mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
Added example messages to wholefile edit format
This commit is contained in:
parent
0fb08896e3
commit
1403d19aa7
2 changed files with 29 additions and 2 deletions
|
@ -8,3 +8,5 @@ class CoderPrompts:
|
||||||
files_content_local_edits = "I edited the files myself."
|
files_content_local_edits = "I edited the files myself."
|
||||||
|
|
||||||
lazy_prompt = ""
|
lazy_prompt = ""
|
||||||
|
|
||||||
|
example_messages = []
|
||||||
|
|
|
@ -14,18 +14,43 @@ Once you understand the request you MUST:
|
||||||
3. If changes are needed, output a copy of each file that needs changes.
|
3. If changes are needed, output a copy of each file that needs changes.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
example_messages = [
|
||||||
|
dict(
|
||||||
|
role="user",
|
||||||
|
content="Change the greeting to be more casual",
|
||||||
|
),
|
||||||
|
dict(
|
||||||
|
role="assistant",
|
||||||
|
content="""Ok, I will:
|
||||||
|
|
||||||
|
1. Switch the greeting text from "Hello" to "Hey".
|
||||||
|
|
||||||
|
show_greeting.py
|
||||||
|
{fence[0]}
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def greeting(name):
|
||||||
|
print(f"Hey {name}")
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
greeting(sys.argv[1])
|
||||||
|
{fence[1]}
|
||||||
|
""",
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
||||||
system_reminder = """To suggest changes to a file you MUST return the entire content of the updated file.
|
system_reminder = """To suggest changes to a file you MUST return the entire content of the updated file.
|
||||||
You MUST use this *file listing* format:
|
You MUST use this *file listing* format:
|
||||||
|
|
||||||
path/to/filename.js
|
path/to/filename.js
|
||||||
{fence[0]}javascript
|
{fence[0]}
|
||||||
// entire file content ...
|
// entire file content ...
|
||||||
// ... goes in between
|
// ... goes in between
|
||||||
{fence[1]}
|
{fence[1]}
|
||||||
|
|
||||||
Every *file listing* MUST use this format:
|
Every *file listing* MUST use this format:
|
||||||
- First line: the filename with any originally provided path
|
- First line: the filename with any originally provided path
|
||||||
- Second line: opening {fence[0]} including the code language
|
- Second line: opening {fence[0]}
|
||||||
- ... entire content of the file ...
|
- ... entire content of the file ...
|
||||||
- Final line: closing {fence[1]}
|
- Final line: closing {fence[1]}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue