fix: handle ISO string timestamps from Cursor database

Cursor stores createdAt as ISO strings ('2026-02-23T06:00:51.123Z'),
not numeric timestamps. Was comparing string against number, so all
rows were filtered out. Now uses ISO string comparison throughout.
This commit is contained in:
AgentSeal 2026-04-15 04:17:56 -07:00
parent f2999da15f
commit c7195c4a17
2 changed files with 12 additions and 13 deletions

View file

@ -3,7 +3,7 @@ import { join } from 'path'
import { homedir } from 'os'
type CacheEntry = {
lastCreatedAt: number
lastCreatedAt: string
dbSizeBytes: number
}
@ -26,7 +26,7 @@ export async function readCursorCache(): Promise<CacheEntry | null> {
}
}
export async function writeCursorCache(lastCreatedAt: number, dbSizeBytes: number): Promise<void> {
export async function writeCursorCache(lastCreatedAt: string, dbSizeBytes: number): Promise<void> {
const dir = getCacheDir()
await mkdir(dir, { recursive: true })
const entry: CacheEntry = { lastCreatedAt, dbSizeBytes }