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

Function getContentText

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

Source from the content-addressed store, hash-verified

2901}
2902
2903export function getContentText(
2904 content: string | DeepImmutable<Array<ContentBlockParam>>,
2905): string | null {
2906 if (typeof content === 'string') {
2907 return content
2908 }
2909 if (Array.isArray(content)) {
2910 return extractTextContent(content, '\n').trim() || null
2911 }
2912 return null
2913}
2914
2915export type StreamingToolUse = {
2916 index: number

Callers 5

AttachmentMessageFunction · 0.85
getUserMessageTextFunction · 0.85
processUserInputFunction · 0.85
initReplBridgeFunction · 0.85
REPLFunction · 0.85

Calls 1

extractTextContentFunction · 0.70

Tested by

no test coverage detected