ToolResultToPart converts a tool call ID, raw result, error flag, and media flag into a ChatMessagePart. This is the minimal conversion used both during streaming and when reading from the database.
(toolCallID, toolName string, result json.RawMessage, isError bool, isMedia bool)
| 845 | // conversion used both during streaming and when reading from the |
| 846 | // database. |
| 847 | func ToolResultToPart(toolCallID, toolName string, result json.RawMessage, isError bool, isMedia bool) codersdk.ChatMessagePart { |
| 848 | return codersdk.ChatMessageToolResult(toolCallID, toolName, result, isError, isMedia) |
| 849 | } |
| 850 | |
| 851 | // toolResultContentToPart converts a fantasy ToolResultContent into a |
| 852 | // ChatMessagePart. |
no test coverage detected