(sessionId: string)
| 399 | } |
| 400 | |
| 401 | export 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 |
| 414 | export function getNodeEnv(): string { |
no test coverage detected