Compare commits

...

1 Commits

Author SHA1 Message Date
Aiden Cline c0d06deefd fix(server): share listener memo map 2026-06-12 17:44:26 -05:00
+2 -1
View File
@@ -12,6 +12,7 @@ import { WebSocketTracker } from "./routes/instance/httpapi/websocket-tracker"
import { PublicApi } from "./routes/instance/httpapi/public"
import type { CorsOptions } from "./cors"
import { lazy } from "@/util/lazy"
import { memoMap } from "@opencode-ai/core/effect/memo-map"
// @ts-ignore This global is needed to prevent ai-sdk from logging warnings to stdout https://github.com/vercel/ai/blob/2dc67e0ef538307f21368db32d5a12345d98831b/packages/ai/src/logger/log-warnings.ts#L85
globalThis.AI_SDK_LOG_WARNINGS = false
@@ -123,7 +124,7 @@ function startWithPortFallback(opts: ListenOptions) {
function startListener(opts: ListenOptions, port: number) {
const scope = Scope.makeUnsafe()
return Layer.buildWithMemoMap(listenerLayer(opts, port), Layer.makeMemoMapUnsafe(), scope).pipe(
return Layer.buildWithMemoMap(listenerLayer(opts, port), memoMap, scope).pipe(
Effect.provide(HttpApiApp.context),
Effect.onError(() => Scope.close(scope, Exit.void).pipe(Effect.ignore)),
Effect.map(