* Does the content array have a tool_result block whose inner content * contains tool_reference (ToolSearch loaded tools)?
( content: ReadonlyArray<ContentBlockParam>, )
| 1776 | * contains tool_reference (ToolSearch loaded tools)? |
| 1777 | */ |
| 1778 | function contentHasToolReference( |
| 1779 | content: ReadonlyArray<ContentBlockParam>, |
| 1780 | ): boolean { |
| 1781 | return content.some( |
| 1782 | block => |
| 1783 | block.type === 'tool_result' && |
| 1784 | Array.isArray(block.content) && |
| 1785 | block.content.some(isToolReferenceBlock), |
| 1786 | ) |
| 1787 | } |
| 1788 | |
| 1789 | /** |
| 1790 | * Ensure all text content in attachment-origin messages carries the |
no outgoing calls
no test coverage detected