CLI UX: Add blank line gap between output and next prompt

Fixes the cramped terminal output. Two changes:
1. display_output: trailing \n after G> text for spacing
2. read_input: leading \n before » prompt + 30ms delay after spinner clear
   to prevent \r overlap with prompt character

Before: G> response...» Hi (no gap, overlapping)
After:  G> response...
        (blank line)
        » Hi  (clean, separated)
This commit is contained in:
2026-06-12 12:04:59 +05:30
parent 1d8e26e683
commit 366d93443b

View File

@@ -545,7 +545,7 @@ impl AgentLoop {
/// Display output to stdout with GyanDoot prefix. /// Display output to stdout with GyanDoot prefix.
fn display_output(&self, output: &str) { fn display_output(&self, output: &str) {
println!( println!(
"\n{bold}{green}G{reset}> {output}", "\n{bold}{green}G{reset}> {output}\n",
bold = cli_color::BOLD, bold = cli_color::BOLD,
green = cli_color::GREEN, green = cli_color::GREEN,
reset = cli_color::RESET, reset = cli_color::RESET,
@@ -598,10 +598,12 @@ impl AgentLoop {
use std::io::Write; use std::io::Write;
use tokio::io::AsyncBufReadExt; use tokio::io::AsyncBufReadExt;
// Show input prompt // Show input prompt with leading blank line for spacing
if atty::is(atty::Stream::Stdin) { if atty::is(atty::Stream::Stdin) {
// Small extra delay ensures spinner \r is fully cleared
tokio::time::sleep(std::time::Duration::from_millis(30)).await;
print!( print!(
"{bold}{cyan}»{reset} ", "\n{bold}{cyan}»{reset} ",
bold = cli_color::BOLD, bold = cli_color::BOLD,
cyan = cli_color::BRIGHT_CYAN, cyan = cli_color::BRIGHT_CYAN,
reset = cli_color::RESET, reset = cli_color::RESET,