Generate Commit Message is adding details for unstaged changes

I love the Generate Commit Message feature, but it seems to add details from my non-staged changes. I would expect that the generated message would only include staged changes details.

I have composer suggest multiple changes, and use the Working Tree view to “Stage Block” a set of changes in a single commit. It will generate a message on ALL changes in the file, not just the blocks I staged.

Here are some screenshots of the commit message and the staged changes in the first file and the unstaged changes that made it into the commit message.

Version:

Version: 0.45.11
VSCode Version: 1.96.2
Commit: f5f18731406b73244e0558ee7716d77c8096d150
Electron: 32.2.6
Node.js: 20.18.1
OS: Darwin arm64 24.2.0

Not a blocking change but a QoL update. Everything to help Cursor be the best it can be!

Thanks for bringing this up! Yeah this is the current behavior - it will generate messages based on all changes in the working tree. I’ll pass this feedback to the team about making it more granular for staged changes only

In the meantime, you can maybe stash the changes you don’t want included in the message, then apply them again? This isn’t to labour intensive with the GitLens extension.