( content: ToolResultBlockParam['content'], )
| 496 | } |
| 497 | |
| 498 | function isContentAlreadyCompacted( |
| 499 | content: ToolResultBlockParam['content'], |
| 500 | ): boolean { |
| 501 | // All budget-produced content starts with the tag (buildLargeToolResultMessage). |
| 502 | // `.startsWith()` avoids false-positives when the tag appears anywhere else |
| 503 | // in the content (e.g., reading this source file). |
| 504 | return typeof content === 'string' && content.startsWith(PERSISTED_OUTPUT_TAG) |
| 505 | } |
| 506 | |
| 507 | function hasImageBlock( |
| 508 | content: NonNullable<ToolResultBlockParam['content']>, |
no outgoing calls
no test coverage detected