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

Function extractTextContent

web/lib/utils.ts:33–42  ·  view source on GitHub ↗
(content: unknown)

Source from the content-addressed store, hash-verified

31}
32
33export function extractTextContent(content: unknown): string {
34 if (typeof content === "string") return content;
35 if (Array.isArray(content)) {
36 return content
37 .filter((b): b is { type: "text"; text: string } => b?.type === "text")
38 .map((b) => b.text)
39 .join("");
40 }
41 return "";
42}

Callers 6

MessageBubbleFunction · 0.90
messageTextFunction · 0.90
exportFunction · 0.90
renderMessageHtmlFunction · 0.90
renderMessageFunction · 0.90
toPlainTextFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected