Skip to content

Commit 37ecf96

Browse files
authored
Link to the settings page from the auto approve toolbar (#2111)
1 parent 712ca71 commit 37ecf96

File tree

17 files changed

+27
-17
lines changed

17 files changed

+27
-17
lines changed

src/i18n/setup.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ if (!isTestEnv) {
5555
// Read and parse the JSON file
5656
const content = fs.readFileSync(filePath, "utf8")
5757
translations[language][namespace] = JSON.parse(content)
58-
console.log(`Successfully loaded '${language}/${namespace}' translations`)
5958
} catch (error) {
6059
console.error(`Error loading translation file ${filePath}:`, error)
6160
}

webview-ui/src/components/chat/AutoApproveMenu.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
22
import { useCallback, useState } from "react"
33
import { useExtensionState } from "../../context/ExtensionStateContext"
44
import { useAppTranslation } from "../../i18n/TranslationContext"
5+
import { Trans } from "react-i18next"
6+
import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
57
import { vscode } from "../../utils/vscode"
68

79
interface AutoApproveAction {
@@ -158,6 +160,10 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
158160
vscode.postMessage({ type: "alwaysApproveResubmit", bool: newValue })
159161
}, [alwaysApproveResubmit, setAlwaysApproveResubmit])
160162

163+
const handleOpenSettings = useCallback(() => {
164+
window.postMessage({ type: "action", action: "settingsButtonClicked" })
165+
}, [])
166+
161167
// Map action IDs to their specific handlers
162168
const actionHandlers: Record<AutoApproveAction["id"], () => void> = {
163169
readFiles: handleReadOnlyChange,
@@ -243,7 +249,12 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
243249
color: "var(--vscode-descriptionForeground)",
244250
fontSize: "12px",
245251
}}>
246-
{t("chat:autoApprove.description")}
252+
<Trans
253+
i18nKey="chat:autoApprove.description"
254+
components={{
255+
settingsLink: <VSCodeLink href="#" onClick={handleOpenSettings} />,
256+
}}
257+
/>
247258
</div>
248259
{actions.map((action) => (
249260
<div key={action.id} style={{ margin: "6px 0" }}>

webview-ui/src/i18n/locales/ca/chat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"autoApprove": {
160160
"title": "Aprovació automàtica:",
161161
"none": "Cap",
162-
"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.",
162+
"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. Configuració més detallada disponible a la <settingsLink>Configuració</settingsLink>.",
163163
"actions": {
164164
"readFiles": {
165165
"label": "Llegir fitxers i directoris",

webview-ui/src/i18n/locales/de/chat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"autoApprove": {
160160
"title": "Automatische Genehmigung:",
161161
"none": "Keine",
162-
"description": "Automatische Genehmigung erlaubt Roo Code, Aktionen ohne Nachfrage auszuführen. Aktiviere dies nur für Aktionen, denen du vollständig vertraust.",
162+
"description": "Automatische Genehmigung erlaubt Roo Code, Aktionen ohne Nachfrage auszuführen. Aktiviere dies nur für Aktionen, denen du vollständig vertraust. Detailliertere Konfiguration verfügbar in den <settingsLink>Einstellungen</settingsLink>.",
163163
"actions": {
164164
"readFiles": {
165165
"label": "Dateien und Verzeichnisse lesen",

webview-ui/src/i18n/locales/en/chat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"autoApprove": {
160160
"title": "Auto-approve:",
161161
"none": "None",
162-
"description": "Auto-approve allows Roo Code to perform actions without asking for permission. Only enable for actions you fully trust.",
162+
"description": "Auto-approve allows Roo Code to perform actions without asking for permission. Only enable for actions you fully trust. More detailed configuration available in <settingsLink>Settings</settingsLink>.",
163163
"actions": {
164164
"readFiles": {
165165
"label": "Read files and directories",

webview-ui/src/i18n/locales/es/chat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"autoApprove": {
160160
"title": "Auto-aprobar:",
161161
"none": "Ninguno",
162-
"description": "Auto-aprobar permite a Roo Code realizar acciones sin pedir permiso. Habilita solo para acciones en las que confíes plenamente.",
162+
"description": "Auto-aprobar permite a Roo Code realizar acciones sin pedir permiso. Habilita solo para acciones en las que confíes plenamente. Configuración más detallada disponible en <settingsLink>Configuración</settingsLink>.",
163163
"actions": {
164164
"readFiles": {
165165
"label": "Leer archivos y directorios",

webview-ui/src/i18n/locales/fr/chat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"autoApprove": {
160160
"title": "Auto-approbation :",
161161
"none": "Aucune",
162-
"description": "L'auto-approbation permet à Roo Code d'effectuer des actions sans demander d'autorisation. Activez-la uniquement pour les actions auxquelles vous faites entièrement confiance.",
162+
"description": "L'auto-approbation permet à Roo Code d'effectuer des actions sans demander d'autorisation. Activez-la uniquement pour les actions auxquelles vous faites entièrement confiance. Configuration plus détaillée disponible dans les <settingsLink>Paramètres</settingsLink>.",
163163
"actions": {
164164
"readFiles": {
165165
"label": "Lire fichiers et répertoires",

webview-ui/src/i18n/locales/hi/chat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"autoApprove": {
160160
"title": "स्वत:-स्वीकृति:",
161161
"none": "कोई नहीं",
162-
"description": "स्वत:-स्वीकृति Roo Code को अनुमति मांगे बिना क्रियाएँ करने की अनुमति देती है। केवल उन क्रियाओं के लिए सक्षम करें जिन पर आप पूरी तरह से विश्वास करते हैं।",
162+
"description": "स्वत:-स्वीकृति Roo Code को अनुमति मांगे बिना क्रियाएँ करने की अनुमति देती है। केवल उन क्रियाओं के लिए सक्षम करें जिन पर आप पूरी तरह से विश्वास करते हैं। अधिक विस्तृत कॉन्फ़िगरेशन <settingsLink>सेटिंग्स</settingsLink> में उपलब्ध है।",
163163
"actions": {
164164
"readFiles": {
165165
"label": "फ़ाइलें और निर्देशिकाएँ पढ़ें",

webview-ui/src/i18n/locales/it/chat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"autoApprove": {
160160
"title": "Auto-approvazione:",
161161
"none": "Nessuna",
162-
"description": "L'auto-approvazione permette a Roo Code di eseguire azioni senza chiedere permesso. Abilita solo per azioni di cui ti fidi completamente.",
162+
"description": "L'auto-approvazione permette a Roo Code di eseguire azioni senza chiedere permesso. Abilita solo per azioni di cui ti fidi completamente. Configurazione più dettagliata disponibile nelle <settingsLink>Impostazioni</settingsLink>.",
163163
"actions": {
164164
"readFiles": {
165165
"label": "Leggi file e directory",

webview-ui/src/i18n/locales/ja/chat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"autoApprove": {
160160
"title": "自動承認:",
161161
"none": "なし",
162-
"description": "自動承認はRoo Codeに許可を求めずに操作を実行する権限を与えます。完全に信頼できる操作のみ有効にしてください。",
162+
"description": "自動承認はRoo Codeに許可を求めずに操作を実行する権限を与えます。完全に信頼できる操作のみ有効にしてください。より詳細な設定は<settingsLink>設定</settingsLink>で利用できます。",
163163
"actions": {
164164
"readFiles": {
165165
"label": "ファイルとディレクトリの読み取り",

0 commit comments

Comments
 (0)