github / github/copilot-cli

Add a diff-only view/keybind for reviewing just agent code changes

Đang mở
#2,964 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
area:input-keyboard area:terminal-rendering
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

Copilot CLI has useful visibility controls, but none that focus specifically on **code line changes only**.

- `Ctrl+O` / expanded timeline shows too much: shell commands, script output, session-state files, markdown/session artifacts, and other operational noise.
- `Ctrl+T` is about reasoning, not code review.
- `/diff` is helpful, but it doesn't map to the quick "show me exactly what code changed from the agent" interaction I want while staying inside the main terminal flow.

When I'm working in the terminal, I care most about **how the agent changed my code**. I usually don't care about session-state updates, helper scripts, or verbose command output.

### Proposed solution

Add a **diff-only review mode** in Copilot CLI for agent edits.

Ideal behavior:

1. A dedicated keybind to toggle **code diff view only**.
2. Show only edited file hunks, grouped by file.
3. Hide shell/script output, session artifacts, state files, and unrelated timeline items by default.
4. Support scoping such as:
- **last turn only**
- **all changes in current session**
5. Render diffs in a clean terminal-native viewer instead of requiring users to expand the entire timeline or open an external editor.

This would make it much easier to audit agent changes quickly and confidently from inside the CLI.

### Example prompts or workflows

1. I ask Copilot CLI to refactor a function, then hit a keybind to see only the code hunks it changed in that turn.
2. I let the agent make several edits, then toggle a session-wide diff-only view without seeing all shell commands and background task output.
3. I review changes in a terminal-only workflow without switching to VS Code or manually running `git diff`.
4. I compare the agent's edits before deciding whether to keep working, rewind, or undo.

### Additional context

The main gap is not "can I see changes at all?" — it's that the current visibility options are too broad or noisy for the common "review only code edits" workflow.

A dedicated diff-only view would be especially valuable for users who prefer terminal-first workflows and want a fast audit surface similar to focused code-diff review in other coding agents.

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

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

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra timeline mở rộng hiện có của Ctrl+O, chế độ xem suy luận của Ctrl+T và workflow /diff để hiểu phạm vi cũng như cách render hiện tại của chúng. Xác định cách một chế độ chỉ-diff native cho terminal sẽ nhận diện các code hunk, nhóm các tệp đã chỉnh sửa và phân biệt các thay đổi trong lượt cuối với toàn bộ thay đổi của phiên. Công việc được xem là hoàn tất khi tương tác, keybind, hành vi về phạm vi và cách xử lý các artifact không phải mã nguồn được đặc tả đủ chi tiết để triển khai và review.

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
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
30/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.