From 95f89d3f8ed0b9f66fad464d0beb36e7f6ad3f5d Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Fri, 16 Jan 2026 20:26:35 +0530 Subject: [PATCH] Simplify compaction status messages --- crates/g3-cli/src/interactive.rs | 8 ++++---- crates/g3-core/src/lib.rs | 18 +++++++----------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/crates/g3-cli/src/interactive.rs b/crates/g3-cli/src/interactive.rs index 19ed5de..835b4f1 100644 --- a/crates/g3-cli/src/interactive.rs +++ b/crates/g3-cli/src/interactive.rs @@ -338,16 +338,16 @@ async fn handle_command( Ok(true) } "/compact" => { - output.print("šŸ—œļø Triggering manual compaction..."); + output.print("g3: compacting session ..."); match agent.force_compact().await { Ok(true) => { - output.print("āœ… Compaction completed successfully"); + output.print("g3: compacting session ... done"); } Ok(false) => { - output.print("āš ļø Compaction failed"); + output.print("g3: compacting session ... failed"); } Err(e) => { - output.print(&format!("āŒ Error during compaction: {}", e)); + output.print(&format!("g3: compacting session ... error: {}", e)); } } Ok(true) diff --git a/crates/g3-core/src/lib.rs b/crates/g3-core/src/lib.rs index 09a479b..09dad58 100644 --- a/crates/g3-core/src/lib.rs +++ b/crates/g3-core/src/lib.rs @@ -893,7 +893,7 @@ impl Agent { // Check if we need to do 90% auto-compaction if self.pending_90_compaction { self.ui_writer - .print_context_status("\n⚔ Context window reached 90% - auto-compacting...\n"); + .print_context_status("\ng3: compacting session ...\n"); if let Err(e) = self.force_compact().await { warn!("Failed to auto-compact at 90%: {}", e); } else { @@ -982,10 +982,7 @@ impl Agent { debug!("Manual compaction triggered"); - self.ui_writer.print_context_status(&format!( - "\nšŸ—œļø Manual compaction requested (current usage: {}%)...", - self.context_window.percentage_used() as u32 - )); + // Note: Status messages are now handled by the CLI layer let provider = self.providers.get(None)?; let provider_name = provider.name().to_string(); @@ -1016,8 +1013,7 @@ impl Agent { .await?; if result.success { - self.ui_writer - .print_context_status("āœ… Context compacted successfully.\n"); + // Note: Success message is now handled by the CLI layer self.compaction_events.push(result.chars_saved); Ok(true) } else { @@ -1076,11 +1072,11 @@ impl Agent { if !self.context_window.should_compact() { self.ui_writer - .print_context_status("āœ… Thinning resolved capacity issue. Continuing...\n"); + .print_context_status("g3: thinning resolved capacity issue\n"); return Ok(false); } self.ui_writer - .print_context_status("āš ļø Thinning insufficient. Proceeding with compaction...\n"); + .print_context_status("g3: thinning insufficient, compacting ...\n"); } // Compaction still needed @@ -1091,7 +1087,7 @@ impl Agent { use crate::compaction::{perform_compaction, CompactionConfig}; self.ui_writer.print_context_status(&format!( - "\nšŸ—œļø Context window reaching capacity ({}%). Compacting...", + "\ng3: compacting session ({}%) ...", self.context_window.percentage_used() as u32 )); @@ -1120,7 +1116,7 @@ impl Agent { if result.success { self.ui_writer - .print_context_status("āœ… Context compacted successfully. Continuing...\n"); + .print_context_status("g3: compacting session ... done\n"); self.compaction_events.push(result.chars_saved); request.messages = self.context_window.conversation_history.clone(); return Ok(true);