diff --git a/crates/goose-cli/src/session/input.rs b/crates/goose-cli/src/session/input.rs index 7265cc4d..af9db363 100644 --- a/crates/goose-cli/src/session/input.rs +++ b/crates/goose-cli/src/session/input.rs @@ -400,9 +400,23 @@ fn parse_plan_command(input: String) -> Option { } 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::() else { + return true; + }; + version < 7000 +} + fn print_help() { let newline_key = get_newline_key().to_ascii_uppercase(); let modes = GooseMode::VARIANTS.join(", ");