(attachments: ReadonlyArray<ToolAttachment>)
| 249 | } |
| 250 | |
| 251 | export function extractImageAttachments(attachments: ReadonlyArray<ToolAttachment>): ImageAttachment[] { |
| 252 | return attachments.flatMap((attachment): ImageAttachment[] => { |
| 253 | const data = dataUrlImage(attachment) |
| 254 | return data ? [data] : [] |
| 255 | }) |
| 256 | } |
| 257 | |
| 258 | export function shellOutputSnapshot(state: { readonly metadata?: unknown }) { |
| 259 | if (!state.metadata || typeof state.metadata !== "object") return undefined |
no test coverage detected