Skip to content

Commit 3ee7084

Browse files
committed
fixup
1 parent 940ad53 commit 3ee7084

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/server/src/provider/Layers/OpenCodeAdapter.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,6 @@ it.layer(OpenCodeAdapterTestLayer)("OpenCodeAdapterLive", (it) => {
744744
{
745745
type: "session.updated",
746746
properties: {
747-
sessionID: "http://127.0.0.1:9999/session",
748747
info: {
749748
id: "http://127.0.0.1:9999/session",
750749
title: "Investigate OpenCode title sync",

‎apps/server/src/provider/Layers/OpenCodeAdapter.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ function openCodeEventSessionId(event: OpenCodeSubscribedEvent): string | undefi
7676
return undefined;
7777
}
7878

79+
const info = (properties as { readonly info?: { readonly id?: unknown } }).info;
80+
const sessionIDFromInfo = info && typeof info.id === "string" ? info.id : undefined;
81+
if (sessionIDFromInfo) {
82+
return sessionIDFromInfo;
83+
}
7984
const sessionID = (properties as { readonly sessionID?: unknown }).sessionID;
8085
return typeof sessionID === "string" ? sessionID : undefined;
8186
}

0 commit comments

Comments
 (0)