Skip to content

Conversation

@samhvw8
Copy link
Contributor

@samhvw8 samhvw8 commented Apr 1, 2025

Context

follow up with PR #827

Implementation

Video

https://www.loom.com/share/d037e22619c84de78f51b84c22c88edf?sid=6b402038-097b-4353-b494-9568f3a6b92e

How to Test

Get in Touch


Important

Adds a new command to generate commit messages based on staged changes, with supporting functionality, tests, and localization updates.

  • Behavior:
    • Adds roo-cline.commitSuggestion command in package.json and registerCommands.ts to generate commit messages based on staged changes.
    • Command is available when scmProvider is git and git.state is initialized.
  • Functionality:
    • Implements generateCommitSuggestion() in commitSuggestion.ts to create commit messages using staged diffs and status.
    • Uses supportPrompt.create() with COMMIT type to format commit messages.
  • Testing:
    • Adds tests in commitSuggestion.test.ts for generateCommitSuggestion() covering scenarios like no staged changes, successful generation, and error handling.
    • Adds tests in git.test.ts for getStagedDiff() and getStagedStatus() functions.
  • Localization:
    • Updates prompts.json files in multiple locales to include descriptions for the new COMMIT feature.

This description was created by Ellipsis for 17f32b401cb6384a1e79a4c70985bb5f0c0020c1. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Apr 1, 2025

⚠️ No Changeset found

Latest commit: 7234d1f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Apr 1, 2025
@hannesrudolph
Copy link
Collaborator

@samhvw8 so you have to paste it in?

@samhvw8 samhvw8 force-pushed the feat/ai-gen-commit branch from 17f32b4 to 22b8edc Compare April 1, 2025 04:57
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap Apr 1, 2025
@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Apr 1, 2025

Hello @samhvw8,

Thank you for your contribution! The pull request introduces a new feature for commit suggestions, along with tests and localization updates across multiple languages. To facilitate a more focused review process, could you please consider splitting the localization changes into a separate pull request? This will help us review and merge the changes more efficiently.

Thank you for your understanding and cooperation!

@samhvw8 samhvw8 force-pushed the feat/ai-gen-commit branch from 22b8edc to 0593198 Compare April 1, 2025 04:57
@samhvw8
Copy link
Contributor Author

samhvw8 commented Apr 1, 2025

@samhvw8 so you have to paste it in?

@hannesrudolph sad but yes, i try to use SourceControlInputBox but don't now how to use it :(

@hannesrudolph
Copy link
Collaborator

@samhvw8 so you have to paste it in?

@hannesrudolph sad but yes, i try to use SourceControlInputBox but don't now how to use it :(

Ahh ok thanks for the explination sir.

@bramburn
Copy link
Contributor

bramburn commented Apr 3, 2025

i have worked on an ai commit, this seems like a long winded way to get the change. see below a repo i worked on, https://github.com/sitoi/ai-commit you can look at rebuilding it and registering the button to perform the task of reviewing the changes in the code base.
If not i can work on a pr for this

@hannesrudolph
Copy link
Collaborator

i have worked on an ai commit, this seems like a long winded way to get the change. see below a repo i worked on, https://github.com/sitoi/ai-commit you can look at rebuilding it and registering the button to perform the task of reviewing the changes in the code base.

If not i can work on a pr for this

Yes please!

@samhvw8 samhvw8 force-pushed the feat/ai-gen-commit branch 2 times, most recently from f3eea55 to dc865a4 Compare April 9, 2025 01:43
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. size:L This PR changes 100-499 lines, ignoring generated files. labels Apr 9, 2025
@samhvw8
Copy link
Contributor Author

samhvw8 commented Apr 9, 2025

@bramburn @hannesrudolph i just update can you review this pr again, now i can set directly into input field

@hannesrudolph
Copy link
Collaborator

Oh NICE

@samhvw8
Copy link
Contributor Author

samhvw8 commented Apr 9, 2025

@bramburn
Copy link
Contributor

bramburn commented Apr 9, 2025

looks good, I was implementing it too. One thing to do is add the additional settings to allow the user to use a different model to do the ai commit. Thats a bug bear of mine i don't want to use say claude 3.7 to do an AI commit.

package.json Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this pick up the right repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we can make follow up pr for this

Copy link
Contributor

@bramburn bramburn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to check for instance of multi repo workspaces.

@bramburn
Copy link
Contributor

bramburn commented Apr 9, 2025

thepatch.patch

here is a sample patch for the settings page.

@bramburn
Copy link
Contributor

bramburn commented Apr 9, 2025

Other than that, it looks like a better implementation of what I've done. I was focusing on the settings first.

@samhvw8
Copy link
Contributor Author

samhvw8 commented Apr 9, 2025

@bramburn cool, let me apply that


Update i cannot apply it :(

BILALMRN and others added 3 commits April 12, 2025 09:26
- Implemented commit message generation logic using staged diffs and file statuses.
- Added error handling and progress notification during commit suggestion generation.
- Updated support-prompt template to include commit message format and considerations.
@samhvw8 samhvw8 force-pushed the feat/ai-gen-commit branch from 49a5c63 to 7234d1f Compare April 12, 2025 02:27
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap May 20, 2025
@hannesrudolph hannesrudolph moved this from PR [Needs Review] to TEMP in Roo Code Roadmap May 26, 2025
@daniel-lxs daniel-lxs moved this from TEMP to PR [Needs Review] in Roo Code Roadmap May 26, 2025
@hannesrudolph
Copy link
Collaborator

Thanks for your PR!

We're closing this one because we'd prefer the commit message suggestion feature to be embedded directly into the "Generate Commit Message" button rather than implemented indirectly.

For future contributions, please follow our issue-first approach. This helps us clearly discuss and approve changes before implementation.

We appreciate your effort and would be happy to see more contributions from you!

@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap May 27, 2025
@github-project-automation github-project-automation bot moved this from Needs Preliminary Review to Done in Roo Code Roadmap May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Needs Preliminary Review size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants