MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / contentText

Function contentText

e2e/src/clients/replay-brain.ts:66–78  ·  view source on GitHub ↗
(content: unknown)

Source from the content-addressed store, hash-verified

64}
65
66const contentText = (content: unknown): string => {
67 if (typeof content === "string") return content;
68 if (Array.isArray(content)) {
69 return content
70 .map((part) =>
71 typeof part === "object" && part !== null && "text" in part
72 ? String((part as { text: unknown }).text)
73 : "",
74 )
75 .join("");
76 }
77 return "";
78};
79
80const sseChunk = (delta: Record<string, unknown>, finish: string | null) =>
81 `data: ${JSON.stringify({

Callers 1

serveReplayBrainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected