From bb25c7881a5a8e0ea9177e146ba50f2c18000eb2 Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Sun, 11 Jan 2026 17:24:26 +0530 Subject: [PATCH] Change agent mode header text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: 🤖 Running as agent: fowler To: >> agent mode | fowler --- crates/g3-cli/src/lib.rs | 2 +- crates/g3-core/src/lib.rs | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/crates/g3-cli/src/lib.rs b/crates/g3-cli/src/lib.rs index 36c5296..cc29575 100644 --- a/crates/g3-cli/src/lib.rs +++ b/crates/g3-cli/src/lib.rs @@ -539,7 +539,7 @@ async fn run_agent_mode( ))? }; - output.print(&format!("🤖 Running as agent: {}", agent_name)); + output.print(&format!(">> agent mode | {}", agent_name)); // Format workspace path, replacing home dir with ~ let workspace_display = { let path_str = workspace_dir.display().to_string(); diff --git a/crates/g3-core/src/lib.rs b/crates/g3-core/src/lib.rs index 6edd312..570bfb5 100644 --- a/crates/g3-core/src/lib.rs +++ b/crates/g3-core/src/lib.rs @@ -130,10 +130,6 @@ pub struct Agent { } impl Agent { - /// Minimum tokens for summary requests to avoid API errors when context is nearly full. - /// This ensures max_tokens is never 0 even when context usage is 90%+. - const SUMMARY_MIN_TOKENS: u32 = 1000; - pub async fn new(config: Config, ui_writer: W) -> Result { Self::new_with_mode(config, ui_writer, false, false).await } @@ -366,10 +362,6 @@ impl Agent { } /// Get the thinking budget tokens for Anthropic provider, if configured. - fn get_thinking_budget_tokens(&self, provider_name: &str) -> Option { - provider_config::get_thinking_budget_tokens(&self.config, provider_name) - } - /// Pre-flight check to validate max_tokens for thinking.budget_tokens constraint. fn preflight_validate_max_tokens(&self, provider_name: &str, proposed_max_tokens: u32) -> (u32, bool) { provider_config::preflight_validate_max_tokens(&self.config, provider_name, proposed_max_tokens) @@ -390,11 +382,6 @@ impl Agent { self.apply_fallback_sequence_impl(provider_name, Some(initial_max_tokens), hard_coded_minimum) } - /// Apply the fallback sequence for summary requests to free up context space. - fn apply_summary_fallback_sequence(&mut self, provider_name: &str) -> u32 { - self.apply_fallback_sequence_impl(provider_name, None, 5000) - } - /// Unified implementation of the fallback sequence for freeing context space. /// If `initial_max_tokens` is Some, uses preflight_validate_max_tokens for validation. /// If `initial_max_tokens` is None, uses calculate_summary_max_tokens for validation.