(message)
| 45 | } |
| 46 | |
| 47 | function toAnthropicToolResult(message) { |
| 48 | return { |
| 49 | type: "tool_result", |
| 50 | tool_use_id: message.tool_call_id, |
| 51 | content: typeof message.content === "string" ? message.content : JSON.stringify(message.content ?? ""), |
| 52 | }; |
| 53 | } |
| 54 | |
| 55 | function splitSystemAndMessages(messages = []) { |
| 56 | const system = []; |
no outgoing calls
no test coverage detected