pub enum AgentEvent {
Show 15 variants
Chunk(String),
FullMessage(String),
Flush,
Typing,
Status(String),
ToolStart {
tool_name: ToolName,
command: String,
},
ToolOutputChunk {
tool_name: ToolName,
command: String,
chunk: String,
},
ToolOutput {
tool_name: ToolName,
command: String,
output: String,
success: bool,
diff: Option<DiffData>,
filter_stats: Option<String>,
kept_lines: Option<Vec<usize>>,
},
ConfirmRequest {
prompt: String,
response_tx: Sender<bool>,
},
ElicitationRequest {
request: ElicitationRequest,
response_tx: Sender<ElicitationResponse>,
},
QueueCount(usize),
DiffReady(DiffData),
CommandResult {
command_id: String,
output: String,
},
SetCancelSignal(Arc<Notify>),
SetMetricsRx(Receiver<MetricsSnapshot>),
}Expand description
Events produced by the agent and forwarded to the TUI via crate::TuiChannel.
Each variant corresponds to a distinct phase or signal in the agent lifecycle (streaming output, tool execution, user confirmation, etc.).
§Examples
use zeph_tui::event::AgentEvent;
let ev = AgentEvent::Chunk("partial response".to_string());
assert!(matches!(ev, AgentEvent::Chunk(_)));Variants§
Chunk(String)
A streaming text chunk from the LLM — appended to the current message.
FullMessage(String)
A complete (non-streaming) assistant message.
Flush
Signals that streaming is complete; the chat widget stops the cursor.
Typing
The agent is waiting for an LLM response (drives the throbber).
Status(String)
A short status string to display in the activity bar (e.g. "Searching memory…").
ToolStart
A tool call has started; the TUI should display a spinner with the tool name.
Fields
ToolOutputChunk
An incremental output chunk from a long-running tool (e.g. streaming shell output).
Fields
ToolOutput
Final tool output, replacing any in-progress chunks for this call.
Fields
ConfirmRequest
The agent requests a boolean confirmation from the user.
Fields
ElicitationRequest
The agent requests structured input via an elicitation dialog.
Fields
request: ElicitationRequestThe elicitation schema and prompt.
response_tx: Sender<ElicitationResponse>One-shot channel to send the user’s response.
QueueCount(usize)
Updated count of messages queued for the agent (shown in the input bar).
DiffReady(DiffData)
A diff is ready for immediate display in the diff panel.
CommandResult
Result from a slash-command dispatched to the agent.
Fields
SetCancelSignal(Arc<Notify>)
Wire a cancel signal into the TUI App after early startup (Phase 2).
SetMetricsRx(Receiver<MetricsSnapshot>)
Wire a metrics receiver into the TUI App after early startup (Phase 2).
Trait Implementations§
Auto 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
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request