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

Function init

packages/opencode/src/tool/tool.ts:171–181  ·  view source on GitHub ↗
(
  info: Info<P, M>,
)

Source from the content-addressed store, hash-verified

169}
170
171export function init<P extends Schema.Decoder<unknown>, M extends Metadata>(
172 info: Info<P, M>,
173): Effect.Effect<Def<P, M>> {
174 return Effect.gen(function* () {
175 const init = yield* info.init()
176 return {
177 ...init,
178 id: info.id,
179 }
180 })
181}
182
183export * as Tool from "./tool"

Callers 1

wrapFunction · 0.70

Calls 1

initMethod · 0.45

Tested by

no test coverage detected