@@ -105,8 +105,8 @@ The format for changes provided below consists of multiple change
105
105
sections, each containing a new hunk (annotated with line numbers),
106
106
an old hunk, and optionally, existing comment chains. Note that the
107
107
old hunk code has been replaced by the new hunk. The line number
108
- annotation on each line in the new hunk is of the
109
- format \`<line_number><colon><whitespace>\`.
108
+ annotations on lines in the new hunk is of the format
109
+ \`<line_number><colon><whitespace>\`.
110
110
111
111
### Format for changes
112
112
@@ -128,13 +128,54 @@ format \`<line_number><colon><whitespace>\`.
128
128
---end_change_section---
129
129
...
130
130
131
+ ### Response format expected
132
+
133
+ <start_line_number>-<end_line_number>:
134
+ <review comment>
135
+ ---
136
+ <start_line_number>-<end_line_number>:
137
+ <review comment>
138
+ \`\`\`suggestion
139
+ <code/text that replaces everything between start_line_number and end_line_number>
140
+ \`\`\`
141
+ ---
142
+ <start_line_number>-<end_line_number>:
143
+ <review comment>
144
+ \`\`\`<language>
145
+ <new code snippet>
146
+ \`\`\`
147
+ ---
148
+ ...
149
+
150
+
131
151
## IMPORTANT: Response Instructions
132
152
133
153
- Your task is to review ONLY the new hunks line by line, ONLY pointing out
134
154
substantive issues within line number ranges. Provide the exact line
135
155
number range (inclusive) for each issue. Take into account any supplementary
136
156
context from the old hunks, comment threads, and file contents during your
137
- review process.
157
+ review process.
158
+ - Respond only in the above response format (consisting of review
159
+ sections). Each review section must have a line number range and a review
160
+ comment for that range. Use separator after each review section.
161
+ - Line number ranges for each review section must be within the
162
+ range of a specific new hunk. <start_line_number> must belong to the same
163
+ hunk as the <end_line_number>.
164
+ - Use Markdown format for review comment text and fenced code blocks for
165
+ code snippets.
166
+ - If needed, suggest new code snippets using the relevant language identifier
167
+ in the fenced code blocks. These snippets may be added to a different file
168
+ (e.g. test cases), or within the same file at locations outside the provided
169
+ hunks. Multiple new code snippets are allowed within a single review section.
170
+ - If needed, provide replacement code to fix the issues by using fenced code
171
+ blocks with the \`suggestion\` or the \`diff\` as the language identifier/format,
172
+ depending on whether the suggestion is a few lines of code (~15 lines) or
173
+ a larger diff (> 15 lines) respectively. The line number range must map
174
+ exactly to the range (inclusive) that needs to be replaced within a new hunk.
175
+ For instance, if 2 lines of code in a hunk need to be replaced with 15 lines of
176
+ code, the line number range must be those exact 2 lines. You must replace all
177
+ the lines in the range with your suggestion. Replacement suggestions must be complete,
178
+ correctly formatted/indented and without the line number annotations.
138
179
- Understand that the hunk provided for review is a part of a larger codebase
139
180
and may not include all relevant parts, such as definitions, imports, or uses
140
181
of functions or variables. You may see incomplete fragments of code or
@@ -156,51 +197,11 @@ format \`<line_number><colon><whitespace>\`.
156
197
and is aware of their implications on the entire system. Instead of
157
198
making generic comments about potential impacts on the system, focus
158
199
on providing specific, objective insights based on the code itself.
159
- - Respond only in the below response format (consisting of review
160
- sections). Each review section must have a line number range and a review
161
- comment for that range. Use separator after each review section.
162
- - Line number ranges for each review section must be within the
163
- range of a specific new hunk. <start_line_number> must belong to the same
164
- hunk as the <end_line_number>.
165
- - Use Markdown format for review comment text and fenced code blocks for
166
- code snippets.
167
- - If needed, suggest new code snippets using the relevant language identifier
168
- in the fenced code blocks. These snippets may be added to a different file
169
- (e.g. test cases), or within the same file at locations outside the provided
170
- hunks. Multiple new code snippets are allowed within a single review section.
171
- - If needed, provide replacement code to fix the issues by using fenced code
172
- blocks with the \`suggestion\` or the \`diff\` as the language identifier/format,
173
- depending on whether the suggestion is a few lines of code (~15 lines) or
174
- a larger diff (> 15 lines) respectively. The line number range must map
175
- exactly to the range (inclusive) that needs to be replaced within a new hunk.
176
- For instance, if 2 lines of code in a hunk need to be replaced with 15 lines of
177
- code, the line number range must be those exact 2 lines. You must replace all
178
- the lines in the range with your suggestion. Replacement suggestions must be complete,
179
- correctly formatted/indented and without the line number annotations.
180
200
- If there are no issues found on a line range, you MUST respond with the
181
201
text \`LGTM!\` for that line range in the review section.
182
202
- Reflect on your comments and line number ranges before sending the final
183
203
response to ensure accuracy of line number ranges and replacement snippets.
184
204
185
- ### Response format expected
186
-
187
- <start_line_number>-<end_line_number>:
188
- <review comment>
189
- ---
190
- <start_line_number>-<end_line_number>:
191
- <review comment>
192
- \`\`\`suggestion
193
- <code/text that replaces everything between start_line_number and end_line_number>
194
- \`\`\`
195
- ---
196
- <start_line_number>-<end_line_number>:
197
- <review comment>
198
- \`\`\`<language>
199
- <new code snippet>
200
- \`\`\`
201
- ---
202
- ...
203
-
204
205
## Example
205
206
206
207
### Example changes
0 commit comments