Просмотр исходного кода

Show 'None' when a mode has no tool groups (#3095)

Matt Rubens 8 месяцев назад
Родитель
Сommit
026a3e1059

+ 6 - 0
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)

+ 2 - 1
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",

+ 2 - 1
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",

+ 2 - 1
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",

+ 2 - 1
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",

+ 2 - 1
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",

+ 2 - 1
webview-ui/src/i18n/locales/hi/prompts.json

@@ -25,7 +25,8 @@
 			"browser": "ब्राउज़र का उपयोग करें",
 			"command": "कमांड्स चलाएँ",
 			"mcp": "MCP का उपयोग करें"
-		}
+		},
+		"noTools": "कोई नहीं"
 	},
 	"roleDefinition": {
 		"title": "भूमिका परिभाषा",

+ 2 - 1
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",

+ 2 - 1
webview-ui/src/i18n/locales/ja/prompts.json

@@ -25,7 +25,8 @@
 			"browser": "ブラウザを使用",
 			"command": "コマンドを実行",
 			"mcp": "MCP を使用"
-		}
+		},
+		"noTools": "なし"
 	},
 	"roleDefinition": {
 		"title": "役割の定義",

+ 2 - 1
webview-ui/src/i18n/locales/ko/prompts.json

@@ -25,7 +25,8 @@
 			"browser": "브라우저 사용",
 			"command": "명령 실행",
 			"mcp": "MCP 사용"
-		}
+		},
+		"noTools": "없음"
 	},
 	"roleDefinition": {
 		"title": "역할 정의",

+ 2 - 1
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",

+ 2 - 1
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",

+ 2 - 1
webview-ui/src/i18n/locales/ru/prompts.json

@@ -25,7 +25,8 @@
 			"browser": "Использовать браузер",
 			"command": "Выполнять команды",
 			"mcp": "Использовать MCP"
-		}
+		},
+		"noTools": "Отсутствуют"
 	},
 	"roleDefinition": {
 		"title": "Определение роли",

+ 2 - 1
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ı",

+ 2 - 1
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ò",

+ 2 - 1
webview-ui/src/i18n/locales/zh-CN/prompts.json

@@ -25,7 +25,8 @@
 			"browser": "浏览器",
 			"command": "运行命令",
 			"mcp": "MCP服务"
-		}
+		},
+		"noTools": "无"
 	},
 	"roleDefinition": {
 		"title": "角色定义",

+ 2 - 1
webview-ui/src/i18n/locales/zh-TW/prompts.json

@@ -25,7 +25,8 @@
 			"browser": "使用瀏覽器",
 			"command": "執行命令",
 			"mcp": "使用 MCP"
-		}
+		},
+		"noTools": "無"
 	},
 	"roleDefinition": {
 		"title": "角色定義",