Expand description
Slash-command registry and the core built-in commands (Goal 146).
A CommandSpec is a static description (name, aliases, summary,
handler). The CommandRegistry wraps a Vec<CommandSpec> (built-ins)
and a Vec<SkillCommand> (Goal-169 skill-backed dynamic commands), and
provides exact lookup (with alias resolution) and prefix search
for the completion menu.
Handlers are split into CommandHandler::Sync (mutate
AppState directly and return a CommandOutcome) and
CommandHandler::Async (push UserActions for the backend
worker to service).
Side-effects: handlers may push transcript blocks, modify
App.modals, or set App.should_quit. They never block the
event loop.
Structs§
- Command
Registry - Vec-backed slash-command registry.
- Command
Spec - One registered slash command.
Enums§
- Command
Handler - What a command’s handler does when invoked.
- Command
Outcome - Result of a synchronous command.