🤖 Commit Assistant
A modern VS Code extension that helps you write better commit messages with ease and consistency.
Built with Svelte + TypeScript + Tailwind CSS for optimal performance, maintainability, and developer experience.

✨ Features
- Conventional Commits compliant form with type, scope, description, body, and footer fields
- Smart type selector with predefined commit types (feat, fix, docs, etc.)
- AI-powered generation for scope and body fields
- Custom flags system for additional metadata
📄 Free Text Mode
- Pure text editor for those who prefer writing commit messages directly
- Auto-growing textarea that adapts to content length
- Flag integration that works seamlessly with text mode
🚩 Multi-scope Flags System
- Dual Storage Support: Choose between Global (User settings) for cross-project flags or Workspace (Project settings) for project-specific metadata.
- Visual Scope Indicators: Each theme features a Globe (🌐) icon. High-lighted means Global storage; dimmed means Workspace storage.
- Standardized Persistence: Workspace flags are saved directly into your परियोजना's
.vscode/settings.json, allowing for easy version control and manual editing.
- Safety Constraints: Prevent accidental data loss with smart deletion rules — Flags containing themes cannot be deleted until their themes are removed.
- Seamless Integration: Flags are automatically appended as footers (e.g.,
#feat:ui) to your commit messages in both Form and Text modes.
🤖 AI Integration
- OpenAI & Google AI support for intelligent commit message generation
- Context-aware suggestions based on your code changes
- Configurable AI models (GPT-4, GPT-3.5, Gemini Pro, etc.)
- Field-specific generation for targeted assistance
🎨 Modern UI/UX
- VS Code theme integration - perfectly matches your editor's appearance
- Responsive design that works on different screen sizes
- Real-time preview of your final commit message
- Intuitive tabbed interface for easy mode switching
💾 Smart State Management
- Auto-save functionality - never lose your work
- Session persistence across VS Code restarts
- Workspace-specific settings for team consistency
⌨️ Keyboard Shortcuts
Ctrl+Enter / Cmd+Enter - Save commit
Escape - Cancel and close
- Full keyboard navigation support
🚀 Quick Start
Installation
- From VS Code Marketplace: Search for "Commit Assistant" in the Extensions view (
Ctrl+Shift+X)
- From Command Line:
code --install-extension sunzhongyi.commit-assistant
Usage
- Open the Assistant: Click the "Assistant" button in the Source Control panel
- Choose your mode:
- Form Mode: Fill out structured fields for conventional commits
- Text Mode: Write commit messages in free text format
- Flags Mode: Configure custom flags for your workflow. Use the Globe (🌐) icon to toggle between Global and Workspace storage.
- Use AI assistance: Click the AI trigger buttons for intelligent suggestions
- Save your commit: Press
Ctrl+Enter or click the Save button
⚙️ Configuration
AI Settings
You can configure AI providers in VS Code settings in GUI way.
Commit Types
Customize available commit types:
{
"commitAssistant.commitTypes": [
{
"value": "feat",
"label": "feat",
"description": "A new feature"
},
{
"value": "fix",
"label": "fix",
"description": "A bug fix"
}
// ... more types
],
"commitAssistant.flags": {
"feat": {
"ui": {
"deadline": "2026-12-31",
"docUrl": "https://example.com/docs"
}
}
}
}
Screenshots

Open Commit Assistant from Source Control, choose Form, and enter the type, scope, and description. AI Generate can fill fields from your changes after you configure an AI provider.
Save Commit writes the message to the Git commit input. Review the message and create the commit in Source Control. The image uses example changes.
🏗️ Architecture
commit-assistant/
├── webviews/
│ ├── commit-editor/ # 📝 Main commit editor
│ │ ├── components/ # Svelte components
│ │ ├── App.svelte # Main app component
│ │ └── main.ts # Entry point
│ └── settings/ # ⚙️ Settings panel
├── extension.ts # 🚀 VS Code extension logic
├── rollup.config.mjs # 🛠️ Build configuration
└── package.json # 📦 Extension manifest
Technical Highlights
- 🚀 Svelte: Compile-time optimized, minimal runtime overhead
- 📘 TypeScript: Full type safety across the entire codebase
- 🎨 Tailwind CSS: Utility-first styling with VS Code theme integration
- 🤖 AI SDK: Unified interface for multiple AI providers
- ⚡ Rollup: Optimized bundling for webview components
🛠️ Development
Prerequisites
- Node.js 18+
- VS Code 1.70+
- Git
Setup
# Clone the repository
git clone https://github.com/joisun/commit-assistant.git
cd commit-assistant
# Install dependencies
npm install
# Build the extension
npm run build
Development Workflow
# Start TypeScript compiler in watch mode
npm run watch
# In another terminal, start webview build in watch mode
npm run build:watch
# Press F5 in VS Code to launch Extension Development Host
Testing
# Run tests (if available)
npm test
# Package extension for testing
npm run package
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Guidelines
- Code Style: We use TypeScript strict mode and Prettier for formatting
- Commits: Follow conventional commit format that this extension helps create!
- Testing: Add tests for new features and bug fixes
- Documentation: Update README and inline docs for any changes
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Conventional Commits specification for commit message standards
- Svelte team for the amazing compile-time framework
- VS Code team for the excellent extension API
- OpenAI and Google for AI capabilities
Start writing better commits today! 🚀
Install from VS Code Marketplace