From 37ecf9648b3fb859c46699fb44a93bb0747ce979 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Sun, 30 Mar 2025 12:22:53 -0400 Subject: [PATCH] Link to the settings page from the auto approve toolbar (#2111) --- src/i18n/setup.ts | 1 - webview-ui/src/components/chat/AutoApproveMenu.tsx | 13 ++++++++++++- webview-ui/src/i18n/locales/ca/chat.json | 2 +- webview-ui/src/i18n/locales/de/chat.json | 2 +- webview-ui/src/i18n/locales/en/chat.json | 2 +- webview-ui/src/i18n/locales/es/chat.json | 2 +- webview-ui/src/i18n/locales/fr/chat.json | 2 +- webview-ui/src/i18n/locales/hi/chat.json | 2 +- webview-ui/src/i18n/locales/it/chat.json | 2 +- webview-ui/src/i18n/locales/ja/chat.json | 2 +- webview-ui/src/i18n/locales/ko/chat.json | 2 +- webview-ui/src/i18n/locales/pl/chat.json | 2 +- webview-ui/src/i18n/locales/pt-BR/chat.json | 2 +- webview-ui/src/i18n/locales/tr/chat.json | 2 +- webview-ui/src/i18n/locales/vi/chat.json | 2 +- webview-ui/src/i18n/locales/zh-CN/chat.json | 2 +- webview-ui/src/i18n/locales/zh-TW/chat.json | 2 +- 17 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/i18n/setup.ts b/src/i18n/setup.ts index dc5fb7b99d..058f357b46 100644 --- a/src/i18n/setup.ts +++ b/src/i18n/setup.ts @@ -55,7 +55,6 @@ if (!isTestEnv) { // Read and parse the JSON file const content = fs.readFileSync(filePath, "utf8") translations[language][namespace] = JSON.parse(content) - console.log(`Successfully loaded '${language}/${namespace}' translations`) } catch (error) { console.error(`Error loading translation file ${filePath}:`, error) } diff --git a/webview-ui/src/components/chat/AutoApproveMenu.tsx b/webview-ui/src/components/chat/AutoApproveMenu.tsx index b3a55c94ec..47565a36d6 100644 --- a/webview-ui/src/components/chat/AutoApproveMenu.tsx +++ b/webview-ui/src/components/chat/AutoApproveMenu.tsx @@ -2,6 +2,8 @@ import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react" import { useCallback, useState } from "react" import { useExtensionState } from "../../context/ExtensionStateContext" import { useAppTranslation } from "../../i18n/TranslationContext" +import { Trans } from "react-i18next" +import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" import { vscode } from "../../utils/vscode" interface AutoApproveAction { @@ -158,6 +160,10 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => { vscode.postMessage({ type: "alwaysApproveResubmit", bool: newValue }) }, [alwaysApproveResubmit, setAlwaysApproveResubmit]) + const handleOpenSettings = useCallback(() => { + window.postMessage({ type: "action", action: "settingsButtonClicked" }) + }, []) + // Map action IDs to their specific handlers const actionHandlers: Record void> = { readFiles: handleReadOnlyChange, @@ -243,7 +249,12 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => { color: "var(--vscode-descriptionForeground)", fontSize: "12px", }}> - {t("chat:autoApprove.description")} + , + }} + /> {actions.map((action) => (
diff --git a/webview-ui/src/i18n/locales/ca/chat.json b/webview-ui/src/i18n/locales/ca/chat.json index 7225e45c59..1fa9509bc9 100644 --- a/webview-ui/src/i18n/locales/ca/chat.json +++ b/webview-ui/src/i18n/locales/ca/chat.json @@ -159,7 +159,7 @@ "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.", + "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 Configuració.", "actions": { "readFiles": { "label": "Llegir fitxers i directoris", diff --git a/webview-ui/src/i18n/locales/de/chat.json b/webview-ui/src/i18n/locales/de/chat.json index 5aa623810c..3255160a74 100644 --- a/webview-ui/src/i18n/locales/de/chat.json +++ b/webview-ui/src/i18n/locales/de/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "Automatische Genehmigung:", "none": "Keine", - "description": "Automatische Genehmigung erlaubt Roo Code, Aktionen ohne Nachfrage auszuführen. Aktiviere dies nur für Aktionen, denen du vollständig vertraust.", + "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 Einstellungen.", "actions": { "readFiles": { "label": "Dateien und Verzeichnisse lesen", diff --git a/webview-ui/src/i18n/locales/en/chat.json b/webview-ui/src/i18n/locales/en/chat.json index 0fa6520ec7..38fb8dfe6d 100644 --- a/webview-ui/src/i18n/locales/en/chat.json +++ b/webview-ui/src/i18n/locales/en/chat.json @@ -159,7 +159,7 @@ "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.", + "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 Settings.", "actions": { "readFiles": { "label": "Read files and directories", diff --git a/webview-ui/src/i18n/locales/es/chat.json b/webview-ui/src/i18n/locales/es/chat.json index ddb09122aa..fa054ff766 100644 --- a/webview-ui/src/i18n/locales/es/chat.json +++ b/webview-ui/src/i18n/locales/es/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "Auto-aprobar:", "none": "Ninguno", - "description": "Auto-aprobar permite a Roo Code realizar acciones sin pedir permiso. Habilita solo para acciones en las que confíes plenamente.", + "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 Configuración.", "actions": { "readFiles": { "label": "Leer archivos y directorios", diff --git a/webview-ui/src/i18n/locales/fr/chat.json b/webview-ui/src/i18n/locales/fr/chat.json index 6577f275ce..85d013ced1 100644 --- a/webview-ui/src/i18n/locales/fr/chat.json +++ b/webview-ui/src/i18n/locales/fr/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "Auto-approbation :", "none": "Aucune", - "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.", + "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 Paramètres.", "actions": { "readFiles": { "label": "Lire fichiers et répertoires", diff --git a/webview-ui/src/i18n/locales/hi/chat.json b/webview-ui/src/i18n/locales/hi/chat.json index 2b85828b08..6faced6a27 100644 --- a/webview-ui/src/i18n/locales/hi/chat.json +++ b/webview-ui/src/i18n/locales/hi/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "स्वत:-स्वीकृति:", "none": "कोई नहीं", - "description": "स्वत:-स्वीकृति Roo Code को अनुमति मांगे बिना क्रियाएँ करने की अनुमति देती है। केवल उन क्रियाओं के लिए सक्षम करें जिन पर आप पूरी तरह से विश्वास करते हैं।", + "description": "स्वत:-स्वीकृति Roo Code को अनुमति मांगे बिना क्रियाएँ करने की अनुमति देती है। केवल उन क्रियाओं के लिए सक्षम करें जिन पर आप पूरी तरह से विश्वास करते हैं। अधिक विस्तृत कॉन्फ़िगरेशन सेटिंग्स में उपलब्ध है।", "actions": { "readFiles": { "label": "फ़ाइलें और निर्देशिकाएँ पढ़ें", diff --git a/webview-ui/src/i18n/locales/it/chat.json b/webview-ui/src/i18n/locales/it/chat.json index d14ff9d051..b10c33e302 100644 --- a/webview-ui/src/i18n/locales/it/chat.json +++ b/webview-ui/src/i18n/locales/it/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "Auto-approvazione:", "none": "Nessuna", - "description": "L'auto-approvazione permette a Roo Code di eseguire azioni senza chiedere permesso. Abilita solo per azioni di cui ti fidi completamente.", + "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 Impostazioni.", "actions": { "readFiles": { "label": "Leggi file e directory", diff --git a/webview-ui/src/i18n/locales/ja/chat.json b/webview-ui/src/i18n/locales/ja/chat.json index 7f4fdd7e32..887bda5a05 100644 --- a/webview-ui/src/i18n/locales/ja/chat.json +++ b/webview-ui/src/i18n/locales/ja/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "自動承認:", "none": "なし", - "description": "自動承認はRoo Codeに許可を求めずに操作を実行する権限を与えます。完全に信頼できる操作のみ有効にしてください。", + "description": "自動承認はRoo Codeに許可を求めずに操作を実行する権限を与えます。完全に信頼できる操作のみ有効にしてください。より詳細な設定は設定で利用できます。", "actions": { "readFiles": { "label": "ファイルとディレクトリの読み取り", diff --git a/webview-ui/src/i18n/locales/ko/chat.json b/webview-ui/src/i18n/locales/ko/chat.json index 4aa5960b6a..633ff812d7 100644 --- a/webview-ui/src/i18n/locales/ko/chat.json +++ b/webview-ui/src/i18n/locales/ko/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "자동 승인:", "none": "없음", - "description": "자동 승인을 사용하면 Roo Code가 권한을 요청하지 않고 작업을 수행할 수 있습니다. 완전히 신뢰할 수 있는 작업에만 활성화하세요.", + "description": "자동 승인을 사용하면 Roo Code가 권한을 요청하지 않고 작업을 수행할 수 있습니다. 완전히 신뢰할 수 있는 작업에만 활성화하세요. 더 자세한 구성은 설정에서 사용할 수 있습니다.", "actions": { "readFiles": { "label": "파일 및 디렉토리 읽기", diff --git a/webview-ui/src/i18n/locales/pl/chat.json b/webview-ui/src/i18n/locales/pl/chat.json index 8157d91db0..6711df86c8 100644 --- a/webview-ui/src/i18n/locales/pl/chat.json +++ b/webview-ui/src/i18n/locales/pl/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "Automatyczne zatwierdzanie:", "none": "Brak", - "description": "Automatyczne zatwierdzanie pozwala Roo Code wykonywać działania bez pytania o pozwolenie. Włącz tylko dla działań, którym w pełni ufasz.", + "description": "Automatyczne zatwierdzanie pozwala Roo Code wykonywać działania bez pytania o pozwolenie. Włącz tylko dla działań, którym w pełni ufasz. Bardziej szczegółowa konfiguracja dostępna w Ustawieniach.", "actions": { "readFiles": { "label": "Czytaj pliki i katalogi", diff --git a/webview-ui/src/i18n/locales/pt-BR/chat.json b/webview-ui/src/i18n/locales/pt-BR/chat.json index 5c52c8bea9..ccb7ec734e 100644 --- a/webview-ui/src/i18n/locales/pt-BR/chat.json +++ b/webview-ui/src/i18n/locales/pt-BR/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "Aprovação automática:", "none": "Nenhuma", - "description": "A aprovação automática permite que o Roo Code execute ações sem pedir permissão. Ative apenas para ações nas quais você confia totalmente.", + "description": "A aprovação automática permite que o Roo Code execute ações sem pedir permissão. Ative apenas para ações nas quais você confia totalmente. Configuração mais detalhada disponível nas Configurações.", "actions": { "readFiles": { "label": "Ler arquivos e diretórios", diff --git a/webview-ui/src/i18n/locales/tr/chat.json b/webview-ui/src/i18n/locales/tr/chat.json index d14b7a3ee2..1738bff644 100644 --- a/webview-ui/src/i18n/locales/tr/chat.json +++ b/webview-ui/src/i18n/locales/tr/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "Otomatik-onay:", "none": "Hiçbiri", - "description": "Otomatik onay, Roo Code'un izin istemeden işlemler gerçekleştirmesine olanak tanır. Yalnızca tamamen güvendiğiniz eylemler için etkinleştirin.", + "description": "Otomatik onay, Roo Code'un izin istemeden işlemler gerçekleştirmesine olanak tanır. Yalnızca tamamen güvendiğiniz eylemler için etkinleştirin. Daha detaylı yapılandırma Ayarlar'da mevcuttur.", "actions": { "readFiles": { "label": "Dosyaları ve dizinleri oku", diff --git a/webview-ui/src/i18n/locales/vi/chat.json b/webview-ui/src/i18n/locales/vi/chat.json index eabc7bb746..97efe4bd57 100644 --- a/webview-ui/src/i18n/locales/vi/chat.json +++ b/webview-ui/src/i18n/locales/vi/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "Tự động phê duyệt:", "none": "Không", - "description": "Tự động phê duyệt cho phép Roo Code thực hiện hành động mà không cần xin phép. Chỉ bật cho các hành động bạn hoàn toàn tin tưởng.", + "description": "Tự động phê duyệt cho phép Roo Code thực hiện hành động mà không cần xin phép. Chỉ bật cho các hành động bạn hoàn toàn tin tưởng. Cấu hình chi tiết hơn có sẵn trong Cài đặt.", "actions": { "readFiles": { "label": "Đọc tệp và thư mục", diff --git a/webview-ui/src/i18n/locales/zh-CN/chat.json b/webview-ui/src/i18n/locales/zh-CN/chat.json index 7d6205dc70..eb86f94529 100644 --- a/webview-ui/src/i18n/locales/zh-CN/chat.json +++ b/webview-ui/src/i18n/locales/zh-CN/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "自动批准:", "none": "无", - "description": "自动批准允许Roo Code无需请求许可即可执行操作。仅为您完全信任的操作启用。", + "description": "自动批准允许Roo Code无需请求许可即可执行操作。仅为您完全信任的操作启用。更详细的配置可在设置中查看。", "actions": { "readFiles": { "label": "读取文件和目录", diff --git a/webview-ui/src/i18n/locales/zh-TW/chat.json b/webview-ui/src/i18n/locales/zh-TW/chat.json index bfd69270e8..13c1e81745 100644 --- a/webview-ui/src/i18n/locales/zh-TW/chat.json +++ b/webview-ui/src/i18n/locales/zh-TW/chat.json @@ -159,7 +159,7 @@ "autoApprove": { "title": "自動批准:", "none": "無", - "description": "自動批准允許Roo Code無需請求許可即可執行操作。僅為您完全信任的操作啟用。", + "description": "自動批准允許Roo Code無需請求許可即可執行操作。僅為您完全信任的操作啟用。更詳細的配置可在設定中查看。", "actions": { "readFiles": { "label": "讀取檔案和目錄",