chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-02 04:03:59 +00:00
parent f33aec1139
commit becf57ee6a
4 changed files with 247 additions and 251 deletions

View File

@@ -178,10 +178,7 @@ export const layer: Layer.Layer<Service, never, Project.Service> = Layer.effect(
return yield* cachedDisposeAll
})
const provide = <A, E, R, R2>(
input: LoadInput<R2>,
effect: Effect.Effect<A, E, R>,
): Effect.Effect<A, E, R | R2> =>
const provide = <A, E, R, R2>(input: LoadInput<R2>, effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R | R2> =>
load(input).pipe(Effect.flatMap((ctx) => effect.pipe(Effect.provideService(InstanceRef, ctx))))
yield* Effect.addFinalizer(() => disposeAll().pipe(Effect.ignore))

View File

@@ -35,9 +35,8 @@ export const Instance = {
return InstanceStore.runtime.runPromise((store) => store.load(liftLegacyInput(input)))
},
async provide<R>(input: { directory: string; init?: () => Promise<unknown>; fn: () => R }): Promise<R> {
return context.provide(
await Instance.load({ directory: input.directory, init: input.init }),
async () => input.fn(),
return context.provide(await Instance.load({ directory: input.directory, init: input.init }), async () =>
input.fn(),
)
},
get current() {