-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix missing Jina provider in type definitions and UI #6434
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
Conversation
- Add jinaConfigMissing translation to all backend embeddings.json files - Add jinaProvider, jinaApiKeyLabel, jinaApiKeyPlaceholder, and jinaApiKeyRequired translations to all frontend settings.json files - Ensures complete internationalization support for Jina embedding provider feature - All translations verified with check-translations script
…files - Add "jina" to EmbedderProvider type definitions in 5 files - Add Jina model profiles (jina-embeddings-v4, jina-embeddings-v3, jina-clip-v2) - Add Jina case to getDefaultModelId function - Update Zod schema in packages/types to include "jina" - Fixes TypeScript compilation errors for Jina embedding provider
- Add "jina" to EmbedderProvider types in 5 files - Add Jina model profiles to embeddingModels.ts - Add Jina case to getDefaultModelId function - Add "jina" to codebaseIndexModelsSchema in packages/types - Add Jina provider option to CodeIndexPopover UI - Add Jina validation case for form validation Fixes TypeScript compilation errors for Jina embedding provider
| "openAiCompatibleConfigMissing": "एम्बेडर बनाने के लिए OpenAI संगत कॉन्फ़िगरेशन गायब है", | ||
| "geminiConfigMissing": "एम्बेडर बनाने के लिए Gemini कॉन्फ़िगरेशन गायब है", | ||
| "mistralConfigMissing": "एम्बेडर निर्माण के लिए मिस्ट्रल कॉन्फ़िगरेशन गायब है", | ||
| "jinaConfigMissing": "एम्बेडर निर्माण के लिए जीना कॉन्फ़िगरेशन गायब है", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical note: For consistency with other provider names (e.g. 'Gemini', 'Mistral'), consider keeping the provider name in English. So instead of 'जीना कॉन्फ़िगरेशन गायब है', it might be better as 'Jina कॉन्फ़िगरेशन गायब है'.
| "jinaConfigMissing": "एम्बेडर निर्माण के लिए जीना कॉन्फ़िगरेशन गायब है", | |
| "jinaConfigMissing": "एम्बेडर निर्माण के लिए Jina कॉन्फ़िगरेशन गायब है", |
This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! I've reviewed the changes and found several areas that could be improved. The PR successfully adds Jina to type definitions and model profiles, but the UI implementation appears incomplete compared to other providers.
Critical Issues:
-
Missing Jina API key input field - The Jina provider configuration section in CodeIndexPopover.tsx lacks an API key input field, unlike other providers (OpenAI, Gemini, Mistral). This creates an inconsistent user experience.
-
Missing Jina API key field in WebviewMessage interface - The codeIndexSettings interface doesn't include
codebaseIndexJinaApiKeyfield for secret management, while other providers have this field defined. -
Missing API key validation - The validation schema doesn't include API key validation for Jina provider, unlike other providers that require API keys.
Important Suggestions:
4. Missing English translations - The English settings.json file is missing Jina-specific translations (jinaProvider, jinaApiKeyLabel, jinaApiKeyPlaceholder) that are present in other language files.
-
Missing Jina API key in provider schema - The codebaseIndexProviderSchema in packages/types/src/codebase-index.ts defines API key fields for other providers but doesn't include
codebaseIndexJinaApiKey. -
Missing secret handling logic - The secret status handling logic doesn't include Jina API key management, while other providers have this implemented.
The type definitions and model profiles look good, but the UI implementation needs to be completed to match other providers for consistency.
- Add missing Jina provider translations to English base files - Add jinaProvider, jinaApiKeyLabel, jinaApiKeyPlaceholder to settings.json - Add jinaApiKeyRequired validation message to settings.json - Add jinaConfigMissing error message to embeddings.json - Complete missing translations in ca, id, pt-BR, ru, zh-TW locales - All translation checks now pass successfully
|
Closing, this should be added to the PR itself |
This PR completes the Jina embedding provider support by fixing missing type definitions and UI components that were causing TypeScript compilation errors.
Changes Made
Type Definition Fixes
EmbedderProvidertypes in 5 files:src/shared/embeddingModels.tssrc/shared/WebviewMessage.tssrc/services/code-index/interfaces/manager.tssrc/services/code-index/interfaces/embedder.tspackages/types/src/codebase-index.tsModel Profile Support
embeddingModels.ts:jina-embeddings-v4(1024 dimensions, 0.4 score threshold)jina-embeddings-v3(1024 dimensions, 0.4 score threshold)jina-clip-v2(768 dimensions, 0.4 score threshold)getDefaultModelIdfunction (defaults tojina-embeddings-v4)UI Integration
codebaseIndexModelsSchemainpackages/types/src/codebase-index.tsProblem Solved
This PR resolves TypeScript compilation errors that occurred when trying to use the Jina embedding provider. The errors were caused by incomplete type definitions where "jina" was missing from various
EmbedderProviderunion types and related schemas.Testing
Related Issues
Complements PR #6416 (Jina provider implementation) and PR #6417 (Jina translations) by completing the type system integration.
Important
This PR adds missing type definitions and UI components for the Jina embedding provider, resolving TypeScript compilation errors and ensuring full integration.
EmbedderProvidertypes inembeddingModels.ts,WebviewMessage.ts, andmanager.ts.codebase-index.tsto include "jina" incodebaseIndexEmbedderProviderandcodebaseIndexModelsSchema.embeddingModels.tswith specific dimensions and score thresholds.getDefaultModelId().This description was created by
for bc255ef. You can customize this summary. It will automatically update as commits are pushed.