-
Notifications
You must be signed in to change notification settings - Fork 367
Fix initial prompt and commit message #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,9 @@ const INIT_MESSAGES_PROMPT: Array<ChatCompletionRequestMessage> = [ | |
config?.emoji | ||
? 'Use Gitmoji convention to preface the commit' | ||
: 'Do not preface the commit with anything' | ||
}, use the present tense. ${ | ||
}. Use the present tense. ${ | ||
config?.description | ||
? 'Add a short description of what commit is about after the commit message. Don\'t start it with "This commit", just describe the changes.' | ||
? "Add a short description of what the commit is about after the commit message, make sure you do NOT start the description with 'This commit', simply describe the changes." | ||
: "Don't add any descriptions to the commit, only commit message." | ||
}` | ||
}, | ||
|
@@ -51,7 +51,7 @@ const INIT_MESSAGES_PROMPT: Array<ChatCompletionRequestMessage> = [ | |
// prettier-ignore | ||
content: `${config?.emoji ? '🐛 ' : ''}fix(server.ts): change port variable case from lowercase port to uppercase PORT | ||
${config?.emoji ? '✨ ' : ''}feat(server.ts): add support for process.env.PORT environment variable | ||
${config?.description ? 'The port variable is now named PORT, which improves consistency with the naming conventions as PORT is a constant. Support for an environment variable allows the application to be more flexible as it can now run on any available port specified via the process.env.PORT environment variable.' : ''}` | ||
${config?.description ? '\nThe port variable is now named PORT, which improves consistency with the naming conventions as PORT is a constant. Support for an environment variable allows the application to be more flexible as it can now run on any available port specified via the process.env.PORT environment variable.' : ''}` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this \n will make 2+ lines look like this:
so it would be hard to tell what describes what :) i'd remove the
but i may be wrong here, could you share a screenshot of your result pls? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see what you mean. The reason I did that was for
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is not always a prefix, it's up to gpt :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can add dots to the commit messages if description is set, lines 52 and 53? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dararish so, how about just adding dots to the end of commit messages? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @di-sukharev I'm attempting to get it to add the period. Modified the example & prompt, but it still generates the commit message without a period. Do you have a working example I could play with? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, adding the period makes it clearer where the "title" ends, but it still shows the whole description with the --oneline flag, which is not desirable when trying to get a quick overview of changes. I will try to refine the prompt in order to make it clear that only the first line(which should be a succinct summary?) should be followed by 2 newlines, but I suspect we might need to add another example. I just realized that my git diff output is customized and is quite different than the provided example, so that could explain some subpar results. Unfortunately I won't have much time to play around with this until Sunday, feel free to merge the other change until we can figure out a way to move forward with this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hello @dararish, any update here? i would love to help you here |
||
} | ||
]; | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.