MCPcopy
hub / github.com/codeaashu/claude-code / sessionIdExists

Function sessionIdExists

src/utils/sessionStorage.ts:401–411  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

399}
400
401export function sessionIdExists(sessionId: string): boolean {
402 const projectDir = getProjectDir(getOriginalCwd())
403 const sessionFile = join(projectDir, `${sessionId}.jsonl`)
404 const fs = getFsImplementation()
405 try {
406 fs.statSync(sessionFile)
407 return true
408 } catch {
409 return false
410 }
411}
412
413// exported for testing
414export function getNodeEnv(): string {

Callers 2

runFunction · 0.85
printResumeHintFunction · 0.85

Calls 3

getOriginalCwdFunction · 0.85
getFsImplementationFunction · 0.85
getProjectDirFunction · 0.70

Tested by

no test coverage detected