Improve description of ReplaceSymbolBodyTool #576

This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2025-09-23 16:27:00 +02:00
1 parent 48d23470b1
commit 69f16bd25b
1 file changed
+6 -2
+6 -2
View File
@@ -226,10 +226,14 @@ class ReplaceSymbolBodyTool(Tool, ToolMarkerSymbolicEdit):
r"""
Replaces the body of the symbol with the given `name_path`.
The tool shall be used to replace symbol bodies that have been previously retrieved
(e.g. via `find_symbol`), such that it is clear what constitutes the body of the symbol.
:param name_path: for finding the symbol to replace, same logic as in the `find_symbol` tool.
:param relative_path: the relative path to the file containing the symbol
:param body: the new symbol body. Important: Begin directly with the symbol definition and provide no
leading indentation for the first line (but do indent the rest of the body according to the context).
:param body: the new symbol body. Important: The symbol body is the full definition of a symbol
in the programming language, including e.g. the signature line for functions,
but it does NOT include any preceding comments or imports, in particular.
"""
code_editor = self.create_code_editor()
code_editor.replace_body(