fix: improve shutdown and project continuity

This commit is contained in:
lofyer
2026-08-07 18:46:26 +08:00
parent 53d18e2b06
commit 954b42ef55
10 changed files with 245 additions and 34 deletions
+3 -2
View File
@@ -806,10 +806,11 @@ export class AssistantDatabase {
const rows = database
.prepare(
includeArchived
? 'SELECT * FROM projects ORDER BY updated_at DESC'
? `SELECT * FROM projects
ORDER BY created_at ASC, rowid ASC`
: `SELECT * FROM projects
WHERE status = 'active'
ORDER BY updated_at DESC`
ORDER BY created_at ASC, rowid ASC`
)
.all() as ProjectRow[]
return rows.map(toProject)