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
Copy file name to clipboardExpand all lines: src/plus/ai/prompts.ts
+55Lines changed: 55 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,61 @@ Fixes #789
49
49
50
50
Based on the provided code diff and any additional context, create a concise but meaningful commit message following the instructions above.`;
51
51
52
+
exportconstgeneratePullRequestMessageUserPrompt=`You are an advanced AI programming assistant and are tasked with summarizing code changes into a concise but meaningful pull request title and description. You will be provided with a code diff and a list of commits. Your goal is to analyze the changes and create a clear, informative title and description that accurately represents the modifications made to the code.
53
+
First, examine the following code changes provided in Git diff format:
54
+
<~~diff~~>
55
+
\${diff}
56
+
</~~diff~~>
57
+
58
+
Then, review the list of commits to help understand the motivation behind the changes and any relevant background information:
59
+
<~~data~~>
60
+
\${data}
61
+
</~~data~~>
62
+
63
+
Now, if provided, use this context to understand the motivation behind the changes and any relevant background information:
64
+
<~~additional-context~~>
65
+
\${context}
66
+
</~~additional-context~~>
67
+
68
+
To create an effective pull request title and description, follow these steps:
69
+
70
+
1. Carefully analyze the diff, commit messages, context, focusing on:
71
+
- The purpose and rationale of the changes
72
+
- Any problems addressed or benefits introduced
73
+
- Any significant logic changes or algorithmic improvements
74
+
2. Ensure the following when composing the pull request title and description:
75
+
- Emphasize the 'why' of the change, its benefits, or the problem it addresses
76
+
- Use an informal yet professional tone
77
+
- Use a future-oriented manner, third-person singular present tense (e.g., 'Fixes', 'Updates', 'Improves', 'Adds', 'Removes')
78
+
- Be clear and concise
79
+
- Synthesize only meaningful information from the diff and context
80
+
- Avoid outputting code, specific code identifiers, names, or file names unless crucial for understanding
81
+
- Avoid repeating information, broad generalities, and unnecessary phrases like "this", "this commit", or "this change"
82
+
3. Summarize the main purpose of the changes in a single, concise sentence, which will be the title of your pull request message
83
+
- Start with a third-person singular present tense verb
84
+
- Limit to 50 characters if possible
85
+
4. If necessary, provide a brief explanation of the changes, which will be the body of your pull request message
86
+
- Add line breaks for readability and to separate independent ideas
87
+
- Focus on the "why" rather than the "what" of the changes.
88
+
- Structure the body with markdown bullets and headings for clarity
89
+
5. If the changes are related to a specific issue or ticket, include the reference (e.g., "Fixes #123" or "Relates to JIRA-456") at the end of the pull request message.
90
+
91
+
Write your title inside <summary> tags and your description inside <body> tags and include no other text:
92
+
93
+
<summary>
94
+
Implements user authentication feature
95
+
</summary>
96
+
<body>
97
+
Adds login and registration endpoints:
98
+
- Updates user model to include password hashing
99
+
- Integrates JWT for secure token generation
100
+
101
+
Fixes #789
102
+
</body>
103
+
\${instructions}
104
+
105
+
Based on the provided code diff, commit list, and any additional context, create a concise but meaningful pull request title and body following the instructions above.`;
106
+
52
107
exportconstgenerateStashMessageUserPrompt=`You are an advanced AI programming assistant and are tasked with creating a concise but descriptive stash message. You will be provided with a code diff of uncommitted changes. Your goal is to analyze the changes and create a clear, single-line stash message that accurately represents the work in progress being stashed.
53
108
54
109
First, examine the following code changes provided in Git diff format:
0 commit comments