MCPcopy Create free account
hub / github.com/WJX20/claude-code / getContentText

Function getContentText

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

Source from the content-addressed store, hash-verified

2930}
2931
2932export function getContentText(
2933 content: string | DeepImmutable<Array<ContentBlockParam>>,
2934): string | null {
2935 if (typeof content === 'string') {
2936 return content
2937 }
2938 if (Array.isArray(content)) {
2939 return extractTextContent(content, '\n').trim() || null
2940 }
2941 return null
2942}
2943
2944export type StreamingToolUse = {
2945 index: number

Callers 5

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

Calls 1

extractTextContentFunction · 0.85

Tested by

no test coverage detected