Comma Agents
@comma-agents/tuiComponents

CommandPalette

Full command palette modal with searchable command list and sub-page navigation stack.

CommandPalette

A modal command palette with a search input and scrollable command list. Supports two kinds of commands: action commands (fire a callback) and page commands (push a sub-page into the palette). Opens with Ctrl+P.

import { CommandPalette } from "@comma-agents/tui";

<CommandPalette
  isVisible={isOpen}
  onClose={close}
  onExitApp={exit}
  commands={customCommands}
/>

CommandPaletteProps

PropTypeDefaultDescription
isVisibleboolean--Whether the palette is visible
idstring--Stable Ink focus ID
onClose() => void--Dismiss callback
onExitApp() => void--Exit app callback (passed to exit command)
commandsreadonly Command[]Built-in commandsCustom command list

Command

FieldTypeDescription
idstringUnique command identifier
labelstringDisplay name
descriptionstringOne-line description
keywordsreadonly string[]?Extra fuzzy-match keywords
pageReact.ComponentType?Sub-page component (page command)
actionCommandAction?Direct callback (action command)

A command must have either action or page. Action commands fire immediately and close the palette. Page commands push a sub-component into the navigation stack.

Built-in Commands

CommandTypeDescription
helpPageKeyboard shortcut reference
list-providersPageAvailable model providers
session-pickerPageBrowse and load persisted runs
settingsPageUser configuration
  • Type to filter -- fuzzy-matches against label, description, and keywords
  • Up/Down arrows -- move selection
  • Enter -- activate selected command
  • Esc -- pop sub-page back to home; close palette at home

The palette is typically rendered inside a <Modal> for backdrop dimming.

On this page