Improve copy + paste formatting for Q responses
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
When copying + pasting responses from Q, newlines are added whenever text formatted as `code` (enclosed in backticks) is met.
## Steps to reproduce the issue
1. Ask Q a question. For instance:
> Could you explain the `secretValueFromJson` method offered by the `Secret` construct in CDK?
2. Await for Q's response:
> The `secretValueFromJson` method is part of the `ISecret` interface in the AWS Cloud Development Kit (CDK). [...]
3. Copy + paste the response. The pasted text contains newlines for each time `code` is encountered:
> The
secretValueFromJson
method is part of the
ISecret
interface in the AWS Cloud Development Kit (CDK).

## Expected behavior
Nicely-formatted text that does not contain the aforementioned newlines:
> The secretValueFromJson method is part of the ISecret interface in the AWS Cloud Development Kit (CDK).
Enclosing any code with backticks would be a plus, but not really necessary.
## System details (run `AWS: About` and/or `Amazon Q: About`)
- OS: macOS 14.4.1 (23E224)
- Visual Studio Code version: 1.89.1 (Universal)
- AWS Toolkit version: N/A
- Amazon Q version: v1.4.0
Contributor guide
Research direction
The issue names no source files or tests. First reproduce the problem by copying an Amazon Q response containing inline code in VS Code, then trace the response rendering and clipboard behavior. Done means pasted inline code no longer introduces line breaks; preserving backticks is optional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100