MCPcopy
hub / github.com/anomalyco/opencode / update

Function update

packages/core/test/location-layer.test.ts:88–102  ·  view source on GitHub ↗
(directory: string)

Source from the content-addressed store, hash-verified

86 )
87
88 const update = (directory: string) =>
89 Effect.gen(function* () {
90 yield* Reference.Service
91 const catalog = yield* Catalog.Service
92 yield* catalog.transform((editor) => editor.provider.update(ProviderV2.ID.make("test"), () => {}))
93 return {
94 providers: yield* catalog.provider.all(),
95 tools: yield* toolDefinitions(yield* ToolRegistry.Service),
96 }
97 }).pipe(
98 Effect.scoped,
99 Effect.provide(
100 LocationServiceMap.Service.get(Location.Ref.make({ directory: AbsolutePath.make(directory) })),
101 ),
102 )
103
104 const blockedState = yield* update(blocked.path)
105 expect(blockedState.providers.some((provider) => provider.id === ProviderV2.ID.make("test"))).toBe(false)

Callers 4

agentHostFunction · 0.50
catalogHostFunction · 0.50
skill.test.tsFile · 0.50

Calls 6

toolDefinitionsFunction · 0.90
updateMethod · 0.65
getMethod · 0.65
transformMethod · 0.45
makeMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected