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

Function getPreviousXml

frontend/components/chat-panel.tsx:765–772  ·  view source on GitHub ↗
(beforeIndex: number)

Source from the content-addressed store, hash-verified

763 // Helper functions for message actions (regenerate/edit)
764 // Extract previous XML snapshot before a given message index
765 const getPreviousXml = (beforeIndex: number): string => {
766 const snapshotKeys = Array.from(xmlSnapshotsRef.current.keys())
767 .filter((k) => k < beforeIndex)
768 .sort((a, b) => b - a)
769 return snapshotKeys.length > 0
770 ? xmlSnapshotsRef.current.get(snapshotKeys[0]) || ""
771 : ""
772 }
773
774 // Restore diagram from snapshot and update ref
775 const restoreDiagramFromSnapshot = (savedXml: string) => {

Callers 2

handleRegenerateFunction · 0.85
handleEditMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected