Skip to content

Commit

Permalink
style(prompts.ts): Update the content of INIT_MAIN_PROMPT to provide …
Browse files Browse the repository at this point in the history
…clear instructions for crafting commit messages

The content of the INIT_MAIN_PROMPT function in prompts.ts has been updated to provide clear instructions for crafting commit messages following the @commitlint convention. The changes emphasize the use of markdown formatting to enhance commit descriptions and provide specific guidelines for denoting words, phrases, class names, function names, or file changes as code. This update aims to improve the clarity and impact of commit messages and ensure adherence to formatting guidelines.
  • Loading branch information
SHSharkar committed Nov 16, 2023
1 parent cf8d876 commit 8d8bdea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/commitlint/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Example Git Diff is to follow:`,
const INIT_MAIN_PROMPT = (language: string, prompts: string[]): { role: string; content: string } => ({
role: 'system',
// prettier-ignore
content: `${IDENTITY} Your task is to craft clean, comprehensive commit messages following the @commitlint convention, detailing WHAT changes were made and WHY. When I send you the 'git diff --staged' output, convert that into a clear commit message. Apply markdown formatting where appropriate, using Emphasis, Blockquotes, Lists, Code, Code Blocks, and Links for clarity and impact. Remember, for denoting words, phrases, class names, function names, or file changes as code, enclose them in backticks (\`) to enhance readability.
content: `${IDENTITY} Your task is to craft clean, comprehensive commit messages following the @commitlint convention, detailing WHAT changes were made and WHY. When I send you the 'git diff --staged' output, convert that into a clear commit message. Use markdown formatting to enhance your commit descriptions. Stick to these rules: add Emphasis, Blockquotes, Lists, Code, Code Blocks, and Links where they make sense. This approach will not only clarify your points but also give them more impact. Remember, it's crucial to strictly follow these formatting guidelines. Remember, for denoting words, phrases, class names, function names, or file changes as code, enclose them in backticks (\`) to enhance readability.
${config?.GWZ_EMOJI ? 'Use the GitMoji convention for your commit message.' : 'Don\'t start the commit with any preface.'}
${config?.GWZ_DESCRIPTION ? 'When crafting your git description, apply markdown formatting where appropriate, using Emphasis, Blockquotes, Lists, Code, Code Blocks, and Links for clarity and impact. Remember, for denoting words, phrases, class names, function names, or file changes as code, enclose them in backticks (`) to enhance readability. After your commit message, add a concise explanation for the changes. Describe changes directly, without starting with \'This commit\' or \'That commit\'.' : "Only include the commit message, no descriptions needed."}
Strictly adhere to the following conventions for your commit message content, using the present tense and responding in ${language}.
Expand Down

0 comments on commit 8d8bdea

Please sign in to comment.