Skip to content

Commit 3487c8b

Browse files
committed
fix: return session id when loading sessions
1 parent edd908b commit 3487c8b

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/AcpExtensions.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export type LegacyNewSessionResponse = NewSessionResponse & {
3434
}
3535

3636
export type LegacyLoadSessionResponse = LoadSessionResponse & {
37+
sessionId: SessionId;
3738
models?: LegacySessionModelState | null;
3839
}
3940

‎src/CodexAcpServer.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ export class CodexAcpServer {
538538
availableModelCount: modelState.availableModels.length
539539
});
540540
return {
541+
sessionId,
541542
models: modelState,
542543
modes: modeState,
543544
...this.createSessionConfigOptionsResponse(this.getSessionState(sessionId)),

‎src/__tests__/CodexACPAgent/load-session.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,9 @@ describe("CodexACPAgent - loadSession", () => {
216216
cwd: "/test/project",
217217
mcpServers: [],
218218
};
219-
await codexAcpAgent.loadSession(loadParams);
219+
const response = await codexAcpAgent.loadSession(loadParams);
220220

221+
expect(response.sessionId).toBe(thread.id);
221222
expect(codexAppServerClient.threadRead).toHaveBeenCalledWith({
222223
threadId: thread.id,
223224
includeTurns: true,

0 commit comments

Comments
 (0)