github / github/copilot-cli

Allow users to cancel or remove enqueued messages before they are executed

Đang mở
#1,857 11 bình luận 28 reaction 0 người được giao Xem trên GitHub
area:input-keyboard
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 feature or problem you'd like to solve

There is no way to cancel or remove a message or slash command that has been queued (via `Ctrl+Q` / `Ctrl+Enter`) while the agent is busy or during `/compact`. Once enqueued, messages are automatically processed in order when the agent finishes — even if the user has changed their mind or made a mistake.

### Proposed solution

Add a mechanism to view and selectively cancel queued messages before they are executed. This could take the form of:
- A `/queue` command to list pending messages, with `/queue cancel ` to remove a specific entry.
- An interactive UI overlay (e.g., triggered by a keybinding) showing the queue with the ability to navigate and delete items.
- A keybinding (e.g., `Ctrl+Shift+Q`) to clear the entire queue at once.

This would benefit Copilot CLI users by:
- Preventing accidental or unwanted actions from queued messages the user no longer intends to send.
- Complementing existing cancellation behavior (`Ctrl+C` for active operations, `Escape` for specific commands like `/compact`) with control over *pending* operations.
- Improving confidence in the queueing workflow, encouraging users to queue more freely knowing they can course-correct.

### Example prompts or workflows

1. **Accidental queue during compaction** — User sends a message during `/compact` (auto-queued per v0.0.389), then realizes it was wrong. They want to remove it before compaction finishes and the message is sent to the model.
2. **Multiple queued commands** — User queues several slash commands with `Ctrl+Q` while the agent is working, then decides the third one is no longer needed. They run `/queue` to see the list and `/queue cancel 3` to drop it.
3. **Clear entire queue** — User has queued several messages but the agent's response changes their plan entirely. They press `Ctrl+Shift+Q` (or run `/queue clear`) to discard all pending messages and start fresh.
4. **Review before execution** — User wants to double-check what's queued before the agent finishes. They press a keybinding to see a transient overlay of queued items, then dismiss it or remove specific entries.

### Additional context

- Current queueing was introduced in v0.0.394 (`Ctrl+D`) and the keybinding was later changed to `Ctrl+Q` / `Ctrl+Enter` in v0.0.407.
- Auto-queueing during `/compact` was added in v0.0.389.
- Existing cancel mechanisms (`Ctrl+C`, `Escape`) only affect the *currently running* operation, not messages waiting in the queue.

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

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

Đánh giá

Issue này chưa được đánh giá.

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.