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

Function source

packages/core/src/instruction-context.ts:29–38  ·  view source on GitHub ↗
(value: ReadonlyArray<File> | SystemContext.Unavailable)

Source from the content-addressed store, hash-verified

27 const registry = yield* SystemContextRegistry.Service
28
29 const source = (value: ReadonlyArray<File> | SystemContext.Unavailable) =>
30 SystemContext.make({
31 key,
32 codec: Schema.toCodecJson(Files),
33 load: Effect.succeed(value),
34 baseline: render,
35 update: (_previous, current) =>
36 `These instructions replace all previously loaded ambient instructions.\n\n${render(current)}`,
37 removed: () => "Previously loaded instructions no longer apply.",
38 })
39
40 const observe = Effect.fn("InstructionContext.observe")(function* () {
41 const start = FSUtil.resolve(location.directory)

Callers 1

Calls 2

renderFunction · 0.70
makeMethod · 0.45

Tested by

no test coverage detected