pub enum SessionEvent {
Show 16 variants
TextDelta {
content: String,
},
ReasoningDelta {
content: String,
},
ToolCall {
call_id: Option<String>,
name: String,
args: Value,
output: ToolCallOutput,
duration_ms: u64,
},
ToolCallStart {
call_id: Option<String>,
name: String,
args: Value,
},
Message {
text: String,
kind: String,
},
LlmRequest {
protocol_iteration: usize,
message_count: usize,
tool_list: String,
},
LlmResponse {
protocol_iteration: usize,
content: String,
duration_ms: u64,
},
TokenUsage {
protocol_iteration: usize,
usage: TokenUsage,
cumulative: TokenUsage,
},
ChildTokenUsage {
session_id: String,
source: String,
model: String,
protocol_iteration: usize,
usage: TokenUsage,
cumulative: TokenUsage,
},
RetryStatus {
wait_seconds: u64,
attempt: usize,
max_attempts: usize,
reason: String,
envelope: Option<ErrorEnvelope>,
},
InjectedTurnInputAccepted {
inputs: Vec<AcceptedInjectedTurnInput>,
checkpoint: CheckpointKind,
},
InjectedMessagesCommitted {
messages: Vec<PluginMessage>,
checkpoint: CheckpointKind,
},
PluginEvent {
plugin_id: String,
event: PluginRuntimeEvent,
},
TurnOutcome {
outcome: TurnOutcome,
},
Done,
Error {
message: String,
envelope: Option<ErrorEnvelope>,
},
}Variants§
TextDelta
ReasoningDelta
Streaming update for the model’s reasoning summary (“thinking”). The UI renders these incrementally in a muted/italic style; reasoning content is never fed back to the model on subsequent turns.
ToolCall
ToolCallStart
Message
LlmRequest
LlmResponse
TokenUsage
ChildTokenUsage
RetryStatus
Fields
§
envelope: Option<ErrorEnvelope>InjectedTurnInputAccepted
InjectedMessagesCommitted
PluginEvent
TurnOutcome
Semantic result for a completed turn. Done remains the machine
lifecycle marker emitted after this event.
Fields
§
outcome: TurnOutcomeDone
Error
Trait Implementations§
Source§impl Clone for SessionEvent
impl Clone for SessionEvent
Source§fn clone(&self) -> SessionEvent
fn clone(&self) -> SessionEvent
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 moreSource§impl Debug for SessionEvent
impl Debug for SessionEvent
Source§impl<'de> Deserialize<'de> for SessionEvent
impl<'de> Deserialize<'de> for SessionEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SessionEvent
impl Serialize for SessionEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SessionEvent
impl RefUnwindSafe for SessionEvent
impl Send for SessionEvent
impl Sync for SessionEvent
impl Unpin for SessionEvent
impl UnsafeUnpin for SessionEvent
impl UnwindSafe for SessionEvent
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