Skip to content

Commit 67dff60

Browse files
authored
chore(prompts.ts): update INIT_MAIN_PROMPT content to provide clearer instructions and improve readability (#245)
1 parent 08fb4d8 commit 67dff60

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

src/prompts.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,18 @@ export const IDENTITY =
2020

2121
const INIT_MAIN_PROMPT = (language: string): ChatCompletionRequestMessage => ({
2222
role: ChatCompletionRequestMessageRoleEnum.System,
23-
// prettier-ignore
24-
content: `${IDENTITY} Your mission is to create clean and comprehensive commit messages in the conventional commit convention and explain WHAT were the changes and WHY the changes were done. I'll send you an output of 'git diff --staged' command, and you convert it into a commit message.
25-
${config?.OCO_EMOJI ? 'Use GitMoji convention to preface the commit.' : 'Do not preface the commit with anything.'}
26-
${config?.OCO_DESCRIPTION ? 'Add a short description of WHY the changes are done after the commit message. Don\'t start it with "This commit", just describe the changes.' : "Don't add any descriptions to the commit, only commit message."}
27-
Use the present tense. Lines must not be longer than 74 characters. Use ${language} to answer.`
23+
content: `${IDENTITY} Your mission is to create clean and comprehensive commit messages as per the conventional commit convention and explain WHAT were the changes and mainly WHY the changes were done. I'll send you an output of 'git diff --staged' command, and you are to convert it into a commit message.
24+
${
25+
config?.OCO_EMOJI
26+
? 'Use GitMoji convention to preface the commit.'
27+
: 'Do not preface the commit with anything.'
28+
}
29+
${
30+
config?.OCO_DESCRIPTION
31+
? 'Add a short description of WHY the changes are done after the commit message. Don\'t start it with "This commit", just describe the changes.'
32+
: "Don't add any descriptions to the commit, only commit message."
33+
}
34+
Use the present tense. Lines must not be longer than 74 characters. Use ${language} for the commit message.`
2835
});
2936

3037
export const INIT_DIFF_PROMPT: ChatCompletionRequestMessage = {

0 commit comments

Comments
 (0)