diff options
| author | Adam <[email protected]> | 2025-12-15 07:14:03 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-12-15 10:20:19 -0600 |
| commit | df2713a6c263a006539efad84e64103caee2d3f5 (patch) | |
| tree | 4be2f81c2e11c25ace628e45dbf88b1b5a215100 /packages/desktop/src/context | |
| parent | ff6864a7ca3772e6f2702d585c6bb64a40bd6cce (diff) | |
| download | opencode-df2713a6c263a006539efad84e64103caee2d3f5.tar.gz opencode-df2713a6c263a006539efad84e64103caee2d3f5.zip | |
chore: cleanup
Diffstat (limited to 'packages/desktop/src/context')
| -rw-r--r-- | packages/desktop/src/context/command.tsx | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/packages/desktop/src/context/command.tsx b/packages/desktop/src/context/command.tsx index dcc4b6007..d4ef8e166 100644 --- a/packages/desktop/src/context/command.tsx +++ b/packages/desktop/src/context/command.tsx @@ -6,12 +6,6 @@ import { List } from "@opencode-ai/ui/list" const IS_MAC = typeof navigator === "object" && /(Mac|iPod|iPhone|iPad)/.test(navigator.platform) -/** - * Keybind configuration type. - * Format: "mod+key" where mod can be ctrl, alt, shift, meta (or cmd on mac) - * Multiple keybinds can be separated by comma: "mod+p,ctrl+shift+p" - * Use "mod" for platform-appropriate modifier (cmd on mac, ctrl elsewhere) - */ export type KeybindConfig = string export interface Keybind { @@ -23,23 +17,14 @@ export interface Keybind { } export interface CommandOption { - /** Unique identifier for the command */ id: string - /** Display title in the command palette */ title: string - /** Optional description */ description?: string - /** Category for grouping in the palette */ category?: string - /** Keybind string (e.g., "mod+p", "ctrl+shift+t") */ keybind?: KeybindConfig - /** Slash command trigger (e.g., "models" for /models) */ slash?: string - /** Whether to show in the "Suggested" section */ suggested?: boolean - /** Whether the command is disabled */ disabled?: boolean - /** Handler when command is selected */ onSelect?: (source?: "palette" | "keybind" | "slash") => void } @@ -197,7 +182,6 @@ export const { use: useCommand, provider: CommandProvider } = createSimpleContex const handleKeyDown = (event: KeyboardEvent) => { if (suspended()) return - // Check for command palette keybind (mod+shift+p) const paletteKeybinds = parseKeybind("mod+shift+p") if (matchKeybind(paletteKeybinds, event)) { event.preventDefault() @@ -205,7 +189,6 @@ export const { use: useCommand, provider: CommandProvider } = createSimpleContex return } - // Check registered command keybinds for (const option of options()) { if (option.disabled) continue if (!option.keybind) continue |
