diff --git a/webview-ui/src/components/chat/AutoApproveMenu.tsx b/webview-ui/src/components/chat/AutoApproveMenu.tsx index 6fc20a2b27..c2485455c5 100644 --- a/webview-ui/src/components/chat/AutoApproveMenu.tsx +++ b/webview-ui/src/components/chat/AutoApproveMenu.tsx @@ -139,7 +139,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => { alignItems: "center", gap: "8px", padding: isExpanded ? "8px 0" : "8px 0 0 0", - cursor: "pointer", + cursor: !hasEnabledActions ? "pointer" : "default", }} onMouseEnter={() => { if (!hasEnabledActions) { @@ -151,7 +151,11 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => { setIsHoveringCollapsibleSection(false) } }} - onClick={() => setIsExpanded((prev) => !prev)}> + onClick={() => { + if (!hasEnabledActions) { + setIsExpanded((prev) => !prev) + } + }}> { updateEnabled(!autoApprovalSettings.enabled) }} /> - + { + // to prevent this from counteracting parent + if (hasEnabledActions) { + setIsExpanded((prev) => !prev) + } + }}> Auto-approve: