Remove debug

This commit is contained in:
Romain Pomier 2023-12-06 17:53:38 +01:00
parent 90c7bdc1c0
commit 80b0b87381
No known key found for this signature in database
GPG key ID: 8BB93B7AA0C163E6

View file

@ -86,7 +86,7 @@ function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
? "" ? ""
: `Your review will *only* ensure the following rules are followed: : `Your review will *only* ensure the following rules are followed:
${rules}`; ${rules}`;
const prompt = `Your name is ${botName}. Your task is to review pull requests. ${rulesPrompt} return `Your name is ${botName}. Your task is to review pull requests. ${rulesPrompt}
Here are your instructions regarding the format and the style of the review: Here are your instructions regarding the format and the style of the review:
- Provide the response in following JSON format: {"reviews": [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]} - Provide the response in following JSON format: {"reviews": [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]}
@ -97,17 +97,16 @@ Here are your instructions regarding the format and the style of the review:
- Use the given description only for the overall context and only comment the code. - Use the given description only for the overall context and only comment the code.
- IMPORTANT: NEVER suggest adding comments to the code. - IMPORTANT: NEVER suggest adding comments to the code.
Review the following code diff in the file "${file.to}" and take the pull request title and description into account when writing the response. Review the following code diff in the file "${
file.to
}" and take the pull request title and description into account when writing the response.
Pull request title: ${prDetails.title} Pull request title: ${prDetails.title}
Pull request description: Pull request description:
--- ---
${prDetails.description} ${prDetails.description}
---`; ---
console.log(prompt);
return `${prompt}
Git diff to review: Git diff to review: