aws / aws/amazon-q-developer-cli

Feature request - Render ANSI escape codes in q chat output

Open
#1,294 0 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.