#[non_exhaustive]pub enum Command {
Compact {
instructions: Option<String>,
},
Clear,
Other(String),
}Expand description
A slash command a run can carry instead of a prompt.
#[non_exhaustive]: the CLI’s vocabulary grows, and this names only the
commands whose behaviour has been verified. Anything else in the catalogue
reaches the agent through Command::Other.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Compact
Summarise the conversation so far and continue from the summary.
The answer to a context window filling up. The optional instructions are
passed to the summariser, for steering what survives: Some("keep the API surface and the failing test").
Refused with Not enough messages to compact. on a conversation too
short to be worth summarising. That arrives as a completed run carrying
crate::Event::Compaction with the reason, not as an error: the
command ran and answered.
Clear
Discard the conversation and start fresh, keeping the session.
Other(String)
Any other command this install offers, named without its leading slash.
The catalogue is per-install — skills, plugins and user commands all
land in it — so it cannot be enumerated here honestly.
crate::Event::Commands reports what the running agent actually has.