* Check if MCP content contains any image blocks. * Used to decide whether to persist to file (images should use truncation instead * to preserve image compression and viewability).
(content: MCPToolResult)
| 2711 | * to preserve image compression and viewability). |
| 2712 | */ |
| 2713 | function contentContainsImages(content: MCPToolResult): boolean { |
| 2714 | if (!content || typeof content === 'string') { |
| 2715 | return false |
| 2716 | } |
| 2717 | return content.some(block => block.type === 'image') |
| 2718 | } |
| 2719 | |
| 2720 | export async function processMCPResult( |
| 2721 | result: unknown, |