github / github/copilot-cli

Ctrl-D in  ask_user /elicitation form fields triggers session shutdown and discards in-progress input

Aperta
#4,866 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

triage
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

Describe the bug

Summary: In the main prompt composer, Ctrl-D behaves correctly (deletes the character under the cursor when the line is non-empty; only signals EOF/shutdown on an empty line — the behavior fixed some months ago). However, when the agent presents an  ask_user  elicitation form and I'm typing an answer into a form text field, pressing Ctrl-D immediately triggers "shutdown" and discards everything I'd typed into the form. It appears the non-empty-line guard applied to the main composer's Ctrl-D handler was never applied to the elicitation/form input widget.

Impact: Repeated loss of carefully composed answers (happened ~6 times in one session).

Severity: High — silent data loss of user input; unexpected shutdown.

Suggested fix: Route the form field's Ctrl-D through the same handler/guard as the main composer (non-empty line ⇒ delete-char; empty ⇒ ignore or blur, not global shutdown).

Affected version

Copilot CLI 1.0.83, macOS (darwin-arm64)

Steps to reproduce the behavior

Steps to reproduce:

  1. Have the agent call a tool that shows an  ask_user  form with a free-text field.
  2. Start typing a multi-line/long answer into the field.
  3. Press Ctrl-D (e.g. out of habit, to delete a character).
  4. Observe: the session shuts down / the form is torn down and the typed answer is lost.
Expected behavior

Expected: In a form field, Ctrl-D should either delete the character under the cursor (matching the main composer) or be a no-op — it should NOT invoke global shutdown while a non-empty field has focus.

Actual: Ctrl-D invokes global shutdown regardless of field contents, discarding in-progress input.

Additional context

No response

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dal widget di input del campo di testo del modulo di raccolta di ask_user e confronta la sua gestione di Ctrl-D con il compositore principale dei prompt, dove la protezione per le righe non vuote è già descritta come funzionante. Riproduci il comportamento con un campo del modulo attivo, quindi verifica che Ctrl-D non attivi più l'arresto globale né scarti l'input non vuoto, mentre il comportamento previsto per un campo vuoto rimane invariato.

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à
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
58/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.