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

Update model family handling in getModelFamily function to use official method to determine user selected model #2

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

tspascoal
Copy link
Owner

This pull request includes updates to the package.json file and modifications to the getModelFamily function and its associated tests in src/parrotchathandler.ts and src/test/parrotchathandler.test.ts.

Version Update:

  • package.json: Updated the package version from 0.0.10 to 0.0.11.

Function Refactoring:

  • src/parrotchathandler.ts: Refactored the getModelFamily function to use the vscode.ChatRequest type and updated the logic to check for model instead of userSelectedModel.

Test Suite Improvements:

  • src/test/parrotchathandler.test.ts: Refactored tests for getModelFamily by introducing a getMockedRequest helper function to create mock requests, and updated tests to use this helper function. Removed outdated tests related to userSelectedModel.

Copy link

github-actions bot commented Jan 2, 2025

Tests

20 tests   - 4   20 ✅  - 4   0s ⏱️ ±0s
 7 suites  - 1    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 091ff15. ± Comparison against base commit d498884.

This pull request removes 4 tests.
Returns default model family if user selected model is not present ‑ getModelFamily Test Suite Returns default model family if user selected model is not present
Returns default model family if user selected model is undefined ‑ getModelFamily Test Suite Returns default model family if user selected model is undefined
Returns default model family if userSelectedModel is null ‑ getModelFamily Test Suite Returns default model family if userSelectedModel is null
Returns user selected model family if userSelectedModel.family is a non-empty string ‑ getModelFamily Test Suite Returns user selected model family if userSelectedModel.family is a non-empty string

@tspascoal tspascoal merged commit d37f69e into main Jan 2, 2025
5 checks passed
@tspascoal tspascoal deleted the add-model-selector branch January 2, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant