Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple fixes for ModelList/Download #3034

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

Commits on Oct 3, 2024

  1. Revert "modellist: work around filtered item models getting out of sy…

    …nc (#2545)"
    
    This is what caused regression seen in issue #2943
    
    This reverts commit 30692a2.
    
    Signed-off-by: Adam Treat <[email protected]>
    manyoso committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    158f9b9 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. fix double semicolons

    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    6cde7cb View commit details
    Browse the repository at this point in the history
  2. modellist: prefer const iterators to avoid detach

    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    d3840fb View commit details
    Browse the repository at this point in the history
  3. do not connect layoutChanged to countChanged

    layoutChanged is only used when the *order* changes. When rows are
    inserted or removed, one of the other three signals is fired.
    
    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    45120d4 View commit details
    Browse the repository at this point in the history
  4. modellist: fix missing #include

    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    3dea7e2 View commit details
    Browse the repository at this point in the history
  5. modellist: assert that update functions are called from main thread

    The locking strategy used by ModelList assumes that only one thread will
    be trying to update the model list at a time, as writes cannot be
    implemented in a fully threadsafe manner.
    
    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    d0158d2 View commit details
    Browse the repository at this point in the history
  6. mysettings: eraseModel only needs an id

    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    9ec0f92 View commit details
    Browse the repository at this point in the history
  7. modellist: reduce updateData indent

    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    62186a0 View commit details
    Browse the repository at this point in the history
  8. modellist: emit layoutChanged when sorting, but not otherwise

    Also, hint to layoutChanged about the specific way in which the model
    was sorted.
    
    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    348c051 View commit details
    Browse the repository at this point in the history
  9. modellist: emit dataChanged on the correct index

    dataChanged will not work correctly if we emit it on an old index after
    sorting.
    
    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    3cfcb2a View commit details
    Browse the repository at this point in the history
  10. modellist: fix removal and improve locking

    There were issues with removing clones or models with clones from the
    model page, as well as trying to remove a model that no longer exists on
    disk, despite being in settings. These should now be resolved.
    
    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    291b4bf View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2024

  1. modellist: provide a path property for convenience

    This should always be used instead of joining the current model path
    setting with the filename, as models may be in subdirectories. But
    fixing this correctly is not in scope for this PR.
    
    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    f814336 View commit details
    Browse the repository at this point in the history
  2. fix removal of models in subdirectories

    removeModel is starting to make sense now.
    
    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    8a64b03 View commit details
    Browse the repository at this point in the history
  3. modellist: fix models.json cache location

    - The filename must have a version number, or we will possibly load the
      cache for the wrong version of GPT4All.
    - The file should be stored in an appropriate folder for cache, not in the
      settings location.
    
    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    1cbea10 View commit details
    Browse the repository at this point in the history
  4. changelog: add this PR

    Signed-off-by: Jared Van Bortel <[email protected]>
    cebtenzzre committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    4e8b82c View commit details
    Browse the repository at this point in the history