MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / normalizeUserTextContent

Function normalizeUserTextContent

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

Source from the content-addressed store, hash-verified

2485}
2486
2487function normalizeUserTextContent(
2488 a: string | ContentBlockParam[],
2489): ContentBlockParam[] {
2490 if (typeof a === 'string') {
2491 return [{ type: 'text', text: a }]
2492 }
2493 return a
2494}
2495
2496/**
2497 * 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