core: let models layer infer its own type so layer composition no longer requires matching explicit requirements
This commit is contained in:
@@ -112,9 +112,7 @@ export interface Interface {
|
|||||||
|
|
||||||
export class Service extends Context.Service<Service, Interface>()("@opencode/ModelsDev") {}
|
export class Service extends Context.Service<Service, Interface>()("@opencode/ModelsDev") {}
|
||||||
|
|
||||||
type Requirements = AppFileSystem.Service | HttpClient.HttpClient
|
export const layer = Layer.effect(
|
||||||
|
|
||||||
export const layer: Layer.Layer<Service, never, Requirements> = Layer.effect(
|
|
||||||
Service,
|
Service,
|
||||||
Effect.gen(function* () {
|
Effect.gen(function* () {
|
||||||
const fs = yield* AppFileSystem.Service
|
const fs = yield* AppFileSystem.Service
|
||||||
|
|||||||
Reference in New Issue
Block a user