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

Function get

packages/opencode/src/effect/instance-state.ts:47–50  ·  view source on GitHub ↗
(self: InstanceState<A, E, R>)

Source from the content-addressed store, hash-verified

45 })
46
47export const get = <A, E, R>(self: InstanceState<A, E, R>) =>
48 Effect.gen(function* () {
49 return yield* ScopedCache.get(self.cache, yield* directory)
50 })
51
52export const use = <A, E, R, B>(self: InstanceState<A, E, R>, select: (value: A) => B) => Effect.map(get(self), select)
53

Callers 2

useFunction · 0.70
useEffectFunction · 0.70

Calls 1

getMethod · 0.65

Tested by

no test coverage detected