diff --git a/webview-ui/src/components/chat/CommandPatternSelector.tsx b/webview-ui/src/components/chat/CommandPatternSelector.tsx index b79d86ccfea..c3b13b79d92 100644 --- a/webview-ui/src/components/chat/CommandPatternSelector.tsx +++ b/webview-ui/src/components/chat/CommandPatternSelector.tsx @@ -31,6 +31,10 @@ export const CommandPatternSelector: React.FC = ({ const [isExpanded, setIsExpanded] = useState(false) const [editingStates, setEditingStates] = useState>({}) + const handleOpenSettings = () => { + window.postMessage({ type: "action", action: "settingsButtonClicked", values: { section: "autoApprove" } }) + } + // Create a combined list with full command first, then patterns const allPatterns = useMemo(() => { // Trim the command to ensure consistency with extracted patterns @@ -90,7 +94,11 @@ export const CommandPatternSelector: React.FC = ({ components={{ settingsLink: ( { + e.preventDefault() + handleOpenSettings() + }} className="text-vscode-textLink-foreground hover:text-vscode-textLink-activeForeground" /> ),