From 026a3e10592e189bc4823dcc367246882d95ffff Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Thu, 1 May 2025 13:09:08 -0400 Subject: [PATCH] Show 'None' when a mode has no tool groups (#3095) --- webview-ui/src/components/prompts/PromptsView.tsx | 6 ++++++ webview-ui/src/i18n/locales/ca/prompts.json | 3 ++- webview-ui/src/i18n/locales/de/prompts.json | 3 ++- webview-ui/src/i18n/locales/en/prompts.json | 3 ++- webview-ui/src/i18n/locales/es/prompts.json | 3 ++- webview-ui/src/i18n/locales/fr/prompts.json | 3 ++- webview-ui/src/i18n/locales/hi/prompts.json | 3 ++- webview-ui/src/i18n/locales/it/prompts.json | 3 ++- webview-ui/src/i18n/locales/ja/prompts.json | 3 ++- webview-ui/src/i18n/locales/ko/prompts.json | 3 ++- webview-ui/src/i18n/locales/pl/prompts.json | 3 ++- webview-ui/src/i18n/locales/pt-BR/prompts.json | 3 ++- webview-ui/src/i18n/locales/ru/prompts.json | 3 ++- webview-ui/src/i18n/locales/tr/prompts.json | 3 ++- webview-ui/src/i18n/locales/vi/prompts.json | 3 ++- webview-ui/src/i18n/locales/zh-CN/prompts.json | 3 ++- webview-ui/src/i18n/locales/zh-TW/prompts.json | 3 ++- 17 files changed, 38 insertions(+), 16 deletions(-) diff --git a/webview-ui/src/components/prompts/PromptsView.tsx b/webview-ui/src/components/prompts/PromptsView.tsx index 9eecb1e6ed..4c84416a2c 100644 --- a/webview-ui/src/components/prompts/PromptsView.tsx +++ b/webview-ui/src/components/prompts/PromptsView.tsx @@ -696,6 +696,12 @@ const PromptsView = ({ onDone }: PromptsViewProps) => { {(() => { const currentMode = getCurrentMode() const enabledGroups = currentMode?.groups || [] + + // If there are no enabled groups, display translated "None" + if (enabledGroups.length === 0) { + return t("prompts:tools.noTools") + } + return enabledGroups .map((group) => { const groupName = getGroupName(group) diff --git a/webview-ui/src/i18n/locales/ca/prompts.json b/webview-ui/src/i18n/locales/ca/prompts.json index 0acb8d5d06..d37e862942 100644 --- a/webview-ui/src/i18n/locales/ca/prompts.json +++ b/webview-ui/src/i18n/locales/ca/prompts.json @@ -25,7 +25,8 @@ "browser": "Utilitzar navegador", "command": "Executar comandes", "mcp": "Utilitzar MCP" - } + }, + "noTools": "Cap" }, "roleDefinition": { "title": "Definició de rol", diff --git a/webview-ui/src/i18n/locales/de/prompts.json b/webview-ui/src/i18n/locales/de/prompts.json index 55e8440c51..7d0a19ec47 100644 --- a/webview-ui/src/i18n/locales/de/prompts.json +++ b/webview-ui/src/i18n/locales/de/prompts.json @@ -25,7 +25,8 @@ "browser": "Browser verwenden", "command": "Befehle ausführen", "mcp": "MCP verwenden" - } + }, + "noTools": "Keine" }, "roleDefinition": { "title": "Rollendefinition", diff --git a/webview-ui/src/i18n/locales/en/prompts.json b/webview-ui/src/i18n/locales/en/prompts.json index ba836a7012..ce567a4869 100644 --- a/webview-ui/src/i18n/locales/en/prompts.json +++ b/webview-ui/src/i18n/locales/en/prompts.json @@ -25,7 +25,8 @@ "browser": "Use Browser", "command": "Run Commands", "mcp": "Use MCP" - } + }, + "noTools": "None" }, "roleDefinition": { "title": "Role Definition", diff --git a/webview-ui/src/i18n/locales/es/prompts.json b/webview-ui/src/i18n/locales/es/prompts.json index e93835edf4..3c6b052639 100644 --- a/webview-ui/src/i18n/locales/es/prompts.json +++ b/webview-ui/src/i18n/locales/es/prompts.json @@ -25,7 +25,8 @@ "browser": "Usar navegador", "command": "Ejecutar comandos", "mcp": "Usar MCP" - } + }, + "noTools": "Ninguna" }, "roleDefinition": { "title": "Definición de rol", diff --git a/webview-ui/src/i18n/locales/fr/prompts.json b/webview-ui/src/i18n/locales/fr/prompts.json index 1d5b871d62..b746bd8311 100644 --- a/webview-ui/src/i18n/locales/fr/prompts.json +++ b/webview-ui/src/i18n/locales/fr/prompts.json @@ -25,7 +25,8 @@ "browser": "Utiliser le navigateur", "command": "Exécuter des commandes", "mcp": "Utiliser MCP" - } + }, + "noTools": "Aucun" }, "roleDefinition": { "title": "Définition du rôle", diff --git a/webview-ui/src/i18n/locales/hi/prompts.json b/webview-ui/src/i18n/locales/hi/prompts.json index e30f04c664..d5291a577c 100644 --- a/webview-ui/src/i18n/locales/hi/prompts.json +++ b/webview-ui/src/i18n/locales/hi/prompts.json @@ -25,7 +25,8 @@ "browser": "ब्राउज़र का उपयोग करें", "command": "कमांड्स चलाएँ", "mcp": "MCP का उपयोग करें" - } + }, + "noTools": "कोई नहीं" }, "roleDefinition": { "title": "भूमिका परिभाषा", diff --git a/webview-ui/src/i18n/locales/it/prompts.json b/webview-ui/src/i18n/locales/it/prompts.json index cfb35f150c..81bb7534de 100644 --- a/webview-ui/src/i18n/locales/it/prompts.json +++ b/webview-ui/src/i18n/locales/it/prompts.json @@ -25,7 +25,8 @@ "browser": "Usa browser", "command": "Esegui comandi", "mcp": "Usa MCP" - } + }, + "noTools": "Nessuno" }, "roleDefinition": { "title": "Definizione del ruolo", diff --git a/webview-ui/src/i18n/locales/ja/prompts.json b/webview-ui/src/i18n/locales/ja/prompts.json index 8f18095a12..16f30a2ebc 100644 --- a/webview-ui/src/i18n/locales/ja/prompts.json +++ b/webview-ui/src/i18n/locales/ja/prompts.json @@ -25,7 +25,8 @@ "browser": "ブラウザを使用", "command": "コマンドを実行", "mcp": "MCP を使用" - } + }, + "noTools": "なし" }, "roleDefinition": { "title": "役割の定義", diff --git a/webview-ui/src/i18n/locales/ko/prompts.json b/webview-ui/src/i18n/locales/ko/prompts.json index 7ce93e8be0..5942105f05 100644 --- a/webview-ui/src/i18n/locales/ko/prompts.json +++ b/webview-ui/src/i18n/locales/ko/prompts.json @@ -25,7 +25,8 @@ "browser": "브라우저 사용", "command": "명령 실행", "mcp": "MCP 사용" - } + }, + "noTools": "없음" }, "roleDefinition": { "title": "역할 정의", diff --git a/webview-ui/src/i18n/locales/pl/prompts.json b/webview-ui/src/i18n/locales/pl/prompts.json index 459b206919..ef8a5ffe08 100644 --- a/webview-ui/src/i18n/locales/pl/prompts.json +++ b/webview-ui/src/i18n/locales/pl/prompts.json @@ -25,7 +25,8 @@ "browser": "Używaj przeglądarki", "command": "Uruchamiaj polecenia", "mcp": "Używaj MCP" - } + }, + "noTools": "Brak" }, "roleDefinition": { "title": "Definicja roli", diff --git a/webview-ui/src/i18n/locales/pt-BR/prompts.json b/webview-ui/src/i18n/locales/pt-BR/prompts.json index 50c3852b15..f255b91a27 100644 --- a/webview-ui/src/i18n/locales/pt-BR/prompts.json +++ b/webview-ui/src/i18n/locales/pt-BR/prompts.json @@ -25,7 +25,8 @@ "browser": "Usar navegador", "command": "Executar comandos", "mcp": "Usar MCP" - } + }, + "noTools": "Nenhuma" }, "roleDefinition": { "title": "Definição de função", diff --git a/webview-ui/src/i18n/locales/ru/prompts.json b/webview-ui/src/i18n/locales/ru/prompts.json index 28778498e0..0ff448bedb 100644 --- a/webview-ui/src/i18n/locales/ru/prompts.json +++ b/webview-ui/src/i18n/locales/ru/prompts.json @@ -25,7 +25,8 @@ "browser": "Использовать браузер", "command": "Выполнять команды", "mcp": "Использовать MCP" - } + }, + "noTools": "Отсутствуют" }, "roleDefinition": { "title": "Определение роли", diff --git a/webview-ui/src/i18n/locales/tr/prompts.json b/webview-ui/src/i18n/locales/tr/prompts.json index 40cd10aa89..8d7c7b9305 100644 --- a/webview-ui/src/i18n/locales/tr/prompts.json +++ b/webview-ui/src/i18n/locales/tr/prompts.json @@ -25,7 +25,8 @@ "browser": "Tarayıcı Kullan", "command": "Komutları Çalıştır", "mcp": "MCP Kullan" - } + }, + "noTools": "Yok" }, "roleDefinition": { "title": "Rol Tanımı", diff --git a/webview-ui/src/i18n/locales/vi/prompts.json b/webview-ui/src/i18n/locales/vi/prompts.json index 3951da818c..4b62d3718e 100644 --- a/webview-ui/src/i18n/locales/vi/prompts.json +++ b/webview-ui/src/i18n/locales/vi/prompts.json @@ -25,7 +25,8 @@ "browser": "Sử dụng trình duyệt", "command": "Chạy lệnh", "mcp": "Sử dụng MCP" - } + }, + "noTools": "Không có" }, "roleDefinition": { "title": "Định nghĩa vai trò", diff --git a/webview-ui/src/i18n/locales/zh-CN/prompts.json b/webview-ui/src/i18n/locales/zh-CN/prompts.json index abfd892039..2980bd6699 100644 --- a/webview-ui/src/i18n/locales/zh-CN/prompts.json +++ b/webview-ui/src/i18n/locales/zh-CN/prompts.json @@ -25,7 +25,8 @@ "browser": "浏览器", "command": "运行命令", "mcp": "MCP服务" - } + }, + "noTools": "无" }, "roleDefinition": { "title": "角色定义", diff --git a/webview-ui/src/i18n/locales/zh-TW/prompts.json b/webview-ui/src/i18n/locales/zh-TW/prompts.json index 874c9361dc..9b99707cf6 100644 --- a/webview-ui/src/i18n/locales/zh-TW/prompts.json +++ b/webview-ui/src/i18n/locales/zh-TW/prompts.json @@ -25,7 +25,8 @@ "browser": "使用瀏覽器", "command": "執行命令", "mcp": "使用 MCP" - } + }, + "noTools": "無" }, "roleDefinition": { "title": "角色定義",