diff --git a/src/agent/context_compressor.rs b/src/agent/context_compressor.rs index e2161fb..f27d9dc 100644 --- a/src/agent/context_compressor.rs +++ b/src/agent/context_compressor.rs @@ -110,17 +110,11 @@ impl ContextCompressor { // Check if compression is needed let tokens = estimate_tokens(&history); if tokens <= self.threshold() { - #[cfg(debug_assertions)] - tracing::info!( - tokens = tokens, - threshold = self.threshold(), - msg_count = history.len(), - "Context compression not needed" - ); return Ok(history); } - tracing::info!( + #[cfg(debug_assertions)] + tracing::debug!( tokens = tokens, threshold = self.threshold(), msg_count = history.len(), @@ -172,7 +166,8 @@ impl ContextCompressor { } } - tracing::info!( + #[cfg(debug_assertions)] + tracing::debug!( final_tokens = estimate_tokens(¤t_history), final_msg_count = current_history.len(), "Context compression completed" diff --git a/src/session/session.rs b/src/session/session.rs index 271ae70..ca7619f 100644 --- a/src/session/session.rs +++ b/src/session/session.rs @@ -265,6 +265,8 @@ impl SessionManager { .find(|c| c.name == command) .ok_or_else(|| AgentError::Other(format!("Unknown command: {}", command)))?; + tracing::info!(cmd = %cmd.name, args = ?args, "Executing slash command"); + match cmd.name { "new" => { let title = args.map(|s| s.to_string());