fix: clean language names, remove diagnostic scripts

This commit is contained in:
AgentSeal 2026-04-15 04:49:09 -07:00
parent 7b23fbb57b
commit d6c6e827ea
3 changed files with 3 additions and 47 deletions

View file

@ -1,21 +0,0 @@
const Database = require('better-sqlite3')
const path = require('path')
const os = require('os')
const dbPath = path.join(os.homedir(), 'Library', 'Application Support', 'Cursor', 'User', 'globalStorage', 'state.vscdb')
const db = new Database(dbPath, { readonly: true })
const rows = db.prepare(`
SELECT json_extract(value, '$.createdAt') as ts
FROM cursorDiskKV
WHERE key LIKE 'bubbleId:%'
AND json_extract(value, '$.tokenCount.inputTokens') > 0
ORDER BY json_extract(value, '$.createdAt') DESC
LIMIT 5
`).all()
console.log('Latest 5 timestamps:', rows)
console.log('As dates:', rows.map(r => ({ ts: r.ts, date: new Date(r.ts).toISOString() })))
console.log('Now:', Date.now())
console.log('120 days ago:', Date.now() - 120 * 24 * 60 * 60 * 1000)
db.close()

View file

@ -1,26 +0,0 @@
const Database = require('better-sqlite3')
const path = require('path')
const os = require('os')
const dbPath = path.join(os.homedir(), 'Library', 'Application Support', 'Cursor', 'User', 'globalStorage', 'state.vscdb')
const db = new Database(dbPath, { readonly: true })
const floor = new Date(Date.now() - 120 * 24 * 60 * 60 * 1000).toISOString()
console.log('Time floor:', floor)
const rows = db.prepare(`
SELECT
json_extract(value, '$.tokenCount.inputTokens') as it,
json_extract(value, '$.tokenCount.outputTokens') as ot,
json_extract(value, '$.createdAt') as ts
FROM cursorDiskKV
WHERE key LIKE 'bubbleId:%'
AND json_extract(value, '$.tokenCount.inputTokens') > 0
AND json_extract(value, '$.createdAt') > ?
ORDER BY json_extract(value, '$.createdAt') DESC
LIMIT 5
`).all(floor)
console.log('Rows found:', rows.length)
console.log('Sample:', rows)
db.close()

View file

@ -237,7 +237,10 @@ export function createCursorProvider(dbPathOverride?: string): Provider {
markdown: 'Markdown',
sql: 'SQL',
shell: 'Shell',
shellscript: 'Shell Script',
bash: 'Bash',
typescriptreact: 'TSX',
javascriptreact: 'JSX',
dockerfile: 'Dockerfile',
toml: 'TOML',
}