refactor: centralize client identity (#38148)
This commit is contained in:
parent
dd6c95fdc7
commit
9c38358197
13 changed files with 102 additions and 94 deletions
|
|
@ -9,9 +9,11 @@ export const create = Effect.fn("OpenCode.create")(function* (options: ServerOpt
|
|||
const runtime = yield* Effect.acquireRelease(
|
||||
Effect.sync(() =>
|
||||
ManagedRuntime.make(
|
||||
createEmbeddedRoutes({ ...options, database: { path: ":memory:", ...options.database } }).pipe(
|
||||
Layer.provide(HttpServer.layerServices),
|
||||
),
|
||||
createEmbeddedRoutes({
|
||||
...options,
|
||||
client: options.client ?? "sdk",
|
||||
database: { path: ":memory:", ...options.database },
|
||||
}).pipe(Layer.provide(HttpServer.layerServices)),
|
||||
),
|
||||
),
|
||||
(runtime) => runtime.disposeEffect,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue