Skip to content

Conversation

@louis-jan
Copy link
Contributor

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

Describe Your Changes

This PR migrates cortex models to the new llama.cpp extension and adds comprehensive test coverage for the migration functionality.

  • Cortex models from previous versions (it's quite buggy since it does not scan models folder but retrieve from cortex.db)
CleanShot 2025-07-21 at 10 57 59@2x
  • After updated, it could see both imported and downloaded models from hub (from previous version and current version)
CleanShot 2025-07-21 at 14 51 08@2x

Changes

  • Migration Implementation: Added automatic migration logic for cortex models to the llama.cpp extension format in extensions/llamacpp-extension/src/index.ts
  • Extension Integration: Updated conversational extension to work with the new llama.cpp extension structure
  • Test Coverage: Added extensive test suite including:
    • Migration tests for legacy cortex models
    • Updated backend and index tests
    • Enhanced utility function tests
    • Improved test setup configuration

Test Plan

  • ✅ All existing tests pass
  • ✅ New migration tests cover legacy cortex model scenarios
  • ✅ Backend integration tests updated for new extension structure

Important

Migrates cortex models to llamacpp extension, updates conversational extension, and enhances test coverage.

  • Migration:
    • Added migrateLegacyModels() in llamacpp-extension/src/index.ts to migrate cortex models to llamacpp format.
    • Updates list() in llamacpp-extension/src/index.ts to call migrateLegacyModels().
  • Conversational Extension:
    • Renames CortexConversationalExtension to JanConversationalExtension in conversational-extension/src/index.ts.
  • Testing:
    • Adds migrateLegacyModels.test.ts for testing migration logic.
    • Updates backend.test.ts, index.test.ts, and util.test.ts for enhanced coverage.
    • Mocks added in setup.ts for consistent test environment.

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

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.

Caution

Changes requested ❌

Reviewed everything up to 162205a in 3 minutes and 12 seconds. Click for details.
  • Reviewed 1000 lines of code in 8 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 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. extensions/llamacpp-extension/src/index.ts:560
  • Draft comment:
    Use the full child path (childPath) instead of just 'child' when pushing into the DFS stack. This ensures proper directory traversal for subsequent fs operations.
  • 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.
2. extensions/llamacpp-extension/src/index.ts:546
  • Draft comment:
    Review the modelId extraction using slice() – it can yield an empty string if the currentDir exactly matches the models base path. Consider a more robust method to generate non-empty model IDs.
  • 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.
3. extensions/llamacpp-extension/src/util.ts:65
  • Draft comment:
    Be cautious when logging proxy configuration details. Although only a boolean flag for authentication is logged, ensure that sensitive details (like credentials) are not inadvertently exposed in production logs.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 20% <= threshold 50% The comment is advising caution about logging sensitive information, which is a valid concern in software development. However, it is phrased in a way that asks the author to ensure something, which violates the rule against asking the author to ensure behavior is intended or tested. Therefore, this comment should be removed.

Workflow ID: wflow_IIoMKOjRuxdX597J

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 21, 2025

Barecheck - Code coverage report

Total: 35.15%

Your code coverage diff: -0.01% ▾

✅ All code changes are covered

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 876d3b6 in 53 seconds. Click for details.
  • Reviewed 12 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 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. extensions/llamacpp-extension/src/index.ts:30
  • Draft comment:
    Remove duplicate import of 'basename' from '@tauri-apps/api/path'.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_3LzEb0Yt3t0xi9A1

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

Copy link
Contributor

@qnixsynapse qnixsynapse left a comment

Choose a reason for hiding this comment

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

LGTM so far now

@louis-jan louis-jan merged commit fe95031 into release/v0.6.6 Jul 22, 2025
58 of 62 checks passed
@louis-jan louis-jan deleted the feat/migrate-cortex-models-to-llamacpp-extension branch July 22, 2025 16:35
@github-project-automation github-project-automation bot moved this to QA in Jan Jul 22, 2025
@github-actions github-actions bot added this to the v0.6.6 milestone Jul 22, 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