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/chat.ts
+31-9Lines changed: 31 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -31,18 +31,26 @@ export class Chat {
31
31
? `Answer me in ${process.env.LANGUAGE},`
32
32
: '';
33
33
34
-
constprompt=
35
-
process.env.PROMPT||
36
-
'Below is a code patch, please help me do a brief code review on it. Any bug risks and/or improvement suggestions are welcome:';
34
+
constuserPrompt=process.env.PROMPT||'Please review the following code patch. Focus on potential bugs, risks, and improvement suggestions.';
35
+
36
+
constjsonFormatRequirement='\nProvide your feedback in a strict JSON format with the following structure:\n'+
37
+
'{\n'+
38
+
' "lgtm": boolean, // true if the code looks good to merge, false if there are concerns\n'+
39
+
' "review_comment": string // Your detailed review comments. You can use markdown syntax in this string, but the overall response must be a valid JSON\n'+
0 commit comments