AI Git Helper generates Git commit messages from the current repository diff.
This VS Code version follows the same core design as the IntelliJ plugin in the parent project:
collect Git changes;
truncate the diff/content summary with a configurable limit;
send the summary through the selected provider: OpenAI Official or OpenAI Compatible;
write the generated message back to the Git commit input box when possible.
Usage
Open a Git repository in VS Code.
Configure aiGitHelper.model, or run AI Git Helper: Select or Enter Model.
Run AI Git Helper: Set API Key, or provide OPENAI_API_KEY in the VS Code process environment.
Stage files if you want the message based on staged changes.
Run AI Git Helper: Generate Commit Message from the Command Palette or the Source Control title bar.
Settings
aiGitHelper.provider: OpenAI Official or OpenAI Compatible.
aiGitHelper.baseUrl: provider base URL, default https://api.openai.com/v1.
aiGitHelper.model: model name. You can type it manually, or run AI Git Helper: Select or Enter Model to fetch models from the configured /models endpoint and choose one.
aiGitHelper.commitLanguage: output language.
aiGitHelper.maxDiffChars: maximum diff/content characters sent to the provider.
aiGitHelper.includeUnversionedFiles: include untracked files that are not part of Git diff output.
aiGitHelper.diffMode: stagedOrWorking, staged, or working for tracked-file diffs.
API keys are intentionally not stored in VS Code settings because settings can be synced or committed accidentally. Use AI Git Helper: Set API Key to store the key in VS Code SecretStorage, or provide OPENAI_API_KEY in the VS Code process environment.
Development
npm install
npm run compile
Press F5 in VS Code to launch an Extension Development Host.
To package:
npm run package
Privacy
When generating a commit message, selected Git diff content and optional unversioned file snippets are sent to the configured AI provider.