@@ -485,27 +485,38 @@ ${comment_chain}
485
485
// add instructions
486
486
ins . patches += `
487
487
Instructions for you:
488
- - Respond using the below specified format and nothing else. The format
489
- includes a line number range and a review comment for each section.
490
- - Line number ranges must be within the same new hunk and are sufficient
491
- for mapping comments to code sections in GitHub.
492
- - Consider the context provided by the old hunk and comment chain when
493
- reviewing the new hunk.
488
+ - Only respond in the below response format and nothing else. Each review
489
+ section must consist of a line number range and a comment for
490
+ that line number range. Optionally, you can include replacement suggestion
491
+ or new code snippets in the review comment. There's a separator between
492
+ review sections.
493
+ - It's important that line number ranges for each review section must
494
+ be within the line number range of a specific new hunk. i.e.
495
+ <start_line_number> must belong to the same hunk as the
496
+ <end_line_number>. The line number range is sufficient to map your
497
+ comment to the correct sections in GitHub pull request.
498
+ - Consider the context provided by the old hunk and associated comment
499
+ chain when reviewing the new hunk.
494
500
- Use Markdown format for review comment text.
501
+ - Fenced code blocks must be used for new content and replacement
502
+ code/text snippets.
495
503
- If needed, provide a replacement suggestion using the exact line number
496
504
range and fenced code blocks with the suggestion language identifier.
497
505
These can be directly committed by the user in the GitHub UI. Replacement
498
506
code/text snippets must be complete and correctly formatted. For instance,
499
507
if 2 lines of code in a hunk need to be replaced with 15 lines of code,
500
508
the line number range must be those exact 2 lines. If an entire hunk need to
501
509
be replaced with new code, then the line number range must be the entire hunk.
502
- - If needed, suggest new code using the correct language identifier in fenced
503
- code blocks. These snippets may be added to a different file, such as test cases.
510
+ - If needed, suggest new code using the correct language identifier in the
511
+ fenced code blocks. These snippets may be added to a different file, such
512
+ as test cases.
504
513
- Do not annotate code snippets with line numbers inside the code blocks.
505
- - In your response, focus only on pointing out substantive issues in the hunks.
514
+ - In your response, focus only on pointing out substantive issues in the hunks
515
+ and nothing else.
506
516
- If there are no issues in a hunk, comment "LGTM!" for the respective line range.
507
517
- Review your comments and line number ranges at least 3 times before sending
508
- the final response to ensure accuracy.
518
+ the final response to ensure accuracy of line number ranges and replacement
519
+ snippets.
509
520
510
521
Response format expected:
511
522
<start_line_number>-<end_line_number>:
0 commit comments