fix: enhance error messages for missing bash command and SSH configuration validation

This commit is contained in:
Harry
2026-02-10 19:22:17 +08:00
parent 4b1af0d525
commit a5271baea0
2 changed files with 7 additions and 1 deletions

View File

@ -91,7 +91,11 @@ class SandboxBashTool(Tool):
) -> Generator[ToolInvokeMessage, None, None]:
command = tool_parameters.get("bash", "")
if not command:
yield self.create_text_message("Error: No command provided")
sandbox_debug("bash_tool", "parameters", tool_parameters)
yield self.create_text_message(
'Error: No command provided. The "bash" parameter is required and must contain '
'the shell command to execute. Example: {"bash": "ls -la"}'
)
return
try: