-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
What problem does this proposed feature solve?
Currently, developers manually craft commit messages for their changes. While essential, this can be time-consuming and may lead to inconsistencies in commit message style or detail.
While tools like GitHub Copilot and Cline offer similar commit message generation, they often require separate extension installations. Some users may prefer not to install additional extensions solely for this purpose, especially if they are already using Roo Code as their primary development tool. An integrated feature within Roo Code would eliminate this dependency, providing a more streamlined and native experience without adding to extension bloat.
This feature aims to improve developer workflow efficiency and promote standardized, high-quality commit messages directly within the Roo Code environment. It's a Quality of Life (QOL) enhancement that reduces friction in the development cycle, allowing developers to focus more on coding and less on the boilerplate of commit message writing.
Describe the proposed solution in detail
This feature will enable Roo Code to automatically generate a suggested commit message based on the user's staged changes.
Key Functionalities:
- Analyze Staged Changes: The system will read the output of
git diff --stagedto understand the modifications made. - Generate Commit Message: Based on the diff, an AI model (or potentially a sophisticated heuristic-based approach) will generate a concise, descriptive commit message following conventional commit standards (e.g., "feat: ...", "fix: ...", "docs: ...").
- User Interaction (as illustrated in Discussion [QOL] Generate commit message #4063):
- The feature would be directly accessible within the Source Control / Git panel, near the commit message input field.
- This could be through an icon button (e.g., a "sparkle" or "wand" icon) or a text button/option such as "Generate Commit Message" (similar to the cline & copilot mockups provided in Discussion [QOL] Generate commit message #4063).
- Upon invocation, the generated message would populate the commit message input box.
- The user can then review, edit, and approve the generated message before committing.
- A command palette option (e.g., "Roo: Generate Commit Message") could also be provided as an alternative access point.
Expected Behavior:
The generated messages should be relevant to the changes, adhere to common commit message conventions, and provide a good starting point for the final commit message.
Potential Impact:
- Increased developer productivity by automating a repetitive task.
- Improved consistency and quality of commit messages across the project.
- Enhanced developer experience, making a common task smoother and faster.
Technical considerations or implementation details (optional)
- Input Source: The primary input will be the diff of staged files (
git diff --staged). - Generation Mechanism:
- The primary approach would involve leveraging an AI model. This would require crafting effective prompts that instruct the model to summarize changes and adhere to commit conventions.
- Consideration should be given to integrating with various AI providers, in line with Roo Code's goal to "Expand robust support for a wide variety of AI providers and models."
- An alternative or supplementary approach could involve rule-based heuristics for simpler changes or as a fallback.
- Inspiration: The functionality is similar to features found in tools like GitHub Copilot's commit message generation or dedicated tools like
aicommitsor Cline's commit generation. The UI mockups for Cline and Github Copilot in Discussion [QOL] Generate commit message #4063 also show inspiration from how Cline and Copilot integrate this. - Integration: The feature should be integrated seamlessly into Roo Code's existing Git workflow UI, as shown in the visual examples in Discussion [QOL] Generate commit message #4063.
- Configuration (Future): Potentially allow users to configure preferred commit message formats or AI model preferences.
- The implementation could potentially adapt concepts from an existing solution familiar to the proposer, focusing on integrating it smoothly within Roo Code's architecture, adhering to its coding standards, and ensuring license compatibility (Apache 2.0).
Describe alternatives considered (if any)
- Manual Commit Messages: The status quo. Less efficient and prone to inconsistency.
- Basic Template-Based Messages: Using very simple templates (e.g., "Update [filename]") without AI. This would lack the detail and context-awareness that AI can provide.
- Relying on External Tools: Users could use standalone CLI tools, but an integrated solution within Roo Code provides a much better user experience.
The proposed Roo AI-powered integrated solution offers the best balance of convenience, intelligence, and quality.
Additional Context & Mockups
This feature request originated from GitHub Discussion #4063: #4063
The discussion includes visual cline & copilot ui mockups demonstrating the desired user interface and interaction within the Source Control panel. These mockups show a button/option near the commit message input to trigger the generation, with the resulting message populating the input field for review.
A simple user flow mockup:
- User stages changes in the Git panel.
- User clicks a "Generate Commit Message" button/icon (as depicted in Discussion [QOL] Generate commit message #4063) or uses a command.
- The commit message input field is populated with an AI-generated suggestion (e.g., "feat(parser): Add support for new syntax [QOL] Generate commit message #4063").
- User reviews, possibly edits, and then commits.
Cline:
Copilot:
Proposal Checklist
- I have searched existing Issues and Discussions to ensure this proposal is not a duplicate.
- This proposal is for a specific, actionable change intended for implementation (not a general idea).
- I understand that this proposal requires review and approval before any development work begins.
Are you interested in implementing this feature if approved?
- Yes, I would like to contribute to implementing this feature.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status

