(self)
| 89 | self.cmd_type = "CODE-edit" |
| 90 | |
| 91 | def docstring(self) -> str: |
| 92 | return ( |
| 93 | "============= CODE EDITING TOOL =============\n" |
| 94 | "You also have access to a code editing tool. \n" |
| 95 | "This tool allows you to replace lines indexed n through m (n:m) of the current code with as many lines of new code as you want to add. This removal is inclusive meaning that line n and m and everything between n and m is removed. This will be the primary way that you interact with code. \n" |
| 96 | "You can edit code using the following command: ```EDIT N M\n<new lines to replace old lines>\n``` EDIT is the word EDIT, N is the first line index you want to replace and M the the last line index you want to replace (everything inbetween will also be removed), and <new lines to replace old lines> will be the new code that is replacing the old code. Before changing the existing code to be your new code, your new code will be tested and if it returns an error it will not replace the existing code. Your changes should significantly change the functionality of the code." |
| 97 | ) |
| 98 | |
| 99 | def execute_command(self, *args) -> str: |
| 100 | # args[0] -> N (int) |
no outgoing calls
no test coverage detected