update prompt

This commit is contained in:
Jack Driscoll 2024-07-29 14:47:45 -04:00
parent f238c27c26
commit ea67fbb923

View file

@ -89,9 +89,10 @@ async function analyzeCode(
} }
function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string { function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
return `Your task is to review pull requests. Instructions: return `You are an expert Nextjs developer. Your task is to review pull requests. Instructions:
- 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>"}]}
- Do not give positive comments or compliments. - Do not give positive comments or compliments.
- Do not comment about CSS. Focus on logic, performance, code quality and nextjs best practices.
- Provide comments and suggestions ONLY if there is something to improve, otherwise "reviews" should be an empty array. - Provide comments and suggestions ONLY if there is something to improve, otherwise "reviews" should be an empty array.
- Write the comment in GitHub Markdown format. - Write the comment in GitHub Markdown format.
- 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.