( content: ToolResultBlockParam['content'], )
| 515 | } |
| 516 | |
| 517 | function isContentAlreadyCompacted( |
| 518 | content: ToolResultBlockParam['content'], |
| 519 | ): boolean { |
| 520 | // All budget-produced content starts with the tag (buildLargeToolResultMessage). |
| 521 | // `.startsWith()` avoids false-positives when the tag appears anywhere else |
| 522 | // in the content (e.g., reading this source file). |
| 523 | return typeof content === 'string' && content.startsWith(PERSISTED_OUTPUT_TAG) |
| 524 | } |
| 525 | |
| 526 | function hasImageBlock( |
| 527 | content: NonNullable<ToolResultBlockParam['content']>, |
no outgoing calls
no test coverage detected