Skip to content

Commit deb1946

Browse files
committed
Use stable method name
1 parent 3486dad commit deb1946

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/CodexAcpServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export class CodexAcpServer implements acp.Agent {
245245
return await this.runWithProcessCheck(() => this.codexAcpClient.listSessions(params));
246246
}
247247

248-
async unstable_closeSession(params: acp.CloseSessionRequest): Promise<acp.CloseSessionResponse> {
248+
async closeSession(params: acp.CloseSessionRequest): Promise<acp.CloseSessionResponse> {
249249
logger.log("Closing session...", {sessionId: params.sessionId});
250250
const sessionState = this.getSessionState(params.sessionId);
251251
this.closingSessions.add(params.sessionId);

src/__tests__/CodexACPAgent/CodexAcpClient.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
12051205
});
12061206
});
12071207

1208-
it('removes session bookkeeping after unstable_closeSession', async () => {
1208+
it('removes session bookkeeping after closeSession', async () => {
12091209
const mockFixture = createCodexMockTestFixture();
12101210
const codexAcpAgent = mockFixture.getCodexAcpAgent();
12111211
const codexAcpClient = mockFixture.getCodexAcpClient();
@@ -1223,7 +1223,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
12231223
});
12241224

12251225
await expect(
1226-
codexAcpAgent.unstable_closeSession({sessionId: sessionState.sessionId})
1226+
codexAcpAgent.closeSession({sessionId: sessionState.sessionId})
12271227
).resolves.toEqual({});
12281228
expect(closeSpy).toHaveBeenCalledWith(sessionState.sessionId, sessionState.currentTurnId);
12291229
expect(() => codexAcpAgent.getSessionState(sessionState.sessionId)).toThrow(
@@ -1248,7 +1248,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
12481248
codexAcpAgent.sessions.set(sessionState.sessionId, sessionState);
12491249

12501250
await expect(
1251-
codexAcpAgent.unstable_closeSession({sessionId: sessionState.sessionId})
1251+
codexAcpAgent.closeSession({sessionId: sessionState.sessionId})
12521252
).resolves.toEqual({});
12531253

12541254
expect(closeSpy).toHaveBeenCalledWith(sessionState.sessionId, "turn-pending");
@@ -1284,7 +1284,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
12841284
});
12851285

12861286
await expect(
1287-
codexAcpAgent.unstable_closeSession({sessionId: sessionState.sessionId})
1287+
codexAcpAgent.closeSession({sessionId: sessionState.sessionId})
12881288
).resolves.toEqual({});
12891289

12901290
resolveTryHandle(false);

0 commit comments

Comments
 (0)