pub enum WorkerEvent {
Message(String),
Token(String),
Thinking(String),
Reading(String),
Editing(String),
ToolUse(String),
Raw(String),
Done,
}Expand description
A single streamed event from a running worker.
Variants§
Message(String)
A line of human-readable narration (“reading src/, editing app.ts”).
Token(String)
A raw streaming text delta from a token-streaming worker (API/HTTP, Grok). Consumers concatenate these verbatim — fragments are often mid-word, so no separator is inserted between them. This is what lets the UI reconstruct and markdown-render any streamed model output regardless of the worker.
Thinking(String)
A reasoning (“thinking”) delta from a reasoning model (e.g. DeepSeek-R1,
o-series). Streamed separately from [Token] content and never part of
the final answer, so the UI can show it dimmed without polluting the
result passed to the next node.
Reading(String)
The worker began reading a file/path.
Editing(String)
The worker edited a file/path.
ToolUse(String)
The worker invoked a tool/command.
Raw(String)
Raw stdout/stderr passthrough, used when no richer structure exists.
Done
Terminal marker: the worker finished emitting events.
Trait Implementations§
Source§impl Clone for WorkerEvent
impl Clone for WorkerEvent
Source§fn clone(&self) -> WorkerEvent
fn clone(&self) -> WorkerEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkerEvent
impl Debug for WorkerEvent
Source§impl<'de> Deserialize<'de> for WorkerEvent
impl<'de> Deserialize<'de> for WorkerEvent
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>,
impl Eq for WorkerEvent
Source§impl PartialEq for WorkerEvent
impl PartialEq for WorkerEvent
Source§fn eq(&self, other: &WorkerEvent) -> bool
fn eq(&self, other: &WorkerEvent) -> bool
self and other values to be equal, and is used by ==.