Re:Show HN: Script to Auto-Generate Commit Messages with AI
by gsuuon on Friday August 25, 2023 @05:02PM
(#37267022)
My plugin is here: https://github.com/gsuuon/llm.nvim -- one of the "starter prompts" is commit message, so with vim-fugitive I open up the git status window, stage my changes, press 'cc', then ':Llm commit\ message' (or just ':Llm mess' tab complete). Then I make changes as needed. I notice that normally it fails to capture my intent for larger changes (things that should be refactor for example get labeled as feat), and readme only changes are sometimes not labeled as 'docs' correctly.
Here's where the commit message prompt is: https://github.com/gsuuon/llm.nvim/blob/2d771cc882ad9edd8011...
Good point about making the AI more aware of conventional commits. In fact, sometimes the AI tends to follow a more conventional commit style, sometimes not. But there is an option to add specific instructions, like adhering to conventional commits or any custom guidline, but anyway, its still in progress ;-) And I usually manually the generated commit messages to fit in a specific context.
One of the challenges I've noticed is that the AI sometimes struggles to distinguish between formatting and actual code changes. So, to address this, I usually also provide additional instructions or make manual adjustments.