(sessionId: string, transcriptPath: string, allowSwitch = false)
| 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; |
no test coverage detected