From 8d8bdeab0a968462fb9311c770961681fda614c5 Mon Sep 17 00:00:00 2001 From: "Md. Sazzad Hossain Sharkar" Date: Thu, 16 Nov 2023 22:06:50 +0600 Subject: [PATCH] style(prompts.ts): Update the content of INIT_MAIN_PROMPT to provide 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. --- src/modules/commitlint/prompts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/commitlint/prompts.ts b/src/modules/commitlint/prompts.ts index c4293a6..74e6ebe 100644 --- a/src/modules/commitlint/prompts.ts +++ b/src/modules/commitlint/prompts.ts @@ -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}.