github / github/copilot-cli

Ctrl+C while copying selected text cancels and declines confirmation dialog

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

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

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

説明

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
  1. Open Windows Terminal with PowerShell.
  2. Start copilot.
  3. Ask Copilot to provide a multi-line script and then display a confirmation dialog that waits for confirmation that the script has been run.
  4. Use the mouse to highlight the first part of the displayed script.
  5. Press Ctrl+C with the intention of copying the selected text.
  6. Observe that the confirmation dialog closes and its contents disappear.
  7. Observe that Copilot reports the prompt to the agent as declined, even though no decline option was selected.
  8. 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+c as cancel.
  • 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.

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

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

はじめの一歩

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

調査の方向性

再現手順で説明されている Copilot CLI の入力要求または確認ダイアログと、Ctrl+C によるキャンセル経路から始めてください。この issue にはソースファイルや既存のテストパスについての記載はありません。Windows Terminal で PowerShell を使って再現し、その後、提案されている回帰テストのカバレッジを追加し、選択したテキストをコピーしても拒否した応答が送信されないことと、スクリプトが復旧可能なままであることを確認してください。

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

評価

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

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

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