iansinnott / prompta

ChatGPT UI that is keyboard-centric, mobile friendly, and searchable.
https://chat.prompta.dev
MIT License
154 stars 13 forks source link

Delete server-side db #23

Closed struanb closed 8 months ago

struanb commented 8 months ago

I'd like to delete all my chats that are synced to the chat.prompta.dev db, as I'm planning to export my chats and reimport them under a new db ID (I believe my current db ID may have been exposed in logs I've shared on recent issues).

I could delete each chat manually but that would be laborious.

Can I suggest a 'delete all' function? A good place to put this might be in Settings under Advanced.

iansinnott commented 8 months ago

Yeah that makes sense, agree it would be a good option for the advanced section.

As a workaround, the database is exposed globally in the app as window.db so you can manually run arbitrary SQL against it using the javascript console:

await db.execO(`select count() from message;`)

Or to delete all messages and threads:

await db.exec(`delete from message;`);
await db.exec(`delete from thread;`);
struanb commented 8 months ago

That's neat, thank you.