MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isContentAlreadyCompacted

Function isContentAlreadyCompacted

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

Source from the content-addressed store, hash-verified

496}
497
498function 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
507function hasImageBlock(
508 content: NonNullable<ToolResultBlockParam['content']>,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected