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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user