gitui icon indicating copy to clipboard operation
gitui copied to clipboard

ai commit summary creation using chat-gpt

Open extrawurst opened this issue 2 years ago • 4 comments

Right now this is not optimized for long diffs.

TODO:

  • [ ] feed it less context if diff gets >4k
  • [ ] feed list of files touched first and then diffs and cut at 4k point
  • [ ] put behind feature flag
  • [ ] other rust crate for openai?
  • [ ] changelog
  • [ ] readme on how to configure

extrawurst avatar Dec 15 '23 23:12 extrawurst

Hi, I tested this on my Mac and noticed it works pretty good . How can we prioritise this? Also, I might help by adding docs on usage or helping trying different prompts.

vladejs avatar Jun 17 '24 19:06 vladejs

Current message output gets bigger with current prompt.

Screenshot 2024-06-17 at 1 30 26 p m

This is the default prompt used at jetbrains products which we can modify to our needs:

Avoid overly verbose descriptions or unnecessary details.
Start with a short sentence in imperative form, no more than 50 characters long.
Then leave an empty line and continue with a more detailed explanation.
Write only one sentence for the first part, and two sentences at most for the detailed explanation.

vladejs avatar Jun 17 '24 20:06 vladejs