Generate commit messages in the company-required Root Cause / Impact / Summary format from Source Control changes. Author: Nguyen Chau Phi <phipari12345@gmail.com>.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
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 AI
vscode: uses only signed-in VS Code AI
api: uses only the configured API key
Commit rule settings can be customized:
headerTemplate
includeShortFixDescription
shortFixPrefix
rootCauseLabel
impactLabel
summaryLabel
summaryItemCount
additionalRules
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, and Summary lines 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 Message
Generate and Commit DBZ Message
Enter a Jira ID such as 870 or DBZ-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 Key in 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 in settings.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.