github / github/copilot-cli

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

オープン
#4,866 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

triage
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ask_user の聞き取りフォームのテキストフィールド入力ウィジェットから始め、Ctrl-D の処理をメインのプロンプトコンポーザーと比較してください。そこでは、空でない行に対するガードがすでに動作していると説明されています。フォーカスされたフォームフィールドで動作を再現し、その後、Ctrl-D がグローバルシャットダウンを引き起こしたり空でない入力を破棄したりしなくなっていることを確認し、空のフィールドに対する期待される動作が維持されていることも確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
58/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。