@@ -390,6 +390,11 @@ Format for changes:
390
390
---end_change_section---
391
391
...
392
392
393
+ The above format for changes consistes of multiple change sections.
394
+ Each change section consists of a new hunk (annotated with line numbers),
395
+ an old hunk (that was replaced with new hunk) and optionally, comment
396
+ chains for context.
397
+
393
398
Hunks for review are below:
394
399
`
395
400
@@ -485,25 +490,29 @@ ${comment_chain}
485
490
// add instructions
486
491
ins . patches += `
487
492
Instructions for you:
488
- - Only respond in the below response format consisting of multiple review
489
- sections and nothing else. Each review section must consist of a line
493
+ - Your task is to do a line by line review of new hunks and point out
494
+ substantive issues in those line number ranges. When commenting,
495
+ you will need to provide the exact line number range (inclusive)
496
+ for each issue that is detected.
497
+ - Only respond in the below response format (consisting of review
498
+ sections) and nothing else. Each review section must consist of a line
490
499
number range and a comment for that line number range. Optionally,
491
500
you can include replacement suggestion or new code snippets in the
492
501
review comment. There's a separator between review sections.
493
502
- It's important that line number ranges for each review section must
494
503
be within the line number range of a specific new hunk. i.e.
495
504
<start_line_number> must belong to the same hunk as the
496
505
<end_line_number>. The line number range is sufficient to map your
497
- comment to the correct sections in GitHub pull request.
506
+ comment to the code changes in GitHub pull request.
498
507
- Consider the context provided by the old hunk and associated comment
499
508
chain when reviewing the new hunk.
500
509
- Use Markdown format for review comment text.
501
510
- Fenced code blocks must be used for new content and replacement
502
511
code/text snippets.
503
512
- If needed, provide a replacement suggestion using fenced code blocks
504
513
with the \`suggestion\` as the language identifier. The line number range
505
- in the review section must map exactly to the line number range that need
506
- to be replaced within a new_hunk_for_review. These snippets will be
514
+ in the review section must map exactly to the line number range (inclusive)
515
+ that need to be replaced within a new_hunk_for_review. These snippets will be
507
516
directly committed by the user using the GitHub UI. For instance,
508
517
if 2 lines of code in a hunk need to be replaced with 15 lines of code,
509
518
the line number range must be those exact 2 lines. If an entire hunk need
@@ -513,7 +522,6 @@ Instructions for you:
513
522
fenced code blocks. These snippets may be added to a different file, such
514
523
as test cases.
515
524
- Do not annotate code snippets with line numbers inside the code blocks.
516
- - In your response, focus only on pointing out substantive issues in the hunks
517
525
and nothing else.
518
526
- If there are no issues in a hunk, comment "LGTM!" for the respective line range.
519
527
- Review your comments and line number ranges at least 3 times before sending
@@ -538,7 +546,7 @@ Response format expected:
538
546
---
539
547
...
540
548
541
- Example request :
549
+ Example changes :
542
550
---new_hunk_for_review---
543
551
1: def add(x, y):
544
552
2: z = x+y
0 commit comments