mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
better
This commit is contained in:
parent
14463700d3
commit
d3640a7d16
1 changed files with 82 additions and 14 deletions
96
prompts.py
96
prompts.py
|
@ -16,19 +16,74 @@ new lines to replace
|
|||
the original chunk
|
||||
>>>>>>> UPDATED
|
||||
|
||||
Here is an example for how to JUST add lines to a file, without altering any existing lines.
|
||||
This anchors the location of the new code in the file by including a few DISTINCTIVE lines from the original file.
|
||||
|
||||
foo.py
|
||||
example.py
|
||||
<<<<<<< ORIGINAL
|
||||
result = cam.cnt()
|
||||
return result
|
||||
=======
|
||||
result = cam.cnt()
|
||||
return result
|
||||
def subtract(x, y):
|
||||
return x - y
|
||||
|
||||
def bar(b):
|
||||
return b*b*b
|
||||
# Function to multiply two numbers
|
||||
def multiply(x, y):
|
||||
return x * y
|
||||
|
||||
=======
|
||||
def subtract(x, y):
|
||||
return x - y
|
||||
|
||||
# Function to multiply two numbers!
|
||||
def multiply(x, y):
|
||||
return x * y
|
||||
|
||||
>>>>>>> UPDATED
|
||||
|
||||
example.py
|
||||
<<<<<<< ORIGINAL
|
||||
def square_root(x):
|
||||
return x ** 0.5
|
||||
|
||||
# Main function
|
||||
def main():
|
||||
print("Welcome to the calculator program!")
|
||||
print("Please select an operation:")
|
||||
=======
|
||||
def square_root(x):
|
||||
return x ** 0.5
|
||||
|
||||
def main():
|
||||
print("Welcome to the calculator program!")
|
||||
print("Please select an operation:")
|
||||
>>>>>>> UPDATED
|
||||
|
||||
example.py
|
||||
<<<<<<< ORIGINAL
|
||||
print("5. Power")
|
||||
print("6. Square Root")
|
||||
|
||||
# Take input from the user
|
||||
choice = input("Enter choice (1/2/3/4/5/6): ")
|
||||
|
||||
# Check if choice is one of the options
|
||||
=======
|
||||
print("5. Power")
|
||||
print("6. Square Root")
|
||||
|
||||
# this is the main input
|
||||
# where the user gets to choose
|
||||
choice = input("Enter choice (1/2/3/4/5/6): ")
|
||||
|
||||
# Check if choice is one of the options
|
||||
>>>>>>> UPDATED
|
||||
|
||||
example.py
|
||||
<<<<<<< ORIGINAL
|
||||
# Call the main function
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
=======
|
||||
# Call the main function
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
# the end
|
||||
>>>>>>> UPDATED
|
||||
'''
|
||||
|
||||
|
@ -42,9 +97,22 @@ files_content_suffix = ''
|
|||
|
||||
user_suffix = '''
|
||||
|
||||
YOU CAN ONLY EDIT THE FILES I PROVIDED ABOVE!
|
||||
NEVER INCLUDE AN ENTIRE FILE IN YOUR REPLY!
|
||||
TO SPECIFY CODE CHANGES YOU MUST USE THE ORIGINAL/UPDATED EDIT COMMANDS!
|
||||
BASE YOUR EDITS ON THE CURRENT CONTENTS OF THE FILES AS SHOWN IN THIS MESSAGE.
|
||||
|
||||
NEVER RETURN CODE LIKE THIS:
|
||||
|
||||
```
|
||||
file contents
|
||||
...
|
||||
```
|
||||
|
||||
NEVER RETURN CODE LIKE THIS:
|
||||
|
||||
filename.ext
|
||||
```
|
||||
file contents
|
||||
...
|
||||
```
|
||||
'''
|
||||
|
||||
### EDITOR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue