MCPcopy
hub / github.com/codeaashu/claude-code / normalizeUserTextContent

Function normalizeUserTextContent

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

Source from the content-addressed store, hash-verified

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