@@ -167,8 +167,8 @@ inputs:
167
167
$file_content
168
168
```
169
169
170
- Below is the format for diff patches. `---`
171
- separator is used between patches.
170
+ Below is the format for patches. `---`
171
+ separator is used between patches.
172
172
173
173
<start_line-end_line>:
174
174
```diff
@@ -180,12 +180,17 @@ inputs:
180
180
---
181
181
...
182
182
183
- Patches for review -
183
+ The <diff_hunk> is in the unidiff format which
184
+ represent the differences between two text files,
185
+ displaying added, removed, and unchanged lines with
186
+ "+" or "-" prefixes and surrounding context lines.
187
+
188
+ Patches for review are below -
184
189
185
190
$patches
186
191
187
- Your review must consist of comments in the following format
188
- with `---` separator between review comments. Any other
192
+ Your review must consist of comments in the below format
193
+ with a separator between review comments. Any other
189
194
commentary outside of this format will be ignored and will not
190
195
be read by the parser. Your comments will be added as multi-line
191
196
review comments in the GitHub pull request.
@@ -196,27 +201,24 @@ inputs:
196
201
<start_line-end_line>:
197
202
<explain why suggestion makes sense>
198
203
```suggestion
199
- <new code>
204
+ <replacement code>
200
205
```
201
206
---
207
+ <start_line-end_line>:
208
+ <explain why new code should be included>
209
+ ```<language>
210
+ <new code>
211
+ ```
202
212
...
203
213
204
- You can comment or suggest code changes for any number
205
- of (sub) line ranges within the line ranges
206
- (start_line and end_line) as long as your line ranges are
207
- within the line ranges in the patches.
208
- When suggesting code changes, the line ranges provided by you should
209
- map to exact line ranges that you wish to replace in the code
210
- with your new code suggestion. For example, if you are suggesting
211
- to replace 2 lines in code then the example comment could be -
212
- 100-101:
213
- ```suggestion
214
- print "Hello world"
215
- end
216
- ```
214
+ You can comment or suggest code changes for the patches and the
215
+ line ranges provided by you should map to the exact line ranges
216
+ provided in the patches. When suggesting a code change, please
217
+ provide the new code that replaces the entire patch from the
218
+ beginning.
217
219
218
- Reflect on the provided code at least 3 times to identify any bug risks
219
- or provide improvement suggestions in these patches.
220
+ Reflect on the provided code at least 3 times to identify any
221
+ bug risks or provide improvement suggestions in these patches.
220
222
You will point out potential issues such as security, logic errors,
221
223
syntax errors, out of bound errors, data races, consistency,
222
224
complexity, error handling, typos, grammar, maintainability,
@@ -295,10 +297,12 @@ inputs:
295
297
296
298
If the comment contains instructions/requests for you, please comply.
297
299
For example, if the comment is asking you to generate documentation
298
- comments on the code, in your reply please generate the required code.
299
- Any code change suggestion in the response must be enclosed in fenced code
300
- blocks with the suggestion identifier and must be in the line range
301
- of diff hunk provided to you -
300
+ comments on the code, in your reply please generate the required code
301
+ and provide as fenced code block in markdown.
302
+
303
+ Any code change suggestion to the diff hunk must be enclosed in fenced code
304
+ blocks with the suggestion identifier and the change must completely
305
+ replace the diff hunk provided to you from the beginning -
302
306
<your comment to the user>
303
307
```suggestion
304
308
<change>
0 commit comments