mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-02 11:50:37 +08:00
feat: Refine prompts and improve formatting in pr_sort_code_suggestions_prompts.toml and pr_update_changelog_prompts.toml
This commit is contained in:
@ -2,10 +2,10 @@
|
|||||||
system="""
|
system="""
|
||||||
"""
|
"""
|
||||||
|
|
||||||
user="""You are given a list of code suggestions to improve a git Pull Request (PR):
|
user="""You are given a list of code suggestions to improve a Git Pull Request (PR):
|
||||||
'
|
======
|
||||||
{{ suggestion_str|trim }}
|
{{ suggestion_str|trim }}
|
||||||
'
|
======
|
||||||
|
|
||||||
Your task is to sort the code suggestions by their order of importance, and return a list with sorting order.
|
Your task is to sort the code suggestions by their order of importance, and return a list with sorting order.
|
||||||
The sorting order is a list of pairs, where each pair contains the index of the suggestion in the original list.
|
The sorting order is a list of pairs, where each pair contains the index of the suggestion in the original list.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[pr_update_changelog_prompt]
|
[pr_update_changelog_prompt]
|
||||||
system="""You are a language model called CodiumAI-PR-Changlog-summarizer.
|
system="""You are a language model called PR-Changelog-Updater.
|
||||||
Your task is to update the CHANGELOG.md file of the project, to shortly summarize important changes introduced in this PR (the '+' lines).
|
Your task is to update the CHANGELOG.md file of the project, to shortly summarize important changes introduced in this PR (the '+' lines).
|
||||||
- The output should match the existing CHANGELOG.md format, style and conventions, so it will look like a natural part of the file. For example, if previous changes were summarized in a single line, you should do the same.
|
- The output should match the existing CHANGELOG.md format, style and conventions, so it will look like a natural part of the file. For example, if previous changes were summarized in a single line, you should do the same.
|
||||||
- Don't repeat previous changes. Generate only new content, that is not already in the CHANGELOG.md file.
|
- Don't repeat previous changes. Generate only new content, that is not already in the CHANGELOG.md file.
|
||||||
@ -8,9 +8,9 @@ Your task is to update the CHANGELOG.md file of the project, to shortly summariz
|
|||||||
{%- if extra_instructions %}
|
{%- if extra_instructions %}
|
||||||
|
|
||||||
Extra instructions from the user:
|
Extra instructions from the user:
|
||||||
'
|
======
|
||||||
{{ extra_instructions }}
|
{{ extra_instructions|trim }}
|
||||||
'
|
======
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -20,7 +20,13 @@ Title: '{{title}}'
|
|||||||
|
|
||||||
Branch: '{{branch}}'
|
Branch: '{{branch}}'
|
||||||
|
|
||||||
Description: '{{description}}'
|
{%- if description %}
|
||||||
|
|
||||||
|
Description:
|
||||||
|
======
|
||||||
|
{{ description|trim }}
|
||||||
|
======
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{%- if language %}
|
{%- if language %}
|
||||||
|
|
||||||
@ -28,17 +34,18 @@ Main PR language: '{{ language }}'
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if commit_messages_str %}
|
{%- if commit_messages_str %}
|
||||||
|
|
||||||
|
|
||||||
Commit messages:
|
Commit messages:
|
||||||
'
|
======
|
||||||
{{ commit_messages_str }}
|
{{ commit_messages_str|trim }}
|
||||||
'
|
======
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
|
||||||
The PR Diff:
|
The PR Git Diff:
|
||||||
```
|
======
|
||||||
{{diff}}
|
{{ diff|trim }}
|
||||||
```
|
======
|
||||||
|
|
||||||
Current date:
|
Current date:
|
||||||
```
|
```
|
||||||
@ -46,9 +53,10 @@ Current date:
|
|||||||
```
|
```
|
||||||
|
|
||||||
The current CHANGELOG.md:
|
The current CHANGELOG.md:
|
||||||
```
|
======
|
||||||
{{ changelog_file_str }}
|
{{ changelog_file_str }}
|
||||||
```
|
======
|
||||||
|
|
||||||
|
|
||||||
Response:
|
Response:
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user