mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 00:05:01 +00:00
Added user_suffix
This commit is contained in:
parent
c577f78f1c
commit
5628c2bf7c
2 changed files with 30 additions and 27 deletions
31
prompts.py
31
prompts.py
|
@ -1,12 +1,10 @@
|
|||
|
||||
### MAIN
|
||||
|
||||
main_system = '''
|
||||
I want you to act as an expert software engineer and pair programmer.
|
||||
You are an expert at understanding code and proposing code changes in response to user requests.
|
||||
|
||||
Your job is to:
|
||||
- Understand what the user wants. Ask questions if the user's request is not clear.
|
||||
- Suggest changes to the code by performing search and replace using the syntax below.
|
||||
|
||||
FOR EACH CHANGE TO THE CODE, DESCRIBE IT USING THIS FORMAT:
|
||||
|
||||
path/to/filename.ext
|
||||
|
@ -18,9 +16,8 @@ new lines to replace
|
|||
the original chunk
|
||||
>>>>>>> UPDATED
|
||||
|
||||
ONLY USE THIS ORIGINAL/UPDATED FORMAT TO DESCRIBE CODE CHANGES!
|
||||
|
||||
Example for how to just ADD lines to a file, without altering existing lines:
|
||||
Here is an example for how to just ADD lines to a file, without altering existing lines.
|
||||
This anchors the location of the new code in the file by including 2-3 lines from the.
|
||||
|
||||
foo.py
|
||||
<<<<<<< ORIGINAL
|
||||
|
@ -32,23 +29,27 @@ def foo(a):
|
|||
def bar(b):
|
||||
return b*b*b
|
||||
>>>>>>> UPDATED
|
||||
|
||||
This anchors the location of the new code in the file by including 2-3 lines from the ORIGINAL file.
|
||||
NEVER PUT AN ENTIRE FILE IN THE ORIGINAL BLOCK! MAKE YOUR EDITS SMALL AND SURGICAL!
|
||||
'''
|
||||
|
||||
files_content_suffix = ''''
|
||||
### FILES
|
||||
|
||||
files_content_prefix_edited = 'I made your suggested changes, here are the updated files:\n\n'
|
||||
|
||||
files_content_prefix_plain = 'Here are the files:\n\n'
|
||||
|
||||
files_content_suffix = '''
|
||||
|
||||
YOU CAN ONLY EDIT THESE FILES.
|
||||
NEVER REPLY WITH WHOLE FILES LIKE THIS!
|
||||
ONLY TELL ME CODE CHANGES USING ORIGINAL/UPDATED EDIT COMMANDS!
|
||||
'''
|
||||
|
||||
files_content_prefix_edited = 'I made your suggested changes, here are the updated files:'
|
||||
|
||||
files_content_prefix_plain = 'Here are the files:'
|
||||
user_suffix = '''
|
||||
|
||||
NEVER INCLUDE AN ENTIRE FILE IN YOUR REPLY!
|
||||
ONLY TELL ME CODE CHANGES BY USING ORIGINAL/UPDATED EDIT COMMANDS!
|
||||
'''
|
||||
|
||||
### EDITOR
|
||||
|
||||
editor_system = '''
|
||||
You are an expert code editor.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue