🐛 create sessions.json

This commit is contained in:
Nate Sesti 2023-12-27 10:03:39 -05:00
parent 2b602635ec
commit 0232de4ae5

View file

@ -27,7 +27,11 @@ export function getSessionFilePath(sessionId: string): string {
}
export function getSessionsListPath(): string {
return path.join(getSessionsFolderPath(), "sessions.json");
const filepath = path.join(getSessionsFolderPath(), "sessions.json");
if (!fs.existsSync(filepath)) {
fs.writeFileSync(filepath, JSON.stringify([]));
}
return filepath;
}
export function getConfigJsonPath(): string {