mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-01 15:32:11 +08:00
12 lines
452 B
TypeScript
12 lines
452 B
TypeScript
import { rm } from "fs/promises"
|
|
import { Database } from "@/storage/db"
|
|
import { disposeAllInstances } from "./fixture"
|
|
|
|
export async function resetDatabase() {
|
|
await disposeAllInstances().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)
|
|
}
|