Skip to content

Commit 2674228

Browse files
committed
Test thread read during session load
1 parent b2c7191 commit 2674228

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/__tests__/CodexACPAgent/CodexAcpClient.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,9 @@ describe('ACP server test', { timeout: 40_000 }, () => {
329329
reasoningEffort: "medium",
330330
serviceTier: null,
331331
} as any);
332+
const threadReadSpy = vi.spyOn(codexAppServerClient, "threadRead").mockResolvedValue({
333+
thread: {id: "thread-id"} as any,
334+
});
332335
vi.spyOn(codexAppServerClient, "listModels").mockResolvedValue({
333336
data: [createTestModel({id: "gpt-5"})],
334337
nextCursor: null,
@@ -356,6 +359,10 @@ describe('ACP server test', { timeout: 40_000 }, () => {
356359
"/workspace": {trust_level: "trusted"},
357360
"/workspace/load-extra": {trust_level: "trusted"},
358361
});
362+
expect(threadReadSpy).toHaveBeenCalledWith({
363+
threadId: "thread-id",
364+
includeTurns: true,
365+
});
359366
});
360367

361368
it('rejects malformed ACP additional directories', async () => {

0 commit comments

Comments
 (0)