(
sessionId: UUID,
)
| 1329 | */ |
| 1330 | private existingSessionFiles = new Map<string, string>() |
| 1331 | private async getExistingSessionFile( |
| 1332 | sessionId: UUID, |
| 1333 | ): Promise<string | null> { |
| 1334 | const cached = this.existingSessionFiles.get(sessionId) |
| 1335 | if (cached) return cached |
| 1336 | |
| 1337 | const targetFile = getTranscriptPathForSession(sessionId) |
| 1338 | try { |
| 1339 | await stat(targetFile) |
| 1340 | this.existingSessionFiles.set(sessionId, targetFile) |
| 1341 | return targetFile |
| 1342 | } catch (e) { |
| 1343 | if (isFsInaccessible(e)) return null |
| 1344 | throw e |
| 1345 | } |
| 1346 | } |
| 1347 | |
| 1348 | private async persistToRemote(sessionId: UUID, entry: TranscriptMessage) { |
| 1349 | if (isShuttingDown()) { |
no test coverage detected