π OpenHands: AI-Driven Development
Revert "Make str_replace_editor description more clear (#8434)" (#8501)
Engel Nystf046efd53d40
diff --git a/openhands/agenthub/codeact_agent/tools/str_replace_editor.py b/openhands/agenthub/codeact_agent/tools/str_replace_editor.pyindex fc4999ece0..d55b0d21c8 100644--- a/openhands/agenthub/codeact_agent/tools/str_replace_editor.py+++ b/openhands/agenthub/codeact_agent/tools/str_replace_editor.py@@ -6,10 +6,7 @@ _DETAILED_STR_REPLACE_EDITOR_DESCRIPTION = """Custom editing tool for viewing, c* The `create` command cannot be used if the specified `path` already exists as a file* If a `command` generates a long output, it will be truncated and marked with `<response clipped>`* The `undo_edit` command will revert the last edit made to the file at `path`-* All commands that include line numbers are 1-indexed-* The `insert` command will insert a string after a specific line number in the file. Note that if you want to insert a string at the start of the file (line 1), you should use `insert_line=0`, and it will inserted *after* 0, so it will be on line 1.-* The `view` command will show the file's contents in the indicated line number range, 1-indexed.-* The line numbers are added by the tool as an aid for you, they are not part of the file.+Before using this tool:1. Use the view tool to understand the file's contents and context@@ -20,7 +17,6 @@ When making edits:- Ensure the edit results in idiomatic, correct code- Do not leave the code in a broken state- Always use absolute file paths (starting with /)- - Do not add line numbers to the `new_str` or `old_str` parametersCRITICAL REQUIREMENTS FOR USING THIS TOOL:@@ -92,7 +88,7 @@ def create_str_replace_editor_tool('type': 'string',},'insert_line': {- 'description': 'Required parameter of `insert` command. The `new_str` will be inserted AFTER the line number `insert_line` of `path`. 0 is an allowed value for this parameter because it means the line before the first line of the file.',+ 'description': 'Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`.','type': 'integer',},'view_range': {diff --git a/poetry.lock b/poetry.lockindex e6e34be310..afaece4013 100644--- a/poetry.lock+++ b/poetry.lock@@ -1,4 +1,4 @@-# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand.+# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand.[[package]]name = "aiohappyeyeballs"@@ -3087,7 +3087,7 @@ google-auth = ">=2.14.1,<2.24.0 || >2.24.0,<2.25.0 || >2.25.0,<3.0.0dev"grpc-google-iam-v1 = ">=0.14.0,<1.0.0dev"proto-plus = [{version = ">=1.25.0,<2.0.0dev", markers = "python_version >= \"3.13\""},- {version = ">=1.22.3,<2.0.0dev"},+ {version = ">=1.22.3,<2.0.0dev", markers = "python_version < \"3.13\""},]protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0dev"@@ -8571,7 +8571,7 @@ description = "C version of reader, parser and emitter for ruamel.yaml derived foptional = falsepython-versions = ">=3.9"groups = ["main"]-markers = "platform_python_implementation == \"CPython\" and python_version == \"3.12\""+markers = "python_version < \"3.13\" and platform_python_implementation == \"CPython\""files = [{file = "ruamel.yaml.clib-0.2.12-cp310-cp310-macosx_13_0_arm64.whl", hash = "sha256:11f891336688faf5156a36293a9c362bdc7c88f03a8a027c2c1d8e0bcde998e5"},{file = "ruamel.yaml.clib-0.2.12-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:a606ef75a60ecf3d924613892cc603b154178ee25abb3055db5062da811fd969"},@@ -9963,7 +9963,7 @@ description = "A language and compiler for custom Deep Learning operations"optional = falsepython-versions = "*"groups = ["evaluation"]-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.12\""+markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version < \"3.13\""files = [{file = "triton-3.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e1efef76935b2febc365bfadf74bcb65a6f959a9872e5bddf44cc9e0adce1e1a"},{file = "triton-3.0.0-1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5ce8520437c602fb633f1324cc3871c47bee3b67acf9756c1a66309b60e3216c"},