tweaks
This commit is contained in:
@@ -292,11 +292,17 @@ impl RetroTui {
|
|||||||
Style::default()
|
Style::default()
|
||||||
.fg(TERMINAL_AMBER)
|
.fg(TERMINAL_AMBER)
|
||||||
.add_modifier(Modifier::BOLD)
|
.add_modifier(Modifier::BOLD)
|
||||||
|
} else if line.starts_with("SYSTEM INITIALIZED")
|
||||||
|
|| line.starts_with("AWAITING COMMAND")
|
||||||
|
{
|
||||||
|
Style::default()
|
||||||
|
.fg(TERMINAL_DIM_GREEN)
|
||||||
|
.add_modifier(Modifier::BOLD)
|
||||||
} else {
|
} else {
|
||||||
Style::default().fg(TERMINAL_GREEN)
|
Style::default().fg(TERMINAL_GREEN)
|
||||||
};
|
};
|
||||||
|
|
||||||
Line::from(Span::styled(line.clone(), style))
|
Line::from(Span::styled(format!(" {}", line), style))
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
use crate::retro_tui::RetroTui;
|
||||||
use g3_core::ui_writer::UiWriter;
|
use g3_core::ui_writer::UiWriter;
|
||||||
use std::io::{self, Write};
|
use std::io::{self, Write};
|
||||||
use crate::retro_tui::RetroTui;
|
|
||||||
|
|
||||||
/// Console implementation of UiWriter that prints to stdout
|
/// Console implementation of UiWriter that prints to stdout
|
||||||
pub struct ConsoleUiWriter;
|
pub struct ConsoleUiWriter;
|
||||||
@@ -13,18 +13,18 @@ impl ConsoleUiWriter {
|
|||||||
|
|
||||||
impl UiWriter for ConsoleUiWriter {
|
impl UiWriter for ConsoleUiWriter {
|
||||||
fn print(&self, message: &str) {
|
fn print(&self, message: &str) {
|
||||||
println!("{}", message);
|
print!("{}", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn println(&self, message: &str) {
|
fn println(&self, message: &str) {
|
||||||
println!("{}", message);
|
println!("{}", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_inline(&self, message: &str) {
|
fn print_inline(&self, message: &str) {
|
||||||
print!("{}", message);
|
print!("{}", message);
|
||||||
let _ = io::stdout().flush();
|
let _ = io::stdout().flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_system_prompt(&self, prompt: &str) {
|
fn print_system_prompt(&self, prompt: &str) {
|
||||||
println!("🔍 System Prompt:");
|
println!("🔍 System Prompt:");
|
||||||
println!("================");
|
println!("================");
|
||||||
@@ -32,27 +32,27 @@ impl UiWriter for ConsoleUiWriter {
|
|||||||
println!("================");
|
println!("================");
|
||||||
println!();
|
println!();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_context_status(&self, message: &str) {
|
fn print_context_status(&self, message: &str) {
|
||||||
println!("{}", message);
|
println!("{}", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_header(&self, tool_name: &str) {
|
fn print_tool_header(&self, tool_name: &str) {
|
||||||
println!("┌─ {}", tool_name);
|
println!("┌─ {}", tool_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_arg(&self, key: &str, value: &str) {
|
fn print_tool_arg(&self, key: &str, value: &str) {
|
||||||
println!("│ {}: {}", key, value);
|
println!("│ {}: {}", key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_output_header(&self) {
|
fn print_tool_output_header(&self) {
|
||||||
println!("├─ output:");
|
println!("├─ output:");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_output_line(&self, line: &str) {
|
fn print_tool_output_line(&self, line: &str) {
|
||||||
println!("│ {}", line);
|
println!("│ {}", line);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_output_summary(&self, hidden_count: usize) {
|
fn print_tool_output_summary(&self, hidden_count: usize) {
|
||||||
println!(
|
println!(
|
||||||
"│ ... ({} more line{} hidden)",
|
"│ ... ({} more line{} hidden)",
|
||||||
@@ -60,22 +60,22 @@ impl UiWriter for ConsoleUiWriter {
|
|||||||
if hidden_count == 1 { "" } else { "s" }
|
if hidden_count == 1 { "" } else { "s" }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_timing(&self, duration_str: &str) {
|
fn print_tool_timing(&self, duration_str: &str) {
|
||||||
println!("└─ ⚡️ {}", duration_str);
|
println!("└─ ⚡️ {}", duration_str);
|
||||||
println!();
|
println!();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_agent_prompt(&self) {
|
fn print_agent_prompt(&self) {
|
||||||
print!("🤖 ");
|
print!(" ");
|
||||||
let _ = io::stdout().flush();
|
let _ = io::stdout().flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_agent_response(&self, content: &str) {
|
fn print_agent_response(&self, content: &str) {
|
||||||
print!("{}", content);
|
print!("{}", content);
|
||||||
let _ = io::stdout().flush();
|
let _ = io::stdout().flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn flush(&self) {
|
fn flush(&self) {
|
||||||
let _ = io::stdout().flush();
|
let _ = io::stdout().flush();
|
||||||
}
|
}
|
||||||
@@ -96,16 +96,16 @@ impl UiWriter for RetroTuiWriter {
|
|||||||
fn print(&self, message: &str) {
|
fn print(&self, message: &str) {
|
||||||
self.tui.output(message);
|
self.tui.output(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn println(&self, message: &str) {
|
fn println(&self, message: &str) {
|
||||||
self.tui.output(message);
|
self.tui.output(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_inline(&self, message: &str) {
|
fn print_inline(&self, message: &str) {
|
||||||
// For inline printing, we'll just append to the output
|
// For inline printing, we'll just append to the output
|
||||||
self.tui.output(message);
|
self.tui.output(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_system_prompt(&self, prompt: &str) {
|
fn print_system_prompt(&self, prompt: &str) {
|
||||||
self.tui.output("🔍 System Prompt:");
|
self.tui.output("🔍 System Prompt:");
|
||||||
self.tui.output("================");
|
self.tui.output("================");
|
||||||
@@ -115,27 +115,27 @@ impl UiWriter for RetroTuiWriter {
|
|||||||
self.tui.output("================");
|
self.tui.output("================");
|
||||||
self.tui.output("");
|
self.tui.output("");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_context_status(&self, message: &str) {
|
fn print_context_status(&self, message: &str) {
|
||||||
self.tui.output(message);
|
self.tui.output(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_header(&self, tool_name: &str) {
|
fn print_tool_header(&self, tool_name: &str) {
|
||||||
self.tui.output(&format!("┌─ {}", tool_name));
|
self.tui.output(&format!("┌─ {}", tool_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_arg(&self, key: &str, value: &str) {
|
fn print_tool_arg(&self, key: &str, value: &str) {
|
||||||
self.tui.output(&format!("│ {}: {}", key, value));
|
self.tui.output(&format!("│ {}: {}", key, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_output_header(&self) {
|
fn print_tool_output_header(&self) {
|
||||||
self.tui.output("├─ output:");
|
self.tui.output("├─ output:");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_output_line(&self, line: &str) {
|
fn print_tool_output_line(&self, line: &str) {
|
||||||
self.tui.output(&format!("│ {}", line));
|
self.tui.output(&format!("│ {}", line));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_output_summary(&self, hidden_count: usize) {
|
fn print_tool_output_summary(&self, hidden_count: usize) {
|
||||||
self.tui.output(&format!(
|
self.tui.output(&format!(
|
||||||
"│ ... ({} more line{} hidden)",
|
"│ ... ({} more line{} hidden)",
|
||||||
@@ -143,21 +143,21 @@ impl UiWriter for RetroTuiWriter {
|
|||||||
if hidden_count == 1 { "" } else { "s" }
|
if hidden_count == 1 { "" } else { "s" }
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_tool_timing(&self, duration_str: &str) {
|
fn print_tool_timing(&self, duration_str: &str) {
|
||||||
self.tui.output(&format!("└─ ⚡️ {}", duration_str));
|
self.tui.output(&format!("└─ ⚡️ {}", duration_str));
|
||||||
self.tui.output("");
|
self.tui.output("");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_agent_prompt(&self) {
|
fn print_agent_prompt(&self) {
|
||||||
self.tui.output("🤖 ");
|
self.tui.output("🤖 ");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_agent_response(&self, content: &str) {
|
fn print_agent_response(&self, content: &str) {
|
||||||
self.tui.output(content);
|
self.tui.output(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn flush(&self) {
|
fn flush(&self) {
|
||||||
// No-op for TUI since it handles its own rendering
|
// No-op for TUI since it handles its own rendering
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user