セッション差分レビュー — difit によるブラウザベースの差分レビュー機能#82
Merged
Conversation
- protocol.ts に openDiffReview / stopDiffReview / difitAvailable 等のメッセージ型を追加 - DiffReviewManager を新規作成(difit プロセス管理 + openExternal でブラウザ表示) - chat-view-provider に openDiffReview / stopDiffReview ハンドラを追加 - extension.ts に difit 存在チェックと DiffReviewManager の生成を追加 - package.json に diff 依存を追加
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
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:DiffIconをVscDiffに変更AppContext.tsx:difitAvailableをコンテキストに追加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(新規): 差分レビュー機能のシナリオテスト動作
difitがインストールされている環境で、ファイル変更があるセッションの FileChangesHeader にレビューボタンが表示される