-
Notifications
You must be signed in to change notification settings - Fork 2.6k
refactor: remove legacy codebaseIndexOpenAiCompatibleModelDimension property #5459
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
✅ No security or compliance issues detected. Reviewed everything up to 167a9e8. Security Overview
Detected Code Changes
Reply to this PR with |
…roperty - Remove backward compatibility for codebaseIndexOpenAiCompatibleModelDimension - Standardize on generic codebaseIndexEmbedderModelDimension property - Remove migration logic from config-manager.ts - Update WebviewMessage interface to remove legacy property - Clean up webviewMessageHandler to only set generic property - Update UI component to remove legacy property handling - Improve UI logic to only show dimension field for OpenAI-compatible providers - Update all related tests to use generic property This simplifies the codebase by removing technical debt from the old provider-specific dimension property naming convention.
… fix test expectations - Added validation in config-manager.ts to ensure codebaseIndexEmbedderModelDimension is a valid positive number - Fixed error message formatting in service-factory.ts to include bold/underline formatting for 'OpenAI-Compatible' - Updated tests to use config.modelDimension instead of openAiCompatibleOptions.modelDimension - Added check for vectorSize <= 0 in addition to undefined check
- Fixed failing test that expected invalid modelDimension to be preserved - Implementation correctly converts invalid dimension values to undefined - Added missing geminiOptions field to expected test output
… ANSI escape codes - Replace hardcoded error strings with translation function calls - Remove ANSI escape codes from error messages as they don't render properly in all contexts - Add translations for all 17 supported languages - Addresses PR review feedback about error message formatting
1aefdb6 to
1ca4b5a
Compare
- Fixed missing closing braces in validation sections - Ensured proper JSON structure across all language files - All translation checks now pass
…ad of hardcoded messages
- Japanese: Use consistent term '埋め込み次元' (embedding dimension) instead of mixing with 'ベクター次元' (vector dimension) - Turkish: Fix grammatical error by changing 'yapılandırma' to 'yapılandırması' (possessive form)
mrubens
approved these changes
Jul 8, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
lgtm
This PR has been approved by a maintainer
PR - Draft / In Progress
size:L
This PR changes 100-499 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is blocking #3999
This PR removes the legacy
codebaseIndexOpenAiCompatibleModelDimensionproperty and standardizes on the genericcodebaseIndexEmbedderModelDimensionproperty throughout the codebase.Changes Made
1. Backend Configuration (
src/services/code-index/config-manager.ts):getConfig()method to only use the generic property2. Message Types (
src/shared/WebviewMessage.ts):codebaseIndexOpenAiCompatibleModelDimensionproperty from theCodeIndexSettingsinterfacecodebaseIndexEmbedderModelDimensionproperty3. Webview Message Handler (
src/core/webview/webviewMessageHandler.ts):codebaseIndexEmbedderModelDimensionproperty4. UI Component (
webview-ui/src/components/chat/CodeIndexPopover.tsx):5. Test Files:
src/core/config/__tests__/importExport.spec.tsTesting
Verification
The codebase now consistently uses only
codebaseIndexEmbedderModelDimensionfor all providers, eliminating the technical debt from the old provider-specific naming convention.Benefits
Important
Refactor to remove legacy
codebaseIndexOpenAiCompatibleModelDimensionand standardize oncodebaseIndexEmbedderModelDimensionacross the codebase.codebaseIndexOpenAiCompatibleModelDimensionfromconfig-manager.ts.codebaseIndexEmbedderModelDimensionfor all providers.WebviewMessage.tsto usecodebaseIndexEmbedderModelDimension.CodeIndexPopover.tsxto usecodebaseIndexEmbedderModelDimension.config-manager.spec.tsandservice-factory.spec.tsto reflect property changes.This description was created by
for 167a9e8. You can customize this summary. It will automatically update as commits are pushed.