refactor(tui): remove hidden command metadata

This commit is contained in:
Dax Raad 2026-07-14 23:40:40 -04:00
commit e8964ce672
3 changed files with 1 additions and 4 deletions

View file

@ -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. */

View file

@ -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,

View file

@ -255,7 +255,6 @@ function useCommands(): Accessor<readonly KeymapCommand[]> {
: 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))