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

Function normalizeUserTextContent

src/utils/messages.ts:2494–2501  ·  view source on GitHub ↗
(
  a: string | ContentBlockParam[],
)

Source from the content-addressed store, hash-verified

2492}
2493
2494function normalizeUserTextContent(
2495 a: string | ContentBlockParam[],
2496): ContentBlockParam[] {
2497 if (typeof a === 'string') {
2498 return [{ type: 'text', text: a }]
2499 }
2500 return a
2501}
2502
2503/**
2504 * Concatenate two content block arrays, appending `\n` to a's last text block

Callers 2

mergeUserMessagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected