pub enum BlockContent {
ShellCommand {
input: String,
output: TerminalOutput,
exit_code: Option<i32>,
cwd: PathBuf,
duration_ms: Option<u64>,
},
AgentMessage {
role: MessageRole,
content_blocks: Vec<ContentBlock>,
},
ToolCall {
tool_name: String,
tool_use_id: String,
input: Value,
output: Option<String>,
streaming_text: Option<String>,
error: Option<String>,
collapsed_default: bool,
},
ApprovalRequest {
action: AgentAction,
reasoning: Option<String>,
granted: Option<bool>,
granter: Option<ActorId>,
},
FileEdit {
path: PathBuf,
diff: UnifiedDiff,
applied: bool,
},
PlanNode {
description: String,
subtask_ids: Vec<BlockId>,
progress: f32,
is_complete: bool,
},
Text {
text: String,
},
}Expand description
The structured content of a block. This replaces unstructured text streams — every piece of content has a typed representation that the terminal can render and reason about.
Variants§
ShellCommand
Output from a shell command execution.
Fields
§
output: TerminalOutputAgentMessage
A message from an AI agent (ACP content blocks).
ToolCall
An agent’s tool call and its result.
Fields
ApprovalRequest
A permission request that the human must approve or deny.
FileEdit
A file edit proposed by an agent.
PlanNode
An agent’s structured plan.
Text
Plain text (e.g., system messages, banners).
Trait Implementations§
Source§impl Clone for BlockContent
impl Clone for BlockContent
Source§fn clone(&self) -> BlockContent
fn clone(&self) -> BlockContent
Returns a duplicate of the value. Read more
1.0.0 · 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 BlockContent
impl Debug for BlockContent
Source§impl<'de> Deserialize<'de> for BlockContent
impl<'de> Deserialize<'de> for BlockContent
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 BlockContent
impl RefUnwindSafe for BlockContent
impl Send for BlockContent
impl Sync for BlockContent
impl Unpin for BlockContent
impl UnsafeUnpin for BlockContent
impl UnwindSafe for BlockContent
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