feat(sdk,studio): ws-4 — add history:false option; disable unused sdk undo in studio (#1496)

Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>
This commit is contained in:
Vance Ingalls
2026-06-17 16:47:12 -07:00
committed by GitHub
co-authored by Miguel Ángel
parent 53717a77f4
commit e35846176e
2 changed files with 10 additions and 2 deletions
+3 -1
View File
@@ -97,7 +97,9 @@ export function useSdkSession(
// 'change' AND Studio writes explicitly) and race on disk; it would
// also write the full active-composition serialization to the fixed
// persistPath even when an edit targeted a sub-composition file.
const comp = await openComposition(content);
// Studio's editHistory is the authoritative undo stack — SDK history
// is unused dead weight here (forceReloadSdkSession discards it on undo).
const comp = await openComposition(content, { history: false });
// Cleanup may have fired while openComposition was awaited; dispose immediately.
if (cancelled) {
comp.dispose();