mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-09-02 01:20:23 +08:00
When the LLM generates edit_diagram tool calls, it sometimes produces inconsistent quote escaping in XML attributes within JSON strings. For example: y="-20\" instead of y=\"-20\" This causes JSON parsing to fail, and jsonrepair cannot fix this pattern. Added pre-processing regex to detect and fix cases where the opening quote is unescaped but the closing quote is escaped in attribute values.