pub enum ChatEvent {
Show 18 variants
MessageAdded(ChatMessage),
StreamStart {
message_id: String,
agent: String,
model: Model,
},
StreamDelta {
message_id: String,
text: String,
},
StreamReasoningDelta {
message_id: String,
text: String,
},
StreamEnd {
message: ChatMessage,
},
Settings(Value),
TypingStatusChanged(bool),
ConversationCleared,
ToolRequest(ToolRequest),
ToolExecutionCompleted {
tool_call_id: String,
tool_name: String,
tool_result: ToolExecutionResult,
success: bool,
error: Option<String>,
},
OperationCancelled {
message: String,
},
RetryAttempt {
attempt: u32,
max_retries: u32,
error: String,
backoff_ms: u64,
},
TaskUpdate(TaskList),
SessionsList {
sessions: Vec<SessionMetadata>,
},
ProfilesList {
profiles: Vec<String>,
},
TimingUpdate {
waiting_for_human: Duration,
ai_processing: Duration,
tool_execution: Duration,
},
ModuleSchemas {
schemas: Vec<ModuleSchemaInfo>,
},
Error(String),
}Expand description
ChatEvent are the messages sent from the actor - the output of the actor.
The actor is built with 2 channels - an input and output channel. Requests
are sent to the actor through the input channel. Requests may generate 1 or
move ChatEvents in response which are sent to the output channel. Various
applications (CLI/VSCode/Tests) process chat events to implement their
application sepecific logic/rendering.
Variants§
MessageAdded(ChatMessage)
StreamStart
StreamDelta
StreamReasoningDelta
StreamEnd
Fields
§
message: ChatMessageSettings(Value)
TypingStatusChanged(bool)
ConversationCleared
ToolRequest(ToolRequest)
ToolExecutionCompleted
Fields
§
tool_result: ToolExecutionResultOperationCancelled
RetryAttempt
TaskUpdate(TaskList)
SessionsList
Fields
§
sessions: Vec<SessionMetadata>ProfilesList
TimingUpdate
ModuleSchemas
Fields
§
schemas: Vec<ModuleSchemaInfo>Error(String)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChatEvent
impl<'de> Deserialize<'de> for ChatEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ChatEvent
impl RefUnwindSafe for ChatEvent
impl Send for ChatEvent
impl Sync for ChatEvent
impl Unpin for ChatEvent
impl UnwindSafe for ChatEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.