(id: string)
| 41 | } |
| 42 | |
| 43 | export function loadSessionById(id: string): SessionData | undefined { |
| 44 | try { |
| 45 | return JSON.parse(fs.readFileSync(path.join(getSessionsDir(), `${id}.json`), "utf8")) as SessionData |
| 46 | } catch { |
| 47 | return undefined |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | /** Sessions for a workspace, most recently updated first. */ |
| 52 | export function listSessions(cwd: string): SessionData[] { |
no test coverage detected