Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgumentCandidate ¶ added in v1.112.0
type ArgumentCandidate struct {
Label string
Description string
// Disabled marks a candidate that is shown for context but cannot be
// submitted (e.g. a non-restartable toolset for /toolset-restart).
Disabled bool
}
ArgumentCandidate is one completable value for a command's argument, e.g. a toolset name for /toolset-restart. It is intentionally free of any completion-UI or app-domain types so pkg/tui/commands stays decoupled from both pkg/tui/components/completion and pkg/app.
type ExecuteFunc ¶
ExecuteFunc is a function that executes a command with an optional argument.
type Item ¶
type Item struct {
ID string
Label string
Description string
Category string
SlashCommand string
Execute ExecuteFunc
Hidden bool // Hidden commands work as slash commands but don't appear in the palette
// Immediate marks commands that should run as soon as they are submitted
// instead of being treated as ordinary queued chat input.
Immediate bool
// CompleteArgument, when set, returns the candidates for this command's
// argument. Called lazily at completion-popup-open time so results
// reflect current runtime state (e.g. toolset lifecycle). Nil for
// commands with no argument completion.
CompleteArgument func() []ArgumentCandidate
}
Item represents a single command in the palette
Click to show internal directories.
Click to hide internal directories.