Skip to content

セッション差分レビュー — difit によるブラウザベースの差分レビュー機能#82

Merged
ktmage merged 9 commits into
developmentfrom
feature/65/diff-review
Mar 7, 2026
Merged

セッション差分レビュー — difit によるブラウザベースの差分レビュー機能#82
ktmage merged 9 commits into
developmentfrom
feature/65/diff-review

Conversation

@ktmage
Copy link
Copy Markdown
Owner

@ktmage ktmage commented Mar 7, 2026

概要

closes #65

セッション中にエージェントが行ったファイル変更を difit を使ってブラウザ上でレビューできる機能を追加。

変更内容

SDK・プロトコル層

  • protocol.ts: openDiffReview, stopDiffReview, difitAvailable, diffReviewStarted, diffReviewStopped, diffReviewError メッセージ型を追加
  • diff-review-manager.ts (新規): difit プロセスのライフサイクル管理。セッション差分を unified diff に変換し、difit に stdin で渡してシステムブラウザで開く
  • chat-view-provider.ts: openDiffReview / stopDiffReview ハンドラを追加
  • extension.ts: 起動時に difit コマンドの利用可否を検出し、DiffReviewManager を生成
  • package.json: diff (jsdiff) 依存を追加

UI 層

  • FileChangesHeader: ヘッダーバーに全体レビューボタン(ホバーで表示)、各ファイル行にファイル単位レビューボタンを追加
  • icons.tsx: DiffIconVscDiff に変更
  • AppContext.tsx: difitAvailable をコンテキストに追加
  • ロケール: 全8言語に fileChanges.diffReview, fileChanges.openReview キーを追加

テスト

  • diff-review-manager.test.ts (新規): difit プロセス起動、URL 検出、focusFile ハッシュ、kill/dispose のテスト
  • chat-view-provider.test.ts: openDiffReview / stopDiffReview ハンドラのテスト追加
  • FileChangesHeader.test.tsx: ヘッダーバー・ファイル行のレビューボタンテスト
  • 25-diff-review.test.tsx (新規): 差分レビュー機能のシナリオテスト

動作

  1. difit がインストールされている環境で、ファイル変更があるセッションの FileChangesHeader にレビューボタンが表示される
  2. ボタンクリックでシステムブラウザに difit の差分ビューが開く
  3. ファイル行のボタンからは対象ファイルにフォーカスした状態で開く

@ktmage ktmage merged commit c3e6c2e into development Mar 7, 2026
1 check passed
@ktmage ktmage mentioned this pull request Mar 7, 2026
@ktmage ktmage deleted the feature/65/diff-review branch March 8, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant