From cef234d91a4ab1826ff85c66dc3a3ce20b5743a0 Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Thu, 6 Nov 2025 13:51:58 +1100 Subject: [PATCH] more color --- crates/g3-cli/src/lib.rs | 22 ++++++++++++++++------ crates/g3-providers/src/anthropic.rs | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/crates/g3-cli/src/lib.rs b/crates/g3-cli/src/lib.rs index 03a9311..27eea7a 100644 --- a/crates/g3-cli/src/lib.rs +++ b/crates/g3-cli/src/lib.rs @@ -452,7 +452,9 @@ async fn run_accumulative_mode( output.print("g3 programming agent - autonomous mode"); output.print(" >> describe what you want, I'll build it iteratively"); output.print(""); - output.print(&format!("workspace: {}", workspace_dir.display())); + print!("{}workspace: {}{}\n", + SetForegroundColor(Color::DarkGrey), + workspace_dir.display(), ResetColor); output.print(""); output.print("šŸ’” Each input you provide will be added to requirements"); output.print(" and I'll automatically work on implementing them. You can"); @@ -583,7 +585,7 @@ async fn run_accumulative_mode( .await?; // Run interactive mode - run_interactive(agent, cli.show_prompt, cli.show_code, chat_combined_content).await?; + run_interactive(agent, cli.show_prompt, cli.show_code, chat_combined_content, &workspace_dir).await?; // After returning from interactive mode, exit output.print("\nšŸ‘‹ Goodbye!"); @@ -792,8 +794,7 @@ async fn run_with_console_mode( output.print_smart(&result.response); } else { // Interactive mode (default) - println!("workspace: {}", project.workspace().display()); - run_interactive(agent, cli.show_prompt, cli.show_code, combined_content).await?; + run_interactive(agent, cli.show_prompt, cli.show_code, combined_content, project.workspace()).await?; } Ok(()) @@ -970,6 +971,7 @@ async fn run_interactive( show_prompt: bool, show_code: bool, combined_content: Option, + workspace_path: &Path, ) -> Result<()> { let output = SimpleOutput::new(); @@ -998,7 +1000,8 @@ async fn run_interactive( let has_readme = content.contains("Project README"); if has_agents { - output.print("šŸ¤– AGENTS.md configuration loaded"); + print!("{}šŸ¤– AGENTS.md configuration loaded{}\n", + SetForegroundColor(Color::DarkGrey), ResetColor); } if has_readme { @@ -1006,10 +1009,17 @@ async fn run_interactive( let readme_snippet = extract_readme_heading(content) .unwrap_or_else(|| "Project documentation loaded".to_string()); - output.print(&format!("šŸ“š detected: {}", readme_snippet)); + print!("{}šŸ“š detected: {}{}\n", + SetForegroundColor(Color::DarkGrey), + readme_snippet, + ResetColor); } } + // Display workspace path + print!("{}workspace: {}{}\n", + SetForegroundColor(Color::DarkGrey), + workspace_path.display(), ResetColor); output.print(""); // Initialize rustyline editor with history diff --git a/crates/g3-providers/src/anthropic.rs b/crates/g3-providers/src/anthropic.rs index 313d83f..75a5abb 100644 --- a/crates/g3-providers/src/anthropic.rs +++ b/crates/g3-providers/src/anthropic.rs @@ -106,7 +106,7 @@ use serde::{Deserialize, Serialize}; use std::time::Duration; use tokio::sync::mpsc; use tokio_stream::wrappers::ReceiverStream; -use tracing::{debug, error, info, warn}; +use tracing::{debug, error, warn}; use crate::{ CompletionChunk, CompletionRequest, CompletionResponse, CompletionStream, LLMProvider, Message,