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

Function bindPrimarySession

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

Source from the content-addressed store, hash-verified

57 };
58
59 const bindPrimarySession = (sessionId: string, transcriptPath: string, allowSwitch = false): void => {
60 if (primarySessionId && primarySessionId !== sessionId && !allowSwitch) {
61 logger.debug(`[codex-local]: Ignoring non-primary SessionStart hook ${sessionId}; primary is ${primarySessionId}`);
62 return;
63 }
64 primarySessionId = sessionId;
65 primaryTranscriptPath = transcriptPath;
66 session.onSessionFound(sessionId);
67 hookReady = true;
68 session.onTranscriptPathFound(transcriptPath);
69 };
70
71 const processTranscriptPath = async (transcriptPath: string): Promise<void> => {
72 hookReady = true;

Callers 1

handleSessionHookFunction · 0.85

Calls 2

debugMethod · 0.80
onTranscriptPathFoundMethod · 0.45

Tested by

no test coverage detected