MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / getContentText

Function getContentText

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

Source from the content-addressed store, hash-verified

3256}
3257
3258export function getContentText(
3259 content: string | DeepImmutable<Array<ContentBlockParam>>,
3260): string | null {
3261 if (typeof content === 'string') {
3262 return content
3263 }
3264 if (Array.isArray(content)) {
3265 return extractTextContent(content, '\n').trim() || null
3266 }
3267 return null
3268}
3269
3270export type StreamingToolUse = {
3271 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