#[non_exhaustive]pub enum Changed {
Nothing,
Message(MessageChange),
MessagesReplaced,
State,
Reasoning(ReasoningChange),
Subagent(SubagentChange),
RunStarted {
thread_id: ThreadId,
run_id: RunId,
},
RunFinished {
outcome: RunOutcome,
result: Option<Value>,
},
RunError {
message: String,
code: Option<String>,
},
}Expand description
What one event changed.
Returned by Applier::apply so a UI can redraw one row instead of the
whole conversation. Every variant that names a message carries its index
into Applier::messages.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Nothing
Nothing a view would redraw: STEP_*, RAW, CUSTOM, or an event
whose target does not exist.
Message(MessageChange)
One message was created, appended to, or completed.
MessagesReplaced
MESSAGES_SNAPSHOT replaced the whole list. Messages may have been
removed, so a view must redraw all of it.
State
The application state was replaced or patched.
Reasoning(ReasoningChange)
Reasoning content changed. Reasoning is kept out of Applier::messages;
see Applier::reasoning.
Subagent(SubagentChange)
A subagent was announced, resumed, finished, suspended or failed. What
it produces arrives as ordinary message and reasoning changes,
carrying its id; this is the lifecycle. See Applier::subagents.
RunStarted
RUN_STARTED.
RunFinished
RUN_FINISHED. An absent outcome is reported as
RunOutcome::Success, which is what the protocol says it means.
Fields
outcome: RunOutcomeHow the run ended.
RunError
RUN_ERROR.