Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/shared/tool-groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,3 @@ export function getToolName(toolConfig: string | readonly [ToolName, ...any[]]):
export function getToolOptions(toolConfig: string | readonly [ToolName, ...any[]]): any {
return typeof toolConfig === "string" ? undefined : toolConfig[1]
}

// Display names for groups in UI
export const GROUP_DISPLAY_NAMES: Record<ToolGroup, string> = {
read: "Read Files",
edit: "Edit Files",
browser: "Use Browser",
command: "Run Commands",
mcp: "Use MCP",
}
8 changes: 4 additions & 4 deletions webview-ui/src/components/prompts/PromptsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import { CustomModeSchema } from "../../../../src/core/config/CustomModesSchema"
import { supportPrompt, SupportPromptType } from "../../../../src/shared/support-prompt"

import { TOOL_GROUPS, GROUP_DISPLAY_NAMES, ToolGroup } from "../../../../src/shared/tool-groups"
import { TOOL_GROUPS, ToolGroup } from "../../../../src/shared/tool-groups"
import { vscode } from "../../utils/vscode"
import { Tab, TabContent, TabHeader } from "../common/Tab"
import i18next from "i18next"
Expand Down Expand Up @@ -657,7 +657,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
checked={isGroupEnabled}
onChange={handleGroupChange(group, Boolean(isCustomMode), customMode)}
disabled={!isCustomMode}>
{GROUP_DISPLAY_NAMES[group]}
{t(`prompts:tools.toolNames.${group}`)}
{group === "edit" && (
<div className="text-xs text-vscode-descriptionForeground mt-0.5">
{t("prompts:tools.allowedFiles")}{" "}
Expand Down Expand Up @@ -689,7 +689,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
return enabledGroups
.map((group) => {
const groupName = getGroupName(group)
const displayName = GROUP_DISPLAY_NAMES[groupName]
const displayName = t(`prompts:tools.toolNames.${groupName}`)
if (Array.isArray(group) && group[1]?.fileRegex) {
const description =
group[1].description || `/${group[1].fileRegex}/`
Expand Down Expand Up @@ -1247,7 +1247,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
)
}
}}>
{GROUP_DISPLAY_NAMES[group]}
{t(`prompts:tools.toolNames.${group}`)}
</VSCodeCheckbox>
))}
</div>
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/ar/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "لا يمكن تعديل أدوات الأوضاع المدمجة",
"editTools": "تعديل الأدوات",
"doneEditing": "انتهاء التعديل",
"allowedFiles": "الملفات المسموحة:"
"allowedFiles": "الملفات المسموحة:",
"toolNames": {
"read": "قراءة الملفات",
"edit": "تعديل الملفات",
"browser": "استخدام المتصفح",
"command": "تنفيذ الأوامر",
"mcp": "استخدام MCP"
}
},
"roleDefinition": {
"title": "تعريف الدور",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/ca/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Les eines per a modes integrats no es poden modificar",
"editTools": "Editar eines",
"doneEditing": "Finalitzar edició",
"allowedFiles": "Fitxers permesos:"
"allowedFiles": "Fitxers permesos:",
"toolNames": {
"read": "Llegir fitxers",
"edit": "Editar fitxers",
"browser": "Utilitzar navegador",
"command": "Executar comandes",
"mcp": "Utilitzar MCP"
}
},
"roleDefinition": {
"title": "Definició de rol",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/cs/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Nástroje pro vestavěné režimy nelze upravovat",
"editTools": "Upravit nástroje",
"doneEditing": "Dokončit úpravy",
"allowedFiles": "Povolené soubory:"
"allowedFiles": "Povolené soubory:",
"toolNames": {
"read": "Číst soubory",
"edit": "Upravit soubory",
"browser": "Použít prohlížeč",
"command": "Spustit příkazy",
"mcp": "Použít MCP"
}
},
"roleDefinition": {
"title": "Definice role",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/de/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Werkzeuge für eingebaute Modi können nicht geändert werden",
"editTools": "Werkzeuge bearbeiten",
"doneEditing": "Bearbeitung abschließen",
"allowedFiles": "Erlaubte Dateien:"
"allowedFiles": "Erlaubte Dateien:",
"toolNames": {
"read": "Dateien lesen",
"edit": "Dateien bearbeiten",
"browser": "Browser verwenden",
"command": "Befehle ausführen",
"mcp": "MCP verwenden"
}
},
"roleDefinition": {
"title": "Rollendefinition",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/en/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Tools for built-in modes cannot be modified",
"editTools": "Edit tools",
"doneEditing": "Done editing",
"allowedFiles": "Allowed files:"
"allowedFiles": "Allowed files:",
"toolNames": {
"read": "Read Files",
"edit": "Edit Files",
"browser": "Use Browser",
"command": "Run Commands",
"mcp": "Use MCP"
}
},
"roleDefinition": {
"title": "Role Definition",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/es/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Las herramientas para modos integrados no se pueden modificar",
"editTools": "Editar herramientas",
"doneEditing": "Terminar edición",
"allowedFiles": "Archivos permitidos:"
"allowedFiles": "Archivos permitidos:",
"toolNames": {
"read": "Leer archivos",
"edit": "Editar archivos",
"browser": "Usar navegador",
"command": "Ejecutar comandos",
"mcp": "Usar MCP"
}
},
"roleDefinition": {
"title": "Definición de rol",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/fr/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Les outils pour les modes intégrés ne peuvent pas être modifiés",
"editTools": "Modifier les outils",
"doneEditing": "Terminer la modification",
"allowedFiles": "Fichiers autorisés :"
"allowedFiles": "Fichiers autorisés :",
"toolNames": {
"read": "Lire les fichiers",
"edit": "Modifier les fichiers",
"browser": "Utiliser le navigateur",
"command": "Exécuter des commandes",
"mcp": "Utiliser MCP"
}
},
"roleDefinition": {
"title": "Définition du rôle",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/hi/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "अंतर्निहित मोड्स के लिए टूल्स को संशोधित नहीं किया जा सकता",
"editTools": "टूल्स संपादित करें",
"doneEditing": "संपादन पूरा हुआ",
"allowedFiles": "अनुमत फाइलें:"
"allowedFiles": "अनुमत फाइलें:",
"toolNames": {
"read": "फाइलें पढ़ें",
"edit": "फाइलें संपादित करें",
"browser": "ब्राउज़र का उपयोग करें",
"command": "कमांड्स चलाएँ",
"mcp": "MCP का उपयोग करें"
}
},
"roleDefinition": {
"title": "भूमिका परिभाषा",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/hu/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "A beépített módok eszközei nem módosíthatók",
"editTools": "Eszközök szerkesztése",
"doneEditing": "Szerkesztés befejezése",
"allowedFiles": "Engedélyezett fájlok:"
"allowedFiles": "Engedélyezett fájlok:",
"toolNames": {
"read": "Fájlok olvasása",
"edit": "Fájlok szerkesztése",
"browser": "Böngésző használata",
"command": "Parancsok futtatása",
"mcp": "MCP használata"
}
},
"roleDefinition": {
"title": "Szerepkör meghatározása",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/it/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Gli strumenti per le modalità integrate non possono essere modificati",
"editTools": "Modifica strumenti",
"doneEditing": "Modifica completata",
"allowedFiles": "File consentiti:"
"allowedFiles": "File consentiti:",
"toolNames": {
"read": "Leggi file",
"edit": "Modifica file",
"browser": "Usa browser",
"command": "Esegui comandi",
"mcp": "Usa MCP"
}
},
"roleDefinition": {
"title": "Definizione del ruolo",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/ja/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "組み込みモードのツールは変更できません",
"editTools": "ツールを編集",
"doneEditing": "編集完了",
"allowedFiles": "許可されたファイル:"
"allowedFiles": "許可されたファイル:",
"toolNames": {
"read": "ファイルを読み込む",
"edit": "ファイルを編集",
"browser": "ブラウザを使用",
"command": "コマンドを実行",
"mcp": "MCP を使用"
}
},
"roleDefinition": {
"title": "役割の定義",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/ko/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "내장 모드용 도구는 수정할 수 없습니다",
"editTools": "도구 편집",
"doneEditing": "편집 완료",
"allowedFiles": "허용된 파일:"
"allowedFiles": "허용된 파일:",
"toolNames": {
"read": "파일 읽기",
"edit": "파일 편집",
"browser": "브라우저 사용",
"command": "명령 실행",
"mcp": "MCP 사용"
}
},
"roleDefinition": {
"title": "역할 정의",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/pl/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Narzędzia dla wbudowanych trybów nie mogą być modyfikowane",
"editTools": "Edytuj narzędzia",
"doneEditing": "Zakończ edycję",
"allowedFiles": "Dozwolone pliki:"
"allowedFiles": "Dozwolone pliki:",
"toolNames": {
"read": "Czytaj pliki",
"edit": "Edytuj pliki",
"browser": "Używaj przeglądarki",
"command": "Uruchamiaj polecenia",
"mcp": "Używaj MCP"
}
},
"roleDefinition": {
"title": "Definicja roli",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/pt-BR/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Ferramentas para modos integrados não podem ser modificadas",
"editTools": "Editar ferramentas",
"doneEditing": "Concluir edição",
"allowedFiles": "Arquivos permitidos:"
"allowedFiles": "Arquivos permitidos:",
"toolNames": {
"read": "Ler arquivos",
"edit": "Editar arquivos",
"browser": "Usar navegador",
"command": "Executar comandos",
"mcp": "Usar MCP"
}
},
"roleDefinition": {
"title": "Definição de função",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/pt/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Ferramentas para modos integrados não podem ser modificadas",
"editTools": "Editar ferramentas",
"doneEditing": "Concluir edição",
"allowedFiles": "Arquivos permitidos:"
"allowedFiles": "Arquivos permitidos:",
"toolNames": {
"read": "Ler arquivos",
"edit": "Editar arquivos",
"browser": "Usar navegador",
"command": "Executar comandos",
"mcp": "Usar MCP"
}
},
"roleDefinition": {
"title": "Definição de função",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/ru/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Инструменты для встроенных режимов нельзя изменять",
"editTools": "Редактировать инструменты",
"doneEditing": "Завершить редактирование",
"allowedFiles": "Разрешенные файлы:"
"allowedFiles": "Разрешенные файлы:",
"toolNames": {
"read": "Читать файлы",
"edit": "Редактировать файлы",
"browser": "Использовать браузер",
"command": "Выполнять команды",
"mcp": "Использовать MCP"
}
},
"roleDefinition": {
"title": "Определение роли",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/tr/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "Yerleşik modlar için araçlar değiştirilemez",
"editTools": "Araçları düzenle",
"doneEditing": "Düzenlemeyi bitir",
"allowedFiles": "İzin verilen dosyalar:"
"allowedFiles": "İzin verilen dosyalar:",
"toolNames": {
"read": "Dosyaları Oku",
"edit": "Dosyaları Düzenle",
"browser": "Tarayıcı Kullan",
"command": "Komutları Çalıştır",
"mcp": "MCP Kullan"
}
},
"roleDefinition": {
"title": "Rol Tanımı",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/zh-CN/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "内置模式的工具不能被修改",
"editTools": "编辑工具",
"doneEditing": "完成编辑",
"allowedFiles": "允许的文件:"
"allowedFiles": "允许的文件:",
"toolNames": {
"read": "读取文件",
"edit": "编辑文件",
"browser": "使用浏览器",
"command": "运行命令",
"mcp": "使用 MCP"
}
},
"roleDefinition": {
"title": "角色定义",
Expand Down
9 changes: 8 additions & 1 deletion webview-ui/src/i18n/locales/zh-TW/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
"builtInModesText": "內建模式的工具不能被修改",
"editTools": "編輯工具",
"doneEditing": "完成編輯",
"allowedFiles": "允許的檔案:"
"allowedFiles": "允許的檔案:",
"toolNames": {
"read": "讀取檔案",
"edit": "編輯檔案",
"browser": "使用瀏覽器",
"command": "執行命令",
"mcp": "使用 MCP"
}
},
"roleDefinition": {
"title": "角色定義",
Expand Down