@@ -6,7 +6,7 @@ import { cn } from "@/lib/utils"
66import { useExtensionState } from "@/context/ExtensionStateContext"
77import { useAppTranslation } from "@/i18n/TranslationContext"
88import { useRooPortal } from "@/components/ui/hooks/useRooPortal"
9- import { Popover , PopoverContent , PopoverTrigger , StandardTooltip , ToggleSwitch } from "@/components/ui"
9+ import { Popover , PopoverContent , PopoverTrigger , StandardTooltip , ToggleSwitch , Button } from "@/components/ui"
1010import { AutoApproveSetting , autoApproveSettingsConfig } from "../settings/AutoApproveToggle"
1111import { useAutoApprovalToggles } from "@/hooks/useAutoApprovalToggles"
1212import { useAutoApprovalState } from "@/hooks/useAutoApprovalState"
@@ -228,24 +228,21 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:
228228 const isEnabled = toggles [ key ]
229229 return (
230230 < StandardTooltip key = { key } content = { t ( descriptionKey ) } >
231- < button
231+ < Button
232+ variant = { isEnabled ? "primary" : "secondary" }
232233 onClick = { ( ) => onAutoApproveToggle ( key , ! isEnabled ) }
233234 className = { cn (
234- "flex items-center gap-2 px-2 py-2 rounded text-sm text-left" ,
235+ "flex items-center gap-2 px-2 py-2 text-sm text-left justify-start h-auto " ,
235236 "transition-all duration-150" ,
236- "opacity-100 hover:opacity-70" ,
237- "cursor-pointer" ,
238237 ! effectiveAutoApprovalEnabled &&
239238 "opacity-50 cursor-not-allowed hover:opacity-50" ,
240- isEnabled
241- ? "bg-vscode-button-background text-vscode-button-foreground"
242- : "bg-vscode-button-background/15 text-vscode-foreground hover:bg-vscode-list-hoverBackground" ,
239+ ! isEnabled && "bg-vscode-button-background/15" ,
243240 ) }
244241 disabled = { ! effectiveAutoApprovalEnabled }
245242 data-testid = { `auto-approve-${ key } ` } >
246243 < span className = { `codicon codicon-${ icon } text-sm flex-shrink-0` } />
247244 < span className = "flex-1 truncate" > { t ( labelKey ) } </ span >
248- </ button >
245+ </ Button >
249246 </ StandardTooltip >
250247 )
251248 } ) }
@@ -254,44 +251,32 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:
254251 { /* Bottom bar with Select All/None buttons */ }
255252 < div className = "flex flex-row items-center justify-between px-2 py-2 border-t border-vscode-dropdown-border" >
256253 < div className = "flex flex-row gap-1" >
257- < button
254+ < Button
255+ variant = "ghost"
256+ size = "sm"
258257 aria-label = { t ( "chat:autoApprove.selectAll" ) }
259258 onClick = { handleSelectAll }
260259 disabled = { ! effectiveAutoApprovalEnabled }
261260 className = { cn (
262- "relative inline-flex items-center justify-center gap-1" ,
263- "bg-transparent border-none px-2 py-1" ,
264- "rounded-md text-base font-bold" ,
265- "text-vscode-foreground" ,
266- "transition-all duration-150" ,
267- "hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)]" ,
268- "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder" ,
269- "active:bg-[rgba(255,255,255,0.1)]" ,
270- "cursor-pointer" ,
261+ "gap-1 px-2 py-1 text-base font-bold h-auto" ,
271262 ! effectiveAutoApprovalEnabled && "opacity-50 hover:opacity-50 cursor-not-allowed" ,
272263 ) } >
273264 < ListChecks className = "w-3.5 h-3.5" />
274265 < span > { t ( "chat:autoApprove.all" ) } </ span >
275- </ button >
276- < button
266+ </ Button >
267+ < Button
268+ variant = "ghost"
269+ size = "sm"
277270 aria-label = { t ( "chat:autoApprove.selectNone" ) }
278271 onClick = { handleSelectNone }
279272 disabled = { ! effectiveAutoApprovalEnabled }
280273 className = { cn (
281- "relative inline-flex items-center justify-center gap-1" ,
282- "bg-transparent border-none px-2 py-1" ,
283- "rounded-md text-base font-bold" ,
284- "text-vscode-foreground" ,
285- "transition-all duration-150" ,
286- "hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)]" ,
287- "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder" ,
288- "active:bg-[rgba(255,255,255,0.1)]" ,
289- "cursor-pointer" ,
274+ "gap-1 px-2 py-1 text-base font-bold h-auto" ,
290275 ! effectiveAutoApprovalEnabled && "opacity-50 hover:opacity-50 cursor-not-allowed" ,
291276 ) } >
292277 < LayoutList className = "w-3.5 h-3.5" />
293278 < span > { t ( "chat:autoApprove.none" ) } </ span >
294- </ button >
279+ </ Button >
295280 </ div >
296281
297282 < label
0 commit comments