MCPcopy Create free account
hub / github.com/anomalyco/opencode / clearEffect

Function clearEffect

packages/opencode/test/config/config.test.ts:122–129  ·  view source on GitHub ↗
(wait = false)

Source from the content-addressed store, hash-verified

120 Config.Service.use((svc) => provideCurrentInstance(svc.get(), ctx)).pipe(Effect.scoped, Effect.provide(layer)),
121 )
122const clearEffect = (wait = false) =>
123 Config.use
124 .invalidate()
125 .pipe(
126 Effect.scoped,
127 Effect.provide(layer),
128 Effect.andThen(wait ? Effect.promise(() => InstanceRuntime.disposeAllInstances()) : Effect.void),
129 )
130const clear = (wait = false) => Effect.runPromise(clearEffect(wait))
131// Get managed config directory from environment (set in preload.ts)
132const managedConfigDir = process.env.OPENCODE_TEST_MANAGED_CONFIG_DIR!

Callers 2

clearFunction · 0.85
withGlobalConfigDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected