MCPcopy Create free account
hub / github.com/ResearAI/AutoFigure / isMinimalDiagram

Function isMinimalDiagram

frontend/app/api/chat/route.ts:64–67  ·  view source on GitHub ↗
(xml: string)

Source from the content-addressed store, hash-verified

62
63// Helper function to check if diagram is minimal/empty
64function isMinimalDiagram(xml: string): boolean {
65 const stripped = xml.replace(/\s/g, "")
66 return !stripped.includes('id="2"')
67}
68
69// Helper function to replace historical tool call XML with placeholders
70// This reduces token usage and forces LLM to rely on the current diagram XML (source of truth)

Callers 1

handleChatRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected