(state: CompletedToolState)
| 228 | } |
| 229 | |
| 230 | export function completedToolRawOutput(state: CompletedToolState) { |
| 231 | return { |
| 232 | output: state.output, |
| 233 | ...(state.metadata !== undefined ? { metadata: state.metadata } : {}), |
| 234 | ...(state.attachments?.length ? { attachments: state.attachments } : {}), |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | export function imageContents(attachments: ReadonlyArray<ToolAttachment>): ToolCallContent[] { |
| 239 | return extractImageAttachments(attachments).map((attachment): ToolCallContent => { |
no outgoing calls
no test coverage detected