github / github/copilot-cli

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

オープン
#2,964 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る
area:input-keyboard area:terminal-rendering
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
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 専用モードでコードハンクを特定し、編集されたファイルをグループ化し、直前のターンでの変更とセッション全体の変更を区別する方法を定義します。インタラクション、キーバインド、スコープの動作、コードではないアーティファクトの扱いが、実装とレビューを行える程度に十分詳細に仕様化されていれば完了です。

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

評価

技術スタック
shell
領域
cli
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

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

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