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

Function hasImageBlock

src/utils/toolResultStorage.ts:526–535  ·  view source on GitHub ↗
(
  content: NonNullable<ToolResultBlockParam['content']>,
)

Source from the content-addressed store, hash-verified

524}
525
526function hasImageBlock(
527 content: NonNullable<ToolResultBlockParam['content']>,
528): boolean {
529 return (
530 Array.isArray(content) &&
531 content.some(
532 b => typeof b === 'object' && 'type' in b && b.type === 'image',
533 )
534 )
535}
536
537function contentSize(
538 content: NonNullable<ToolResultBlockParam['content']>,

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected