ai-chat-cleaner 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.mjs +2 -2
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -314,7 +314,7 @@ function isUUID(value) {
314
314
  //#endregion
315
315
  //#region package.json
316
316
  var name = "ai-chat-cleaner";
317
- var version = "0.1.2";
317
+ var version = "0.1.4";
318
318
 
319
319
  //#endregion
320
320
  //#region src/constants.ts
@@ -621,7 +621,7 @@ async function deleteThreads({ threads, globalState, sqlitePath }) {
621
621
  if (sqlitePath) await writeSQLite(sqlitePath, Array.from(threadIds));
622
622
  }
623
623
  async function updateGlobalState(threadIds, globalState) {
624
- if (!globalState) return;
624
+ if (!globalState || !globalState["thread-titles"]) return;
625
625
  for (const id of threadIds) delete globalState["thread-titles"].titles[id];
626
626
  globalState["thread-titles"].order = globalState["thread-titles"].order.filter((id) => !threadIds.has(id));
627
627
  await writeJSON(GLOBAL_STATE_PATH, globalState);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-chat-cleaner",
3
3
  "type": "module",
4
- "version": "0.1.2",
4
+ "version": "0.1.4",
5
5
  "description": "Clean and remove AI chat with an interactive terminal UI.",
6
6
  "author": "jinghaihan",
7
7
  "license": "MIT",