mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 22:32:27 +08:00
When sending a message, the history was being added twice because: 1. handleExport() triggers exportDiagram() which adds to history 2. AI responds and loadDiagram() is called, which internally triggers another export event in DrawIO, adding a duplicate entry Added expectHistoryExportRef flag to track user-initiated exports and only add to history when the export was explicitly requested.