From e8964ce672c4699842272cdb8166d1c9d0648de3 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Tue, 14 Jul 2026 23:40:40 -0400 Subject: [PATCH] refactor(tui): remove hidden command metadata --- packages/plugin/src/v2/tui/context.ts | 2 -- packages/tui/src/component/command-palette.tsx | 2 +- packages/tui/src/context/keymap.tsx | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/plugin/src/v2/tui/context.ts b/packages/plugin/src/v2/tui/context.ts index 1e83ff35f2..465f62a018 100644 --- a/packages/plugin/src/v2/tui/context.ts +++ b/packages/plugin/src/v2/tui/context.ts @@ -135,8 +135,6 @@ export interface KeymapCommand { readonly name: string readonly aliases?: string[] } - /** Hides the command from discovery UI. */ - readonly hidden?: boolean /** Promotes the command in discovery UI. */ readonly suggested?: boolean | (() => boolean) /** Executes the command. Return false to let keymap dispatch continue. */ diff --git a/packages/tui/src/component/command-palette.tsx b/packages/tui/src/component/command-palette.tsx index b71d61495e..e7c55b5a48 100644 --- a/packages/tui/src/component/command-palette.tsx +++ b/packages/tui/src/component/command-palette.tsx @@ -16,7 +16,7 @@ export function CommandPaletteDialog() { const shortcuts = Keymap.useShortcuts() const options = createMemo(() => commands().flatMap((command) => { - if (!command.id || !command.palette || command.hidden || command.id === COMMAND_PALETTE_COMMAND) return [] + if (!command.id || !command.palette || command.id === COMMAND_PALETTE_COMMAND) return [] return { title: command.title ?? command.id, description: command.description, diff --git a/packages/tui/src/context/keymap.tsx b/packages/tui/src/context/keymap.tsx index 04e7dff924..dce85fee13 100644 --- a/packages/tui/src/context/keymap.tsx +++ b/packages/tui/src/context/keymap.tsx @@ -255,7 +255,6 @@ function useCommands(): Accessor { : undefined, palette: entry.command.namespace === "palette" ? true : undefined, slash: entry.command.slash, - hidden: typeof entry.command.hidden === "boolean" ? entry.command.hidden : undefined, suggested: typeof entry.command.suggested === "boolean" || typeof entry.command.suggested === "function" ? (entry.command.suggested as boolean | (() => boolean))