From cc550af04b21a05ef1739d15c0f13f31f7b6a9ae Mon Sep 17 00:00:00 2001 From: xiangjinyu <1376193973@qq.com> Date: Tue, 18 Mar 2025 14:25:23 +0800 Subject: [PATCH] edit str_replace_editor.py --- app/tool/str_replace_editor.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/tool/str_replace_editor.py b/app/tool/str_replace_editor.py index 4094565..07f4c46 100644 --- a/app/tool/str_replace_editor.py +++ b/app/tool/str_replace_editor.py @@ -138,10 +138,7 @@ class StrReplaceEditor(BaseTool): """ # Check if its an absolute path if not path.is_absolute(): - suggested_path = Path("") / path - raise ToolError( - f"The path {path} is not an absolute path, it should start with `/`. Maybe you meant {suggested_path}?" - ) + raise ToolError(f"The path {path} is not an absolute path") # Check if path exists if not path.exists() and command != "create": raise ToolError(