File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -482,18 +482,36 @@ export function CommandPalette() {
482482 </ div >
483483 < div className = "flex flex-wrap gap-2" >
484484 { modeRecentQueries . map ( ( recentQuery ) => (
485- < button
485+ < div
486486 key = { `${ mode } -${ recentQuery } ` }
487- type = "button"
488- onClick = { ( ) => {
489- setQuery ( recentQuery ) ;
490- setActiveIndex ( 0 ) ;
491- } }
492- className = "rounded-full border border-hud-border px-3 py-1.5 font-mono text-[11px] text-hud-muted transition-colors hover:border-hud-border-active hover:text-hud-text"
493- title = { `Reuse recent ${ modeMeta [ mode ] . label . toLowerCase ( ) } search` }
487+ className = "inline-flex items-center overflow-hidden rounded-full border border-hud-border text-hud-muted transition-colors hover:border-hud-border-active"
494488 >
495- { recentQuery }
496- </ button >
489+ < button
490+ type = "button"
491+ onClick = { ( ) => {
492+ setQuery ( recentQuery ) ;
493+ setActiveIndex ( 0 ) ;
494+ } }
495+ className = "px-3 py-1.5 font-mono text-[11px] transition-colors hover:text-hud-text"
496+ title = { `Reuse recent ${ modeMeta [ mode ] . label . toLowerCase ( ) } search` }
497+ >
498+ { recentQuery }
499+ </ button >
500+ < button
501+ type = "button"
502+ onClick = { ( ) => {
503+ setRecentQueries ( ( current ) => ( {
504+ ...current ,
505+ [ mode ] : current [ mode ] . filter ( ( entry ) => entry !== recentQuery ) ,
506+ } ) ) ;
507+ } }
508+ className = "border-l border-hud-border px-2 py-1.5 font-mono text-[10px] uppercase tracking-[0.14em] transition-colors hover:bg-white/5 hover:text-hud-text"
509+ title = { `Remove ${ recentQuery } from recent ${ modeMeta [ mode ] . label . toLowerCase ( ) } searches` }
510+ aria-label = { `Remove ${ recentQuery } from recent ${ modeMeta [ mode ] . label . toLowerCase ( ) } searches` }
511+ >
512+ ×
513+ </ button >
514+ </ div >
497515 ) ) }
498516 </ div >
499517 </ div >
You can’t perform that action at this time.
0 commit comments