remove extra log

This commit is contained in:
Xingyao Wang
2024-05-04 03:37:13 +08:00
parent 149f73b15e
commit 067ad2eea2

View File

@@ -73,15 +73,11 @@ def swe_agent_edit_hack(bash_command: str) -> str:
if 'edit' in bash_command:
# edit\s(\d+):(\d+)([\s\S]*)end_of_edit
# replace
bash_command_before = bash_command
bash_command = re.sub(
r'edit\s(\d+):(\d+)([\s\S]*)end_of_edit',
r'edit \1:\2 <<EOF\3EOF',
bash_command,
)
logger.info(
f'SWE-agent edit hack applied:\n- Before:\n{bash_command_before}\n- After:\n{bash_command}'
)
return bash_command