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

Function getContentText

src/utils/messages.ts:2972–2982  ·  view source on GitHub ↗
(
  content: string | DeepImmutable<Array<ContentBlockParam>>,
)

Source from the content-addressed store, hash-verified

2970}
2971
2972export function getContentText(
2973 content: string | DeepImmutable<Array<ContentBlockParam>>,
2974): string | null {
2975 if (typeof content === 'string') {
2976 return content
2977 }
2978 if (Array.isArray(content)) {
2979 return extractTextContent(content, '\n').trim() || null
2980 }
2981 return null
2982}
2983
2984export type StreamingToolUse = {
2985 index: number

Callers 10

textOfFunction · 0.85
extractSearchTextFunction · 0.85
previousExtractorFunction · 0.85
nextExtractorFunction · 0.85
lowerTextFunction · 0.85
AttachmentMessageFunction · 0.85
getUserMessageTextFunction · 0.85
processUserInputFunction · 0.85
initReplBridgeFunction · 0.85
createReplOnQueryFunction · 0.85

Calls 1

extractTextContentFunction · 0.85

Tested by 5

textOfFunction · 0.68
extractSearchTextFunction · 0.68
previousExtractorFunction · 0.68
nextExtractorFunction · 0.68
lowerTextFunction · 0.68