Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/opencode/src/provider/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -961,11 +961,12 @@ export namespace Provider {
}
}

const layer: Layer.Layer<Service, never, Config.Service | Auth.Service> = Layer.effect(
const layer: Layer.Layer<Service, never, Config.Service | Auth.Service | Plugin.Service> = Layer.effect(
Service,
Effect.gen(function* () {
const config = yield* Config.Service
const auth = yield* Auth.Service
const plugin = yield* Plugin.Service

const cache = yield* InstanceState.make<State>(() =>
Effect.gen(function* () {
Expand Down Expand Up @@ -1128,7 +1129,7 @@ export namespace Provider {
}
}

const plugins = yield* Effect.promise(() => Plugin.list())
const plugins = yield* plugin.list()
for (const plugin of plugins) {
if (!plugin.auth) continue
const providerID = ProviderID.make(plugin.auth.provider)
Expand Down Expand Up @@ -1541,7 +1542,11 @@ export namespace Provider {
}),
)

export const defaultLayer = layer.pipe(Layer.provide(Config.defaultLayer), Layer.provide(Auth.defaultLayer))
export const defaultLayer = layer.pipe(
Layer.provide(Config.defaultLayer),
Layer.provide(Auth.defaultLayer),
Layer.provide(Plugin.defaultLayer),
)

const { runPromise } = makeRuntime(Service, defaultLayer)

Expand Down
Loading