Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions webview-ui/src/components/chat/AutoApproveMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,31 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
overflowY: "auto",
...style,
}}>
{isExpanded && (
<div className="flex flex-col gap-2 py-4">
<div
style={{
color: "var(--vscode-descriptionForeground)",
fontSize: "12px",
}}>
<Trans
i18nKey="chat:autoApprove.description"
components={{
settingsLink: <VSCodeLink href="#" onClick={handleOpenSettings} />,
}}
/>
</div>

<AutoApproveToggle {...toggles} onToggle={onAutoApproveToggle} />
</div>
)}

<div
style={{
display: "flex",
alignItems: "center",
gap: "8px",
padding: isExpanded ? "8px 0" : "2px 0 0 0",
padding: "2px 0 0 0",
cursor: "pointer",
}}
onClick={toggleExpanded}>
Expand Down Expand Up @@ -215,33 +234,14 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
{displayText}
</span>
<span
className={`codicon codicon-chevron-${isExpanded ? "down" : "right"}`}
className={`codicon codicon-chevron-${isExpanded ? "up" : "right"}`}
style={{
flexShrink: 0,
marginLeft: isExpanded ? "2px" : "-2px",
}}
/>
</div>
</div>

{isExpanded && (
<div className="flex flex-col gap-2">
<div
style={{
color: "var(--vscode-descriptionForeground)",
fontSize: "12px",
}}>
<Trans
i18nKey="chat:autoApprove.description"
components={{
settingsLink: <VSCodeLink href="#" onClick={handleOpenSettings} />,
}}
/>
</div>

<AutoApproveToggle {...toggles} onToggle={onAutoApproveToggle} />
</div>
)}
</div>
)
}
Expand Down
Loading