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
59 changes: 30 additions & 29 deletions webview-ui/src/components/chat/AutoApproveMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
import { useCallback, useState } from "react"
import { useExtensionState } from "../../context/ExtensionStateContext"
import { useAppTranslation } from "../../i18n/TranslationContext"
import { vscode } from "../../utils/vscode"

interface AutoApproveAction {
Expand Down Expand Up @@ -38,63 +39,64 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
setAutoApprovalEnabled,
} = useExtensionState()

const { t } = useAppTranslation()

const actions: AutoApproveAction[] = [
{
id: "readFiles",
label: "Read files and directories",
shortName: "Read",
label: t("chat:autoApprove.actions.readFiles.label"),
shortName: t("chat:autoApprove.actions.readFiles.shortName"),
enabled: alwaysAllowReadOnly ?? false,
description: "Allows access to read any file on your computer.",
description: t("chat:autoApprove.actions.readFiles.description"),
},
{
id: "editFiles",
label: "Edit files",
shortName: "Edit",
label: t("chat:autoApprove.actions.editFiles.label"),
shortName: t("chat:autoApprove.actions.editFiles.shortName"),
enabled: alwaysAllowWrite ?? false,
description: "Allows modification of any files on your computer.",
description: t("chat:autoApprove.actions.editFiles.description"),
},
{
id: "executeCommands",
label: "Execute approved commands",
shortName: "Commands",
label: t("chat:autoApprove.actions.executeCommands.label"),
shortName: t("chat:autoApprove.actions.executeCommands.shortName"),
enabled: alwaysAllowExecute ?? false,
description:
"Allows execution of approved terminal commands. You can configure this in the settings panel.",
description: t("chat:autoApprove.actions.executeCommands.description"),
},
{
id: "useBrowser",
label: "Use the browser",
shortName: "Browser",
label: t("chat:autoApprove.actions.useBrowser.label"),
shortName: t("chat:autoApprove.actions.useBrowser.shortName"),
enabled: alwaysAllowBrowser ?? false,
description: "Allows ability to launch and interact with any website in a headless browser.",
description: t("chat:autoApprove.actions.useBrowser.description"),
},
{
id: "useMcp",
label: "Use MCP servers",
shortName: "MCP",
label: t("chat:autoApprove.actions.useMcp.label"),
shortName: t("chat:autoApprove.actions.useMcp.shortName"),
enabled: alwaysAllowMcp ?? false,
description: "Allows use of configured MCP servers which may modify filesystem or interact with APIs.",
description: t("chat:autoApprove.actions.useMcp.description"),
},
{
id: "switchModes",
label: "Switch modes",
shortName: "Modes",
label: t("chat:autoApprove.actions.switchModes.label"),
shortName: t("chat:autoApprove.actions.switchModes.shortName"),
enabled: alwaysAllowModeSwitch ?? false,
description: "Allows automatic switching between different modes without requiring approval.",
description: t("chat:autoApprove.actions.switchModes.description"),
},
{
id: "subtasks",
label: "Create & complete subtasks",
shortName: "Subtasks",
label: t("chat:autoApprove.actions.subtasks.label"),
shortName: t("chat:autoApprove.actions.subtasks.shortName"),
enabled: alwaysAllowSubtasks ?? false,
description: "Allow creation and completion of subtasks without requiring approval.",
description: t("chat:autoApprove.actions.subtasks.description"),
},
{
id: "retryRequests",
label: "Retry failed requests",
shortName: "Retries",
label: t("chat:autoApprove.actions.retryRequests.label"),
shortName: t("chat:autoApprove.actions.retryRequests.shortName"),
enabled: alwaysApproveResubmit ?? false,
description: "Automatically retry failed API requests when the provider returns an error response.",
description: t("chat:autoApprove.actions.retryRequests.description"),
},
]

Expand Down Expand Up @@ -211,7 +213,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
color: "var(--vscode-foreground)",
flexShrink: 0,
}}>
Auto-approve:
{t("chat:autoApprove.title")}
</span>
<span
style={{
Expand All @@ -222,7 +224,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
flex: 1,
minWidth: 0,
}}>
{enabledActionsList || "None"}
{enabledActionsList || t("chat:autoApprove.none")}
</span>
<span
className={`codicon codicon-chevron-${isExpanded ? "down" : "right"}`}
Expand All @@ -241,8 +243,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
color: "var(--vscode-descriptionForeground)",
fontSize: "12px",
}}>
Auto-approve allows Roo Code to perform actions without asking for permission. Only enable for
actions you fully trust.
{t("chat:autoApprove.description")}
</div>
{actions.map((action) => (
<div key={action.id} style={{ margin: "6px 0" }}>
Expand Down
49 changes: 48 additions & 1 deletion webview-ui/src/i18n/locales/ar/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,52 @@
"noValidImages": "لم تتم معالجة أي صور صالحة",
"separator": "فاصل",
"edit": "تعديل...",
"forNextMode": "للوضع التالي"
"forNextMode": "للوضع التالي",
"autoApprove": {
"title": "الموافقة التلقائية:",
"none": "لا شيء",
"description": "الموافقة التلقائية تسمح لـ Roo Code بتنفيذ الإجراءات دون طلب إذن. قم بتمكينها فقط للإجراءات التي تثق بها تمامًا.",
"actions": {
"readFiles": {
"label": "قراءة الملفات والمجلدات",
"shortName": "قراءة",
"description": "يسمح بالوصول لقراءة أي ملف على جهاز الكمبيوتر الخاص بك."
},
"editFiles": {
"label": "تعديل الملفات",
"shortName": "تعديل",
"description": "يسمح بتعديل أي ملفات على جهاز الكمبيوتر الخاص بك."
},
"executeCommands": {
"label": "تنفيذ الأوامر المعتمدة",
"shortName": "أوامر",
"description": "يسمح بتنفيذ أوامر الطرفية المعتمدة. يمكنك تكوين ذلك في لوحة الإعدادات."
},
"useBrowser": {
"label": "استخدام المتصفح",
"shortName": "متصفح",
"description": "يسمح بالقدرة على تشغيل والتفاعل مع أي موقع ويب في متصفح بدون واجهة."
},
"useMcp": {
"label": "استخدام خوادم MCP",
"shortName": "MCP",
"description": "يسمح باستخدام خوادم MCP المكونة التي قد تعدل نظام الملفات أو تتفاعل مع واجهات برمجة التطبيقات."
},
"switchModes": {
"label": "تبديل الأوضاع",
"shortName": "أوضاع",
"description": "يسمح بالتبديل التلقائي بين الأوضاع المختلفة دون الحاجة إلى موافقة."
},
"subtasks": {
"label": "إنشاء وإكمال المهام الفرعية",
"shortName": "مهام فرعية",
"description": "يسمح بإنشاء وإكمال المهام الفرعية دون الحاجة إلى موافقة."
},
"retryRequests": {
"label": "إعادة محاولة الطلبات الفاشلة",
"shortName": "إعادة المحاولات",
"description": "إعادة محاولة طلبات API الفاشلة تلقائيًا عندما يُرجع المزود استجابة خطأ."
}
}
}
}
49 changes: 48 additions & 1 deletion webview-ui/src/i18n/locales/ca/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,52 @@
"noValidImages": "No s'ha processat cap imatge vàlida",
"separator": "Separador",
"edit": "Edita...",
"forNextMode": "per al següent mode"
"forNextMode": "per al següent mode",
"autoApprove": {
"title": "Aprovació automàtica:",
"none": "Cap",
"description": "L'aprovació automàtica permet a Roo Code realitzar accions sense demanar permís. Activa-la només per a accions en les que confies plenament.",
"actions": {
"readFiles": {
"label": "Llegir fitxers i directoris",
"shortName": "Lectura",
"description": "Permet l'accés per llegir qualsevol fitxer al teu ordinador."
},
"editFiles": {
"label": "Editar fitxers",
"shortName": "Edició",
"description": "Permet la modificació de qualsevol fitxer al teu ordinador."
},
"executeCommands": {
"label": "Executar ordres aprovades",
"shortName": "Ordres",
"description": "Permet l'execució d'ordres de terminal aprovades. Pots configurar-ho al panell de configuració."
},
"useBrowser": {
"label": "Utilitzar el navegador",
"shortName": "Navegador",
"description": "Permet la capacitat d'iniciar i interactuar amb qualsevol lloc web en un navegador headless."
},
"useMcp": {
"label": "Utilitzar servidors MCP",
"shortName": "MCP",
"description": "Permet l'ús de servidors MCP configurats que poden modificar el sistema de fitxers o interactuar amb APIs."
},
"switchModes": {
"label": "Canviar modes",
"shortName": "Modes",
"description": "Permet el canvi automàtic entre diferents modes sense requerir aprovació."
},
"subtasks": {
"label": "Crear i completar subtasques",
"shortName": "Subtasques",
"description": "Permet la creació i finalització de subtasques sense requerir aprovació."
},
"retryRequests": {
"label": "Reintentar sol·licituds fallides",
"shortName": "Reintents",
"description": "Reintenta automàticament les sol·licituds API fallides quan el proveïdor retorna una resposta d'error."
}
}
}
}
49 changes: 48 additions & 1 deletion webview-ui/src/i18n/locales/cs/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,52 @@
"noValidImages": "Nebyly zpracovány žádné platné obrázky",
"separator": "Oddělovač",
"edit": "Upravit...",
"forNextMode": "pro další režim"
"forNextMode": "pro další režim",
"autoApprove": {
"title": "Automatické schválení:",
"none": "Žádné",
"description": "Automatické schválení umožňuje Roo Code provádět akce bez vyžádání povolení. Povolte pouze pro akce, kterým plně důvěřujete.",
"actions": {
"readFiles": {
"label": "Číst soubory a adresáře",
"shortName": "Čtení",
"description": "Umožňuje přístup ke čtení jakéhokoli souboru na vašem počítači."
},
"editFiles": {
"label": "Upravovat soubory",
"shortName": "Úpravy",
"description": "Umožňuje úpravy jakýchkoli souborů na vašem počítači."
},
"executeCommands": {
"label": "Spouštět schválené příkazy",
"shortName": "Příkazy",
"description": "Umožňuje spouštění schválených terminálových příkazů. Toto můžete nakonfigurovat v panelu nastavení."
},
"useBrowser": {
"label": "Používat prohlížeč",
"shortName": "Prohlížeč",
"description": "Umožňuje spuštění a interakci s jakýmkoli webem v headless prohlížeči."
},
"useMcp": {
"label": "Používat MCP servery",
"shortName": "MCP",
"description": "Umožňuje použití nakonfigurovaných MCP serverů, které mohou upravovat souborový systém nebo komunikovat s API."
},
"switchModes": {
"label": "Přepínat režimy",
"shortName": "Režimy",
"description": "Umožňuje automatické přepínání mezi různými režimy bez nutnosti schválení."
},
"subtasks": {
"label": "Vytvářet a dokončovat dílčí úkoly",
"shortName": "Dílčí úkoly",
"description": "Umožňuje vytváření a dokončování dílčích úkolů bez nutnosti schválení."
},
"retryRequests": {
"label": "Opakovat neúspěšné požadavky",
"shortName": "Opakování",
"description": "Automaticky opakuje neúspěšné API požadavky, když poskytovatel vrátí chybovou odpověď."
}
}
}
}
49 changes: 48 additions & 1 deletion webview-ui/src/i18n/locales/de/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,52 @@
"noValidImages": "Es wurden keine gültigen Bilder verarbeitet",
"separator": "Trennlinie",
"edit": "Bearbeiten...",
"forNextMode": "für nächsten Modus"
"forNextMode": "für nächsten Modus",
"autoApprove": {
"title": "Auto-Genehmigung:",
"none": "Keine",
"description": "Auto-Genehmigung erlaubt Roo Code, Aktionen ohne Nachfrage auszuführen. Aktivieren Sie dies nur für Aktionen, denen Sie vollständig vertrauen.",
"actions": {
"readFiles": {
"label": "Dateien und Verzeichnisse lesen",
"shortName": "Lesen",
"description": "Ermöglicht den Zugriff zum Lesen jeder Datei auf Ihrem Computer."
},
"editFiles": {
"label": "Dateien bearbeiten",
"shortName": "Bearbeiten",
"description": "Ermöglicht die Bearbeitung beliebiger Dateien auf Ihrem Computer."
},
"executeCommands": {
"label": "Genehmigte Befehle ausführen",
"shortName": "Befehle",
"description": "Erlaubt die Ausführung genehmigter Terminalbefehle. Sie können dies im Einstellungsbereich konfigurieren."
},
"useBrowser": {
"label": "Browser verwenden",
"shortName": "Browser",
"description": "Ermöglicht das Starten und Interagieren mit jeder Website in einem Headless-Browser."
},
"useMcp": {
"label": "MCP-Server verwenden",
"shortName": "MCP",
"description": "Erlaubt die Verwendung konfigurierter MCP-Server, die das Dateisystem ändern oder mit APIs interagieren können."
},
"switchModes": {
"label": "Modi wechseln",
"shortName": "Modi",
"description": "Ermöglicht automatisches Wechseln zwischen verschiedenen Modi ohne Genehmigung."
},
"subtasks": {
"label": "Teilaufgaben erstellen & abschließen",
"shortName": "Teilaufgaben",
"description": "Erlaubt die Erstellung und den Abschluss von Teilaufgaben ohne Genehmigung."
},
"retryRequests": {
"label": "Fehlgeschlagene Anfragen wiederholen",
"shortName": "Wiederholungen",
"description": "Wiederholt automatisch fehlgeschlagene API-Anfragen, wenn der Anbieter eine Fehlermeldung zurückgibt."
}
}
}
}
49 changes: 48 additions & 1 deletion webview-ui/src/i18n/locales/en/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,52 @@
"noValidImages": "No valid images were processed",
"separator": "Separator",
"edit": "Edit...",
"forNextMode": "for next mode"
"forNextMode": "for next mode",
"autoApprove": {
"title": "Auto-approve:",
"none": "None",
"description": "Auto-approve allows Roo Code to perform actions without asking for permission. Only enable for actions you fully trust.",
"actions": {
"readFiles": {
"label": "Read files and directories",
"shortName": "Read",
"description": "Allows access to read any file on your computer."
},
"editFiles": {
"label": "Edit files",
"shortName": "Edit",
"description": "Allows modification of any files on your computer."
},
"executeCommands": {
"label": "Execute approved commands",
"shortName": "Commands",
"description": "Allows execution of approved terminal commands. You can configure this in the settings panel."
},
"useBrowser": {
"label": "Use the browser",
"shortName": "Browser",
"description": "Allows ability to launch and interact with any website in a headless browser."
},
"useMcp": {
"label": "Use MCP servers",
"shortName": "MCP",
"description": "Allows use of configured MCP servers which may modify filesystem or interact with APIs."
},
"switchModes": {
"label": "Switch modes",
"shortName": "Modes",
"description": "Allows automatic switching between different modes without requiring approval."
},
"subtasks": {
"label": "Create & complete subtasks",
"shortName": "Subtasks",
"description": "Allow creation and completion of subtasks without requiring approval."
},
"retryRequests": {
"label": "Retry failed requests",
"shortName": "Retries",
"description": "Automatically retry failed API requests when the provider returns an error response."
}
}
}
}
Loading