fix: regex

feature/process-manager
adldotori 1 year ago
parent 26a0c67bef
commit be366ff6c5

@ -63,7 +63,7 @@ class CodeEditor(BaseToolSet):
output = (
"Last 3 line was:\n"
+ "\n".join(code.split("\n")[-3:])
+ "\nYou can use CodeEditor.APPEND tool to append the code if it is not completed."
+ "\nYou can use CodeEditor.APPEND tool to append the code if this file is not completed."
)
except Exception as e:
output = str(e)
@ -88,7 +88,7 @@ class CodeEditor(BaseToolSet):
output = (
"Last 3 line was:\n"
+ "\n".join(code.split("\n")[-3:])
+ "\nYou can use CodeEditor.APPEND tool to append the code if it is not completed."
+ "\nYou can use CodeEditor.APPEND tool to append the code if this file is not completed."
)
except Exception as e:
output = str(e)

@ -127,7 +127,7 @@ class PatchCommand:
@staticmethod
def from_str(command: str) -> "PatchCommand":
match = re.search(
r"(.*)\|([0-9])*,([0-9])*\|([0-9]*),([0-9]*)(\||\n)(.*)",
r"(.*)\|([0-9]*),([0-9]*)\|([0-9]*),([0-9]*)(\||\n)(.*)",
command,
re.DOTALL,
)

Loading…
Cancel
Save