1use std::io::{self, Write};
2
3use super::OutputRenderer;
4
5pub struct QuietRenderer;
6
7impl QuietRenderer {
8 pub fn new() -> Self {
9 Self
10 }
11}
12
13impl Default for QuietRenderer {
14 fn default() -> Self {
15 Self::new()
16 }
17}
18
19impl OutputRenderer for QuietRenderer {
20 fn text_chunk(&mut self, text: &str) {
21 print!("{text}");
22 let _ = io::stdout().flush();
23 }
24
25 fn tool_status(&mut self, _tool: &str) {}
26 fn tool_result(&mut self, _tool: &str, _output: &str, _is_read: bool) {}
27
28 fn permission_denied(&mut self, _tool: &str) {}
29
30 fn error(&mut self, _err: &str) {}
31
32 fn session_info(&mut self, _id: &str) {}
33
34 fn done(&mut self) {
35 let _ = io::stdout().flush();
36 }
37}