github / github/copilot-cli

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

Đang mở
#4,866 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

triage
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu từ widget nhập trường văn bản của biểu mẫu thu thập thông tin ask_user và so sánh cách xử lý Ctrl-D của nó với trình soạn prompt chính, nơi cơ chế bảo vệ dòng không rỗng đã được mô tả là đang hoạt động. Tái hiện hành vi với một trường biểu mẫu đang được focus, sau đó xác minh rằng Ctrl-D không còn kích hoạt việc tắt toàn cục hoặc loại bỏ dữ liệu nhập không rỗng, trong khi hành vi mong đợi đối với trường rỗng vẫn được giữ nguyên.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
shell
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
58/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.