Unified · Split
| @@ -175,7 +175,6 @@ import { · 174 unmodified lines | ||
| 175 | 175 | import { sortThreads } from "../lib/threadSort"; |
| 176 | 176 | import { SidebarUpdatePill } from "./sidebar/SidebarUpdatePill"; |
| 177 | 177 | import { useCopyToClipboard } from "~/hooks/useCopyToClipboard"; |
| 178 | −import { CommandDialogTrigger } from "./ui/command"; | |
| 179 | 178 | import { readEnvironmentApi } from "../environmentApi"; |
| 180 | 179 | import { useSettings, useUpdateSettings } from "~/hooks/useSettings"; |
| 181 | 180 | import { useServerKeybindings } from "../rpc/serverState"; |
| @@ -2619,20 +2618,22 @@ const SidebarProjectsContent = memo(function SidebarProjectsContent( · 2437 unmodified lines | ||
| 2619 | 2618 | }, |
| 2620 | 2619 | [updateSettings], |
| 2621 | 2620 | ); |
| 2621 | + const setCommandPaletteOpen = useCommandPaletteStore((store) => store.setOpen); | |
| 2622 | + const handleCommandPaletteClick = useCallback(() => { | |
| 2623 | + setCommandPaletteOpen(true); | |
| 2624 | + }, [setCommandPaletteOpen]); | |
| 2622 | 2625 | |
| 2623 | 2626 | return ( |
| 2624 | 2627 | <SidebarContent className="gap-0"> |
| 2625 | 2628 | <SidebarGroup className="px-2 pt-2 pb-1"> |
| 2626 | 2629 | <SidebarMenu> |
| 2627 | 2630 | <SidebarMenuItem> |
| 2628 | − <CommandDialogTrigger | |
| 2629 | − render={ | |
| 2630 | − <SidebarMenuButton | |
| 2631 | − size="sm" | |
| 2632 | − className="gap-2 px-2 py-1.5 text-muted-foreground/70 hover:bg-accent hover:text-foreground focus-visible:ring-0" | |
| 2633 | − data-testid="command-palette-trigger" | |
| 2634 | − /> | |
| 2635 | − } | |
| 2631 | + <SidebarMenuButton | |
| 2632 | + size="sm" | |
| 2633 | + className="gap-2 px-2 py-1.5 text-muted-foreground/70 hover:bg-accent hover:text-foreground focus-visible:ring-0" | |
| 2634 | + data-testid="command-palette-trigger" | |
| 2635 | + aria-haspopup="dialog" | |
| 2636 | + onClick={handleCommandPaletteClick} | |
| 2636 | 2637 | > |
| 2637 | 2638 | <SearchIcon className="size-3.5" /> |
| 2638 | 2639 | <span className="flex-1 truncate text-left text-xs">Search</span> |
| @@ -2641,7 +2642,7 @@ const SidebarProjectsContent = memo(function SidebarProjectsContent( · 2 unmodified lines | ||
| 2641 | 2642 | {commandPaletteShortcutLabel} |
| 2642 | 2643 | </Kbd> |
| 2643 | 2644 | ) : null} |
| 2644 | − </CommandDialogTrigger> | |
| 2645 | + </SidebarMenuButton> | |
| 2645 | 2646 | </SidebarMenuItem> |
| 2646 | 2647 | </SidebarMenu> |
| 2647 | 2648 | </SidebarGroup> |