MCPcopy Create free account
hub / github.com/Noumena-Network/code / isContentAlreadyCompacted

Function isContentAlreadyCompacted

src/utils/toolResultStorage.ts:517–524  ·  view source on GitHub ↗
(
  content: ToolResultBlockParam['content'],
)

Source from the content-addressed store, hash-verified

515}
516
517function 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
526function hasImageBlock(
527 content: NonNullable<ToolResultBlockParam['content']>,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected