(content: unknown)
| 31 | } |
| 32 | |
| 33 | export 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 | } |
no outgoing calls
no test coverage detected