pub struct TerminalRenderer { /* private fields */ }Expand description
Rich terminal renderer — colors, emoji, formatted output.
Streams AI responses in real-time, displays tool calls with icons, and shows turn summaries including duration and tool call count.
Implementations§
Source§impl TerminalRenderer
impl TerminalRenderer
Sourcepub fn new(
show_thinking: bool,
show_tool_args: bool,
color: bool,
writer: Box<dyn Write + Send>,
) -> Self
pub fn new( show_thinking: bool, show_tool_args: bool, color: bool, writer: Box<dyn Write + Send>, ) -> Self
Create a new terminal renderer.
show_thinking— display the LLM’s chain-of-thoughtshow_tool_args— display tool call arguments inlinecolor— enable ANSI color codeswriter— output destination (usually stdout, can be a WebSocket, etc.)
pub fn stdout(show_thinking: bool, show_tool_args: bool, color: bool) -> Self
Trait Implementations§
Source§impl EventRenderer for TerminalRenderer
impl EventRenderer for TerminalRenderer
Source§fn render(&mut self, event: RuntimeEvent) -> AgentResult<()>
fn render(&mut self, event: RuntimeEvent) -> AgentResult<()>
Process one runtime event.
Source§fn finish_turn(&mut self) -> AgentResult<()>
fn finish_turn(&mut self) -> AgentResult<()>
End of current turn — renderer may flush / output summary.
Source§fn finish_session(&mut self) -> AgentResult<()>
fn finish_session(&mut self) -> AgentResult<()>
End of entire session.
Auto Trait Implementations§
impl !RefUnwindSafe for TerminalRenderer
impl !Sync for TerminalRenderer
impl !UnwindSafe for TerminalRenderer
impl Freeze for TerminalRenderer
impl Send for TerminalRenderer
impl Unpin for TerminalRenderer
impl UnsafeUnpin for TerminalRenderer
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