Overview Version History Q & A Rating & Review
DiffPilot
AI-powered code review and commit helper for Visual Studio Code.
Review any commit or staged changes with OpenAI (sends full unified diff, returns a structured Markdown report in Vietnamese).
Generate Conventional Commit messages (English subject/body) from staged changes.
One-click model selector in the sidebar footer.
Enter and store OpenAI API key securely (VS Code SecretStorage, no .env or settings files).
Fast, repo-native commit list (reads .git
via isomorphic-git; diffs via Git CLI).
Highlights
Review commit: open the sidebar, click Review on any commit → AI report (Tóm tắt, Ảnh hưởng logic cũ, Lỗi nghiêm trọng/khác, Ngoại lệ, Bảo mật, Hiệu năng, Test, Refactor, Rủi ro & Ưu tiên).
Review staged: analyze your current staged changes before committing.
Suggest commit: generate a high‑quality Conventional Commit subject/body (English) from staged diffs.
Footer controls:
Model dropdown: choose gpt-4o
, gpt-4o-mini
, gpt-4.1
, or gpt-4.1-mini
.
Wrench icon: prompt to enter API key (stored in SecretStorage).
Installation
Install the extension from the VS Code Marketplace (search “DiffPilot”).
Ensure Git is installed and available in your PATH.
Open a Git repository folder in VS Code.
Getting Started
Open the activity bar item “DiffPilot”.
In the footer:
Pick your OpenAI model from the dropdown.
Click the wrench icon to enter your OpenAI API key (stored securely).
Status shows: Model: <name> • API key: đã thiết lập / chưa thiết lập
.
Use the top toolbar:
Refresh: reload commit list.
Suggest Commit: create Conventional Commit (from staged).
Review Staged: review all staged changes.
In the list, click “Review” on any commit to open an AI report.
Permissions & Data Use
The extension sends only the diffs you explicitly request (commit or staged) to OpenAI for analysis.
API key is stored in VS Code SecretStorage (encrypted), not in files or environment variables.
No external telemetry is collected by this extension.
Supported Models
gpt-4o
, gpt-4o-mini
gpt-4.1
, gpt-4.1-mini
Notes:
“gpt‑5” family is not used here.
Requirements
Git (to obtain unified diffs)
OpenAI API key with access to the chosen model
VS Code ≥ 1.92
Commands
DiffPilot: Refresh Commits
DiffPilot: Review Staged Changes
DiffPilot: Suggest Commit Message from Staged
Known Limitations
Very large diffs are chunked before sending to the model (the extension merges the responses).
Private code: ensure your organization’s policy allows sending diffs to OpenAI.
Troubleshooting
No commits listed:
Confirm the folder is a Git repository.
On Windows, ensure Git is on PATH for the Extension Development Host.
“No staged changes”:
Stage files first: git add …
.
“Invalid model”:
Switch to a listed model in the footer. Unsupported IDs are normalized to gpt-4o-mini
.
Privacy
API key is never written to disk or to extension settings.
Diffs are transmitted only when you trigger a review or suggestion.
Review outputs are stored as temporary Markdown documents in your editor.
License
MIT © 2025 NghiaHH
Support
Issues & feedback: open a ticket in the repository’s Issues tab.
Feature requests are welcome (graph lanes, per-file deep links, file upload mode for extremely large diffs).