feat: add Nebius AI support to webview UI and translations

This commit is contained in:
Roo Code 2025-10-10 02:28:43 +00:00
parent f9b208b194
commit 2e46109333
2 changed files with 13 additions and 1 deletions

View file

@ -73,6 +73,7 @@ interface LocalCodeIndexSettings {
codebaseIndexGeminiApiKey?: string
codebaseIndexMistralApiKey?: string
codebaseIndexVercelAiGatewayApiKey?: string
codebaseIndexNebiusApiKey?: string
}
// Validation schema for codebase index settings
@ -194,6 +195,7 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
codebaseIndexGeminiApiKey: "",
codebaseIndexMistralApiKey: "",
codebaseIndexVercelAiGatewayApiKey: "",
codebaseIndexNebiusApiKey: "",
})
// Initial settings state - stores the settings when popover opens
@ -229,6 +231,7 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
codebaseIndexGeminiApiKey: "",
codebaseIndexMistralApiKey: "",
codebaseIndexVercelAiGatewayApiKey: "",
codebaseIndexNebiusApiKey: "",
}
setInitialSettings(settings)
setCurrentSettings(settings)
@ -345,6 +348,9 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
? SECRET_PLACEHOLDER
: ""
}
if (!prev.codebaseIndexNebiusApiKey || prev.codebaseIndexNebiusApiKey === SECRET_PLACEHOLDER) {
updated.codebaseIndexNebiusApiKey = secretStatus.hasNebiusApiKey ? SECRET_PLACEHOLDER : ""
}
return updated
}
@ -418,7 +424,8 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
key === "codebaseIndexOpenAiCompatibleApiKey" ||
key === "codebaseIndexGeminiApiKey" ||
key === "codebaseIndexMistralApiKey" ||
key === "codebaseIndexVercelAiGatewayApiKey"
key === "codebaseIndexVercelAiGatewayApiKey" ||
key === "codebaseIndexNebiusApiKey"
) {
dataToValidate[key] = "placeholder-valid"
}

View file

@ -69,6 +69,10 @@
"vercelAiGatewayProvider": "Vercel AI Gateway",
"vercelAiGatewayApiKeyLabel": "API Key",
"vercelAiGatewayApiKeyPlaceholder": "Enter your Vercel AI Gateway API key",
"nebiusApiKey": "Nebius API Key",
"nebiusApiKeyPlaceholder": "Enter your Nebius API key",
"modelId": "Model ID",
"nebiusModelIdDescription": "Default: Qwen/Qwen3-Embedding-8B (4096 dimensions)",
"openaiCompatibleProvider": "OpenAI Compatible",
"openAiKeyLabel": "OpenAI API Key",
"openAiKeyPlaceholder": "Enter your OpenAI API key",
@ -135,6 +139,7 @@
"geminiApiKeyRequired": "Gemini API key is required",
"mistralApiKeyRequired": "Mistral API key is required",
"vercelAiGatewayApiKeyRequired": "Vercel AI Gateway API key is required",
"nebiusApiKeyRequired": "Nebius API key is required",
"ollamaBaseUrlRequired": "Ollama base URL is required",
"baseUrlRequired": "Base URL is required",
"modelDimensionMinValue": "Model dimension must be greater than 0"