refactor: undo feature cover every single part of editor

This commit is contained in:
taDuc
2026-05-23 12:23:01 +07:00
parent 3b4ff71b9a
commit 282b365287
47 changed files with 2184 additions and 3311 deletions
+4
View File
@@ -96,6 +96,10 @@ function isSameUndo(a: UndoAction | undefined, b: UndoAction) {
&& JSON.stringify(a.prevReplay) === JSON.stringify(next.prevReplay)
);
}
case "replays": {
const next = b as Extract<UndoAction, { type: "replays" }>;
return a.label === next.label && JSON.stringify(a.prevReplays) === JSON.stringify(next.prevReplays);
}
case "replay_session": {
const next = b as Extract<UndoAction, { type: "replay_session" }>;
return (