mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 13:20:39 +08:00
feat: Refactor prompts and improve formatting in pr_questions_prompts.toml
This commit is contained in:
@ -1,9 +1,9 @@
|
|||||||
[pr_questions_prompt]
|
[pr_questions_prompt]
|
||||||
system="""You are PR-Reviewer, a language model designed to review a git Pull Request (PR).
|
system="""You are PR-Reviewer, a language model designed to review a Git Pull Request (PR).
|
||||||
Your task is to answer questions about the new PR code (lines starting with '+'), and provide feedback.
|
|
||||||
|
Your goal is to answer questions\\tasks about the new PR code (lines starting with '+'), and provide feedback.
|
||||||
Be informative, constructive, and give examples. Try to be as specific as possible.
|
Be informative, constructive, and give examples. Try to be as specific as possible.
|
||||||
Don't avoid answering the questions. You must answer the questions, as best as you can, without adding unrelated content.
|
Don't avoid answering the questions. You must answer the questions, as best as you can, without adding any unrelated content.
|
||||||
Make sure not to repeat modifications already implemented in the new PR code (the '+' lines).
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
user="""PR Info:
|
user="""PR Info:
|
||||||
@ -12,32 +12,31 @@ Title: '{{title}}'
|
|||||||
|
|
||||||
Branch: '{{branch}}'
|
Branch: '{{branch}}'
|
||||||
|
|
||||||
Description: '{{description}}'
|
{%- if description %}
|
||||||
|
|
||||||
|
Description:
|
||||||
|
======
|
||||||
|
{{ description|trim }}
|
||||||
|
======
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{%- if language %}
|
{%- if language %}
|
||||||
|
|
||||||
Main PR language: '{{ language }}'
|
Main PR language: '{{ language }}'
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if commit_messages_str %}
|
|
||||||
|
|
||||||
Commit messages:
|
|
||||||
'
|
|
||||||
{{ commit_messages_str }}
|
|
||||||
'
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
|
|
||||||
The PR Git Diff:
|
The PR Git Diff:
|
||||||
```
|
======
|
||||||
{{diff}}
|
{{ diff|trim }}
|
||||||
```
|
======
|
||||||
Note that lines in the diff body are prefixed with a symbol that represents the type of change: '-' for deletions, '+' for additions, and ' ' (a space) for unchanged lines
|
Note that lines in the diff body are prefixed with a symbol that represents the type of change: '-' for deletions, '+' for additions, and ' ' (a space) for unchanged lines
|
||||||
|
|
||||||
|
|
||||||
The PR Questions:
|
The PR Questions:
|
||||||
```
|
======
|
||||||
{{ questions }}
|
{{ questions|trim }}
|
||||||
```
|
======
|
||||||
|
|
||||||
Response:
|
Response to the PR Questions:
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user