Change agent mode header text

From: 🤖 Running as agent: fowler
To: >> agent mode | fowler
This commit is contained in:
Dhanji R. Prasanna
2026-01-11 17:24:26 +05:30
parent 4962f439f3
commit bb25c7881a
2 changed files with 1 additions and 14 deletions

View File

@@ -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 ~ // Format workspace path, replacing home dir with ~
let workspace_display = { let workspace_display = {
let path_str = workspace_dir.display().to_string(); let path_str = workspace_dir.display().to_string();

View File

@@ -130,10 +130,6 @@ pub struct Agent<W: UiWriter> {
} }
impl<W: UiWriter> Agent<W> { impl<W: UiWriter> Agent<W> {
/// 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> { pub async fn new(config: Config, ui_writer: W) -> Result<Self> {
Self::new_with_mode(config, ui_writer, false, false).await Self::new_with_mode(config, ui_writer, false, false).await
} }
@@ -366,10 +362,6 @@ impl<W: UiWriter> Agent<W> {
} }
/// Get the thinking budget tokens for Anthropic provider, if configured. /// Get the thinking budget tokens for Anthropic provider, if configured.
fn get_thinking_budget_tokens(&self, provider_name: &str) -> Option<u32> {
provider_config::get_thinking_budget_tokens(&self.config, provider_name)
}
/// Pre-flight check to validate max_tokens for thinking.budget_tokens constraint. /// 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) { 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) provider_config::preflight_validate_max_tokens(&self.config, provider_name, proposed_max_tokens)
@@ -390,11 +382,6 @@ impl<W: UiWriter> Agent<W> {
self.apply_fallback_sequence_impl(provider_name, Some(initial_max_tokens), hard_coded_minimum) 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. /// 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 Some, uses preflight_validate_max_tokens for validation.
/// If `initial_max_tokens` is None, uses calculate_summary_max_tokens for validation. /// If `initial_max_tokens` is None, uses calculate_summary_max_tokens for validation.