From 366d93443b266c313029adb453d68ce2686ecef6 Mon Sep 17 00:00:00 2001 From: Tara Menon Date: Fri, 12 Jun 2026 12:04:59 +0530 Subject: [PATCH] CLI UX: Add blank line gap between output and next prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- crates/gyandoot-agent/src/agent_loop.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/gyandoot-agent/src/agent_loop.rs b/crates/gyandoot-agent/src/agent_loop.rs index 171c048..97f7b7d 100644 --- a/crates/gyandoot-agent/src/agent_loop.rs +++ b/crates/gyandoot-agent/src/agent_loop.rs @@ -545,7 +545,7 @@ impl AgentLoop { /// Display output to stdout with GyanDoot prefix. fn display_output(&self, output: &str) { println!( - "\n{bold}{green}G{reset}> {output}", + "\n{bold}{green}G{reset}> {output}\n", bold = cli_color::BOLD, green = cli_color::GREEN, reset = cli_color::RESET, @@ -598,10 +598,12 @@ impl AgentLoop { use std::io::Write; use tokio::io::AsyncBufReadExt; - // Show input prompt + // Show input prompt with leading blank line for spacing 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!( - "{bold}{cyan}»{reset} ", + "\n{bold}{cyan}»{reset} ", bold = cli_color::BOLD, cyan = cli_color::BRIGHT_CYAN, reset = cli_color::RESET,