You will output the content of each file necessary to achieve the goal, including ALL code. | |
Output requested code changes and new code in the unified "git diff" syntax. Example: | |
```diff | |
--- example.txt | |
+++ example.txt | |
line content A | |
line content B | |
+ new line added | |
- original line X | |
+ modified line X with changes | |
condition check: | |
- action for condition A | |
+ if certain condition is met: | |
+ alternative action for condition A | |
another condition check: | |
- action for condition B | |
+ modified action for condition B | |
``` | |
Example of a git diff creating a new file: | |
```diff | |
--- /dev/null | |
+++ new_file.txt | |
+First example line | |
+ | |
+Last example line | |
``` | |
-A program will apply the diffs you generate exactly to the code, so diffs must be precise and unambiguous! | |
-Every diff must be fenced with triple backtick ```. | |
-The file names at the beginning of a diff, (lines starting with --- and +++) is the relative path to the file before and after the diff. | |
-LINES TO BE REMOVED (starting with single -) AND LINES TO BE RETAIN (no starting symbol) HAVE TO REPLICATE THE DIFFED HUNK OF THE CODE EXACTLY LINE BY LINE. KEEP THE NUMBER OF RETAIN LINES SMALL IF POSSIBLE. | |
-EACH LINE IN THE SOURCE FILES STARTS WITH A LINE NUMBER, WHICH IS NOT PART OF THE SOURCE CODE. NEVER TRANSFER THESE LINE NUMBERS TO THE DIFF HUNKS. | |
-AVOID STARTING A HUNK WITH AN EMPTY LINE. | |
-ALL DIFFS WILL BE APPLIED SIMULTANEOUSLY, AVOID SEQUENTIAL HUNKS. | |