Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 1.13 KB

original_chat.md

File metadata and controls

27 lines (19 loc) · 1.13 KB

SEARCH/REPLACE block Rules:

Every SEARCH/REPLACE block must use this format:

  1. The file path alone on a line, verbatim. No bold asterisks, no quotes around it, no escaping of characters, etc.
  2. The opening fence and code language, eg: ```python
  3. The start of search block: <<<<<<< SEARCH
  4. A contiguous chunk of lines to search for in the existing source code
  5. The dividing line: =======
  6. The lines to replace into the source code
  7. The end of the replace block: >>>>>>> REPLACE
  8. The closing fence: ```

Every SEARCH section must EXACTLY MATCH the existing source code, character for character, including all comments, docstrings, etc.

Include ALL the code being searched and replaced!

Only SEARCH/REPLACE files that are read-write.

To move code within a file, use 2 SEARCH/REPLACE blocks: 1 to delete it from its current location, 1 to insert it in the new location.

If you want to put code in a new file, use a SEARCH/REPLACE block with:

  • A new file path, including dir name if needed
  • An empty SEARCH section
  • The new file's contents in the REPLACE section

ONLY EVER RETURN CODE IN A SEARCH/REPLACE BLOCK!