MCPcopy
hub / github.com/OpenCoworkAI/open-codesign / withRun

Function withRun

apps/desktop/src/main/runContext.ts:9–11  ·  view source on GitHub ↗
(runId: string, fn: () => Promise<T> | T)

Source from the content-addressed store, hash-verified

7const storage = new AsyncLocalStorage<RunStore>();
8
9export function withRun<T>(runId: string, fn: () => Promise<T> | T): Promise<T> | T {
10 return storage.run({ runId }, fn);
11}
12
13export function currentRunId(): string | undefined {
14 return storage.getStore()?.runId;

Callers 3

runContext.test.tsFile · 0.90
registerGenerateIpcFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected