github / github/copilot-cli

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

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

描述

### 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.

貢獻指南

開啟貢獻指南

研究方向

先檢查現有的 Ctrl+O 展開時間軸、Ctrl+T 推理檢視畫面和 /diff 工作流程,以了解它們目前的範圍和呈現方式。定義終端原生的僅 diff 模式如何識別程式碼 hunk、群組編輯過的檔案,以及區分上一輪變更與工作階段中的所有變更。當互動方式、按鍵繫結、範圍行為以及對非程式碼成品的處理,都已明確到足以實作和審查時,即視為完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell
領域
cli
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
需要釐清
新手友好度
30/100

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

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