github / github/copilot-cli

Preserve question_tool rendered output (description/question/choices) when user presses Escape to dismiss

未关闭
#2,732 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:terminal-rendering
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

When the agent presents a question or multiple-choice prompt, pressing Escape to dismiss it (e.g. to run a quick `!` shell command or interact with the agent differently) causes the entire question block to collapse into a single unreadable line. The original multi-line formatting — choices, context, spacing — is lost.

This makes it difficult to reference what the agent asked, especially when you want to come back and answer the question after checking something first.

### Steps to reproduce

1. Give the agent a prompt that triggers a question with multiple choices
2. Agent renders a nicely formatted question with options
3. Press **Esc** to dismiss the question (e.g. to run a `!` command first)
4. Observe: the question collapses into a single line of concatenated text, losing all formatting

### Expected behavior

When a question/choices prompt is dismissed via Escape, the rendered text should preserve its original multi-line formatting. The question should remain readable in the conversation history so the user can:

- Reference it after running a quick shell command
- Copy/paste from it
- Re-read the options before deciding how to respond

### Additional context

This is a common workflow — the agent asks a question, but before answering you want to check something (e.g. `!ls`, `!git status`, `!cat some-file`) to make an informed choice. The collapsed question text makes it hard to remember what was asked.

Related to #2733 Agent pushes user toward implementation choices while still in plan mode

贡献指南

打开贡献指南

调研方向

首先使用多项选择提示复现 question_tool 流程,然后跟踪按下 Escape 将其关闭后,渲染出的输出被添加到对话历史时发生了什么。当描述、问题、选项、间距和换行在关闭后仍保持可读时,这项工作就完成了;issue 中没有指定文件或测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
50/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。