From 389ed6a55438c54ae4a94933b575e5acdb803048 Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Tue, 13 Jan 2026 14:32:24 +0530 Subject: [PATCH] Compact project info display in interactive mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: ๐Ÿค– AGENTS.md configuration loaded ๐Ÿ“š detected: G3 - AI Coding Agent ๐Ÿง  Project memory loaded workspace: /Users/dhanji/src/g3 After: >> G3 - AI Coding Agent โœ“ README | โœ“ AGENTS.md | โœ“ Memory -> ~/src/g3 --- crates/g3-cli/src/interactive.rs | 55 +++++++++++++++++--------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/crates/g3-cli/src/interactive.rs b/crates/g3-cli/src/interactive.rs index a0ba325..ccfb95d 100644 --- a/crates/g3-cli/src/interactive.rs +++ b/crates/g3-cli/src/interactive.rs @@ -94,41 +94,44 @@ pub async fn run_interactive( let has_readme = content.contains("Project README"); let has_memory = content.contains("Project Memory"); - if has_agents { - print!( - "{}๐Ÿค– AGENTS.md configuration loaded{}\n", - SetForegroundColor(Color::DarkGrey), - ResetColor - ); - } + let readme_status = if has_readme { "โœ“" } else { "ยท" }; + let agents_status = if has_agents { "โœ“" } else { "ยท" }; + let memory_status = if has_memory { "โœ“" } else { "ยท" }; - if has_readme { + // Extract project name if README is loaded + let project_name = if has_readme { // Extract the first heading or title from the README - let readme_snippet = extract_readme_heading(content) - .unwrap_or_else(|| "Project documentation loaded".to_string()); + extract_readme_heading(content) + } else { + None + }; - print!( - "{}๐Ÿ“š detected: {}{}\n", - SetForegroundColor(Color::DarkGrey), - readme_snippet, - ResetColor - ); - } - - if has_memory { - print!( - "{}๐Ÿง  Project memory loaded{}\n", - SetForegroundColor(Color::DarkGrey), - ResetColor - ); + if let Some(name) = project_name { + print!("{}>> {}{}\n", SetForegroundColor(Color::DarkGrey), name, ResetColor); } + print!( + "{} {} README | {} AGENTS.md | {} Memory{}\n", + SetForegroundColor(Color::DarkGrey), + readme_status, agents_status, memory_status, + ResetColor + ); } // Display workspace path + let workspace_display = { + let path_str = workspace_path.display().to_string(); + dirs::home_dir() + .and_then(|home| { + path_str + .strip_prefix(&home.display().to_string()) + .map(|s| format!("~{}", s)) + }) + .unwrap_or(path_str) + }; print!( - "{}workspace: {}{}\n", + "{}-> {}{}\n", SetForegroundColor(Color::DarkGrey), - workspace_path.display(), + workspace_display, ResetColor ); output.print("");