Skip to content

Commit ea3de32

Browse files
MuriloFPdaniel-lxs
authored andcommitted
fix: Add missing LM Studio translations and fix test assertions
- Added missing LM Studio translation keys to all non-English locale files - Fixed test assertions in config-manager.spec.ts to match new config structure - Fixed test assertion in service-factory.spec.ts for LM Studio embedder - All provider options are now always included in config objects (with undefined values when not configured)
1 parent 58804a1 commit ea3de32

File tree

20 files changed

+87
-6
lines changed

20 files changed

+87
-6
lines changed

src/services/code-index/__tests__/config-manager.spec.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ describe("CodeIndexConfigManager", () => {
8282
modelId: "text-embedding-3-large",
8383
openAiOptions: { openAiNativeApiKey: "test-openai-key" },
8484
ollamaOptions: { ollamaBaseUrl: "" },
85+
openAiCompatibleOptions: undefined,
86+
geminiOptions: undefined,
87+
lmStudioOptions: { lmStudioBaseUrl: "" },
8588
qdrantUrl: "http://qdrant.local",
8689
qdrantApiKey: "test-qdrant-key",
8790
searchMinScore: 0.4,
@@ -118,7 +121,10 @@ describe("CodeIndexConfigManager", () => {
118121
openAiCompatibleOptions: {
119122
baseUrl: "https://api.example.com/v1",
120123
apiKey: "test-openai-compatible-key",
124+
modelDimension: undefined,
121125
},
126+
geminiOptions: undefined,
127+
lmStudioOptions: { lmStudioBaseUrl: "" },
122128
qdrantUrl: "http://qdrant.local",
123129
qdrantApiKey: "test-qdrant-key",
124130
searchMinScore: 0.4,
@@ -157,6 +163,8 @@ describe("CodeIndexConfigManager", () => {
157163
baseUrl: "https://api.example.com/v1",
158164
apiKey: "test-openai-compatible-key",
159165
},
166+
geminiOptions: undefined,
167+
lmStudioOptions: { lmStudioBaseUrl: "" },
160168
qdrantUrl: "http://qdrant.local",
161169
qdrantApiKey: "test-qdrant-key",
162170
searchMinScore: 0.4,
@@ -193,8 +201,10 @@ describe("CodeIndexConfigManager", () => {
193201
openAiCompatibleOptions: {
194202
baseUrl: "https://api.example.com/v1",
195203
apiKey: "test-openai-compatible-key",
196-
// modelDimension is undefined when not set
204+
modelDimension: undefined,
197205
},
206+
geminiOptions: undefined,
207+
lmStudioOptions: { lmStudioBaseUrl: "" },
198208
qdrantUrl: "http://qdrant.local",
199209
qdrantApiKey: "test-qdrant-key",
200210
searchMinScore: 0.4,
@@ -234,6 +244,9 @@ describe("CodeIndexConfigManager", () => {
234244
apiKey: "test-openai-compatible-key",
235245
},
236246
geminiOptions: undefined,
247+
lmStudioOptions: {
248+
lmStudioBaseUrl: "",
249+
},
237250
qdrantUrl: "http://qdrant.local",
238251
qdrantApiKey: "test-qdrant-key",
239252
searchMinScore: 0.4,
@@ -1207,8 +1220,9 @@ describe("CodeIndexConfigManager", () => {
12071220
modelId: "text-embedding-3-large",
12081221
openAiOptions: { openAiNativeApiKey: "test-openai-key" },
12091222
ollamaOptions: { ollamaBaseUrl: undefined },
1210-
geminiOptions: undefined,
12111223
openAiCompatibleOptions: undefined,
1224+
geminiOptions: undefined,
1225+
lmStudioOptions: { lmStudioBaseUrl: undefined },
12121226
qdrantUrl: "http://qdrant.local",
12131227
qdrantApiKey: "test-qdrant-key",
12141228
searchMinScore: 0.4,

src/services/code-index/__tests__/service-factory.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ describe("CodeIndexServiceFactory", () => {
320320
// Assert
321321
expect(MockedCodeIndexLmStudioEmbedder).toHaveBeenCalledWith({
322322
lmStudioBaseUrl: "http://localhost:1234",
323-
lmStudioModelId: testModelId,
323+
embeddingModelId: testModelId,
324324
})
325325
})
326326

@@ -341,7 +341,7 @@ describe("CodeIndexServiceFactory", () => {
341341
// Assert
342342
expect(MockedCodeIndexLmStudioEmbedder).toHaveBeenCalledWith({
343343
lmStudioBaseUrl: "http://localhost:1234",
344-
lmStudioModelId: undefined,
344+
embeddingModelId: undefined,
345345
})
346346
})
347347

webview-ui/src/i18n/locales/ca/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@
119119
"searchMinScoreResetTooltip": "Restablir al valor per defecte (0.4)",
120120
"searchMaxResultsLabel": "Màxim de resultats de cerca",
121121
"searchMaxResultsDescription": "Nombre màxim de resultats de cerca a retornar quan es consulta l'índex de la base de codi. Els valors més alts proporcionen més context però poden incloure resultats menys rellevants.",
122-
"resetToDefault": "Restablir al valor per defecte"
122+
"resetToDefault": "Restablir al valor per defecte",
123+
"lmstudioProvider": "LM Studio",
124+
"lmstudioUrlLabel": "LM Studio URL:",
125+
"lmstudioUrlPlaceholder": "http://localhost:1234"
123126
},
124127
"autoApprove": {
125128
"description": "Permet que Roo realitzi operacions automàticament sense requerir aprovació. Activeu aquesta configuració només si confieu plenament en la IA i enteneu els riscos de seguretat associats.",

webview-ui/src/i18n/locales/de/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@
119119
"searchMinScoreResetTooltip": "Auf Standardwert zurücksetzen (0.4)",
120120
"searchMaxResultsLabel": "Maximale Suchergebnisse",
121121
"searchMaxResultsDescription": "Maximale Anzahl von Suchergebnissen, die bei der Abfrage des Codebase-Index zurückgegeben werden. Höhere Werte bieten mehr Kontext, können aber weniger relevante Ergebnisse enthalten.",
122-
"resetToDefault": "Auf Standard zurücksetzen"
122+
"resetToDefault": "Auf Standard zurücksetzen",
123+
"lmstudioProvider": "LM Studio",
124+
"lmstudioUrlLabel": "LM Studio URL:",
125+
"lmstudioUrlPlaceholder": "http://localhost:1234"
123126
},
124127
"autoApprove": {
125128
"description": "Erlaubt Roo, Operationen automatisch ohne Genehmigung durchzuführen. Aktiviere diese Einstellungen nur, wenn du der KI vollständig vertraust und die damit verbundenen Sicherheitsrisiken verstehst.",

webview-ui/src/i18n/locales/en/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
},
9494
"ollamaUrlPlaceholder": "http://localhost:11434",
9595
"openAiCompatibleBaseUrlPlaceholder": "https://api.example.com",
96+
"lmstudioUrlPlaceholder": "http://localhost:1234",
9697
"modelDimensionPlaceholder": "1536",
9798
"qdrantUrlPlaceholder": "http://localhost:6333",
9899
"saveError": "Failed to save settings",

webview-ui/src/i18n/locales/es/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
"searchMaxResultsLabel": "Resultados máximos de búsqueda",
121121
"searchMaxResultsDescription": "Número máximo de resultados de búsqueda a devolver al consultar el índice de código. Valores más altos proporcionan más contexto pero pueden incluir resultados menos relevantes.",
122122
"resetToDefault": "Restablecer al valor predeterminado"
123+
,
124+
"lmstudioProvider": "LM Studio",
125+
"lmstudioUrlLabel": "LM Studio URL:",
126+
"lmstudioUrlPlaceholder": "http://localhost:1234"
123127
},
124128
"autoApprove": {
125129
"description": "Permitir que Roo realice operaciones automáticamente sin requerir aprobación. Habilite esta configuración solo si confía plenamente en la IA y comprende los riesgos de seguridad asociados.",

webview-ui/src/i18n/locales/fr/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
"searchMaxResultsLabel": "Résultats de recherche maximum",
121121
"searchMaxResultsDescription": "Nombre maximum de résultats de recherche à retourner lors de l'interrogation de l'index de code. Des valeurs plus élevées fournissent plus de contexte mais peuvent inclure des résultats moins pertinents.",
122122
"resetToDefault": "Réinitialiser par défaut"
123+
,
124+
"lmstudioProvider": "LM Studio",
125+
"lmstudioUrlLabel": "LM Studio URL:",
126+
"lmstudioUrlPlaceholder": "http://localhost:1234"
123127
},
124128
"autoApprove": {
125129
"description": "Permettre à Roo d'effectuer automatiquement des opérations sans requérir d'approbation. Activez ces paramètres uniquement si vous faites entièrement confiance à l'IA et que vous comprenez les risques de sécurité associés.",

webview-ui/src/i18n/locales/hi/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
"searchMaxResultsLabel": "अधिकतम खोज परिणाम",
121121
"searchMaxResultsDescription": "कोडबेस इंडेक्स को क्वेरी करते समय वापस करने के लिए खोज परिणामों की अधिकतम संख्या। उच्च मान अधिक संदर्भ प्रदान करते हैं लेकिन कम प्रासंगिक परिणाम शामिल कर सकते हैं।",
122122
"resetToDefault": "डिफ़ॉल्ट पर रीसेट करें"
123+
,
124+
"lmstudioProvider": "LM Studio",
125+
"lmstudioUrlLabel": "LM Studio URL:",
126+
"lmstudioUrlPlaceholder": "http://localhost:1234"
123127
},
124128
"autoApprove": {
125129
"description": "Roo को अनुमोदन की आवश्यकता के बिना स्वचालित रूप से ऑपरेशन करने की अनुमति दें। इन सेटिंग्स को केवल तभी सक्षम करें जब आप AI पर पूरी तरह से भरोसा करते हों और संबंधित सुरक्षा जोखिमों को समझते हों।",

webview-ui/src/i18n/locales/id/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
"searchMaxResultsLabel": "Hasil Pencarian Maksimum",
121121
"searchMaxResultsDescription": "Jumlah maksimum hasil pencarian yang dikembalikan saat melakukan query indeks basis kode. Nilai yang lebih tinggi memberikan lebih banyak konteks tetapi mungkin menyertakan hasil yang kurang relevan.",
122122
"resetToDefault": "Reset ke default"
123+
,
124+
"lmstudioProvider": "LM Studio",
125+
"lmstudioUrlLabel": "LM Studio URL:",
126+
"lmstudioUrlPlaceholder": "http://localhost:1234"
123127
},
124128
"autoApprove": {
125129
"description": "Izinkan Roo untuk secara otomatis melakukan operasi tanpa memerlukan persetujuan. Aktifkan pengaturan ini hanya jika kamu sepenuhnya mempercayai AI dan memahami risiko keamanan yang terkait.",

webview-ui/src/i18n/locales/it/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
"searchMaxResultsLabel": "Risultati di ricerca massimi",
121121
"searchMaxResultsDescription": "Numero massimo di risultati di ricerca da restituire quando si interroga l'indice del codice. Valori più alti forniscono più contesto ma possono includere risultati meno pertinenti.",
122122
"resetToDefault": "Ripristina al valore predefinito"
123+
,
124+
"lmstudioProvider": "LM Studio",
125+
"lmstudioUrlLabel": "LM Studio URL:",
126+
"lmstudioUrlPlaceholder": "http://localhost:1234"
123127
},
124128
"autoApprove": {
125129
"description": "Permetti a Roo di eseguire automaticamente operazioni senza richiedere approvazione. Abilita queste impostazioni solo se ti fidi completamente dell'IA e comprendi i rischi di sicurezza associati.",

0 commit comments

Comments
 (0)