mirror of https://github.com/kortix-ai/suna.git
Merge pull request #520 from tnfssc/sharath/suna-280-make-sure-agent-continues-on-wrong-parse-add-a-result
This commit is contained in:
commit
59f8f80c7d
|
@ -253,10 +253,10 @@ class SandboxShellTool(SandboxToolsBase):
|
|||
],
|
||||
example='''
|
||||
<!-- Example 1: Check output without killing session -->
|
||||
<check-command-output session_name="dev_server"/>
|
||||
<check-command-output session_name="dev_server"></check-command-output>
|
||||
|
||||
<!-- Example 2: Check final output and kill session -->
|
||||
<check-command-output session_name="build_process" kill_session="true"/>
|
||||
<check-command-output session_name="build_process" kill_session="true"></check-command-output>
|
||||
'''
|
||||
)
|
||||
async def check_command_output(
|
||||
|
@ -317,7 +317,7 @@ class SandboxShellTool(SandboxToolsBase):
|
|||
],
|
||||
example='''
|
||||
<!-- Example: Terminate a running server -->
|
||||
<terminate-command session_name="dev_server"/>
|
||||
<terminate-command session_name="dev_server"></terminate-command>
|
||||
'''
|
||||
)
|
||||
async def terminate_command(
|
||||
|
@ -359,7 +359,7 @@ class SandboxShellTool(SandboxToolsBase):
|
|||
mappings=[],
|
||||
example='''
|
||||
<!-- Example: List all running commands -->
|
||||
<list-commands/>
|
||||
<list-commands></list-commands>
|
||||
'''
|
||||
)
|
||||
async def list_commands(self) -> ToolResult:
|
||||
|
|
|
@ -1061,16 +1061,7 @@ class ResponseProcessor:
|
|||
logger.error(f"Error processing mapping {mapping}: {e}")
|
||||
self.trace.event(name="error_processing_mapping", level="ERROR", status_message=(f"Error processing mapping {mapping}: {e}"))
|
||||
continue
|
||||
|
||||
# Validate required parameters
|
||||
missing = [mapping.param_name for mapping in schema.mappings if mapping.required and mapping.param_name not in params]
|
||||
if missing:
|
||||
logger.error(f"Missing required parameters: {missing}")
|
||||
logger.error(f"Current params: {params}")
|
||||
logger.error(f"XML chunk: {xml_chunk}")
|
||||
self.trace.event(name="missing_required_parameters", level="ERROR", status_message=(f"Missing required parameters: {missing}"), metadata={"current_params": params, "xml_chunk": xml_chunk})
|
||||
return None
|
||||
|
||||
|
||||
# Create tool call with clear separation between function_name and xml_tag_name
|
||||
tool_call = {
|
||||
"function_name": function_name, # The actual method to call (e.g., create_file)
|
||||
|
|
Loading…
Reference in New Issue