mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03:00
Changed tool output serialization in AgentService._convert_event_to_chunk() from str() to json.dumps() to ensure structured data (dict/list) is properly formatted as standard JSON instead of Python string representation. Changes: - Added json import to agent_service.py - Modified on_tool_end event handling to use json.dumps(output, ensure_ascii=False, indent=2) - Updated ai-chat-api-design.md to document tool_output format Benefits: - Frontend can parse tool results with standard JSON.parse() - Chinese and non-ASCII characters are preserved (not escaped) - Formatted output (indent=2) improves readability Co-Authored-By: YueGuobin <yueguobin@outlook.com>