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
LanguageModelChatMessage.User(`You are an advanced AI programming assistant tasked with summarizing code changes into a concise and meaningful commit message. Compose a commit message that:
68
+
constmessages: LanguageModelChatMessage[]=[
69
+
LanguageModelChatMessage.User(`You are an advanced AI programming assistant tasked with summarizing code changes into a concise and meaningful commit message. Compose a commit message that:
68
70
- Strictly synthesizes meaningful information from the provided code diff
69
71
- Utilizes any additional user-provided context to comprehend the rationale behind the code changes
70
72
- Is clear and brief, with an informal yet professional tone, and without superfluous descriptions
// `Unable to generate commit message: Your API key doesn't seem to have access to the selected '${model}' model`,
95
-
// );
96
-
// }
97
-
// if (rsp.status === 429) {
98
-
// throw new Error(
99
-
// `Unable to generate commit message: (${this.name}:${rsp.status}) Too many requests (rate limit exceeded) or your API key is associated with an expired trial`,
LanguageModelChatMessage.User(`You are an advanced AI programming assistant tasked with summarizing code changes into an explanation that is both easy to understand and meaningful. Construct an explanation that:
159
+
constmessages: LanguageModelChatMessage[]=[
160
+
LanguageModelChatMessage.User(`You are an advanced AI programming assistant tasked with summarizing code changes into an explanation that is both easy to understand and meaningful. Construct an explanation that:
169
161
- Concisely synthesizes meaningful information from the provided code diff
170
162
- Incorporates any additional context provided by the user to understand the rationale behind the code changes
171
163
- Places the emphasis on the 'why' of the change, clarifying its benefits or addressing the problem that necessitated the change, beyond just detailing the 'what' has changed
172
164
173
165
Do not make any assumptions or invent details that are not supported by the code diff or the user-provided context.`),
174
-
LanguageModelChatMessage.User(
175
-
`Here is additional context provided by the author of the changes, which should provide some explanation to why these changes where made. Please strongly consider this information when generating your explanation:\n\n${message}`,
176
-
),
177
-
LanguageModelChatMessage.User(
178
-
`Now, kindly explain the following code diff in a way that would be clear to someone reviewing or trying to understand these changes:\n\n${code}`,
179
-
),
180
-
LanguageModelChatMessage.User(
181
-
'Remember to frame your explanation in a way that is suitable for a reviewer to quickly grasp the essence of the changes, the issues they resolve, and their implications on the codebase.',
// `Unable to explain commit: Your API key doesn't seem to have access to the selected '${model}' model`,
191
-
// );
192
-
// }
193
-
// if (rsp.status === 429) {
194
-
// throw new Error(
195
-
// `Unable to explain commit: (${this.name}:${rsp.status}) Too many requests (rate limit exceeded) or your API key is associated with an expired trial`,
// if (retries++ < 2 && json?.error?.code === 'context_length_exceeded') {
207
-
// maxCodeCharacters -= 500 * retries;
208
-
// continue;
209
-
// }
210
-
211
-
// throw new Error(
212
-
// `Unable to explain commit: (${this.name}:${rsp.status}) ${json?.error?.message || rsp.statusText}`,
213
-
// );
214
-
// }
215
-
216
-
if(diff.length>maxCodeCharacters){
217
-
voidwindow.showWarningMessage(
218
-
`The diff of the changes had to be truncated to ${maxCodeCharacters} characters to fit within ${getPossessiveForm(
219
-
model.provider.name,
220
-
)} limits.`,
166
+
LanguageModelChatMessage.User(
167
+
`Here is additional context provided by the author of the changes, which should provide some explanation to why these changes where made. Please strongly consider this information when generating your explanation:\n\n${message}`,
168
+
),
169
+
LanguageModelChatMessage.User(
170
+
`Now, kindly explain the following code diff in a way that would be clear to someone reviewing or trying to understand these changes:\n\n${code}`,
171
+
),
172
+
LanguageModelChatMessage.User(
173
+
'Remember to frame your explanation in a way that is suitable for a reviewer to quickly grasp the essence of the changes, the issues they resolve, and their implications on the codebase.',
0 commit comments