github / github/copilot-cli

Prioritize clearing the typed prompt over canceling an active operation when pressing Ctrl+C

未關閉
#1,961 0 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
area:input-keyboard
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the feature or problem you'd like to solve

Prioritize clearing the typed prompt over canceling an active operation when pressing Ctrl+C

### Proposed solution

Currently:
• If an operation is running, Ctrl+C cancels the operation.
• If no operation is running, Ctrl+C clears the typed prompt.

In practice, it’s common to have a partially typed prompt while an operation is still running. When that happens, pressing Ctrl+C cancels the operation first, and only a second Ctrl+C clears the prompt.

A more helpful UX would be:
• If the prompt buffer is non-empty → Ctrl+C clears the prompt.
• Otherwise, if an operation is running → Ctrl+C cancels the operation.

This would let users quickly discard an in-progress prompt without accidentally interrupting the running task.

### Example prompts or workflows

_No response_

### Additional context

_No response_

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。