s-kostyaev / ellama

Ellama is a tool for interacting with large language models from Emacs.
GNU General Public License v3.0
345 stars 25 forks source link

[feature-request] Auto-generate commit messages in magit. #105

Open CsBigDataHub opened 2 months ago

CsBigDataHub commented 2 months ago

Prompt - https://github.com/ywkim/gpt-commit/blob/66badff3de08055f69b9ff892f9d6580b01268db/gpt-commit.el#L66

Commandline examples - https://github.com/ikramhasan/AI-Dev-Scripts/blob/main/ai_commit

Other commandline project - https://github.com/di-sukharev/opencommit

s-kostyaev commented 2 months ago

Hi @CsBigDataHub

Not sure if it is really useful. Helpful commit message says why changes made, not what changed. And LLM can't extract the reason from diff.

eras commented 2 months ago

However, have you looked at the commits in this repository? :wink:

Projects have different commit message conventions, but I think the first line of commit should say what was changed. The body, if present, can tell more: sometimes it's why, sometimes it's just in higher level to get an idea of the change without looking into the code.

Is this explanation for 42da4b2 poor?

CsBigDataHub commented 2 months ago

Hi @CsBigDataHub

Not sure if it is really useful. Helpful commit message says why changes made, not what changed. And LLM can't extract the reason from diff.

Hi @s-kostyaev totally agree but this feature can help speedup the commit writing message with more detail. Of course generated content can be edited. Please see Opencommit projects prompt.

mcraveiro commented 2 months ago

Actually, I wasn't too sold on this until I saw the example above, which I'll paste here for anyone else reading this thread. I now think this is quite useful.

Screenshot from 2024-04-25 08-33-17