pub enum SessionUpdate {
Show 13 variants
UserMessageChunk(ContentChunk),
AgentMessageChunk(ContentChunk),
AgentThoughtChunk(ContentChunk),
ToolCall(ToolCall),
ToolCallUpdate(ToolCallUpdate),
Plan(Plan),
AvailableCommandsUpdate(AvailableCommandsUpdate),
CurrentModeUpdate(CurrentModeUpdate),
ConfigOptionUpdate(ConfigOptionUpdate),
SessionInfoUpdate(SessionInfoUpdate),
UsageUpdate(UsageUpdate),
Notice(Notice),
Other(Value),
}Expand description
Different types of updates the agent can send
during session processing. A 13-arm
discriminated union keyed on the wire
sessionUpdate field.
PartialEq only — the UsageUpdate variant
carries an f64 (the cost amount), and f64
does not implement Eq because of NaN. The
usage_update payload is the only variant that
pays the price, but dropping Eq from the
whole enum is the simpler choice.
Variants§
UserMessageChunk(ContentChunk)
A chunk of the user’s message being streamed.
AgentMessageChunk(ContentChunk)
A chunk of the agent’s response being streamed.
AgentThoughtChunk(ContentChunk)
A chunk of the agent’s internal reasoning being streamed.
ToolCall(ToolCall)
Notification that a new tool call has been initiated.
ToolCallUpdate(ToolCallUpdate)
Update on the status or results of a tool call.
Plan(Plan)
The agent’s execution plan.
AvailableCommandsUpdate(AvailableCommandsUpdate)
Available commands are ready or have changed.
CurrentModeUpdate(CurrentModeUpdate)
The current mode of the session has changed.
ConfigOptionUpdate(ConfigOptionUpdate)
Session configuration options have been updated.
SessionInfoUpdate(SessionInfoUpdate)
Session metadata has been updated (title, timestamps).
UsageUpdate(UsageUpdate)
Context window and cost update.
Notice(Notice)
Information for the user that is not part of session history.
Other(Value)
A session update the typed form does not yet model. The wire payload is preserved verbatim for the bridge to forward.