Skip to content

Conversation

@louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Jul 23, 2025

Describe Your Changes

This PR is to add back missing function where users can input HF repository ID in Hub search box to download GGUF models.

This is a part of cortex deprecation where we don't add source to cortex for this action but just fetch directly the repo information.

CleanShot.2025-07-23.at.21.46.32.mp4

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Important

Reintroduces HF repository ID search in Hub for direct GGUF model downloads, updating useModelSources and adding fetchHuggingFaceRepo function with corresponding tests.

  • Behavior:
    • Reintroduces HF repository ID search in Hub to download GGUF models directly.
    • Updates Hub component to fetch and display HF repository data.
    • Adds fetchHuggingFaceRepo function in models.ts to retrieve HF repo data.
  • Hooks:
    • Modifies useModelSources in useModelSources.ts to handle CatalogModel instead of strings.
    • Updates tests in useModelSources.test.ts to reflect new addSource behavior.
  • Tests:
    • Adds huggingface-conversion.test.ts to test conversion of HF repo data to CatalogModel.
    • Updates models.test.ts to include tests for fetchHuggingFaceRepo.
  • Misc:
    • Adds HuggingFaceRepo interface to models.ts for type safety.
    • Updates index.tsx in routes/hub to integrate HF repo search and display.

This description was created by Ellipsis for 88ff20a. You can customize this summary. It will automatically update as commits are pushed.

@louis-jan louis-jan force-pushed the fix/bring-back-HF-repo-search branch from 27dc433 to fcf5960 Compare July 23, 2025 14:59
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 88ff20a in 1 minute and 59 seconds. Click for details.
  • Reviewed 787 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 7 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/hooks/__tests__/useModelSources.test.ts:237
  • Draft comment:
    Good update: the tests now assert state changes for addSource using CatalogModel objects instead of relying on console.log.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. web-app/src/routes/hub/__tests__/huggingface-conversion.test.ts:4
  • Draft comment:
    Comprehensive tests for the conversion logic; consider extracting convertHfRepoToCatalogModel into a shared utility module to avoid duplicating the logic in the component.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. web-app/src/routes/hub/index.tsx:103
  • Draft comment:
    Using a case‐insensitive regex to remove the file extension is a solid improvement over a plain string replace.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. web-app/src/routes/hub/index.tsx:86
  • Draft comment:
    The conversion logic here is duplicated from the tests; consider extracting it to a shared helper to improve maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. web-app/src/routes/hub/index.tsx:139
  • Draft comment:
    Consider using a debouncing utility instead of manual setTimeouts for handling repo search updates, to simplify the logic.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
6. web-app/src/routes/hub/index.tsx:516
  • Draft comment:
    The global constant IS_LINUX is used for disabling the overlay. Ensure it is defined or imported to avoid runtime issues.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. web-app/src/services/__tests__/models.test.ts:277
  • Draft comment:
    FetchHuggingFaceRepo tests are thorough, covering various input formats and error scenarios. Nice job!
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_R4OMsjiYLLhfk9cK

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@louis-jan louis-jan merged commit 6599d91 into release/v0.6.6 Jul 24, 2025
19 of 20 checks passed
@louis-jan louis-jan deleted the fix/bring-back-HF-repo-search branch July 24, 2025 02:46
@github-project-automation github-project-automation bot moved this to QA in Jan Jul 24, 2025
@github-actions github-actions bot added this to the v0.6.6 milestone Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants