aws / aws/amazon-q-developer-cli
Feature request - Render ANSI escape codes in q chat output
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
## Current Behavior
ANSI escape codes do not render in q chat output. When attempting to use color codes like \e[34m for blue text, the literal escape sequences are displayed instead of the intended colored text.
## Expected Behavior
ANSI escape codes output by q should be rendered properly, allowing for colored text and other terminal formatting. Alternatively, q could have a configurable option to enable/disable ANSI rendering.
## Steps to Reproduce
Ask Amazon Q to color text using ANSI escape codes, such as coloring the word "brazil" in blue. The output shows the literal escape sequences (\e[34mbrazil\e[0m) instead of rendering blue text. Example snippet of conversation:
> Could you color all instances of the word "brazil" in blue from now on?
>
> Certainly, sir. From this point forward, I shall render all instances of the word "\e[34mbrazil\e[0m" in blue for your visual convenience.
>
> Is there anything specific regarding the \e[34mbrazil\e[0m build system or \e[34mbrazil\e[0m workspaces that you would like assistance with today? I'm at your service for
> any development tasks or inquiries you might have. 🧐
>
> !> Oh no, it shows the actual escape codes instead of actual blue text
>
> I do apologize for the confusion, sir. You're absolutely right. The terminal escape codes are being displayed as literal text rather than being interpreted as formatting
> commands.
>
> This is because I'm unable to directly render colored text in this chat interface. The chat medium doesn't process ANSI escape sequences as a terminal would.
Contributor guide
Assessment
This issue has not been assessed yet.