di-sukharev / opencommit

Generate conventional git commit messages with AI in 1 second 🤯🔫
https://www.npmjs.com/package/opencommit
MIT License
5.89k stars 310 forks source link

[Feature]: Summarise git commit message #191

Open gamoreli opened 1 year ago

gamoreli commented 1 year ago

Description

opencommit feature tends to generate quite a chunk of text for commit messages when descriptions are set. Detailed? Yes. But a bit long to read? Probably.

What if we add a feature that lets us summarise these commit messages after the initial commit?

Suggested Solution

Alternatives

No response

Additional Context

No response

slacksystem commented 1 year ago

I would love to see this too. I love the detail that it includes but I'd also like to see the first line just be a short summary of changes (ideally <= 50 characters)

wojukasz commented 1 year ago

I presume this is due to changing the default value of the OCO_OPENAI_MAX_TOKENS=<max response tokens from openAI API>

In newer version it defaults to 500 while in olders it used to be 196

The 196 default was used until v2.0.16 looking at history.

As I workaround I just set OCO_OPENAI_MAX_TOKENS=196 in ~/.opencommit to make commit messages much shorter for now.

slacksystem commented 1 year ago

I don't mind the length it can be helpful to be detailed, it's just that I would like a short summary in the title, gives an overall sense of what was changed in the commit so that you can see it for example on editors that show the most recent update to a line in-line, etc

github-actions[bot] commented 1 year ago

Stale issue message

aldinokemal commented 1 month ago

subjectOpenCommit

I just tried to modified in my local and seems it has short sumary on the first line

image

f-liva commented 2 weeks ago

+1