MCPcopy Create free account
hub / github.com/tiann/hapi / handleSessionFound

Function handleSessionFound

cli/src/codex/codexLocalLauncher.ts:46–53  ·  view source on GitHub ↗
(sessionId: string, allowSwitch = false)

Source from the content-addressed store, hash-verified

44 };
45
46 const handleSessionFound = (sessionId: string, allowSwitch = false): void => {
47 if (primarySessionId && primarySessionId !== sessionId && !allowSwitch) {
48 logger.debug(`[codex-local]: Ignoring non-primary Codex session id ${sessionId}; primary is ${primarySessionId}`);
49 return;
50 }
51 primarySessionId = sessionId;
52 session.onSessionFound(sessionId);
53 };
54
55 const isPrimarySessionId = (sessionId: string): boolean => {
56 return primarySessionId === null || primarySessionId === sessionId;

Callers 1

handleSessionHookFunction · 0.70

Calls 1

debugMethod · 0.80

Tested by

no test coverage detected