pub enum UiEvent {
Show 17 variants
AgentTurnStarted,
AgentThinking,
AgentTextDelta(String),
AgentMessageComplete(String),
ToolCallStarted {
id: String,
name: String,
args: Value,
},
ToolCallProgress {
id: String,
chunk: ProgressChunk,
},
ToolCallCompleted {
id: String,
result: UiToolResult,
},
AgentTurnComplete,
PermissionRequested {
tool: String,
args: Value,
resolver: Sender<Decision>,
},
InlineBashOutput {
command: String,
output: String,
},
SessionReplaced(Vec<Message>),
ModelSwitched(ModelId),
ForkCandidates(Vec<(String, String)>),
BranchTree(BranchTree),
MessagesSnapshot(Vec<Message>),
StateSnapshot {
session_id: String,
model: String,
active_turn: bool,
},
Error(String),
}Variants§
AgentTurnStarted
AgentThinking
AgentTextDelta(String)
AgentMessageComplete(String)
ToolCallStarted
ToolCallProgress
ToolCallCompleted
AgentTurnComplete
PermissionRequested
InlineBashOutput
Output of a !!cmd inline-bash run, for transcript display.
SessionReplaced(Vec<Message>)
The session was replaced (/new cleared it, or /resume loaded a
stored one). Carries the new transcript so the TUI can rebuild
state.messages. Empty Vec = a fresh session.
ModelSwitched(ModelId)
The active model changed successfully.
ForkCandidates(Vec<(String, String)>)
Refreshed /fork candidate list (active-branch user messages,
newest first) — (EntryId, preview) pairs. The binary emits this
at startup and after every turn so the picker is never stale.
BranchTree(BranchTree)
Refreshed session branch tree — the binary emits this at startup
and after every turn so the /tree view is never stale.
MessagesSnapshot(Vec<Message>)
Reply to Command::GetMessages — the session’s persisted message
history. RPC clients use this to snapshot transcript state.
StateSnapshot
Reply to Command::GetState — a small status snapshot for RPC
clients (the TUI holds these in AppState so does not need it).