diff --git a/src/serena/tools/cmd_tools.py b/src/serena/tools/cmd_tools.py index 077a1978..e548903e 100644 --- a/src/serena/tools/cmd_tools.py +++ b/src/serena/tools/cmd_tools.py @@ -22,7 +22,10 @@ class ExecuteShellCommandTool(Tool, ToolMarkerCanEdit): ) -> str: """ Execute a shell command and return its output. If there is a memory about suggested commands, read that first. - Never execute unsafe shell commands like `rm -rf /` or similar! + Never execute unsafe shell commands! + IMPORTANT: Do not use this tool to start + * long-running processes (e.g. servers) that are not intended to terminate quickly, + * processes that require user interaction. :param command: the shell command to execute :param cwd: the working directory to execute the command in. If None, the project root will be used. diff --git a/src/serena/tools/symbol_tools.py b/src/serena/tools/symbol_tools.py index 310ebe11..14099ef7 100644 --- a/src/serena/tools/symbol_tools.py +++ b/src/serena/tools/symbol_tools.py @@ -227,13 +227,14 @@ class ReplaceSymbolBodyTool(Tool, ToolMarkerSymbolicEdit): 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. + (e.g. via `find_symbol`). + IMPORTANT: Do not use this tool if you do not know what exactly 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: 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. + :param body: the new symbol body. The symbol body is the definition of a symbol + in the programming language, including e.g. the signature line for functions. + IMPORTANT: The body does NOT include any preceding docstrings/comments or imports, in particular. """ code_editor = self.create_code_editor() code_editor.replace_body(