pub enum AgentEvent {
AgentStart,
AgentEnd {
messages: Vec<Message>,
},
TurnStart,
TurnEnd,
AssistantMessage {
message: Message,
},
UserMessage {
message: Message,
},
TextDelta {
delta: String,
},
ThinkingDelta {
delta: String,
},
ToolExecutionStart {
tool_call_id: String,
tool_name: String,
args: Value,
},
ToolExecutionEnd {
tool_call_id: String,
tool_name: String,
is_error: bool,
content: Vec<Content>,
},
PermissionDenied {
tool_name: String,
reason: String,
},
}Expand description
Events emitted by the agent loop, mirroring AgentEvent in TS.
Variants§
AgentStart
AgentEnd
TurnStart
TurnEnd
AssistantMessage
UserMessage
TextDelta
Streaming text chunk while the assistant types.
ThinkingDelta
Streaming thinking chunk.
ToolExecutionStart
ToolExecutionEnd
PermissionDenied
Permission denied for a tool call (the loop appended an error tool result).
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