From cb1f99c41cddc302af8badd184640d54020d59f2 Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Thu, 22 Jan 2026 10:24:21 +0530 Subject: [PATCH] Revert "fix(cli): use '> ' as readline prompt when project active" This reverts commit 4d9399f737eb29236732da4fdb4ad24eb8844ef2. --- crates/g3-cli/src/interactive.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/g3-cli/src/interactive.rs b/crates/g3-cli/src/interactive.rs index fb735ab..4dba1e9 100644 --- a/crates/g3-cli/src/interactive.rs +++ b/crates/g3-cli/src/interactive.rs @@ -38,15 +38,15 @@ pub fn build_prompt(in_multiline: bool, agent_name: Option<&str>, active_project .file_name() .and_then(|n| n.to_str()) .unwrap_or("project"); - // Return colored prefix (without "> "), and "> " as the readline prompt + // Return colored prefix to print, and plain prompt for readline let prefix = format!( - "{} {}| {}{}", + "{} {}| {}>{} ", base_name, SetForegroundColor(Color::Blue), project_name, ResetColor ); - (prefix, "> ".to_string()) + (prefix, String::new()) } else { (String::new(), format!("{}> ", base_name)) } @@ -377,11 +377,11 @@ mod tests { fn test_build_prompt_with_project() { let project = Some(create_test_project("myapp")); let (prefix, prompt) = build_prompt(false, None, &project); - // Project name should be in the colored prefix, prompt should be "> " + // Project name should be in the colored prefix, prompt should be empty assert!(prefix.contains("g3")); assert!(prefix.contains("myapp")); assert!(prefix.contains("|")); - assert_eq!(prompt, "> "); + assert!(prompt.is_empty()); } #[test] @@ -392,7 +392,7 @@ mod tests { assert!(prefix.contains("carmack")); assert!(prefix.contains("myapp")); assert!(prefix.contains("|")); - assert_eq!(prompt, "> "); + assert!(prompt.is_empty()); } #[test] @@ -418,7 +418,7 @@ mod tests { }); let (prefix, prompt) = build_prompt(false, None, &project); assert!(prefix.contains("awesome-app")); - assert_eq!(prompt, "> "); + assert!(prompt.is_empty()); } }