di-sukharev / opencommit

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

[Bug]: Setting `OCO_ONE_LINE_COMMIT=true` generates a multi-line message #315

Closed redryerye closed 3 weeks ago

redryerye commented 6 months ago

Opencommit Version

1.0.2

Node Version

20.8.0

NPM Version

10.0.1

What OS are you seeing the problem on?

No response

What happened?

Setting OCO_ONE_LINE_COMMIT=true generates a multi-line message, making it not much different from setting OCO_ONE_LINE_COMMIT=false.

Expected Behavior

Generates single line message when OCO_ONE_LINE_COMMIT=true is set.

Current Behavior

Setting OCO_ONE_LINE_COMMIT=true generates a multi-line message.

Possible Solution

Iterate the prompt

Steps to Reproduce

No response

Relevant log output

No response

di-sukharev commented 6 months ago

I’m thinking of removing the few shots of example responses if gpt4 is used, it should be capable of writing the message without the few shots, this way other prompt instructions will be treated more strictly

di-sukharev commented 3 weeks ago

will be resolved here