thinning message highlighted

This commit is contained in:
Dhanji Prasanna
2025-10-23 13:16:13 +11:00
parent efd4eca755
commit 0be4829ca9
6 changed files with 83 additions and 430 deletions

View File

@@ -2473,8 +2473,7 @@ Template:
let (thin_summary, chars_saved) = self.context_window.thin_context();
self.thinning_events.push(chars_saved);
// Print the thinning summary to the user
self.ui_writer.println("");
self.ui_writer.print_context_status(&format!("{}\n", thin_summary));
self.ui_writer.print_context_thinning(&thin_summary);
}
// Track what we've already displayed before getting new text

View File

@@ -17,6 +17,9 @@ pub trait UiWriter: Send + Sync {
/// Print a context window status message
fn print_context_status(&self, message: &str);
/// Print a context thinning success message with highlight and animation
fn print_context_thinning(&self, message: &str);
/// Print a tool execution header
fn print_tool_header(&self, tool_name: &str);
@@ -60,6 +63,7 @@ impl UiWriter for NullUiWriter {
fn print_inline(&self, _message: &str) {}
fn print_system_prompt(&self, _prompt: &str) {}
fn print_context_status(&self, _message: &str) {}
fn print_context_thinning(&self, _message: &str) {}
fn print_tool_header(&self, _tool_name: &str) {}
fn print_tool_arg(&self, _key: &str, _value: &str) {}
fn print_tool_output_header(&self) {}