DinoCommitz — VSCode Extension
Generate clean, Odoo-style commit messages with Gemini, then drop them straight into the Source Control input box.
This is the VSCode extension port of DinoCommitz, the Next.js web app. Same opinionated commit-message generator, now living next to your code.
Features
- AI commit messages powered by Gemini (2.5-flash by default, 2.5-pro available).
- SCM integration — one click pushes the generated message into the active git repository's commit input box.
- Three tag presets — Odoo-style, Conventional Commits, or fully custom tag arrays in
settings.json.
- Customisable title format with optional groups (
{tag} [{module}: ]{title} adapts when module is empty).
- Smart Odoo module detection — walks up from each changed file looking for
__manifest__.py (or __openerp__.py) and uses the containing directory as the module name. Falls back to path heuristics for non-Odoo repos.
- Branch ticket detection — auto-extracts
JIRA-123 / #456 style refs from the current branch and surfaces them in the prompt.
- Generate from staged diff — load the actual
git diff --cached into the body, or include it in the prompt automatically.
- Sign-off footer — appends
Signed-off-by: from your local git config user.name / user.email on demand.
- Sidebar view in the activity bar and a full-window panel — same React tree, different container.
- Encrypted API key storage via VSCode
SecretStorage.
- Per-workspace draft persistence — your in-flight commit survives reloads.
- Theme-aware UI — follows whichever VSCode theme you have installed.
- Custom prompt guidelines — keep the bundled Odoo rules or paste your own (or load from a file).
- Quick-pick tag command for keyboard-driven workflows.
Quick start
- Run
npm install.
- Press
F5 in VSCode (or run npm run watch and launch the Extension Development Host).
- In the new VSCode window:
- Open the Command Palette → DinoCommitz: Set Gemini API Key and paste your key from https://aistudio.google.com/apikey.
- Click the dino icon in the activity bar, or run DinoCommitz: Open Commit Builder.
- Pick a tag, type a short reason, click Generate, then ↳ Insert into SCM.
Commands
| Command |
Default keybinding |
What it does |
DinoCommitz: Open Commit Builder |
Ctrl+Alt+P (Cmd+Alt+P) |
Opens the main webview panel. |
DinoCommitz: Pick Commit Tag |
Ctrl+Alt+T (Cmd+Alt+T) |
Quick pick over all 11 commit tags. |
DinoCommitz: Generate & Insert into SCM |
— |
Opens the panel and primes you to generate. |
DinoCommitz: Set Gemini API Key |
— |
Stores the key in SecretStorage. |
DinoCommitz: Clear Gemini API Key |
— |
Removes the stored key. |
DinoCommitz: Clear Form |
— |
Resets the in-flight commit draft. |
Settings
| Setting |
Default |
Notes |
dinoCommits.model |
gemini-2.5-flash |
Choose between flash, pro, or 2.0-flash. |
dinoCommits.tagPreset |
odoo |
odoo, conventional, or custom. |
dinoCommits.customTags |
[] |
Array of {tag, label, description, shortcutLabel?} used when preset is custom. |
dinoCommits.titleFormat |
{tag} [{module}: ]{title} |
Template. [...] groups disappear when their placeholders are empty. |
dinoCommits.showModuleField |
true |
Show/hide the module field in the builder. |
dinoCommits.maxTitleLength |
80 |
Title length limit, shown in the meter. |
dinoCommits.guidelineMode |
default |
default ships the Odoo-style rules; custom uses your text. |
dinoCommits.customGuideline |
(empty) |
Multiline string used when mode is custom. |
dinoCommits.customInstructions |
(empty) |
Extra rules appended to the prompt. |
dinoCommits.insertChapterFooter |
false |
Show chapter input and append Chapter #n to the message. |
dinoCommits.appendSignOff |
false |
Append Signed-off-by from local git config. |
dinoCommits.includeStagedDiffInPrompt |
false |
Auto-include staged diff in every generation prompt. |
dinoCommits.detectOdooManifest |
true |
Walk up to __manifest__.py for Odoo module detection. |
dinoCommits.detectTicketRef |
true |
Auto-extract ticket refs (JIRA-123, #456) from branch names. |
| Preset |
Default format |
Example |
odoo |
{tag} [{module}: ]{title} |
[FIX] website_sale: prevent checkout crash on empty cart |
conventional |
{tag}[({module})]: {title} |
feat(api): add reply-to header for thread tracking |
custom |
up to you |
up to you |
The [...] groups are conditional — they disappear entirely if any placeholder inside is empty. So {tag}[({module})]: {title} with module="" becomes feat: my title, not feat(): my title.
Add to settings.json:
"dinoCommits.tagPreset": "custom",
"dinoCommits.customTags": [
{ "tag": "[BUG]", "label": "BUG", "description": "Bug fix" },
{ "tag": "[FEAT]", "label": "FEAT", "description": "New feature" },
{ "tag": "[CHORE]", "label": "CHORE", "description": "Misc maintenance" }
],
"dinoCommits.titleFormat": "{tag} {title}",
"dinoCommits.showModuleField": false
Building
npm install
npm run compile # one-shot build → dist/
npm run watch # continuous rebuilds
npm run package # minified, production-ready build
npm run check-types # type-check both bundles
The build produces three files under dist/:
extension.js — Node CommonJS bundle for the extension host.
webview.js — IIFE bundle for the React UI.
webview.css — Bundled stylesheet for the webview.
Architecture
┌─────────────────────────┐ ┌──────────────────────────┐
│ extension.ts (Node) │ │ webview React UI (DOM) │
│ ├─ DinoCommitsPanel │ ←────→ │ ├─ App.tsx │
│ ├─ ViewProvider │ message │ ├─ CommitBuilder │
│ ├─ WebviewBridge │ passing │ ├─ PreviewPanel │
│ ├─ GitBridge │ │ ├─ SetupCard │
│ ├─ DinoState │ │ ├─ GitContextCard │
│ └─ gemini.ts │ │ └─ TipsCard │
└─────────────────────────┘ └──────────────────────────┘
│ ▲
│ SecretStorage / WorkspaceState │
▼ │
workspaceState ──────── draft restored ─────┘
The extension host owns the API key and the Gemini network call; the webview is purely a UI layer that talks to the host via typed messages defined in src/messages.ts.
Documentation
Before publishing
The extension manifest does not currently reference media/icon.png. The marketplace requires a 128×128 PNG icon — drop one in media/icon.png and re-add "icon": "media/icon.png" to package.json before running vsce package.
License
MIT.