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