fix: Remove bold styling from prompt on Windows to prevent cursor shift#3989
fix: Remove bold styling from prompt on Windows to prevent cursor shift#3989ConstantTime wants to merge 1 commit intoblock:mainfrom
Conversation
416eb38 to
dcbe912
Compare
Fixes block#3364 - On Windows terminals, the bold ANSI escape code in the prompt was causing the cursor to be shifted to the right. This change removes the bold styling specifically for Windows while maintaining it for other platforms. The issue was in the readline prompt where console::style was applying bold formatting that Windows terminals weren't handling correctly.
dcbe912 to
2c82148
Compare
|
I was just in the process of debugging this issue myself and came across this PR. This bug renders the CLI unusable for me (no pun intended). Wondering if this is something that can be enabled / disabled, like have an option to disable prompt styling if it's causing rendering issues. I'd rather have it fall back to safe defaults. |
Hey @thebristolsound |
|
I'll get local dev setup and test it out, will let you know |
Thanks! |
|
Just a heads up, I went ahead and created a pull request addressing this issue and added some test coverage onto it. Got two approvals and just waiting for next steps: |
Cool. Closing my PR then. |


Summary
Problem
When running Goose CLI on Windows 11, the cursor was shifted to the right in the terminal due to the bold ANSI escape code not being handled correctly by Windows terminals.
Solution
Added a platform-specific check using
cfg\!(target_os = "windows")to conditionally apply styling:console::style("( O)>").cyan()(no bold)console::style("( O)>").cyan().bold()(with bold)Test Plan
cargo check -p goose-cli)Note
This is a draft PR as I don't have access to a Windows machine to test the fix. Would appreciate if someone with Windows could verify the cursor position is now correct.