pub enum AgentEvent {
AgentStart,
TurnStart,
TextDelta {
delta: String,
},
ThinkingDelta {
delta: String,
},
ToolCall {
id: String,
name: String,
args: Value,
},
ToolCallArgsUpdate {
id: String,
args: Value,
},
ToolResult {
id: String,
name: String,
content: String,
compact: Option<String>,
is_error: bool,
},
ToolProgress {
content: String,
is_error: bool,
},
Aborted {
reason: String,
},
UserMessage {
content: String,
},
TurnEnd,
AgentEnd {
messages: Vec<AgentMessage>,
},
}Expand description
Emitted by the loop for consumers (print mode writes to stdout; TUI later renders).
Variants§
AgentStart
TurnStart
TextDelta
ThinkingDelta
ToolCall
ToolCallArgsUpdate
Progressive args update (pi calls renderCall multiple times).
ToolResult
ToolProgress
Intermediate tool execution progress (bash streaming output).
Aborted
Stream was aborted or errored. TextDelta/ThinkingDelta may have been sent before.
UserMessage
A user message was injected from the steering or follow-up queue.
TurnEnd
AgentEnd
Fields
§
messages: Vec<AgentMessage>Trait Implementations§
Source§impl Clone for AgentEvent
impl Clone for AgentEvent
Source§fn clone(&self) -> AgentEvent
fn clone(&self) -> AgentEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentEvent
impl RefUnwindSafe for AgentEvent
impl Send for AgentEvent
impl Sync for AgentEvent
impl Unpin for AgentEvent
impl UnsafeUnpin for AgentEvent
impl UnwindSafe for AgentEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more