Comma Agents
@comma-agents/tuiComponents

StrategyPicker

Strategy selection menu using ink-select-input.

StrategyPicker

Renders a list of available strategies using ink-select-input. Calls onSelect with the chosen strategy's value when the user makes a selection.

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

<StrategyPicker
  strategies={[
    { label: "Plan", value: "plan", description: "Think step-by-step" },
    { label: "Build", value: "build", description: "Write code directly" },
  ]}
  onSelect={(strategyPath) => loadStrategy(strategyPath)}
/>

StrategyPickerProps

PropTypeDescription
strategiesreadonly StrategyOption[]Available strategies to display
onSelect(strategyPath: string) => voidCalled with the selected strategy's value

StrategyOption

FieldTypeDescription
labelstringShort display name
valuestringStrategy identifier passed to onSelect
descriptionstringOne-line description appended to the label in the list

The picker shows a "Choose a strategy:" heading followed by the SelectInput list. Uses arrow keys for navigation and Enter to select.

On this page