Compact project info display in interactive mode

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
This commit is contained in:
Dhanji R. Prasanna
2026-01-13 14:32:24 +05:30
parent af3aa840db
commit 389ed6a554

View File

@@ -94,41 +94,44 @@ pub async fn run_interactive<W: UiWriter>(
let has_readme = content.contains("Project README"); let has_readme = content.contains("Project README");
let has_memory = content.contains("Project Memory"); let has_memory = content.contains("Project Memory");
if has_agents { let readme_status = if has_readme { "" } else { "·" };
print!( let agents_status = if has_agents { "" } else { "·" };
"{}🤖 AGENTS.md configuration loaded{}\n", let memory_status = if has_memory { "" } else { "·" };
SetForegroundColor(Color::DarkGrey),
ResetColor
);
}
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 // Extract the first heading or title from the README
let readme_snippet = extract_readme_heading(content) extract_readme_heading(content)
.unwrap_or_else(|| "Project documentation loaded".to_string()); } else {
None
};
print!( if let Some(name) = project_name {
"{}📚 detected: {}{}\n", print!("{}>> {}{}\n", SetForegroundColor(Color::DarkGrey), name, ResetColor);
SetForegroundColor(Color::DarkGrey),
readme_snippet,
ResetColor
);
}
if has_memory {
print!(
"{}🧠 Project memory loaded{}\n",
SetForegroundColor(Color::DarkGrey),
ResetColor
);
} }
print!(
"{} {} README | {} AGENTS.md | {} Memory{}\n",
SetForegroundColor(Color::DarkGrey),
readme_status, agents_status, memory_status,
ResetColor
);
} }
// Display workspace path // 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!( print!(
"{}workspace: {}{}\n", "{}-> {}{}\n",
SetForegroundColor(Color::DarkGrey), SetForegroundColor(Color::DarkGrey),
workspace_path.display(), workspace_display,
ResetColor ResetColor
); );
output.print(""); output.print("");