pub enum Block {
Text(String),
Reasoning(String),
ToolCall {
id: String,
title: String,
status: ToolStatus,
kind: ToolKind,
input: Option<String>,
output: Option<String>,
},
Edit {
path: String,
status: EditStatus,
},
Permission {
id: String,
title: String,
description: Option<String>,
options: Vec<PermissionOption>,
status: PermissionStatus,
},
}Expand description
One renderable unit within a turn.
Variants§
Text(String)
Streamed message text.
Reasoning(String)
Streamed reasoning / thinking. TCF: the projection prefixes each line
with │, and a multi-line block is folded closed by default via
ReasoningFoldSource — the
fold keeps the head line visible and hides the rest until za. (Before
TCF this comment claimed folding the projection did not do.)
ToolCall
A tool invocation and its live status.
TCF: kind, input and output are the detail an expanded tool call
shows. input/output are the agent’s raw JSON, pretty-printed at
ingest (stored as String, not serde_json::Value, so Block stays
Eq). Detail commonly arrives on a later ToolCallUpdate, not the
initial call, so it is merged in as it lands.
Edit
An agent-proposed file edit (AU‑4 wires the diff review).
Permission
AUX‑1: an inline permission request awaiting or reflecting user action.
Trait Implementations§
impl Eq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more