Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/CodexAcpServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1963,7 +1963,6 @@ export class CodexAcpServer {
logger.log("Prompt handled by a command");
await this.codexAcpClient.waitForSessionNotifications(params.sessionId);
if (commandResult.turnCompleted?.turn.status === "interrupted") {
await this.notifyConversationInterrupted(params.sessionId);
return this.cancelledPromptResponse(sessionState);
}
const error = eventHandler.getFailure();
Expand Down Expand Up @@ -2044,7 +2043,6 @@ export class CodexAcpServer {

if (turnCompleted.turn.status === "interrupted") {
await eventHandler.flushPendingPlanUpdates();
await this.notifyConversationInterrupted(params.sessionId);
return this.cancelledPromptResponse(sessionState);
}

Expand Down Expand Up @@ -2121,7 +2119,6 @@ export class CodexAcpServer {
await this.codexAcpClient.waitForSessionNotifications(params.sessionId);
if (turnCompleted.turn.status === "interrupted") {
await eventHandler.flushPendingPlanUpdates();
await this.notifyConversationInterrupted(params.sessionId);
return this.cancelledPromptResponse(sessionState);
}

Expand Down Expand Up @@ -2226,16 +2223,6 @@ export class CodexAcpServer {
};
}

private async notifyConversationInterrupted(sessionId: string): Promise<void> {
if (this.sessionIsClosing(sessionId) || !this.sessions.has(sessionId)) {
return;
}
await this.connection.notify(acp.methods.client.session.update, {
sessionId,
update: createAgentTextMessageChunk("*Conversation interrupted*"),
});
}

private buildQuotaMeta(sessionState: SessionState): { quota: QuotaMeta } {
const lastTokenUsage = sessionState.lastTokenUsage;

Expand Down
1 change: 0 additions & 1 deletion src/__tests__/CodexACPAgent/session-close.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ describe("ACP session close", () => {
const requestMethods = fixture.getCodexConnectionEvents([])
.flatMap(event => event.eventType === "request" ? [event.method] : []);
expect(requestMethods).toEqual(["thread/unsubscribe"]);
expect(fixture.getAcpConnectionDump([])).not.toContain("Conversation interrupted");
expect(() => codexAcpAgent.getSessionState(sessionId)).toThrow(`Session ${sessionId} not found`);

fixture.clearCodexConnectionDump();
Expand Down