mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-02-17 06:40:27 +00:00
add line number calculation instruction
This commit is contained in:
parent
e73abe7ded
commit
27939a4b16
3 changed files with 5 additions and 5 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
|
@ -111,7 +111,7 @@ function createPrompt(file, chunk, prDetails) {
|
||||||
- Write the comment in GitHub markdown.
|
- Write the comment in GitHub markdown.
|
||||||
- Don't give positive comments.
|
- Don't give positive comments.
|
||||||
- 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.
|
||||||
|
- 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.
|
||||||
|
|
||||||
|
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -84,7 +84,7 @@ function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
|
||||||
- Write the comment in GitHub markdown.
|
- Write the comment in GitHub markdown.
|
||||||
- Don't give positive comments.
|
- Don't give positive comments.
|
||||||
- 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.
|
||||||
|
- 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
|
file.to
|
||||||
|
|
Loading…
Add table
Reference in a new issue