From d18b143f41c45b25437efc189f17bab84b880a54 Mon Sep 17 00:00:00 2001 From: "Ton Hoang Nguyen (Bill)" <32552798+HahaBill@users.noreply.github.com> Date: Wed, 9 Jul 2025 22:30:36 +0100 Subject: [PATCH] fix: more changes from the feedback/review from `daniel-lxs` --- .../components/settings/providers/Gemini.tsx | 191 +++++++++--------- webview-ui/src/i18n/locales/ca/settings.json | 5 +- webview-ui/src/i18n/locales/de/settings.json | 5 +- webview-ui/src/i18n/locales/en/settings.json | 5 +- webview-ui/src/i18n/locales/es/settings.json | 5 +- webview-ui/src/i18n/locales/fr/settings.json | 5 +- webview-ui/src/i18n/locales/hi/settings.json | 5 +- webview-ui/src/i18n/locales/id/settings.json | 5 +- webview-ui/src/i18n/locales/it/settings.json | 5 +- webview-ui/src/i18n/locales/ja/settings.json | 5 +- webview-ui/src/i18n/locales/ko/settings.json | 5 +- webview-ui/src/i18n/locales/nl/settings.json | 5 +- webview-ui/src/i18n/locales/pl/settings.json | 5 +- .../src/i18n/locales/pt-BR/settings.json | 5 +- webview-ui/src/i18n/locales/ru/settings.json | 5 +- webview-ui/src/i18n/locales/tr/settings.json | 5 +- webview-ui/src/i18n/locales/vi/settings.json | 5 +- .../src/i18n/locales/zh-CN/settings.json | 5 +- .../src/i18n/locales/zh-TW/settings.json | 5 +- 19 files changed, 133 insertions(+), 148 deletions(-) diff --git a/webview-ui/src/components/settings/providers/Gemini.tsx b/webview-ui/src/components/settings/providers/Gemini.tsx index 13243dab4c..05d083e381 100644 --- a/webview-ui/src/components/settings/providers/Gemini.tsx +++ b/webview-ui/src/components/settings/providers/Gemini.tsx @@ -85,12 +85,9 @@ export const Gemini = ({ apiConfiguration, setApiConfigurationField, currentMode className="w-full mt-1" /> )} - - -
-

{t("settings:providers.geminiSections.tools")}

setApiConfigurationField("enableUrlContext", checked)}> @@ -109,104 +106,110 @@ export const Gemini = ({ apiConfiguration, setApiConfigurationField, currentMode
{t("settings:providers.geminiParameters.groundingSearch.description")}
-
-
- - -
-
-

- {t("settings:providers.geminiSections.modelParameters.title")} -

-

- {t("settings:providers.geminiSections.modelParameters.description")} -

-
- -
-
- -
- -
- setApiConfigurationField("topP", values[0])} - className="flex-grow" +
+ + +
+
+

+ {t("settings:providers.geminiSections.modelParameters.title")} +

+

+ {t("settings:providers.geminiSections.modelParameters.description")} +

+
+ - {(apiConfiguration.topP ?? 0.95).toFixed(2)}
-
- {t("settings:providers.geminiParameters.topP.description")} + + +
+ +
+ + setApiConfigurationField("topP", values[0]) + } + className="flex-grow" + /> + + {(apiConfiguration.topP ?? 0.95).toFixed(2)} + +
+
+ {t("settings:providers.geminiParameters.topP.description")} +
-
-
- -
- setApiConfigurationField("topK", values[0])} - className="flex-grow" - /> - {apiConfiguration.topK ?? 64} +
+ +
+ + setApiConfigurationField("topK", values[0]) + } + className="flex-grow" + /> + {apiConfiguration.topK ?? 64} +
+
+ {t("settings:providers.geminiParameters.topK.description")} +
-
- {t("settings:providers.geminiParameters.topK.description")} -
-
-
- -
- - setApiConfigurationField("maxOutputTokens", values[0]) - } - className="flex-grow" - /> - { - const val = parseInt((e as any).target.value, 10) - return Number.isNaN(val) ? 0 : Math.min(val, modelInfo.maxTokens) - })} - className="w-16" - /> +
+ +
+ + setApiConfigurationField("maxOutputTokens", values[0]) + } + className="flex-grow" + /> + { + const val = parseInt((e as any).target.value, 10) + return Number.isNaN(val) ? 0 : Math.min(val, modelInfo.maxTokens) + })} + className="w-16" + /> +
+
+ {t("settings:providers.geminiParameters.maxOutputTokens.description")}_{" "} +
-
- {t("settings:providers.geminiParameters.maxOutputTokens.description")}_{" "} -
-
- - + + +
) diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json index f5bea43246..e4bebe3dc8 100644 --- a/webview-ui/src/i18n/locales/ca/settings.json +++ b/webview-ui/src/i18n/locales/ca/settings.json @@ -304,10 +304,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Paràmetres del model", + "title": "Configuració avançada", "description": "Ajusta la temperatura, top-p i altres paràmetres avançats." - }, - "tools": "Eines" + } }, "googleCloudSetup": { "title": "Per utilitzar Google Cloud Vertex AI, necessiteu:", diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json index a337dce074..c5d362598a 100644 --- a/webview-ui/src/i18n/locales/de/settings.json +++ b/webview-ui/src/i18n/locales/de/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Modellparameter", + "title": "Erweiterte Einstellungen", "description": "Feinabstimmung von Temperatur, Top-P und anderen erweiterten Einstellungen." - }, - "tools": "Werkzeuge" + } }, "googleCloudSetup": { "title": "Um Google Cloud Vertex AI zu verwenden, müssen Sie:", diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 491f89184f..91cce5dccd 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -278,10 +278,9 @@ "vscodeLmWarning": "Note: This is a very experimental integration and provider support will vary. If you get an error about a model not being supported, that's an issue on the provider's end.", "geminiSections": { "modelParameters": { - "title": "Model Parameters", + "title": "Advanced Settings", "description": "Fine-tune topP, topK and maxOutputTokens" - }, - "tools": "Tools" + } }, "geminiParameters": { "topK": { diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json index 3b7e522784..0ee11ef249 100644 --- a/webview-ui/src/i18n/locales/es/settings.json +++ b/webview-ui/src/i18n/locales/es/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Parámetros del modelo", + "title": "Configuración avanzada", "description": "Ajusta la temperatura, top-p y otros parámetros avanzados." - }, - "tools": "Herramientas" + } }, "googleCloudSetup": { "title": "Para usar Google Cloud Vertex AI, necesita:", diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json index 525a7866ec..44944833b4 100644 --- a/webview-ui/src/i18n/locales/fr/settings.json +++ b/webview-ui/src/i18n/locales/fr/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Paramètres du modèle", + "title": "Paramètres avancés", "description": "Ajustez la température, top-p et d'autres paramètres avancés." - }, - "tools": "Outils" + } }, "googleCloudSetup": { "title": "Pour utiliser Google Cloud Vertex AI, vous devez :", diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json index 2ac60df5a9..dc78cb147f 100644 --- a/webview-ui/src/i18n/locales/hi/settings.json +++ b/webview-ui/src/i18n/locales/hi/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "मॉडल पैरामीटर", + "title": "उन्नत सेटिंग्स", "description": "टेम्परेचर, टॉप-पी और अन्य उन्नत सेटिंग्स को फाइन-ट्यून करें।" - }, - "tools": "उपकरण" + } }, "googleCloudSetup": { "title": "Google Cloud Vertex AI का उपयोग करने के लिए, आपको आवश्यकता है:", diff --git a/webview-ui/src/i18n/locales/id/settings.json b/webview-ui/src/i18n/locales/id/settings.json index 78572f30de..117fab0df9 100644 --- a/webview-ui/src/i18n/locales/id/settings.json +++ b/webview-ui/src/i18n/locales/id/settings.json @@ -304,10 +304,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Parameter Model", + "title": "Pengaturan Lanjutan", "description": "Menyesuaikan suhu, top-p, dan pengaturan lanjutan lainnya." - }, - "tools": "Alat" + } }, "googleCloudSetup": { "title": "Untuk menggunakan Google Cloud Vertex AI, kamu perlu:", diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json index b40ef2a059..b8e4934ee2 100644 --- a/webview-ui/src/i18n/locales/it/settings.json +++ b/webview-ui/src/i18n/locales/it/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Parametri del modello", + "title": "Impostazioni avanzate", "description": "Regola la temperatura, top-p e altre impostazioni avanzate." - }, - "tools": "Strumenti" + } }, "googleCloudSetup": { "title": "Per utilizzare Google Cloud Vertex AI, è necessario:", diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json index 9568ff624b..55d31147f7 100644 --- a/webview-ui/src/i18n/locales/ja/settings.json +++ b/webview-ui/src/i18n/locales/ja/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "モデルパラメータ", + "title": "詳細設定", "description": "温度、top-p、およびその他の詳細設定を調整します。" - }, - "tools": "ツール" + } }, "googleCloudSetup": { "title": "Google Cloud Vertex AIを使用するには:", diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json index dd18394e74..167c42e78e 100644 --- a/webview-ui/src/i18n/locales/ko/settings.json +++ b/webview-ui/src/i18n/locales/ko/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "모델 매개변수", + "title": "고급 설정", "description": "온도, top-p 및 기타 고급 설정을 조정합니다." - }, - "tools": "도구" + } }, "googleCloudSetup": { "title": "Google Cloud Vertex AI를 사용하려면:", diff --git a/webview-ui/src/i18n/locales/nl/settings.json b/webview-ui/src/i18n/locales/nl/settings.json index c310f03b01..70f8ede8c7 100644 --- a/webview-ui/src/i18n/locales/nl/settings.json +++ b/webview-ui/src/i18n/locales/nl/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Modelparameters", + "title": "Geavanceerde instellingen", "description": "Pas de temperatuur, top-p en andere geavanceerde instellingen aan." - }, - "tools": "Gereedschap" + } }, "googleCloudSetup": { "title": "Om Google Cloud Vertex AI te gebruiken, moet je:", diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json index 3e879138d3..9b483a93fc 100644 --- a/webview-ui/src/i18n/locales/pl/settings.json +++ b/webview-ui/src/i18n/locales/pl/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Parametry modelu", + "title": "Ustawienia zaawansowane", "description": "Dostosuj temperaturę, top-p i inne zaawansowane ustawienia." - }, - "tools": "Narzędzia" + } }, "googleCloudSetup": { "title": "Aby korzystać z Google Cloud Vertex AI, potrzebujesz:", diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json index f3ed8d0d95..c682543da3 100644 --- a/webview-ui/src/i18n/locales/pt-BR/settings.json +++ b/webview-ui/src/i18n/locales/pt-BR/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Parâmetros do modelo", + "title": "Configurações Avançadas", "description": "Ajuste a temperatura, top-p e outras configurações avançadas." - }, - "tools": "Ferramentas" + } }, "googleCloudSetup": { "title": "Para usar o Google Cloud Vertex AI, você precisa:", diff --git a/webview-ui/src/i18n/locales/ru/settings.json b/webview-ui/src/i18n/locales/ru/settings.json index 6d8646efb9..cecb2da747 100644 --- a/webview-ui/src/i18n/locales/ru/settings.json +++ b/webview-ui/src/i18n/locales/ru/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Параметры модели", + "title": "Расширенные настройки", "description": "Настройте температуру, top-p и другие расширенные параметры." - }, - "tools": "Инструменты" + } }, "googleCloudSetup": { "title": "Для использования Google Cloud Vertex AI необходимо:", diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json index a5565d00e6..303fe94c52 100644 --- a/webview-ui/src/i18n/locales/tr/settings.json +++ b/webview-ui/src/i18n/locales/tr/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Model Parametreleri", + "title": "Gelişmiş Ayarlar", "description": "Sıcaklık, top-p ve diğer gelişmiş ayarları yapın." - }, - "tools": "Araçlar" + } }, "googleCloudSetup": { "title": "Google Cloud Vertex AI'yi kullanmak için şunları yapmanız gerekir:", diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json index cc673c3897..52dd0e00a2 100644 --- a/webview-ui/src/i18n/locales/vi/settings.json +++ b/webview-ui/src/i18n/locales/vi/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "Tham số mô hình", + "title": "Cài đặt nâng cao", "description": "Điều chỉnh nhiệt độ, top-p và các cài đặt nâng cao khác." - }, - "tools": "Công cụ" + } }, "googleCloudSetup": { "title": "Để sử dụng Google Cloud Vertex AI, bạn cần:", diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index b516caebe0..5fb49d9a5a 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "模型参数", + "title": "高级设置", "description": "调整温度、top-p 和其他高级设置。" - }, - "tools": "工具" + } }, "googleCloudSetup": { "title": "要使用 Google Cloud Vertex AI,您需要:", diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index 9775bf9908..56eb8f5644 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -300,10 +300,9 @@ }, "geminiSections": { "modelParameters": { - "title": "模型參數", + "title": "進階設定", "description": "調整溫度、top-p 和其他進階設定。" - }, - "tools": "工具" + } }, "googleCloudSetup": { "title": "要使用 Google Cloud Vertex AI,您需要:",