AI Git Commit Assistant
AI Git Commit Assistant is a VS Code extension that analyzes local Git changes with the VS Code Language Model API and generates practical release artifacts directly in the editor.
Features
- Analyze either staged changes (
git diff --staged) or all changes since HEAD (git diff HEAD).
- Summarize changed behavior and affected files.
- Detect potential breaking changes.
- Select a Conventional Commit type:
feat, fix, refactor, docs, style, perf, test, chore, or ci.
- Generate a Conventional Commit title.
- Generate a pull request description.
- Suggest a semantic version bump from the current
package.json version.
- Generate changelog markdown.
- Score commit-message quality and provide follow-up suggestions.
- Create a Git commit from staged files.
AI Provider
The extension uses vscode.lm, the VS Code Language Model API. It does not require its own API key.
Users authenticate through whichever VS Code extension exposes a language model, such as GitHub Copilot or another compatible provider. The first available chat model is used by default.
Usage
- Open a Git repository in VS Code.
- Stage the files you want to commit, or switch the assistant to
HEAD mode.
- Open the assistant using one of these options:
- Run
AI Git Commit Assistant: Open from the Command Palette.
- Press
Ctrl+Alt+G on Windows/Linux or Cmd+Alt+G on macOS.
- Click
AI Commit in the bottom status bar.
- Click the Git commit icon in the Source Control view title bar.
- Select
Staged or HEAD.
- Click
Generate.
- Review the generated summary, breaking changes, version suggestion, commit title, PR description, and changelog.
- Use
Copy, Commit, Generate PR, or Generate Changelog.
The Commit button only commits staged files. If you generated analysis in HEAD mode, stage the intended files before committing.
Generate PR creates a pull request description from unpushed commits on the current branch first. If none are found, it uses the current branch relative to the default base branch. If no base range is found, it uses the latest 10 commits. Large ranges are automatically trimmed before sending them to the language model.
Settings
| Setting |
Default |
Description |
aiGitCommitAssistant.diffMode |
staged |
Default diff mode, either staged or head. |
aiGitCommitAssistant.maxDiffCharacters |
45000 |
Maximum diff characters sent to the language model. |
aiGitCommitAssistant.modelVendor |
empty |
Optional language model vendor filter, such as copilot. |
aiGitCommitAssistant.modelFamily |
empty |
Optional language model family filter. |
If the configured model filter returns no models, the extension falls back to the first available VS Code chat model.
Semantic Version Rules
- Breaking change: major bump, such as
1.4.2 to 2.0.0.
feat: minor bump, such as 1.4.2 to 1.5.0.
fix: patch bump, such as 1.4.2 to 1.4.3.
- Other commit types: no version bump unless a breaking change is detected.
The current version is read from the workspace package.json. If no version is found, the assistant uses 0.1.0 as a fallback.
Development
npm install
npm run check
npm run compile
Open this folder in VS Code and press F5 to launch an Extension Development Host, then run AI Git Commit Assistant: Open.
Packaging
npm run package