MCPcopy Index your code
hub / github.com/Waishnav/devspace / contentText

Function contentText

src/server.ts:285–292  ·  view source on GitHub ↗
(content: ToolContent[])

Source from the content-addressed store, hash-verified

283}
284
285function contentText(content: ToolContent[]): string {
286 return content
287 .filter(
288 (item): item is { type: "text"; text: string } => item.type === "text",
289 )
290 .map((item) => item.text)
291 .join("\n");
292}
293
294function toolErrorPreview(content: ToolContent[]): string | undefined {
295 const text = contentText(content).replace(/\s+/g, " ").trim();

Callers 3

toolErrorPreviewFunction · 0.85
textSummaryFunction · 0.85
createMcpServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected