(
sessionId: UUID,
)
| 1365 | */ |
| 1366 | private existingSessionFiles = new Map<string, string>() |
| 1367 | private async getExistingSessionFile( |
| 1368 | sessionId: UUID, |
| 1369 | ): Promise<string | null> { |
| 1370 | const cached = this.existingSessionFiles.get(sessionId) |
| 1371 | if (cached) return cached |
| 1372 | |
| 1373 | const targetFile = getTranscriptPathForSession(sessionId) |
| 1374 | try { |
| 1375 | await stat(targetFile) |
| 1376 | this.existingSessionFiles.set(sessionId, targetFile) |
| 1377 | return targetFile |
| 1378 | } catch (e) { |
| 1379 | if (isFsInaccessible(e)) return null |
| 1380 | throw e |
| 1381 | } |
| 1382 | } |
| 1383 | |
| 1384 | private async persistToRemote(sessionId: UUID, entry: TranscriptMessage) { |
| 1385 | if (isShuttingDown()) { |
no test coverage detected