mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 21:30:40 +08:00
review_v2
This commit is contained in:
@ -27,14 +27,15 @@ __old hunk__
|
|||||||
## file: 'src/file2.py'
|
## file: 'src/file2.py'
|
||||||
...
|
...
|
||||||
======
|
======
|
||||||
- In this format, we separated each hunk of code to '__new hunk__' and '__old hunk__' sections. The '__new hunk__' section contains the new code of the chunk, and the '__old hunk__' section contains the old code that was removed.
|
- In this format, we separated each hunk of diff code to '__new hunk__' and '__old hunk__' sections. The '__new hunk__' section contains the new code of the chunk, and the '__old hunk__' section contains the old code, that was removed.
|
||||||
- Code lines are prefixed symbols ('+', '-', ' '). The '+' symbol indicates new code added in the PR, the '-' symbol indicates code removed in the PR, and the ' ' symbol indicates unchanged code.
|
|
||||||
- We also added line numbers for the '__new hunk__' sections, to help you refer to the code lines in your suggestions. These line numbers are not part of the actual code, and are only used for reference.
|
- We also added line numbers for the '__new hunk__' sections, to help you refer to the code lines in your suggestions. These line numbers are not part of the actual code, and are only used for reference.
|
||||||
|
- Code lines are prefixed with symbols ('+', '-', ' '). The '+' symbol indicates new code added in the PR, the '-' symbol indicates code removed in the PR, and the ' ' symbol indicates unchanged code. \
|
||||||
|
Suggestions should always focus on ways to improve the new code lines introduced in the PR, meaning lines in the '__new hunk__' sections that begin with a '+' symbol (after the line numbers). The '__old hunk__' sections code is for context and reference only.
|
||||||
|
|
||||||
|
|
||||||
Specific instructions for generating code suggestions:
|
Specific instructions for generating code suggestions:
|
||||||
- Provide up to {{ num_code_suggestions }} code suggestions. The suggestions should be diverse and insightful.
|
- Provide up to {{ num_code_suggestions }} code suggestions. The suggestions should be diverse and insightful.
|
||||||
- The suggestions should focus on ways to improve the new code in the PR, meaning focusing on lines from '__new hunk__' sections, starting with '+'. Use the '__old hunk__' sections to understand the context of the code changes.
|
- The suggestions should focus how to improve the new code introduced the PR, meaning on lines from '__new hunk__' sections, starting with '+' (after the line numbers).
|
||||||
- Prioritize suggestions that address possible issues, major problems, and bugs in the PR code.
|
- Prioritize suggestions that address possible issues, major problems, and bugs in the PR code.
|
||||||
- Don't suggest to add docstring, type hints, or comments, or to remove unused imports.
|
- Don't suggest to add docstring, type hints, or comments, or to remove unused imports.
|
||||||
- Suggestions should not repeat code already present in the '__new hunk__' sections.
|
- Suggestions should not repeat code already present in the '__new hunk__' sections.
|
||||||
|
Reference in New Issue
Block a user