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

Function extractTextContent

src/utils/messages.ts:2962–2970  ·  view source on GitHub ↗
(
  blocks: readonly { readonly type: string }[],
  separator = '',
)

Source from the content-addressed store, hash-verified

2960 * and their readonly/DeepImmutable variants via structural typing.
2961 */
2962export function extractTextContent(
2963 blocks: readonly { readonly type: string }[],
2964 separator = '',
2965): string {
2966 return blocks
2967 .filter((b): b is { type: 'text'; text: string } => b.type === 'text')
2968 .map(b => b.text)
2969 .join(separator)
2970}
2971
2972export function getContentText(
2973 content: string | DeepImmutable<Array<ContentBlockParam>>,

Callers 15

runWorkflowAgentTaskFunction · 0.85
getTaskOutputDataFunction · 0.85
extractPartialResultFunction · 0.85
runAsyncAgentLifecycleFunction · 0.85
callFunction · 0.85
useFrustrationDetectionFunction · 0.85
useMemorySurveyFunction · 0.85
extractTextFromValueFunction · 0.85
generateSessionTitleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected