mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
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:
co-authored by
Miguel Ángel
parent
53717a77f4
commit
e35846176e
@@ -48,6 +48,12 @@ export interface OpenCompositionOptions {
|
||||
trackedOrigins?: unknown[];
|
||||
/** Auto-coalesce window for history entries (ms). Default: 300. */
|
||||
coalesceMs?: number;
|
||||
/**
|
||||
* Pass `false` to skip attaching the history module (undo/redo).
|
||||
* Default: history is attached in standalone (non-embedded) mode.
|
||||
* Use when the host owns the undo stack and SDK undo is dead weight.
|
||||
*/
|
||||
history?: false;
|
||||
}
|
||||
|
||||
// ─── Implementation ───────────────────────────────────────────────────────────
|
||||
@@ -495,7 +501,7 @@ export async function openComposition(
|
||||
|
||||
const isEmbedded = opts?.overrides !== undefined;
|
||||
|
||||
if (!isEmbedded) {
|
||||
if (!isEmbedded && opts?.history !== false) {
|
||||
const history = createHistory(session, {
|
||||
coalesceMs: opts?.coalesceMs ?? 300,
|
||||
trackedOrigins: opts?.trackedOrigins,
|
||||
|
||||
Reference in New Issue
Block a user