Is there any chance of having an AI-generated commit message directly in Source Control?
Just for reference, I believe Aider git commits every accepted code suggestion. Not sure if that is desirable in Cursor, but interesting to know I think.
iâm a huge fan of how Aider works in this respect. would love to see something similar in Cursor!
Thinking out loud, there are several prompt interfaces in Cursor:
- Ctrl + L (interpreter and normal mode),
- Ctrl + K (in Editor and Terminal)
- Composer (Ctrl + I).
So first you would have to define in which scenarios the automatic git commit would be used.
And then youâd have to provide an easy way to undo those git commits (perhaps just using the default âdiscard changesâ button in the git tab would work).
I also know that when I use Composer, I am often approving one diff at a time whilst within the underlying file Editor area, so would need to specify if each of those accepted diffs would also be a commit or not.
So quite a bit to consider.
Perhaps @gbdr âs original request was for something simpler, just a âlook at my staged changes and generate a commit message for me please?â
exactly @litecode , I am referring to something like the copilot feature in VS Code - like in the screenshot
As a workaround (which might be implemented as a feature), I use
@commit followed by a prompt instruction in chat.
@commit Please generate a commit message that:",
â1. Summarizes the main purpose of the changesâ,
â2. Follows best practices for commit message formattingâ,
â3. Includes any relevant details about the implementation or impactâ,
â4. Mentions any new files added or significant refactoringâ,
â\nSuggested commit message format:â,
â<type>(<scope>): <subject>â,
ââ,
â<body>â,
ââ,
â<footer>â
Then I copy the result and paste it as the commit Message. I could probably automate this either using vscode extension or a keyboard meastro (mac application) macro, but it is just a few annoying clicks and I am curious what the cursor team comes up with as a solution.
Hi @Malte ,
Out of interest, what is @ commit
referring to?
I canât see it in the docs for @
Symbols.
And I couldnât see it mentioned in the docs for the @
Git symbol.
Is commit
just a file in your folder with that prompt within it?
And you are @
'ing that file?
(for reference, see here for more discussion on the topic of canned prompts)
In my chat it works⌠i type @commit and it defaults to @git->commit (Diff or working state). It does not work in inline editing. Not sure where this comes from if not from Cursor.
As for the canned response, interesting idea. so I could pipe the diff through to a piped response using another file which contains the prompt⌠hmmmâŚ
@shaoruu | @truell20 | @litecode
Hello everyone,
please add a function for AI-Commits (Auto-Commit / AutoComplete) for GIT.
As you can see for the CodeGPT plugin for VSCode, it has already implemented:
+1 for this
I was using copilot before and liked the one-click commit messages. It would be great to have this in Cursor. It would look at staged changes and describe what was done just by clicking the icon.
I think we have enough people to request this feature haha
+1 for this. Itâs a must
Itâs actually documented here, but I think a dedicated feature in the version control tab itself will be useful. There are other tools that can do that, like gitlens etc. but I believe cursor can do a better job.
+1 from me too
+1 from me too
What you can try is to leave the commit message empty and press Commit button.
In my editor it opens then COMMIT_EDITMSG
buffer in the Editor panel and since itâs an editor so the AI will suggest a message for the commit