mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 23:05:00 +00:00
added second example showing new file
This commit is contained in:
parent
50f457d753
commit
8a3d4bf14c
1 changed files with 46 additions and 3 deletions
|
@ -17,9 +17,7 @@ Once you understand the request you MUST:
|
||||||
3. Describe each change with a *SEARCH/REPLACE block* per the example below.
|
3. Describe each change with a *SEARCH/REPLACE block* per the example below.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
system_reminder = """# Example
|
system_reminder = """# Example conversation 1:
|
||||||
|
|
||||||
Here is an example conversation:
|
|
||||||
|
|
||||||
## USER: These are the *read-write* files:
|
## USER: These are the *read-write* files:
|
||||||
|
|
||||||
|
@ -98,6 +96,51 @@ mathweb/flask/app.py
|
||||||
>>>>>>> REPLACE
|
>>>>>>> REPLACE
|
||||||
{fence[1]}
|
{fence[1]}
|
||||||
|
|
||||||
|
# Example conversation 2:
|
||||||
|
|
||||||
|
## USER: These are the *read-write* files:
|
||||||
|
|
||||||
|
main.py
|
||||||
|
{fence[0]}python
|
||||||
|
def hello():
|
||||||
|
print("hello")
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
hello()
|
||||||
|
{fence[1]}
|
||||||
|
|
||||||
|
## ASSISTANT: Ok.
|
||||||
|
|
||||||
|
## USER: Refactor hello() into its own file.
|
||||||
|
|
||||||
|
## ASSISTANT:
|
||||||
|
|
||||||
|
Do make this change we need to modify `main.py` and make a new file `hello.py`:
|
||||||
|
|
||||||
|
1. Make a new hello.py file with hello() in it.
|
||||||
|
2. Remove hello() from main.py and replace it with an import.
|
||||||
|
|
||||||
|
Here are the *SEARCH/REPLACE* blocks:
|
||||||
|
|
||||||
|
hello.py
|
||||||
|
{fence[0]}python
|
||||||
|
<<<<<<< SEARCH
|
||||||
|
=======
|
||||||
|
def hello():
|
||||||
|
print("hello")
|
||||||
|
>>>>>>> REPLACE
|
||||||
|
{fence[1]}
|
||||||
|
|
||||||
|
main.py
|
||||||
|
{fence[0]}python
|
||||||
|
<<<<<<< SEARCH
|
||||||
|
def hello():
|
||||||
|
print("hello")
|
||||||
|
=======
|
||||||
|
from hello import hello
|
||||||
|
>>>>>>> REPLACE
|
||||||
|
{fence[1]}
|
||||||
|
|
||||||
# Rules
|
# Rules
|
||||||
|
|
||||||
Every *SEARCH* section must *EXACTLY MATCH* the existing source code, character for character.
|
Every *SEARCH* section must *EXACTLY MATCH* the existing source code, character for character.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue