mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
- Rename packages/opencode → packages/tfcode (directory only) - Rename bin/opencode → bin/tfcode (CLI binary) - Rename .opencode → .tfcode (config directory) - Update package.json name and bin field - Update config directory path references (.tfcode) - Keep internal code references as 'opencode' for easy upstream sync - Keep @opencode-ai/* workspace package names This minimal branding approach allows clean merges from upstream opencode repository while providing tfcode branding for users.
12 lines
466 B
TypeScript
12 lines
466 B
TypeScript
import { rm } from "fs/promises"
|
|
import { Instance } from "../../src/project/instance"
|
|
import { Database } from "../../src/storage/db"
|
|
|
|
export async function resetDatabase() {
|
|
await Instance.disposeAll().catch(() => undefined)
|
|
Database.close()
|
|
await rm(Database.Path, { force: true }).catch(() => undefined)
|
|
await rm(`${Database.Path}-wal`, { force: true }).catch(() => undefined)
|
|
await rm(`${Database.Path}-shm`, { force: true }).catch(() => undefined)
|
|
}
|