refactor: move project deletion to module

This commit is contained in:
Haileyesus
2026-04-25 20:45:24 +03:00
parent 447f352e7b
commit 7a82fb54dc
8 changed files with 133 additions and 128 deletions

View File

@@ -161,6 +161,11 @@ export const sessionsDb = {
.all(projectPath) as SessionRow[];
},
deleteSessionsByProjectPath(projectPath: string): void {
const db = getConnection();
db.prepare(`DELETE FROM sessions WHERE project_path = ?`).run(projectPath);
},
getSessionName(sessionId: string, provider: string): string | null {
const db = getConnection();
const row = db