github / github/copilot-cli

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

Aperta
#2,732 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
area:terminal-rendering
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

### 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by reproducing the question_tool flow with a multiple-choice prompt, then trace what happens when Escape dismisses it and the rendered output is added to conversation history. The work is done when the description, question, choices, spacing, and line breaks remain readable after dismissal; no file or test is named in the issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
shell
Ambito
cli
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
50/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.