toolResponse builds a fantasy.ToolResponse from a JSON-serializable result map. The map constraint ensures all tool results serialize to JSON objects so the frontend can safely parse them.
(result map[string]any)
| 26 | // result map. The map constraint ensures all tool results serialize |
| 27 | // to JSON objects so the frontend can safely parse them. |
| 28 | func toolResponse(result map[string]any) fantasy.ToolResponse { |
| 29 | return marshalToolResponse(result) |
| 30 | } |
| 31 | |
| 32 | // buildToolResponse marshals a buildErrorResult into a tool response. |
| 33 | // Separate from toolResponse to keep the map[string]any constraint |
no test coverage detected