MCPcopy Index your code
hub / github.com/simstudioai/sim / runWithUndoRedoRecordingSuspended

Function runWithUndoRedoRecordingSuspended

apps/sim/stores/undo-redo/store.ts:35–44  ·  view source on GitHub ↗
(
  callback: () => Promise<T> | T
)

Source from the content-addressed store, hash-verified

33 * @returns The callback result.
34 */
35export async function runWithUndoRedoRecordingSuspended<T>(
36 callback: () => Promise<T> | T
37): Promise<T> {
38 recordingSuspendDepth += 1
39 try {
40 return await Promise.resolve(callback())
41 } finally {
42 recordingSuspendDepth = Math.max(0, recordingSuspendDepth - 1)
43 }
44}
45
46function getStackKey(workflowId: string, userId: string): string {
47 return `${workflowId}:${userId}`

Callers 2

store.test.tsFile · 0.90
useUndoRedoFunction · 0.90

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected