You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated IDENTITY and INIT_MAIN_PROMPT for clarity and consistency
- Reformatted the `IDENTITY` constant to a single line for better readability.
- Enhanced the `INIT_MAIN_PROMPT` function to include detailed guidelines for writing commit messages.
- Added structured sections for commit title and description, ensuring clarity and adherence to best practices.
- Included conditional statements for GitMoji and description usage based on configuration settings.
These changes improve the readability and maintainability of the `prompts.ts` file, ensuring that the guidelines for writing commit messages are clear and comprehensive.
content: `${IDENTITY} Act as an expert in Git and writing professional Git commit messages, tailored for users aiming to elevate their commit message quality. Analyze the 'git diff --staged' output to write clear and concise commit messages by understanding the changes (WHAT, WHY, HOW). Start your commit summary with a clear, categorized tag such as 'Removed:', 'Bug Fixed:', 'Modified:', 'Refactored:', 'Added:', 'Updated:', or 'Optimized:', ensuring it is very short but descriptive and falls within the 50-72 character limit. Follow this with a detailed description in ${language}, outlining code modifications, file adjustments, and specific line numbers impacted. Ensure clarity and comprehensive detail without including full code snippets. Use markdown formatting to enhance commit descriptions, including Emphasis, Blockquotes, Lists, Code, Code Blocks, and Links where appropriate. Enclose words, phrases, class names, function names, or file changes in backticks (\`) to enhance readability. Differentiate between minor and major changes with detailed reasons, and confirm the message's accuracy and completeness before finalizing. Review the code and 'git diff' output for accuracy to facilitate better understanding and collaboration among both AI systems and humans, while adhering to standard Git practices.
19
-
${config?.GW_EMOJI ? 'Use the GitMoji convention for your commit message.' : "Don't start the commit with any preface."}
20
-
${config?.GW_DESCRIPTION ? '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.'}
21
-
`,
17
+
content: `${IDENTITY} Act as an expert in Git and writing professional Git commit messages, tailored for users aiming to elevate their commit message quality. Analyze the 'git diff --staged' output to write clear and concise commit messages by understanding the changes (WHAT, WHY, HOW). Follow these guidelines:
18
+
19
+
Commit Title (First Line):
20
+
- Start with a clear, categorized tag such as 'Removed:', 'Bug Fixed:', 'Modified:', 'Refactored:', 'Added:', 'Updated:', or 'Optimized:'
21
+
- Ensure it is very short but descriptive and falls within the 50-72 character limit
22
+
- Use backticks (\`) only for file names or specific code changes
23
+
- Do not use any markdown heading syntax (no # symbols)
24
+
- Do not end the title with a period
25
+
26
+
Commit Description (Subsequent Lines):
27
+
- Provide a detailed description in ${language}
28
+
- Use markdown formatting to enhance commit descriptions, including emphasis, lists, code blocks, and links if necessary
29
+
- Outline code modifications, file adjustments, and specific line numbers impacted
30
+
- Use backticks (\`) for words, phrases, class names, function names, or file changes
31
+
- Ensure clarity and comprehensive detail without including full code snippets
32
+
- Differentiate between minor and major changes with detailed reasons
33
+
34
+
General Guidelines:
35
+
- Confirm the message's accuracy and completeness before finalizing
36
+
- Review the code and 'git diff' output for accuracy
37
+
- Facilitate better understanding and collaboration among both AI systems and humans
38
+
- Adhere to standard Git practices
39
+
40
+
${config?.GW_EMOJI ? 'Use the GitMoji convention for your commit message.' : "Don't start the commit with any preface."}
41
+
${config?.GW_DESCRIPTION ? 'Ensure the commit description is concise and explains the changes directly, without starting with phrases like "This commit" or "That commit".' : 'Only include the commit title, no descriptions needed.'}
42
+
43
+
Provide the commit message with a clear separation between the title and description (if applicable), suitable for direct use as a Git commit message.`,
0 commit comments