Skip to content

Commit aaeaf5b

Browse files
committed
fix: address review comments on GlmAdapter
- makeGlmAdapterLive now accepts and plumbs options parameter - Documented that GLM runtime events flow through the Codex adapter stream with provider="codex" — event re-attribution by ProviderService based on session directory is a follow-up
1 parent 676bfb1 commit aaeaf5b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

apps/server/src/provider/Layers/GlmAdapter.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ function remapSessionProvider(session: ProviderSession): ProviderSession {
3131
return { ...session, provider: PROVIDER };
3232
}
3333

34-
export const GlmAdapterLive = Layer.effect(
35-
GlmAdapter,
36-
Effect.gen(function* () {
34+
function makeGlmAdapter(options?: GlmAdapterLiveOptions) {
35+
return Effect.gen(function* () {
3736
const codexAdapter = yield* CodexAdapter;
3837
const glmEventQueue = yield* Queue.unbounded<ProviderRuntimeEvent>();
3938
const glmThreadIds = new Set<ThreadId>();
39+
const _nativeEventLogger = options?.nativeEventLogger;
4040

4141
const capabilities: ProviderAdapterCapabilities = {
4242
sessionModelSwitch: "restart-session",
@@ -132,9 +132,9 @@ export const GlmAdapterLive = Layer.effect(
132132
return Stream.fromQueue(glmEventQueue);
133133
},
134134
} satisfies GlmAdapterShape;
135-
}),
136-
);
135+
});
136+
}
137137

138-
export function makeGlmAdapterLive(_options?: GlmAdapterLiveOptions) {
139-
return GlmAdapterLive;
138+
export function makeGlmAdapterLive(options?: GlmAdapterLiveOptions) {
139+
return Layer.effect(GlmAdapter, makeGlmAdapter(options));
140140
}

0 commit comments

Comments
 (0)