Author: Nguyen Chau Phi
Email: [email protected]
This VS Code extension reads the current Git diff from Source Control and generates commit messages that follow your company rule, for example:
[Jira DBZ-870]
Root Cause: ...
Impact: ...
Summary: ...; ...; ...
Features
Generate DBZ Commit Message: generates a commit message and fills the SCM input box.Generate and Commit DBZ Message: generates the message and commits staged changes in one step.Open DBZ Commit Settings: opens a visual settings screen to manage commit rules and AI backend options.- Supports two AI backends:
- signed-in VS Code AI
- a custom API key stored in Secret Storage
- Supports
providerMode:auto: prefers a saved API key, otherwise falls back to VS Code AIvscode: uses only signed-in VS Code AIapi: uses only the configured API key
- Commit rule settings can be customized:
headerTemplateincludeShortFixDescriptionshortFixPrefixrootCauseLabelimpactLabelsummaryLabelsummaryItemCountadditionalRules
Optional Short Fix Description
- When
includeShortFixDescription = false- the first line stays unchanged:
[Jira DBZ-784]
- When
includeShortFixDescription = true- the first line becomes:
[Jira DBZ-784] -fix: Adjust spacing and reorder transaction log details for better readability
- The
Root Cause,Impact, andSummarylines still remain unchanged.
Quick Setup
- Install the extension in VS Code.
- Reload VS Code.
- Open the Command Palette.
- Run
Open DBZ Commit Settings. - Choose your AI backend and commit rule options.
Usage
- Stage or modify code in a Git repository.
- Open Source Control.
- Run one of these commands:
Generate DBZ Commit MessageGenerate and Commit DBZ Message
- Enter a Jira ID such as
870orDBZ-870.
Backend Configuration
VS Code AI
- Set
providerMode = vscode - Choose
modelFamily - Make sure you are already signed in to AI inside VS Code
Custom API Key
- Set
providerMode = api - Enter
apiBaseUrl - Enter
apiModel - Enter the
API Keyin the settings screen
Automatic Selection
- Set
providerMode = auto - If a saved API key exists, the extension uses the API
- If no API key is saved, the extension uses VS Code AI
Notes
- The API key is stored in
Secret Storage, not directly insettings.json. - VS Code does not provide a public API to replace the default built-in commit message generation button in Source Control. The stable approach is to use this extension's own commands in the SCM title area.