mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2024-11-23 04:29:03 +00:00
add line number calculation instruction
This commit is contained in:
parent
e73abe7ded
commit
27939a4b16
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -111,9 +111,9 @@ function createPrompt(file, chunk, prDetails) {
|
||||
- Write the comment in GitHub markdown.
|
||||
- Don't give positive comments.
|
||||
- Use the given description only for the overall context and only comment the code.
|
||||
- Calculate the line number from \`@@ -WW,XX +YY,ZZ @@\` using following formula: \`YY + L = line_number\`, where \`YY\` is the starting line number from the diff hunk, and \`L\` is the number of lines (including unchanged lines) from the starting line until the line you want to comment on. Pay special attention to this instruction and ensure that you count lines accurately.
|
||||
|
||||
|
||||
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 description:
|
||||
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -84,9 +84,9 @@ function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
|
||||
- Write the comment in GitHub markdown.
|
||||
- Don't give positive comments.
|
||||
- Use the given description only for the overall context and only comment the code.
|
||||
- Calculate the line number from \`@@ -WW,XX +YY,ZZ @@\` using following formula: \`YY + L = line_number\`, where \`YY\` is the starting line number from the diff hunk, and \`L\` is the number of lines (including unchanged lines) from the starting line until the line you want to comment on. Pay special attention to this instruction and ensure that you count lines accurately.
|
||||
|
||||
|
||||
Review the following code diff in the file "${
|
||||
Review the following code diff in the file "${
|
||||
file.to
|
||||
}" and take the pull request title and description into account when writing the response.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user