fix(coding-agent): decouple codex session cleanup

This commit is contained in:
Mario Zechner
2026-05-04 00:45:56 +02:00
parent 5fa277b320
commit 23420012ab
4 changed files with 30 additions and 7 deletions

View File

@@ -22,6 +22,7 @@ if (typeof process !== "undefined" && (process.versions?.node || process.version
import { getEnvApiKey } from "../env-api-keys.js";
import { clampThinkingLevel } from "../models.js";
import { registerSessionResourceCleanup } from "../session-resources.js";
import type {
Api,
AssistantMessage,
@@ -682,6 +683,8 @@ export function closeOpenAICodexWebSocketSessions(sessionId?: string): void {
websocketSessionCache.clear();
}
registerSessionResourceCleanup(closeOpenAICodexWebSocketSessions);
function isWebSocketSseFallbackActive(sessionId: string | undefined): boolean {
return sessionId ? websocketSseFallbackSessions.has(sessionId) : false;
}