MCPcopy
hub / github.com/tone-row/flowchart-fun / addToUndoStack

Function addToUndoStack

app/src/lib/undoStack.ts:9–12  ·  view source on GitHub ↗
(action: UndoAction)

Source from the content-addressed store, hash-verified

7let redoStack: UndoAction[] = [];
8
9export function addToUndoStack(action: UndoAction) {
10 undoStack.push(action);
11 redoStack = []; // Clear redo stack when a new action is performed
12}
13
14export function undo() {
15 const action = undoStack.pop();

Callers 5

acceptDiffFunction · 0.90
useRunAiWithStoreFunction · 0.90
alignNodesFunction · 0.90
alignNodesHorizontallyFunction · 0.90
alignNodesVerticallyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected