-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Diff based file editing for all modes
- Loading branch information
Aman Rusia
committed
Nov 21, 2024
1 parent
2291895
commit 69f4e61
Showing
10 changed files
with
323 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[project] | ||
authors = [{ name = "Aman Rusia", email = "[email protected]" }] | ||
name = "wcgw" | ||
version = "1.0.3" | ||
version = "1.1.0" | ||
description = "What could go wrong giving full shell access to chatgpt?" | ||
readme = "README.md" | ||
requires-python = ">=3.10, <3.13" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
Instructions for | ||
Only edit the files using the following SEARCH/REPLACE blocks. | ||
``` | ||
<<<<<<< SEARCH | ||
======= | ||
def hello(): | ||
"print a greeting" | ||
|
||
print("hello") | ||
>>>>>>> REPLACE | ||
|
||
<<<<<<< SEARCH | ||
def hello(): | ||
"print a greeting" | ||
|
||
print("hello") | ||
======= | ||
from hello import hello | ||
>>>>>>> REPLACE | ||
``` | ||
|
||
# *SEARCH/REPLACE block* Rules: | ||
|
||
Every *SEARCH/REPLACE block* must use this format: | ||
1. The start of search block: <<<<<<< SEARCH | ||
2. A contiguous chunk of lines to search for in the existing source code | ||
3. The dividing line: ======= | ||
4. The lines to replace into the source code | ||
5. The end of the replace block: >>>>>>> REPLACE | ||
|
||
Use the *FULL* file path, as shown to you by the user. | ||
|
||
Every *SEARCH* section must *EXACTLY MATCH* the existing file content, character for character, including all comments, docstrings, etc. | ||
If the file contains code or other data wrapped/escaped in json/xml/quotes or other containers, you need to propose edits to the literal contents of the file, including the container markup. | ||
|
||
*SEARCH/REPLACE* blocks will *only* replace the first match occurrence. | ||
Including multiple unique *SEARCH/REPLACE* blocks if needed. | ||
Include enough lines in each SEARCH section to uniquely match each set of lines that need to change. | ||
|
||
Keep *SEARCH/REPLACE* blocks concise. | ||
Break large *SEARCH/REPLACE* blocks into a series of smaller blocks that each change a small portion of the file. | ||
Include just the changing lines, and a few surrounding lines if needed for uniqueness. | ||
Do not include long runs of unchanging lines in *SEARCH/REPLACE* blocks. |
Oops, something went wrong.