diff --git a/webview-ui/src/components/chat/AutoApproveMenu.tsx b/webview-ui/src/components/chat/AutoApproveMenu.tsx index 412ff26a1ba..d5b6dbe4a0a 100644 --- a/webview-ui/src/components/chat/AutoApproveMenu.tsx +++ b/webview-ui/src/components/chat/AutoApproveMenu.tsx @@ -1,4 +1,4 @@ -import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react" +import { VSCodeCheckbox, VSCodeButton } from "@vscode/webview-ui-toolkit/react" import { useCallback, useState } from "react" import { useExtensionState } from "../../context/ExtensionStateContext" import { useAppTranslation } from "../../i18n/TranslationContext" @@ -10,7 +10,6 @@ interface AutoApproveAction { id: string label: string enabled: boolean - shortName: string description: string } @@ -47,56 +46,48 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => { { id: "readFiles", label: t("chat:autoApprove.actions.readFiles.label"), - shortName: t("chat:autoApprove.actions.readFiles.shortName"), enabled: alwaysAllowReadOnly ?? false, description: t("chat:autoApprove.actions.readFiles.description"), }, { id: "editFiles", label: t("chat:autoApprove.actions.editFiles.label"), - shortName: t("chat:autoApprove.actions.editFiles.shortName"), enabled: alwaysAllowWrite ?? false, description: t("chat:autoApprove.actions.editFiles.description"), }, { id: "executeCommands", label: t("chat:autoApprove.actions.executeCommands.label"), - shortName: t("chat:autoApprove.actions.executeCommands.shortName"), enabled: alwaysAllowExecute ?? false, description: t("chat:autoApprove.actions.executeCommands.description"), }, { id: "useBrowser", label: t("chat:autoApprove.actions.useBrowser.label"), - shortName: t("chat:autoApprove.actions.useBrowser.shortName"), enabled: alwaysAllowBrowser ?? false, description: t("chat:autoApprove.actions.useBrowser.description"), }, { id: "useMcp", label: t("chat:autoApprove.actions.useMcp.label"), - shortName: t("chat:autoApprove.actions.useMcp.shortName"), enabled: alwaysAllowMcp ?? false, description: t("chat:autoApprove.actions.useMcp.description"), }, { id: "switchModes", label: t("chat:autoApprove.actions.switchModes.label"), - shortName: t("chat:autoApprove.actions.switchModes.shortName"), enabled: alwaysAllowModeSwitch ?? false, description: t("chat:autoApprove.actions.switchModes.description"), }, { id: "subtasks", label: t("chat:autoApprove.actions.subtasks.label"), - shortName: t("chat:autoApprove.actions.subtasks.shortName"), enabled: alwaysAllowSubtasks ?? false, description: t("chat:autoApprove.actions.subtasks.description"), }, { id: "retryRequests", label: t("chat:autoApprove.actions.retryRequests.label"), - shortName: t("chat:autoApprove.actions.retryRequests.shortName"), enabled: alwaysApproveResubmit ?? false, description: t("chat:autoApprove.actions.retryRequests.description"), }, @@ -108,7 +99,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => { const enabledActionsList = actions .filter((action) => action.enabled) - .map((action) => action.shortName) + .map((action) => action.label) .join(", ") // Individual checkbox handlers - each one only updates its own state @@ -260,23 +251,46 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => { }} /> - {actions.map((action) => ( -