MCPcopy Create free account
hub / github.com/HELPMEEADICE/doge-code / getExistingSessionFile

Method getExistingSessionFile

src/utils/sessionStorage.ts:1331–1346  ·  view source on GitHub ↗
(
    sessionId: UUID,
  )

Source from the content-addressed store, hash-verified

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()) {

Callers 1

appendEntryMethod · 0.95

Calls 5

statFunction · 0.85
isFsInaccessibleFunction · 0.85
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected