feat: improve tool execution logging (fix #10)

This commit is contained in:
Manus 2026-02-02 04:24:14 -05:00
parent 4f01e3ab93
commit f61e7a5968

View File

@ -189,7 +189,8 @@ class AgentLoop:
# Execute tools
for tool_call in response.tool_calls:
logger.debug(f"Executing tool: {tool_call.name}")
args_str = json.dumps(tool_call.arguments)
logger.debug(f"Executing tool: {tool_call.name} with arguments: {args_str}")
result = await self.tools.execute(tool_call.name, tool_call.arguments)
messages = self.context.add_tool_result(
messages, tool_call.id, tool_call.name, result
@ -281,7 +282,8 @@ class AgentLoop:
)
for tool_call in response.tool_calls:
logger.debug(f"Executing tool: {tool_call.name}")
args_str = json.dumps(tool_call.arguments)
logger.debug(f"Executing tool: {tool_call.name} with arguments: {args_str}")
result = await self.tools.execute(tool_call.name, tool_call.arguments)
messages = self.context.add_tool_result(
messages, tool_call.id, tool_call.name, result