fix(cli): use plain '> ' prompt instead of goose emoji (#9305)

Signed-off-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
Douwe Osinga
2026-05-19 10:06:36 -04:00
committed by GitHub
parent 7dbdfa43fa
commit f41d45ff3a
+1 -21
View File
@@ -149,9 +149,7 @@ pub fn get_input(
rustyline::EventHandler::Conditional(Box::new(CtrlCHandler::new(completion_cache))),
);
let prompt = get_input_prompt_string();
let input = match editor.readline(&prompt) {
let input = match editor.readline("> ") {
Ok(text) => text,
Err(e) => match e {
rustyline::error::ReadlineError::Interrupted => return Ok(InputResult::Exit),
@@ -387,24 +385,6 @@ fn parse_plan_command(input: String) -> Option<InputResult> {
Some(InputResult::Plan(options))
}
fn get_input_prompt_string() -> String {
if is_vte_with_broken_emoji_width() {
return "> ".to_string();
}
"🪿 ".to_string()
}
/// VTE < 0.70 renders 🪿 as 1 cell while unicode-width counts 2, causing cursor offset.
fn is_vte_with_broken_emoji_width() -> bool {
let Ok(vte_version) = std::env::var("VTE_VERSION") else {
return false;
};
let Ok(version) = vte_version.parse::<u32>() else {
return true;
};
version < 7000
}
fn print_help() {
let newline_key = get_newline_key().to_ascii_uppercase();
let modes = GooseMode::VARIANTS.join(", ");