Copying selected prompt text includes the input box's left border
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 6
描述
### Describe the bug
Mouse-selecting text from the current prompt input box and copying it includes the decorative left border of the input box in the clipboard payload. The copied prompt is therefore contaminated with a box-drawing glyph that the user did not type.
This occurs when the prompt wraps across multiple visual lines. The selection appears to cover the user-entered text, but pasting the clipboard contents also produces the cyan left-hand border shown by the input box.
For example, selecting the text shown below:
produces clipboard text containing the left border (and a lot of whitespace to the right of each line):
```text
┃ Here's some example
┃ text
┃ that I'm going to
┃ copy.
```
### Affected version
`GitHub Copilot CLI 1.0.71-0.`
### Steps to reproduce the behavior
1. Launch Copilot CLI in Ghostty on macOS.
2. Enter enough text in the prompt input box for it to wrap across multiple lines.
3. Mouse-drag to select the text inside the prompt input box.
4. Copy the selection with `Cmd+C`.
5. Paste the clipboard contents into an editor or another application.
6. Observe that the input box left-border glyph is included with the prompt text.
### Expected behavior
Copying selected prompt text should copy only the user-entered content. Decorative input-box borders and other Copilot CLI UI chrome must not be present in the clipboard payload.
Done when mouse-selected single-line, multiline, and soft-wrapped prompt text can be copied without any input-box border glyphs or other decorative characters.
### Additional context
- Operating system: macOS 26.5.2 (25F84)
- CPU architecture: Apple Silicon (`arm64`)
- Terminal emulator: Ghostty 1.3.2-HEAD-+05c3e29
- Terminal type: `xterm-256color`
- This appears related to https://github.com/github/copilot-cli/issues/4009, which reports the same class of clipboard contamination for the right-side scrollbar. This report concerns the prompt input box left border.
贡献指南
调研方向
首先,使用 macOS 上的 Ghostty 重现 Copilot CLI 提示输入框中的选择和复制行为。跟踪提示选择和剪贴板处理,然后验证单行、多行和软换行选择中只包含用户输入的文本,不包含左边框或其他 UI 字符。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- shell
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 62/100