Skip to content

Commit f9e7ba6

Browse files
committed
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 e95e101 commit f9e7ba6

File tree

20 files changed

+89
-19
lines changed

20 files changed

+89
-19
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ describe("CodeIndexConfigManager", () => {
8484
modelId: "text-embedding-3-large",
8585
openAiOptions: { openAiNativeApiKey: "test-openai-key" },
8686
ollamaOptions: { ollamaBaseUrl: "" },
87+
openAiCompatibleOptions: undefined,
88+
geminiOptions: undefined,
89+
lmStudioOptions: { lmStudioBaseUrl: "" },
8790
qdrantUrl: "http://qdrant.local",
8891
qdrantApiKey: "test-qdrant-key",
8992
searchMinScore: 0.4,
@@ -121,7 +124,10 @@ describe("CodeIndexConfigManager", () => {
121124
openAiCompatibleOptions: {
122125
baseUrl: "https://api.example.com/v1",
123126
apiKey: "test-openai-compatible-key",
127+
modelDimension: undefined,
124128
},
129+
geminiOptions: undefined,
130+
lmStudioOptions: { lmStudioBaseUrl: "" },
125131
qdrantUrl: "http://qdrant.local",
126132
qdrantApiKey: "test-qdrant-key",
127133
searchMinScore: 0.4,
@@ -161,6 +167,8 @@ describe("CodeIndexConfigManager", () => {
161167
apiKey: "test-openai-compatible-key",
162168
modelDimension: 1024,
163169
},
170+
geminiOptions: undefined,
171+
lmStudioOptions: { lmStudioBaseUrl: "" },
164172
qdrantUrl: "http://qdrant.local",
165173
qdrantApiKey: "test-qdrant-key",
166174
searchMinScore: 0.4,
@@ -198,7 +206,10 @@ describe("CodeIndexConfigManager", () => {
198206
openAiCompatibleOptions: {
199207
baseUrl: "https://api.example.com/v1",
200208
apiKey: "test-openai-compatible-key",
209+
modelDimension: undefined,
201210
},
211+
geminiOptions: undefined,
212+
lmStudioOptions: { lmStudioBaseUrl: "" },
202213
qdrantUrl: "http://qdrant.local",
203214
qdrantApiKey: "test-qdrant-key",
204215
searchMinScore: 0.4,
@@ -238,6 +249,10 @@ describe("CodeIndexConfigManager", () => {
238249
apiKey: "test-openai-compatible-key",
239250
modelDimension: "invalid-dimension",
240251
},
252+
geminiOptions: undefined,
253+
lmStudioOptions: {
254+
lmStudioBaseUrl: "",
255+
},
241256
qdrantUrl: "http://qdrant.local",
242257
qdrantApiKey: "test-qdrant-key",
243258
searchMinScore: 0.4,
@@ -1158,6 +1173,9 @@ describe("CodeIndexConfigManager", () => {
11581173
modelId: "text-embedding-3-large",
11591174
openAiOptions: { openAiNativeApiKey: "test-openai-key" },
11601175
ollamaOptions: { ollamaBaseUrl: undefined },
1176+
openAiCompatibleOptions: undefined,
1177+
geminiOptions: undefined,
1178+
lmStudioOptions: { lmStudioBaseUrl: undefined },
11611179
qdrantUrl: "http://qdrant.local",
11621180
qdrantApiKey: "test-qdrant-key",
11631181
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
@@ -326,7 +326,7 @@ describe("CodeIndexServiceFactory", () => {
326326
// Assert
327327
expect(MockedCodeIndexLmStudioEmbedder).toHaveBeenCalledWith({
328328
lmStudioBaseUrl: "http://localhost:1234",
329-
lmStudioModelId: testModelId,
329+
embeddingModelId: testModelId,
330330
})
331331
})
332332

@@ -347,7 +347,7 @@ describe("CodeIndexServiceFactory", () => {
347347
// Assert
348348
expect(MockedCodeIndexLmStudioEmbedder).toHaveBeenCalledWith({
349349
lmStudioBaseUrl: "http://localhost:1234",
350-
lmStudioModelId: undefined,
350+
embeddingModelId: undefined,
351351
})
352352
})
353353

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@
100100
"advancedConfigLabel": "Configuració avançada",
101101
"searchMinScoreLabel": "Llindar de puntuació de cerca",
102102
"searchMinScoreDescription": "Puntuació mínima de similitud (0.0-1.0) requerida per als resultats de la cerca. Valors més baixos retornen més resultats però poden ser menys rellevants. Valors més alts retornen menys resultats però més rellevants.",
103-
"searchMinScoreResetTooltip": "Restablir al valor per defecte (0.4)"
103+
"searchMinScoreResetTooltip": "Restablir al valor per defecte (0.4)",
104+
"lmstudioProvider": "LM Studio",
105+
"lmstudioUrlLabel": "LM Studio URL:",
106+
"lmstudioUrlPlaceholder": "http://localhost:1234"
104107
},
105108
"autoApprove": {
106109
"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
@@ -100,7 +100,10 @@
100100
"advancedConfigLabel": "Erweiterte Konfiguration",
101101
"searchMinScoreLabel": "Suchergebnis-Schwellenwert",
102102
"searchMinScoreDescription": "Mindestähnlichkeitswert (0.0-1.0), der für Suchergebnisse erforderlich ist. Niedrigere Werte liefern mehr Ergebnisse, die jedoch möglicherweise weniger relevant sind. Höhere Werte liefern weniger, aber relevantere Ergebnisse.",
103-
"searchMinScoreResetTooltip": "Auf Standardwert zurücksetzen (0.4)"
103+
"searchMinScoreResetTooltip": "Auf Standardwert zurücksetzen (0.4)",
104+
"lmstudioProvider": "LM Studio",
105+
"lmstudioUrlLabel": "LM Studio URL:",
106+
"lmstudioUrlPlaceholder": "http://localhost:1234"
104107
},
105108
"autoApprove": {
106109
"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
@@ -89,6 +89,7 @@
8989
},
9090
"ollamaUrlPlaceholder": "http://localhost:11434",
9191
"openAiCompatibleBaseUrlPlaceholder": "https://api.example.com",
92+
"lmstudioUrlPlaceholder": "http://localhost:1234",
9293
"modelDimensionPlaceholder": "1536",
9394
"qdrantUrlPlaceholder": "http://localhost:6333",
9495
"saveError": "Failed to save settings",

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@
100100
"advancedConfigLabel": "Configuración avanzada",
101101
"searchMinScoreLabel": "Umbral de puntuación de búsqueda",
102102
"searchMinScoreDescription": "Puntuación mínima de similitud (0.0-1.0) requerida para los resultados de búsqueda. Valores más bajos devuelven más resultados pero pueden ser menos relevantes. Valores más altos devuelven menos resultados pero más relevantes.",
103-
"searchMinScoreResetTooltip": "Restablecer al valor predeterminado (0.4)"
103+
"searchMinScoreResetTooltip": "Restablecer al valor predeterminado (0.4)",
104+
"lmstudioProvider": "LM Studio",
105+
"lmstudioUrlLabel": "LM Studio URL:",
106+
"lmstudioUrlPlaceholder": "http://localhost:1234"
104107
},
105108
"autoApprove": {
106109
"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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@
100100
"advancedConfigLabel": "Configuration avancée",
101101
"searchMinScoreLabel": "Seuil de score de recherche",
102102
"searchMinScoreDescription": "Score de similarité minimum (0.0-1.0) requis pour les résultats de recherche. Des valeurs plus faibles renvoient plus de résultats mais peuvent être moins pertinents. Des valeurs plus élevées renvoient moins de résultats mais plus pertinents.",
103-
"searchMinScoreResetTooltip": "Réinitialiser à la valeur par défaut (0.4)"
103+
"searchMinScoreResetTooltip": "Réinitialiser à la valeur par défaut (0.4)",
104+
"lmstudioProvider": "LM Studio",
105+
"lmstudioUrlLabel": "LM Studio URL:",
106+
"lmstudioUrlPlaceholder": "http://localhost:1234"
104107
},
105108
"autoApprove": {
106109
"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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@
100100
"advancedConfigLabel": "उन्नत कॉन्फ़िगरेशन",
101101
"searchMinScoreLabel": "खोज स्कोर थ्रेसहोल्ड",
102102
"searchMinScoreDescription": "खोज परिणामों के लिए आवश्यक न्यूनतम समानता स्कोर (0.0-1.0)। कम मान अधिक परिणाम लौटाते हैं लेकिन कम प्रासंगिक हो सकते हैं। उच्च मान कम लेकिन अधिक प्रासंगिक परिणाम लौटाते हैं।",
103-
"searchMinScoreResetTooltip": "डिफ़ॉल्ट मान पर रीसेट करें (0.4)"
103+
"searchMinScoreResetTooltip": "डिफ़ॉल्ट मान पर रीसेट करें (0.4)",
104+
"lmstudioProvider": "LM Studio",
105+
"lmstudioUrlLabel": "LM Studio URL:",
106+
"lmstudioUrlPlaceholder": "http://localhost:1234"
104107
},
105108
"autoApprove": {
106109
"description": "Roo को अनुमोदन की आवश्यकता के बिना स्वचालित रूप से ऑपरेशन करने की अनुमति दें। इन सेटिंग्स को केवल तभी सक्षम करें जब आप AI पर पूरी तरह से भरोसा करते हों और संबंधित सुरक्षा जोखिमों को समझते हों।",

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@
100100
"advancedConfigLabel": "Konfigurasi Lanjutan",
101101
"searchMinScoreLabel": "Ambang Batas Skor Pencarian",
102102
"searchMinScoreDescription": "Skor kesamaan minimum (0.0-1.0) yang diperlukan untuk hasil pencarian. Nilai yang lebih rendah mengembalikan lebih banyak hasil tetapi mungkin kurang relevan. Nilai yang lebih tinggi mengembalikan lebih sedikit hasil tetapi lebih relevan.",
103-
"searchMinScoreResetTooltip": "Reset ke nilai default (0.4)"
103+
"searchMinScoreResetTooltip": "Reset ke nilai default (0.4)",
104+
"lmstudioProvider": "LM Studio",
105+
"lmstudioUrlLabel": "LM Studio URL:",
106+
"lmstudioUrlPlaceholder": "http://localhost:1234"
104107
},
105108
"autoApprove": {
106109
"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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@
100100
"advancedConfigLabel": "Configurazione avanzata",
101101
"searchMinScoreLabel": "Soglia punteggio di ricerca",
102102
"searchMinScoreDescription": "Punteggio minimo di somiglianza (0.0-1.0) richiesto per i risultati della ricerca. Valori più bassi restituiscono più risultati ma potrebbero essere meno pertinenti. Valori più alti restituiscono meno risultati ma più pertinenti.",
103-
"searchMinScoreResetTooltip": "Ripristina al valore predefinito (0.4)"
103+
"searchMinScoreResetTooltip": "Ripristina al valore predefinito (0.4)",
104+
"lmstudioProvider": "LM Studio",
105+
"lmstudioUrlLabel": "LM Studio URL:",
106+
"lmstudioUrlPlaceholder": "http://localhost:1234"
104107
},
105108
"autoApprove": {
106109
"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)