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

DRY up the auto-approve toggles (#2664)

* DRY up the auto-approve toggles

* Better subtask icon per @joemanley201
Chris Estreich 8 месяцев назад
Родитель
Сommit
1bbfd2e8e6

+ 88 - 176
webview-ui/src/components/chat/AutoApproveMenu.tsx

@@ -1,31 +1,11 @@
-import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
-import { useCallback, useState } from "react"
+import { useCallback, useMemo, useState } from "react"
 import { Trans } from "react-i18next"
 import { Trans } from "react-i18next"
-import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
-
-import { Button } from "@/components/ui"
+import { VSCodeCheckbox, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
 
 
 import { vscode } from "../../utils/vscode"
 import { vscode } from "../../utils/vscode"
 import { useExtensionState } from "../../context/ExtensionStateContext"
 import { useExtensionState } from "../../context/ExtensionStateContext"
 import { useAppTranslation } from "../../i18n/TranslationContext"
 import { useAppTranslation } from "../../i18n/TranslationContext"
-
-const ICON_MAP: Record<string, string> = {
-	readFiles: "eye",
-	editFiles: "edit",
-	executeCommands: "terminal",
-	useBrowser: "globe",
-	useMcp: "plug",
-	switchModes: "sync",
-	subtasks: "discard",
-	retryRequests: "refresh",
-}
-
-interface AutoApproveAction {
-	id: string
-	label: string
-	enabled: boolean
-	description: string
-}
+import { AutoApproveToggle, AutoApproveSetting, autoApproveSettingsConfig } from "../settings/AutoApproveToggle"
 
 
 interface AutoApproveMenuProps {
 interface AutoApproveMenuProps {
 	style?: React.CSSProperties
 	style?: React.CSSProperties
@@ -33,157 +13,108 @@ interface AutoApproveMenuProps {
 
 
 const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
 const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
 	const [isExpanded, setIsExpanded] = useState(false)
 	const [isExpanded, setIsExpanded] = useState(false)
+
 	const {
 	const {
+		autoApprovalEnabled,
+		setAutoApprovalEnabled,
 		alwaysAllowReadOnly,
 		alwaysAllowReadOnly,
-		setAlwaysAllowReadOnly,
 		alwaysAllowWrite,
 		alwaysAllowWrite,
-		setAlwaysAllowWrite,
 		alwaysAllowExecute,
 		alwaysAllowExecute,
-		setAlwaysAllowExecute,
 		alwaysAllowBrowser,
 		alwaysAllowBrowser,
-		setAlwaysAllowBrowser,
 		alwaysAllowMcp,
 		alwaysAllowMcp,
-		setAlwaysAllowMcp,
 		alwaysAllowModeSwitch,
 		alwaysAllowModeSwitch,
-		setAlwaysAllowModeSwitch,
 		alwaysAllowSubtasks,
 		alwaysAllowSubtasks,
-		setAlwaysAllowSubtasks,
 		alwaysApproveResubmit,
 		alwaysApproveResubmit,
+		setAlwaysAllowReadOnly,
+		setAlwaysAllowWrite,
+		setAlwaysAllowExecute,
+		setAlwaysAllowBrowser,
+		setAlwaysAllowMcp,
+		setAlwaysAllowModeSwitch,
+		setAlwaysAllowSubtasks,
 		setAlwaysApproveResubmit,
 		setAlwaysApproveResubmit,
-		autoApprovalEnabled,
-		setAutoApprovalEnabled,
 	} = useExtensionState()
 	} = useExtensionState()
 
 
 	const { t } = useAppTranslation()
 	const { t } = useAppTranslation()
 
 
-	const actions: AutoApproveAction[] = [
-		{
-			id: "readFiles",
-			label: t("chat:autoApprove.actions.readFiles.label"),
-			enabled: alwaysAllowReadOnly ?? false,
-			description: t("chat:autoApprove.actions.readFiles.description"),
-		},
-		{
-			id: "editFiles",
-			label: t("chat:autoApprove.actions.editFiles.label"),
-			enabled: alwaysAllowWrite ?? false,
-			description: t("chat:autoApprove.actions.editFiles.description"),
-		},
-		{
-			id: "executeCommands",
-			label: t("chat:autoApprove.actions.executeCommands.label"),
-			enabled: alwaysAllowExecute ?? false,
-			description: t("chat:autoApprove.actions.executeCommands.description"),
-		},
-		{
-			id: "useBrowser",
-			label: t("chat:autoApprove.actions.useBrowser.label"),
-			enabled: alwaysAllowBrowser ?? false,
-			description: t("chat:autoApprove.actions.useBrowser.description"),
-		},
-		{
-			id: "useMcp",
-			label: t("chat:autoApprove.actions.useMcp.label"),
-			enabled: alwaysAllowMcp ?? false,
-			description: t("chat:autoApprove.actions.useMcp.description"),
-		},
-		{
-			id: "switchModes",
-			label: t("chat:autoApprove.actions.switchModes.label"),
-			enabled: alwaysAllowModeSwitch ?? false,
-			description: t("chat:autoApprove.actions.switchModes.description"),
+	const onAutoApproveToggle = useCallback(
+		(key: AutoApproveSetting, value: boolean) => {
+			vscode.postMessage({ type: key, bool: value })
+
+			switch (key) {
+				case "alwaysAllowReadOnly":
+					setAlwaysAllowReadOnly(value)
+					break
+				case "alwaysAllowWrite":
+					setAlwaysAllowWrite(value)
+					break
+				case "alwaysAllowExecute":
+					setAlwaysAllowExecute(value)
+					break
+				case "alwaysAllowBrowser":
+					setAlwaysAllowBrowser(value)
+					break
+				case "alwaysAllowMcp":
+					setAlwaysAllowMcp(value)
+					break
+				case "alwaysAllowModeSwitch":
+					setAlwaysAllowModeSwitch(value)
+					break
+				case "alwaysAllowSubtasks":
+					setAlwaysAllowSubtasks(value)
+					break
+				case "alwaysApproveResubmit":
+					setAlwaysApproveResubmit(value)
+					break
+			}
 		},
 		},
-		{
-			id: "subtasks",
-			label: t("chat:autoApprove.actions.subtasks.label"),
-			enabled: alwaysAllowSubtasks ?? false,
-			description: t("chat:autoApprove.actions.subtasks.description"),
-		},
-		{
-			id: "retryRequests",
-			label: t("chat:autoApprove.actions.retryRequests.label"),
-			enabled: alwaysApproveResubmit ?? false,
-			description: t("chat:autoApprove.actions.retryRequests.description"),
-		},
-	]
+		[
+			setAlwaysAllowReadOnly,
+			setAlwaysAllowWrite,
+			setAlwaysAllowExecute,
+			setAlwaysAllowBrowser,
+			setAlwaysAllowMcp,
+			setAlwaysAllowModeSwitch,
+			setAlwaysAllowSubtasks,
+			setAlwaysApproveResubmit,
+		],
+	)
 
 
-	const toggleExpanded = useCallback(() => {
-		setIsExpanded((prev) => !prev)
-	}, [])
+	const toggleExpanded = useCallback(() => setIsExpanded((prev) => !prev), [])
+
+	const toggles = useMemo(
+		() => ({
+			alwaysAllowReadOnly: alwaysAllowReadOnly,
+			alwaysAllowWrite: alwaysAllowWrite,
+			alwaysAllowExecute: alwaysAllowExecute,
+			alwaysAllowBrowser: alwaysAllowBrowser,
+			alwaysAllowMcp: alwaysAllowMcp,
+			alwaysAllowModeSwitch: alwaysAllowModeSwitch,
+			alwaysAllowSubtasks: alwaysAllowSubtasks,
+			alwaysApproveResubmit: alwaysApproveResubmit,
+		}),
+		[
+			alwaysAllowReadOnly,
+			alwaysAllowWrite,
+			alwaysAllowExecute,
+			alwaysAllowBrowser,
+			alwaysAllowMcp,
+			alwaysAllowModeSwitch,
+			alwaysAllowSubtasks,
+			alwaysApproveResubmit,
+		],
+	)
 
 
-	const enabledActionsList = actions
-		.filter((action) => action.enabled)
-		.map((action) => action.label)
+	const enabledActionsList = Object.entries(toggles)
+		.filter(([_key, value]) => !!value)
+		.map(([key]) => t(autoApproveSettingsConfig[key as AutoApproveSetting].labelKey))
 		.join(", ")
 		.join(", ")
 
 
-	// Individual checkbox handlers - each one only updates its own state.
-	const handleReadOnlyChange = useCallback(() => {
-		const newValue = !(alwaysAllowReadOnly ?? false)
-		setAlwaysAllowReadOnly(newValue)
-		vscode.postMessage({ type: "alwaysAllowReadOnly", bool: newValue })
-	}, [alwaysAllowReadOnly, setAlwaysAllowReadOnly])
-
-	const handleWriteChange = useCallback(() => {
-		const newValue = !(alwaysAllowWrite ?? false)
-		setAlwaysAllowWrite(newValue)
-		vscode.postMessage({ type: "alwaysAllowWrite", bool: newValue })
-	}, [alwaysAllowWrite, setAlwaysAllowWrite])
-
-	const handleExecuteChange = useCallback(() => {
-		const newValue = !(alwaysAllowExecute ?? false)
-		setAlwaysAllowExecute(newValue)
-		vscode.postMessage({ type: "alwaysAllowExecute", bool: newValue })
-	}, [alwaysAllowExecute, setAlwaysAllowExecute])
-
-	const handleBrowserChange = useCallback(() => {
-		const newValue = !(alwaysAllowBrowser ?? false)
-		setAlwaysAllowBrowser(newValue)
-		vscode.postMessage({ type: "alwaysAllowBrowser", bool: newValue })
-	}, [alwaysAllowBrowser, setAlwaysAllowBrowser])
-
-	const handleMcpChange = useCallback(() => {
-		const newValue = !(alwaysAllowMcp ?? false)
-		setAlwaysAllowMcp(newValue)
-		vscode.postMessage({ type: "alwaysAllowMcp", bool: newValue })
-	}, [alwaysAllowMcp, setAlwaysAllowMcp])
-
-	const handleModeSwitchChange = useCallback(() => {
-		const newValue = !(alwaysAllowModeSwitch ?? false)
-		setAlwaysAllowModeSwitch(newValue)
-		vscode.postMessage({ type: "alwaysAllowModeSwitch", bool: newValue })
-	}, [alwaysAllowModeSwitch, setAlwaysAllowModeSwitch])
-
-	const handleSubtasksChange = useCallback(() => {
-		const newValue = !(alwaysAllowSubtasks ?? false)
-		setAlwaysAllowSubtasks(newValue)
-		vscode.postMessage({ type: "alwaysAllowSubtasks", bool: newValue })
-	}, [alwaysAllowSubtasks, setAlwaysAllowSubtasks])
-
-	const handleRetryChange = useCallback(() => {
-		const newValue = !(alwaysApproveResubmit ?? false)
-		setAlwaysApproveResubmit(newValue)
-		vscode.postMessage({ type: "alwaysApproveResubmit", bool: newValue })
-	}, [alwaysApproveResubmit, setAlwaysApproveResubmit])
-
-	const handleOpenSettings = useCallback(() => {
-		window.postMessage({
-			type: "action",
-			action: "settingsButtonClicked",
-			values: { section: "autoApprove" },
-		})
-	}, [])
-
-	// Map action IDs to their specific handlers.
-	const actionHandlers: Record<AutoApproveAction["id"], () => void> = {
-		readFiles: handleReadOnlyChange,
-		editFiles: handleWriteChange,
-		executeCommands: handleExecuteChange,
-		useBrowser: handleBrowserChange,
-		useMcp: handleMcpChange,
-		switchModes: handleModeSwitchChange,
-		subtasks: handleSubtasksChange,
-		retryRequests: handleRetryChange,
-	}
+	const handleOpenSettings = useCallback(
+		() =>
+			window.postMessage({ type: "action", action: "settingsButtonClicked", values: { section: "autoApprove" } }),
+		[],
+	)
 
 
 	return (
 	return (
 		<div
 		<div
@@ -250,6 +181,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
 					/>
 					/>
 				</div>
 				</div>
 			</div>
 			</div>
+
 			{isExpanded && (
 			{isExpanded && (
 				<div className="flex flex-col gap-2">
 				<div className="flex flex-col gap-2">
 					<div
 					<div
@@ -264,27 +196,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
 							}}
 							}}
 						/>
 						/>
 					</div>
 					</div>
-					<div className="grid grid-cols-2 [@media(min-width:320px)]:grid-cols-4 gap-2">
-						{actions.map((action) => {
-							const codicon = ICON_MAP[action.id] || "question"
-							return (
-								<Button
-									key={action.id}
-									variant={action.enabled ? "default" : "ghost"}
-									onClick={(e) => {
-										e.stopPropagation()
-										actionHandlers[action.id]()
-									}}
-									title={action.description}
-									className="h-12">
-									<span className="flex flex-col items-center gap-1">
-										<span className={`codicon codicon-${codicon}`} />
-										<span className="text-sm text-center">{action.label}</span>
-									</span>
-								</Button>
-							)
-						})}
-					</div>
+					<AutoApproveToggle {...toggles} onToggle={onAutoApproveToggle} />
 				</div>
 				</div>
 			)}
 			)}
 		</div>
 		</div>

+ 31 - 109
webview-ui/src/components/settings/AutoApproveSettings.tsx

@@ -1,72 +1,15 @@
 import { HTMLAttributes, useState } from "react"
 import { HTMLAttributes, useState } from "react"
-import { useAppTranslation } from "@/i18n/TranslationContext"
-import { VSCodeButton, VSCodeTextField, VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
+import { X } from "lucide-react"
 
 
+import { useAppTranslation } from "@/i18n/TranslationContext"
+import { VSCodeTextField, VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
 import { vscode } from "@/utils/vscode"
 import { vscode } from "@/utils/vscode"
 import { Button, Slider } from "@/components/ui"
 import { Button, Slider } from "@/components/ui"
 
 
 import { SetCachedStateField } from "./types"
 import { SetCachedStateField } from "./types"
 import { SectionHeader } from "./SectionHeader"
 import { SectionHeader } from "./SectionHeader"
 import { Section } from "./Section"
 import { Section } from "./Section"
-
-const AUTO_APPROVE_SETTINGS_CONFIG = [
-	{
-		key: "alwaysAllowReadOnly",
-		labelKey: "settings:autoApprove.readOnly.label",
-		descriptionKey: "settings:autoApprove.readOnly.description",
-		icon: "eye",
-		testId: "always-allow-readonly-toggle",
-	},
-	{
-		key: "alwaysAllowWrite",
-		labelKey: "settings:autoApprove.write.label",
-		descriptionKey: "settings:autoApprove.write.description",
-		icon: "edit",
-		testId: "always-allow-write-toggle",
-	},
-	{
-		key: "alwaysAllowBrowser",
-		labelKey: "settings:autoApprove.browser.label",
-		descriptionKey: "settings:autoApprove.browser.description",
-		icon: "globe",
-		testId: "always-allow-browser-toggle",
-	},
-	{
-		key: "alwaysApproveResubmit",
-		labelKey: "settings:autoApprove.retry.label",
-		descriptionKey: "settings:autoApprove.retry.description",
-		icon: "refresh",
-		testId: "always-approve-resubmit-toggle",
-	},
-	{
-		key: "alwaysAllowMcp",
-		labelKey: "settings:autoApprove.mcp.label",
-		descriptionKey: "settings:autoApprove.mcp.description",
-		icon: "plug",
-		testId: "always-allow-mcp-toggle",
-	},
-	{
-		key: "alwaysAllowModeSwitch",
-		labelKey: "settings:autoApprove.modeSwitch.label",
-		descriptionKey: "settings:autoApprove.modeSwitch.description",
-		icon: "sync",
-		testId: "always-allow-mode-switch-toggle",
-	},
-	{
-		key: "alwaysAllowSubtasks",
-		labelKey: "settings:autoApprove.subtasks.label",
-		descriptionKey: "settings:autoApprove.subtasks.description",
-		icon: "discard",
-		testId: "always-allow-subtasks-toggle",
-	},
-	{
-		key: "alwaysAllowExecute",
-		labelKey: "settings:autoApprove.execute.label",
-		descriptionKey: "settings:autoApprove.execute.description",
-		icon: "terminal",
-		testId: "always-allow-execute-toggle",
-	},
-]
+import { AutoApproveToggle } from "./AutoApproveToggle"
 
 
 type AutoApproveSettingsProps = HTMLAttributes<HTMLDivElement> & {
 type AutoApproveSettingsProps = HTMLAttributes<HTMLDivElement> & {
 	alwaysAllowReadOnly?: boolean
 	alwaysAllowReadOnly?: boolean
@@ -122,6 +65,7 @@ export const AutoApproveSettings = ({
 
 
 	const handleAddCommand = () => {
 	const handleAddCommand = () => {
 		const currentCommands = allowedCommands ?? []
 		const currentCommands = allowedCommands ?? []
+
 		if (commandInput && !currentCommands.includes(commandInput)) {
 		if (commandInput && !currentCommands.includes(commandInput)) {
 			const newCommands = [...currentCommands, commandInput]
 			const newCommands = [...currentCommands, commandInput]
 			setCachedStateField("allowedCommands", newCommands)
 			setCachedStateField("allowedCommands", newCommands)
@@ -140,37 +84,17 @@ export const AutoApproveSettings = ({
 			</SectionHeader>
 			</SectionHeader>
 
 
 			<Section>
 			<Section>
-				<div className="grid grid-cols-2 [@media(min-width:320px)]:grid-cols-4 gap-2">
-					{AUTO_APPROVE_SETTINGS_CONFIG.map((cfg) => {
-						const boolValues = {
-							alwaysAllowReadOnly,
-							alwaysAllowWrite,
-							alwaysAllowBrowser,
-							alwaysApproveResubmit,
-							alwaysAllowMcp,
-							alwaysAllowModeSwitch,
-							alwaysAllowSubtasks,
-							alwaysAllowExecute,
-						}
-
-						const value = boolValues[cfg.key as keyof typeof boolValues] ?? false
-
-						return (
-							<Button
-								key={cfg.key}
-								variant={value ? "default" : "ghost"}
-								onClick={() => setCachedStateField(cfg.key as any, !value)}
-								title={t(cfg.descriptionKey || "")}
-								data-testid={cfg.testId}
-								className="h-12">
-								<span className="flex flex-col items-center gap-1">
-									<span className={`codicon codicon-${cfg.icon}`} />
-									<span className="text-sm text-center">{t(cfg.labelKey)}</span>
-								</span>
-							</Button>
-						)
-					})}
-				</div>
+				<AutoApproveToggle
+					alwaysAllowReadOnly={alwaysAllowReadOnly}
+					alwaysAllowWrite={alwaysAllowWrite}
+					alwaysAllowBrowser={alwaysAllowBrowser}
+					alwaysApproveResubmit={alwaysApproveResubmit}
+					alwaysAllowMcp={alwaysAllowMcp}
+					alwaysAllowModeSwitch={alwaysAllowModeSwitch}
+					alwaysAllowSubtasks={alwaysAllowSubtasks}
+					alwaysAllowExecute={alwaysAllowExecute}
+					onToggle={(key, value) => setCachedStateField(key, value)}
+				/>
 
 
 				{/* ADDITIONAL SETTINGS */}
 				{/* ADDITIONAL SETTINGS */}
 
 
@@ -293,29 +217,27 @@ export const AutoApproveSettings = ({
 								className="grow"
 								className="grow"
 								data-testid="command-input"
 								data-testid="command-input"
 							/>
 							/>
-							<VSCodeButton onClick={handleAddCommand} data-testid="add-command-button">
+							<Button onClick={handleAddCommand} data-testid="add-command-button">
 								{t("settings:autoApprove.execute.addButton")}
 								{t("settings:autoApprove.execute.addButton")}
-							</VSCodeButton>
+							</Button>
 						</div>
 						</div>
 
 
 						<div className="flex flex-wrap gap-2">
 						<div className="flex flex-wrap gap-2">
 							{(allowedCommands ?? []).map((cmd, index) => (
 							{(allowedCommands ?? []).map((cmd, index) => (
-								<div
+								<Button
 									key={index}
 									key={index}
-									className="border border-vscode-input-border bg-primary text-primary-foreground flex items-center gap-1 rounded-xs px-1.5 p-0.5">
-									<span>{cmd}</span>
-									<VSCodeButton
-										appearance="icon"
-										className="text-primary-foreground"
-										data-testid={`remove-command-${index}`}
-										onClick={() => {
-											const newCommands = (allowedCommands ?? []).filter((_, i) => i !== index)
-											setCachedStateField("allowedCommands", newCommands)
-											vscode.postMessage({ type: "allowedCommands", commands: newCommands })
-										}}>
-										<span className="codicon codicon-close" />
-									</VSCodeButton>
-								</div>
+									variant="secondary"
+									data-testid={`remove-command-${index}`}
+									onClick={() => {
+										const newCommands = (allowedCommands ?? []).filter((_, i) => i !== index)
+										setCachedStateField("allowedCommands", newCommands)
+										vscode.postMessage({ type: "allowedCommands", commands: newCommands })
+									}}>
+									<div className="flex flex-row items-center gap-1">
+										<div>{cmd}</div>
+										<X className="text-primary-foreground scale-75" />
+									</div>
+								</Button>
 							))}
 							))}
 						</div>
 						</div>
 					</div>
 					</div>

+ 122 - 0
webview-ui/src/components/settings/AutoApproveToggle.tsx

@@ -0,0 +1,122 @@
+import { useAppTranslation } from "@/i18n/TranslationContext"
+import { cn } from "@/lib/utils"
+import { Button } from "@/components/ui"
+
+import { GlobalSettings } from "../../../../src/schemas"
+
+type AutoApproveToggles = Pick<
+	GlobalSettings,
+	| "alwaysAllowReadOnly"
+	| "alwaysAllowWrite"
+	| "alwaysAllowBrowser"
+	| "alwaysApproveResubmit"
+	| "alwaysAllowMcp"
+	| "alwaysAllowModeSwitch"
+	| "alwaysAllowSubtasks"
+	| "alwaysAllowExecute"
+>
+
+export type AutoApproveSetting = keyof AutoApproveToggles
+
+type AutoApproveConfig = {
+	key: AutoApproveSetting
+	labelKey: string
+	descriptionKey: string
+	icon: string
+	testId: string
+}
+
+export const autoApproveSettingsConfig: Record<AutoApproveSetting, AutoApproveConfig> = {
+	alwaysAllowReadOnly: {
+		key: "alwaysAllowReadOnly",
+		labelKey: "settings:autoApprove.readOnly.label",
+		descriptionKey: "settings:autoApprove.readOnly.description",
+		icon: "eye",
+		testId: "always-allow-readonly-toggle",
+	},
+	alwaysAllowWrite: {
+		key: "alwaysAllowWrite",
+		labelKey: "settings:autoApprove.write.label",
+		descriptionKey: "settings:autoApprove.write.description",
+		icon: "edit",
+		testId: "always-allow-write-toggle",
+	},
+	alwaysAllowBrowser: {
+		key: "alwaysAllowBrowser",
+		labelKey: "settings:autoApprove.browser.label",
+		descriptionKey: "settings:autoApprove.browser.description",
+		icon: "globe",
+		testId: "always-allow-browser-toggle",
+	},
+	alwaysApproveResubmit: {
+		key: "alwaysApproveResubmit",
+		labelKey: "settings:autoApprove.retry.label",
+		descriptionKey: "settings:autoApprove.retry.description",
+		icon: "refresh",
+		testId: "always-approve-resubmit-toggle",
+	},
+	alwaysAllowMcp: {
+		key: "alwaysAllowMcp",
+		labelKey: "settings:autoApprove.mcp.label",
+		descriptionKey: "settings:autoApprove.mcp.description",
+		icon: "plug",
+		testId: "always-allow-mcp-toggle",
+	},
+	alwaysAllowModeSwitch: {
+		key: "alwaysAllowModeSwitch",
+		labelKey: "settings:autoApprove.modeSwitch.label",
+		descriptionKey: "settings:autoApprove.modeSwitch.description",
+		icon: "sync",
+		testId: "always-allow-mode-switch-toggle",
+	},
+	alwaysAllowSubtasks: {
+		key: "alwaysAllowSubtasks",
+		labelKey: "settings:autoApprove.subtasks.label",
+		descriptionKey: "settings:autoApprove.subtasks.description",
+		icon: "list-tree",
+		testId: "always-allow-subtasks-toggle",
+	},
+	alwaysAllowExecute: {
+		key: "alwaysAllowExecute",
+		labelKey: "settings:autoApprove.execute.label",
+		descriptionKey: "settings:autoApprove.execute.description",
+		icon: "terminal",
+		testId: "always-allow-execute-toggle",
+	},
+}
+
+type AutoApproveToggleProps = AutoApproveToggles & {
+	onToggle: (key: AutoApproveSetting, value: boolean) => void
+}
+
+export const AutoApproveToggle = ({ onToggle, ...props }: AutoApproveToggleProps) => {
+	const { t } = useAppTranslation()
+
+	return (
+		<div
+			className={cn(
+				"grid grid-cols-2",
+				"[@media(min-width:260px)]:grid-cols-3",
+				"[@media(min-width:320px)]:grid-cols-4",
+				"[@media(min-width:480px)]:grid-cols-6",
+				"[@media(min-width:640px)]:grid-cols-8",
+				"gap-2",
+			)}>
+			{Object.values(autoApproveSettingsConfig).map(({ key, descriptionKey, labelKey, icon, testId }) => (
+				<div key={key} className="aspect-square">
+					<Button
+						variant="secondary"
+						onClick={() => onToggle(key, !props[key])}
+						title={t(descriptionKey || "")}
+						data-testid={testId}
+						className={cn("w-full h-full", { "opacity-50": !props[key] })}>
+						<span className="flex flex-col items-center gap-1">
+							<span className={`codicon codicon-${icon}`} />
+							<span className="text-sm text-center">{t(labelKey)}</span>
+						</span>
+					</Button>
+				</div>
+			))}
+		</div>
+	)
+}

+ 1 - 35
webview-ui/src/i18n/locales/ca/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "Aprovació automàtica:",
 		"title": "Aprovació automàtica:",
 		"none": "Cap",
 		"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. Configuració més detallada disponible a la <settingsLink>Configuració</settingsLink>.",
-		"actions": {
-			"readFiles": {
-				"label": "Llegir",
-				"description": "Permet l'accés per llegir qualsevol fitxer al teu ordinador."
-			},
-			"editFiles": {
-				"label": "Editar",
-				"description": "Permet la modificació de qualsevol fitxer al teu ordinador."
-			},
-			"executeCommands": {
-				"label": "Ordres",
-				"description": "Permet l'execució d'ordres de terminal aprovades. Pots configurar-ho al panell de configuració."
-			},
-			"useBrowser": {
-				"label": "Navegador",
-				"description": "Permet la capacitat d'iniciar i interactuar amb qualsevol lloc web en un navegador headless."
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "Permet l'ús de servidors MCP configurats que poden modificar el sistema de fitxers o interactuar amb APIs."
-			},
-			"switchModes": {
-				"label": "Modes",
-				"description": "Permet el canvi automàtic entre diferents modes sense requerir aprovació."
-			},
-			"subtasks": {
-				"label": "Subtasques",
-				"description": "Permet la creació i finalització de subtasques sense requerir aprovació."
-			},
-			"retryRequests": {
-				"label": "Reintents",
-				"description": "Reintenta automàticament les sol·licituds API fallides quan el proveïdor retorna una resposta d'error."
-			}
-		}
+		"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>."
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "Pensant",
 		"thinking": "Pensant",

+ 1 - 35
webview-ui/src/i18n/locales/de/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "Automatische Genehmigung:",
 		"title": "Automatische Genehmigung:",
 		"none": "Keine",
 		"none": "Keine",
-		"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>.",
-		"actions": {
-			"readFiles": {
-				"label": "Lesen",
-				"description": "Erlaubt Zugriff zum Lesen jeder Datei auf deinem Computer."
-			},
-			"editFiles": {
-				"label": "Bearbeiten",
-				"description": "Erlaubt die Änderung jeder Datei auf deinem Computer."
-			},
-			"executeCommands": {
-				"label": "Befehle",
-				"description": "Erlaubt die Ausführung genehmigter Terminal-Befehle. Du kannst dies im Einstellungsfenster konfigurieren."
-			},
-			"useBrowser": {
-				"label": "Browser",
-				"description": "Erlaubt die Fähigkeit, jede Website in einem Headless-Browser zu starten und mit ihr zu interagieren."
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "Erlaubt die Verwendung konfigurierter MCP-Server, die das Dateisystem ändern oder mit APIs interagieren können."
-			},
-			"switchModes": {
-				"label": "Modi",
-				"description": "Erlaubt automatischen Wechsel zwischen verschiedenen Modi ohne erforderliche Genehmigung."
-			},
-			"subtasks": {
-				"label": "Teilaufgaben",
-				"description": "Erlaubt die Erstellung und den Abschluss von Teilaufgaben ohne erforderliche Genehmigung."
-			},
-			"retryRequests": {
-				"label": "Wiederholungen",
-				"description": "Wiederholt automatisch fehlgeschlagene API-Anfragen, wenn der Anbieter eine Fehlermeldung zurückgibt."
-			}
-		}
+		"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>."
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "Denke nach",
 		"thinking": "Denke nach",

+ 1 - 35
webview-ui/src/i18n/locales/en/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "Auto-approve:",
 		"title": "Auto-approve:",
 		"none": "None",
 		"none": "None",
-		"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>.",
-		"actions": {
-			"readFiles": {
-				"label": "Read",
-				"description": "Allows access to read any file on your computer."
-			},
-			"editFiles": {
-				"label": "Edit",
-				"description": "Allows modification of any files on your computer."
-			},
-			"executeCommands": {
-				"label": "Commands",
-				"description": "Allows execution of approved terminal commands. You can configure this in the settings panel."
-			},
-			"useBrowser": {
-				"label": "Browser",
-				"description": "Allows ability to launch and interact with any website in a headless browser."
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "Allows use of configured MCP servers which may modify filesystem or interact with APIs."
-			},
-			"switchModes": {
-				"label": "Modes",
-				"description": "Allows automatic switching between different modes without requiring approval."
-			},
-			"subtasks": {
-				"label": "Subtasks",
-				"description": "Allow creation and completion of subtasks without requiring approval."
-			},
-			"retryRequests": {
-				"label": "Retries",
-				"description": "Automatically retry failed API requests when the provider returns an error response."
-			}
-		}
+		"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>."
 	},
 	},
 	"announcement": {
 	"announcement": {
 		"title": "Do more with Boomerang Tasks 🪃",
 		"title": "Do more with Boomerang Tasks 🪃",

+ 1 - 35
webview-ui/src/i18n/locales/es/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "Auto-aprobar:",
 		"title": "Auto-aprobar:",
 		"none": "Ninguno",
 		"none": "Ninguno",
-		"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>.",
-		"actions": {
-			"readFiles": {
-				"label": "Lectura",
-				"description": "Permite acceso para leer cualquier archivo en tu computadora."
-			},
-			"editFiles": {
-				"label": "Edición",
-				"description": "Permite la modificación de cualquier archivo en tu computadora."
-			},
-			"executeCommands": {
-				"label": "Comandos",
-				"description": "Permite la ejecución de comandos de terminal aprobados. Puedes configurar esto en el panel de configuración."
-			},
-			"useBrowser": {
-				"label": "Navegador",
-				"description": "Permite la capacidad de iniciar e interactuar con cualquier sitio web en un navegador sin interfaz."
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "Permite el uso de servidores MCP configurados que pueden modificar el sistema de archivos o interactuar con APIs."
-			},
-			"switchModes": {
-				"label": "Modos",
-				"description": "Permite el cambio automático entre diferentes modos sin requerir aprobación."
-			},
-			"subtasks": {
-				"label": "Subtareas",
-				"description": "Permite la creación y finalización de subtareas sin requerir aprobación."
-			},
-			"retryRequests": {
-				"label": "Reintentos",
-				"description": "Reintenta automáticamente las solicitudes API fallidas cuando el proveedor devuelve una respuesta de error."
-			}
-		}
+		"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>."
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "Pensando",
 		"thinking": "Pensando",

+ 1 - 35
webview-ui/src/i18n/locales/fr/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "Auto-approbation :",
 		"title": "Auto-approbation :",
 		"none": "Aucune",
 		"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. Configuration plus détaillée disponible dans les <settingsLink>Paramètres</settingsLink>.",
-		"actions": {
-			"readFiles": {
-				"label": "Lecture",
-				"description": "Permet l'accès en lecture à n'importe quel fichier sur votre ordinateur."
-			},
-			"editFiles": {
-				"label": "Édition",
-				"description": "Permet la modification de n'importe quel fichier sur votre ordinateur."
-			},
-			"executeCommands": {
-				"label": "Commandes",
-				"description": "Permet l'exécution de commandes de terminal approuvées. Vous pouvez configurer cela dans le panneau des paramètres."
-			},
-			"useBrowser": {
-				"label": "Navigateur",
-				"description": "Permet de lancer et d'interagir avec n'importe quel site web dans un navigateur sans interface."
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "Permet l'utilisation de serveurs MCP configurés qui peuvent modifier le système de fichiers ou interagir avec des APIs."
-			},
-			"switchModes": {
-				"label": "Modes",
-				"description": "Permet le changement automatique entre différents modes sans nécessiter d'approbation."
-			},
-			"subtasks": {
-				"label": "Sous-tâches",
-				"description": "Permet la création et l'achèvement de sous-tâches sans nécessiter d'approbation."
-			},
-			"retryRequests": {
-				"label": "Réessais",
-				"description": "Réessaie automatiquement les requêtes API échouées lorsque le fournisseur renvoie une réponse d'erreur."
-			}
-		}
+		"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>."
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "Réflexion",
 		"thinking": "Réflexion",

+ 1 - 35
webview-ui/src/i18n/locales/hi/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "स्वत:-स्वीकृति:",
 		"title": "स्वत:-स्वीकृति:",
 		"none": "कोई नहीं",
 		"none": "कोई नहीं",
-		"description": "स्वत:-स्वीकृति Roo Code को अनुमति मांगे बिना क्रियाएँ करने की अनुमति देती है। केवल उन क्रियाओं के लिए सक्षम करें जिन पर आप पूरी तरह से विश्वास करते हैं। अधिक विस्तृत कॉन्फ़िगरेशन <settingsLink>सेटिंग्स</settingsLink> में उपलब्ध है।",
-		"actions": {
-			"readFiles": {
-				"label": "पढ़ें",
-				"description": "आपके कंप्यूटर पर किसी भी फ़ाइल को पढ़ने के लिए पहुँच की अनुमति देता है।"
-			},
-			"editFiles": {
-				"label": "संपादित करें",
-				"description": "आपके कंप्यूटर पर किसी भी फ़ाइल को संशोधित करने की अनुमति देता है।"
-			},
-			"executeCommands": {
-				"label": "कमांड्स",
-				"description": "स्वीकृत टर्मिनल कमांड के निष्पादन की अनुमति देता है। आप इसे सेटिंग्स पैनल में कॉन्फ़िगर कर सकते हैं।"
-			},
-			"useBrowser": {
-				"label": "ब्राउज़र",
-				"description": "हेडलेस ब्राउज़र में किसी भी वेबसाइट को लॉन्च करने और उसके साथ इंटरैक्ट करने की क्षमता की अनुमति देता है।"
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "कॉन्फ़िगर किए गए MCP सर्वर के उपयोग की अनुमति देता है जो फ़ाइल सिस्टम को संशोधित कर सकते हैं या API के साथ इंटरैक्ट कर सकते हैं।"
-			},
-			"switchModes": {
-				"label": "मोड्स",
-				"description": "स्वीकृति की आवश्यकता के बिना विभिन्न मोड के बीच स्वचालित स्विचिंग की अनुमति देता है।"
-			},
-			"subtasks": {
-				"label": "उपकार्य",
-				"description": "स्वीकृति की आवश्यकता के बिना उपकार्यों के निर्माण और पूर्णता की अनुमति देता है।"
-			},
-			"retryRequests": {
-				"label": "पुनः प्रयास",
-				"description": "जब प्रदाता त्रुटि प्रतिक्रिया लौटाता है तो विफल API अनुरोधों को स्वचालित रूप से पुनः प्रयास करता है।"
-			}
-		}
+		"description": "स्वत:-स्वीकृति Roo Code को अनुमति मांगे बिना क्रियाएँ करने की अनुमति देती है। केवल उन क्रियाओं के लिए सक्षम करें जिन पर आप पूरी तरह से विश्वास करते हैं। अधिक विस्तृत कॉन्फ़िगरेशन <settingsLink>सेटिंग्स</settingsLink> में उपलब्ध है।"
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "विचार कर रहा है",
 		"thinking": "विचार कर रहा है",

+ 1 - 35
webview-ui/src/i18n/locales/it/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "Auto-approvazione:",
 		"title": "Auto-approvazione:",
 		"none": "Nessuna",
 		"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. Configurazione più dettagliata disponibile nelle <settingsLink>Impostazioni</settingsLink>.",
-		"actions": {
-			"readFiles": {
-				"label": "Lettura",
-				"description": "Consente l'accesso per leggere qualsiasi file sul tuo computer."
-			},
-			"editFiles": {
-				"label": "Modifica",
-				"description": "Consente la modifica di qualsiasi file sul tuo computer."
-			},
-			"executeCommands": {
-				"label": "Comandi",
-				"description": "Consente l'esecuzione di comandi da terminale approvati. Puoi configurare questo nel pannello delle impostazioni."
-			},
-			"useBrowser": {
-				"label": "Browser",
-				"description": "Consente la capacità di avviare e interagire con qualsiasi sito web in un browser headless."
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "Consente l'uso di server MCP configurati che possono modificare il filesystem o interagire con API."
-			},
-			"switchModes": {
-				"label": "Modalità",
-				"description": "Consente il passaggio automatico tra diverse modalità senza richiedere approvazione."
-			},
-			"subtasks": {
-				"label": "Sottoattività",
-				"description": "Consente la creazione e il completamento di sottoattività senza richiedere approvazione."
-			},
-			"retryRequests": {
-				"label": "Ritentativi",
-				"description": "Riprova automaticamente le richieste API fallite quando il provider restituisce una risposta di errore."
-			}
-		}
+		"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>."
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "Sto pensando",
 		"thinking": "Sto pensando",

+ 1 - 35
webview-ui/src/i18n/locales/ja/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "自動承認:",
 		"title": "自動承認:",
 		"none": "なし",
 		"none": "なし",
-		"description": "自動承認はRoo Codeに許可を求めずに操作を実行する権限を与えます。完全に信頼できる操作のみ有効にしてください。より詳細な設定は<settingsLink>設定</settingsLink>で利用できます。",
-		"actions": {
-			"readFiles": {
-				"label": "読み取り",
-				"description": "コンピュータ上の任意のファイルを読み取るアクセスを許可します。"
-			},
-			"editFiles": {
-				"label": "編集",
-				"description": "コンピュータ上の任意のファイルを変更することを許可します。"
-			},
-			"executeCommands": {
-				"label": "コマンド",
-				"description": "承認されたターミナルコマンドの実行を許可します。設定パネルで構成できます。"
-			},
-			"useBrowser": {
-				"label": "ブラウザ",
-				"description": "ヘッドレスブラウザで任意のウェブサイトを起動して操作する能力を許可します。"
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "ファイルシステムを変更したりAPIと対話したりできる構成済みMCPサーバーの使用を許可します。"
-			},
-			"switchModes": {
-				"label": "モード",
-				"description": "承認を必要とせず、異なるモード間の自動切り替えを許可します。"
-			},
-			"subtasks": {
-				"label": "サブタスク",
-				"description": "承認を必要とせずにサブタスクの作成と完了を許可します。"
-			},
-			"retryRequests": {
-				"label": "再試行",
-				"description": "プロバイダーがエラー応答を返した場合、失敗したAPIリクエストを自動的に再試行します。"
-			}
-		}
+		"description": "自動承認はRoo Codeに許可を求めずに操作を実行する権限を与えます。完全に信頼できる操作のみ有効にしてください。より詳細な設定は<settingsLink>設定</settingsLink>で利用できます。"
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "考え中",
 		"thinking": "考え中",

+ 1 - 35
webview-ui/src/i18n/locales/ko/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "자동 승인:",
 		"title": "자동 승인:",
 		"none": "없음",
 		"none": "없음",
-		"description": "자동 승인을 사용하면 Roo Code가 권한을 요청하지 않고 작업을 수행할 수 있습니다. 완전히 신뢰할 수 있는 작업에만 활성화하세요. 더 자세한 구성은 <settingsLink>설정</settingsLink>에서 사용할 수 있습니다.",
-		"actions": {
-			"readFiles": {
-				"label": "읽기",
-				"description": "컴퓨터의 모든 파일을 읽을 수 있는 액세스 권한을 허용합니다."
-			},
-			"editFiles": {
-				"label": "편집",
-				"description": "컴퓨터의 모든 파일을 수정할 수 있는 권한을 허용합니다."
-			},
-			"executeCommands": {
-				"label": "명령",
-				"description": "승인된 터미널 명령 실행을 허용합니다. 설정 패널에서 구성할 수 있습니다."
-			},
-			"useBrowser": {
-				"label": "브라우저",
-				"description": "헤드리스 브라우저에서 모든 웹사이트를 실행하고 상호작용할 수 있는 기능을 허용합니다."
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "파일 시스템을 수정하거나 API와 상호작용할 수 있는 구성된 MCP 서버 사용을 허용합니다."
-			},
-			"switchModes": {
-				"label": "모드",
-				"description": "승인 없이 다른 모드 간 자동 전환을 허용합니다."
-			},
-			"subtasks": {
-				"label": "하위 작업",
-				"description": "승인 없이 하위 작업 생성 및 완료를 허용합니다."
-			},
-			"retryRequests": {
-				"label": "재시도",
-				"description": "제공자가 오류 응답을 반환할 때 실패한 API 요청을 자동으로 재시도합니다."
-			}
-		}
+		"description": "자동 승인을 사용하면 Roo Code가 권한을 요청하지 않고 작업을 수행할 수 있습니다. 완전히 신뢰할 수 있는 작업에만 활성화하세요. 더 자세한 구성은 <settingsLink>설정</settingsLink>에서 사용할 수 있습니다."
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "생각 중",
 		"thinking": "생각 중",

+ 1 - 35
webview-ui/src/i18n/locales/pl/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "Automatyczne zatwierdzanie:",
 		"title": "Automatyczne zatwierdzanie:",
 		"none": "Brak",
 		"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. Bardziej szczegółowa konfiguracja dostępna w <settingsLink>Ustawieniach</settingsLink>.",
-		"actions": {
-			"readFiles": {
-				"label": "Odczyt",
-				"description": "Pozwala na dostęp do odczytu dowolnego pliku na Twoim komputerze."
-			},
-			"editFiles": {
-				"label": "Edycja",
-				"description": "Pozwala na modyfikację dowolnych plików na Twoim komputerze."
-			},
-			"executeCommands": {
-				"label": "Polecenia",
-				"description": "Pozwala na wykonywanie zatwierdzonych poleceń terminala. Możesz to skonfigurować w panelu ustawień."
-			},
-			"useBrowser": {
-				"label": "Przeglądarka",
-				"description": "Pozwala na uruchamianie i interakcję z dowolną stroną internetową w przeglądarce bezinterfejsowej."
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "Pozwala na korzystanie ze skonfigurowanych serwerów MCP, które mogą modyfikować system plików lub wchodzić w interakcje z API."
-			},
-			"switchModes": {
-				"label": "Tryby",
-				"description": "Pozwala na automatyczne przełączanie między różnymi trybami bez wymagania zatwierdzenia."
-			},
-			"subtasks": {
-				"label": "Podzadania",
-				"description": "Pozwala na tworzenie i kończenie podzadań bez wymagania zatwierdzenia."
-			},
-			"retryRequests": {
-				"label": "Ponowienia",
-				"description": "Automatycznie ponawia nieudane zapytania API, gdy dostawca zwraca odpowiedź z błędem."
-			}
-		}
+		"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 <settingsLink>Ustawieniach</settingsLink>."
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "Myślenie",
 		"thinking": "Myślenie",

+ 1 - 35
webview-ui/src/i18n/locales/pt-BR/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "Aprovação automática:",
 		"title": "Aprovação automática:",
 		"none": "Nenhuma",
 		"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. Configuração mais detalhada disponível nas <settingsLink>Configurações</settingsLink>.",
-		"actions": {
-			"readFiles": {
-				"label": "Leitura",
-				"description": "Permite acesso para ler qualquer arquivo em seu computador."
-			},
-			"editFiles": {
-				"label": "Edição",
-				"description": "Permite a modificação de quaisquer arquivos em seu computador."
-			},
-			"executeCommands": {
-				"label": "Comandos",
-				"description": "Permite a execução de comandos de terminal aprovados. Você pode configurar isso no painel de configurações."
-			},
-			"useBrowser": {
-				"label": "Navegador",
-				"description": "Permite a capacidade de iniciar e interagir com qualquer site em um navegador headless."
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "Permite o uso de servidores MCP configurados que podem modificar o sistema de arquivos ou interagir com APIs."
-			},
-			"switchModes": {
-				"label": "Modos",
-				"description": "Permite a alternância automática entre diferentes modos sem exigir aprovação."
-			},
-			"subtasks": {
-				"label": "Subtarefas",
-				"description": "Permite a criação e conclusão de subtarefas sem exigir aprovação."
-			},
-			"retryRequests": {
-				"label": "Retentativas",
-				"description": "Retenta automaticamente requisições de API falhas quando o provedor retorna uma resposta de erro."
-			}
-		}
+		"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 <settingsLink>Configurações</settingsLink>."
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "Pensando",
 		"thinking": "Pensando",

+ 1 - 35
webview-ui/src/i18n/locales/tr/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "Otomatik-onay:",
 		"title": "Otomatik-onay:",
 		"none": "Hiçbiri",
 		"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. Daha detaylı yapılandırma <settingsLink>Ayarlar</settingsLink>'da mevcuttur.",
-		"actions": {
-			"readFiles": {
-				"label": "Okuma",
-				"description": "Bilgisayarınızdaki herhangi bir dosyayı okuma erişimine izin verir."
-			},
-			"editFiles": {
-				"label": "Yazma",
-				"description": "Bilgisayarınızdaki herhangi bir dosyanın değiştirilmesine izin verir."
-			},
-			"executeCommands": {
-				"label": "Komutlar",
-				"description": "Onaylanmış terminal komutlarının çalıştırılmasına izin verir. Bunu ayarlar panelinde yapılandırabilirsiniz."
-			},
-			"useBrowser": {
-				"label": "Tarayıcı",
-				"description": "Grafiksel arayüz olmayan bir tarayıcıda herhangi bir web sitesini başlatma ve etkileşim kurma yeteneğine izin verir."
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "Dosya sistemini değiştirebilen veya API'lerle etkileşime girebilen yapılandırılmış MCP sunucularının kullanımına izin verir."
-			},
-			"switchModes": {
-				"label": "Modlar",
-				"description": "Onay gerektirmeden farklı modlar arasında otomatik geçişe izin verir."
-			},
-			"subtasks": {
-				"label": "Alt Görevler",
-				"description": "Onay gerektirmeden alt görevlerin oluşturulmasına ve tamamlanmasına izin verir."
-			},
-			"retryRequests": {
-				"label": "Yeniden Denemeler",
-				"description": "Sağlayıcı bir hata yanıtı döndürdüğünde başarısız API isteklerini otomatik olarak yeniden dener."
-			}
-		}
+		"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 <settingsLink>Ayarlar</settingsLink>'da mevcuttur."
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "Düşünüyor",
 		"thinking": "Düşünüyor",

+ 1 - 35
webview-ui/src/i18n/locales/vi/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "Tự động phê duyệt:",
 		"title": "Tự động phê duyệt:",
 		"none": "Không",
 		"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. Cấu hình chi tiết hơn có sẵn trong <settingsLink>Cài đặt</settingsLink>.",
-		"actions": {
-			"readFiles": {
-				"label": "Đọc",
-				"description": "Cho phép truy cập để đọc bất kỳ tệp nào trên máy tính của bạn."
-			},
-			"editFiles": {
-				"label": "Chỉnh sửa",
-				"description": "Cho phép chỉnh sửa bất kỳ tệp nào trên máy tính của bạn."
-			},
-			"executeCommands": {
-				"label": "Lệnh",
-				"description": "Cho phép thực thi lệnh terminal đã được phê duyệt. Bạn có thể cấu hình điều này trong bảng cài đặt."
-			},
-			"useBrowser": {
-				"label": "Trình duyệt",
-				"description": "Cho phép khả năng khởi chạy và tương tác với bất kỳ trang web nào trong trình duyệt không giao diện."
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "Cho phép sử dụng máy chủ MCP đã cấu hình có thể sửa đổi hệ thống tệp hoặc tương tác với API."
-			},
-			"switchModes": {
-				"label": "Chế độ",
-				"description": "Cho phép tự động chuyển đổi giữa các chế độ khác nhau mà không cần phê duyệt."
-			},
-			"subtasks": {
-				"label": "Nhiệm vụ phụ",
-				"description": "Cho phép tạo và hoàn thành các nhiệm vụ phụ mà không cần phê duyệt."
-			},
-			"retryRequests": {
-				"label": "Thử lại",
-				"description": "Tự động thử lại các yêu cầu API thất bại khi nhà cung cấp trả về phản hồi lỗi."
-			}
-		}
+		"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 <settingsLink>Cài đặt</settingsLink>."
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "Đang suy nghĩ",
 		"thinking": "Đang suy nghĩ",

+ 1 - 35
webview-ui/src/i18n/locales/zh-CN/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "自动批准:",
 		"title": "自动批准:",
 		"none": "无",
 		"none": "无",
-		"description": "允许直接执行操作无需确认,请谨慎启用。前往<settingsLink>设置</settingsLink>调整",
-		"actions": {
-			"readFiles": {
-				"label": "读取",
-				"description": "允许读取系统中的文件内容"
-			},
-			"editFiles": {
-				"label": "编辑",
-				"description": "允许修改系统中的文件"
-			},
-			"executeCommands": {
-				"label": "命令",
-				"description": "允许执行终端命令。"
-			},
-			"useBrowser": {
-				"label": "浏览器",
-				"description": "允许通过无头浏览器访问网站"
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "允许访问配置好的 MCP 服务(可能涉及文件系统或API操作)"
-			},
-			"switchModes": {
-				"label": "模式",
-				"description": "允许自动切换工作模式"
-			},
-			"subtasks": {
-				"label": "子任务",
-				"description": "允许自主创建和管理子任务"
-			},
-			"retryRequests": {
-				"label": "重试",
-				"description": "API请求失败时自动重试"
-			}
-		}
+		"description": "允许直接执行操作无需确认,请谨慎启用。前往<settingsLink>设置</settingsLink>调整"
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "思考中",
 		"thinking": "思考中",

+ 1 - 35
webview-ui/src/i18n/locales/zh-TW/chat.json

@@ -171,41 +171,7 @@
 	"autoApprove": {
 	"autoApprove": {
 		"title": "自動核准:",
 		"title": "自動核准:",
 		"none": "無",
 		"none": "無",
-		"description": "自動核准讓 Roo Code 可以在無需徵求您同意的情況下執行動作。請僅對您完全信任的動作啟用此功能。您可以在<settingsLink>設定</settingsLink>中進行更詳細的調整。",
-		"actions": {
-			"readFiles": {
-				"label": "讀取",
-				"description": "允許存取電腦上的任何檔案。"
-			},
-			"editFiles": {
-				"label": "編輯",
-				"description": "允許修改電腦上的任何檔案。"
-			},
-			"executeCommands": {
-				"label": "命令",
-				"description": "允許執行已核准的終端機命令。您可以在設定面板中調整此設定。"
-			},
-			"useBrowser": {
-				"label": "瀏覽器",
-				"description": "允許在無介面瀏覽器中啟動並與任何網站互動。"
-			},
-			"useMcp": {
-				"label": "MCP",
-				"description": "允許使用已設定的 MCP 伺服器,這些伺服器可能會修改檔案系統或與 API 進行互動。"
-			},
-			"switchModes": {
-				"label": "模式",
-				"description": "允許在不需要核准的情況下自動切換不同模式。"
-			},
-			"subtasks": {
-				"label": "子工作",
-				"description": "允許在不需要核准的情況下建立和完成子工作。"
-			},
-			"retryRequests": {
-				"label": "重試",
-				"description": "當服務提供者回傳錯誤回應時自動重試失敗的 API 請求。"
-			}
-		}
+		"description": "自動核准讓 Roo Code 可以在無需徵求您同意的情況下執行動作。請僅對您完全信任的動作啟用此功能。您可以在<settingsLink>設定</settingsLink>中進行更詳細的調整。"
 	},
 	},
 	"reasoning": {
 	"reasoning": {
 		"thinking": "思考中",
 		"thinking": "思考中",