MCPcopy Index your code
hub / github.com/anomalyco/opencode / restoreWorkspace

Function restoreWorkspace

packages/opencode/src/effect/bridge.ts:14–17  ·  view source on GitHub ↗
(workspace: WorkspaceV2.ID | undefined, fn: () => R)

Source from the content-addressed store, hash-verified

12}
13
14function restoreWorkspace<R>(workspace: WorkspaceV2.ID | undefined, fn: () => R): R {
15 if (workspace !== undefined) return WorkspaceContext.restore(workspace, fn)
16 return fn()
17}
18
19function captureSync() {
20 const fiber = Fiber.getCurrent()

Callers 3

bindFunction · 0.85
fromPromiseFunction · 0.85
makeFunction · 0.85

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected