mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 22:32:27 +08:00
The React state update (setChartXML) is async, so chartXMLRef wasn't updated when edit_diagram tool callback checked it. Now we update the ref directly in onFormSubmit, handleRegenerate, and handleEditMessage before sending.