Ctrl+C while copying selected text cancels and declines confirmation dialog
Chưa có ai nhận issue này.
- 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
When Copilot CLI displays a confirmation dialog containing a multi-line script and waits for me to confirm that I ran it, I highlight part of the script and press Ctrl+C to copy the selected text.
Instead of copying the selection while leaving the dialog open, Copilot CLI closes the dialog, removes its contents, and tells the agent that I declined the prompt. I then cannot copy the remaining commands, and the agent incorrectly proceeds as though I intentionally rejected the confirmation.
Windows Terminal may deliver Ctrl+C as an interrupt, but converting that interrupt into a semantically "declined" answer and removing the only visible copy of the script is CLI-level behavior. Cancellation and explicit decline should not be treated as equivalent.
Affected version
GitHub Copilot CLI 1.0.84-3
Steps to reproduce the behavior
- Open Windows Terminal with PowerShell.
- Start
copilot. - Ask Copilot to provide a multi-line script and then display a confirmation dialog that waits for confirmation that the script has been run.
- Use the mouse to highlight the first part of the displayed script.
- Press Ctrl+C with the intention of copying the selected text.
- Observe that the confirmation dialog closes and its contents disappear.
- Observe that Copilot reports the prompt to the agent as declined, even though no decline option was selected.
- Attempt to copy the remaining part of the script and observe that it is no longer available.
Expected behavior
When text is selected inside a confirmation dialog, copying that text must not submit a declined response or permanently remove the dialog contents. If Ctrl+C is handled as cancellation rather than copy, the CLI should distinguish cancellation from an explicit decline and preserve the dialog or its script in the conversation timeline so it remains copyable.
Additional context
- Reproducibility: Happens consistently when I press Ctrl+C after selecting text in a blocking confirmation dialog.
- Operating system: Microsoft Windows 11 Enterprise, version 10.0.26200
- CPU architecture: x64
- CPU: AMD EPYC 7763 64-Core Processor
- Terminal emulator: Windows Terminal
- Shell: PowerShell 7.6.6
- Copilot CLI help currently documents
ctrl+cascancel. - The incorrect behavior is specifically that cancellation is returned to the agent as an explicit decline and the dialog content disappears.
- Debug logs: Attach a debug log from a reproduction if available.
- Suggested regression test: Render an elicitation dialog, deliver Ctrl+C while text is selected, and verify that the dialog does not produce a declined response and that its content remains recoverable.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với hộp thoại yêu cầu hoặc xác nhận của Copilot CLI và đường dẫn hủy bằng Ctrl+C được mô tả trong phần tái hiện; issue không đề cập đến tệp nguồn hoặc đường dẫn kiểm thử hiện có. Tái hiện lỗi trong Windows Terminal với PowerShell, sau đó thêm phạm vi kiểm thử hồi quy được đề xuất và xác minh rằng việc sao chép văn bản đã chọn không gửi một phản hồi bị từ chối, đồng thời script vẫn có thể khôi phục.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- powershell, shell
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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
- 55/100