Skip to main content

Module commands

Module commands 

Source
Expand description

ACP lifecycle ex-commands: :opencode / :ai-prompt / :ai-stop.

Per feedback_mode_owns_its_surface, BOTH the binding (the command name) AND the handler body live here: each apply closure captures the AiClientHandle and drives it directly (a non-blocking cmd_tx send), returning an Effect::Echo for user feedback. The host’s only role is calling register_ai_ex_commands once at boot (from crate::acp::install).

The transport-neutral :ai-log command is NOT here – it lives in the crate-root commands module (register_ai_log_command), because the log substrate is shared by every transport (AG‑3).

Functions§

register_ai_ex_commands
Register :opencode / :ai-prompt / :ai-stop against registry, wiring each to handle. Called once from ACP boot (crate::acp::install).