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

Function createContext

apps/sim/executor/orchestrators/loop.test.ts:58–75  ·  view source on GitHub ↗
(scope: Record<string, unknown> = {}, loopId = 'loop-1')

Source from the content-addressed store, hash-verified

56}
57
58function createContext(scope: Record<string, unknown> = {}, loopId = 'loop-1'): ExecutionContext {
59 return {
60 workflowId: 'workflow-1',
61 workspaceId: 'workspace-1',
62 executionId: 'execution-1',
63 userId: 'user-1',
64 blockStates: new Map(),
65 executedBlocks: new Set(),
66 blockLogs: [],
67 metadata: { requestId: 'request-1' },
68 environmentVariables: {},
69 workflowVariables: {},
70 decisions: { router: new Map(), condition: new Map() },
71 completedLoops: new Set(),
72 activeExecutionPath: new Set(),
73 loopExecutions: new Map([[loopId, scope as any]]),
74 } as ExecutionContext
75}
76
77function createOrchestrator(loopConfigs = new Map<string, any>()) {
78 const state = createState()

Callers 6

loop.test.tsFile · 0.70
button-group.tsxFile · 0.50
toast.tsxFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected