@xuda.io/ai_module 1.1.3601 → 1.1.3603

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/index.mjs +5 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2448,7 +2448,7 @@ export const delete_ai_agent = async function (req) {
2448
2448
  await client.files.delete(file_id);
2449
2449
  }
2450
2450
  }
2451
-
2451
+ delete_depended_chats(uid, agent_id);
2452
2452
  return { code: 9, data };
2453
2453
  } catch (err) {
2454
2454
  return { code: -9, data: err.message };
@@ -2555,7 +2555,7 @@ export const delete_mini_app = async function (req) {
2555
2555
  prog_doc.stat = 4;
2556
2556
  prog_doc.ts = Date.now();
2557
2557
  const save_ret = await db_module.save_app_couch_doc(app_id, prog_doc);
2558
-
2558
+ delete_depended_chats(uid, prog_id);
2559
2559
  return save_ret;
2560
2560
  } catch (err) {
2561
2561
  return { code: -9, data: err.message };
@@ -4911,7 +4911,7 @@ setTimeout(async () => {
4911
4911
 
4912
4912
  // await init_studio_units();
4913
4913
  let ret;
4914
- ret = await delete_depended_chats(uid);
4914
+ // ret = await delete_depended_chats(uid);
4915
4915
  // ret = await run_plugin(app_id, uid, '@xuda.io/xuda-library-plugin-studio-ai-app-builder', 'table_builder', { name: 'test2', prompt: 'build items table', save: true });
4916
4916
  // ret = await run_plugin(app_id, uid, '@xuda.io/xuda-library-plugin-studio-ai-app-builder', 'folder_builder', { name: 'test', prompt: 'build boaz folder', save: true, parentId: 'programs' });
4917
4917
  // ret = await run_plugin(app_id, uid, '@xuda.io/xuda-library-plugin-studio-ai-app-builder', 'alert_builder', { name: 'hero', prompt: 'build warning alert', save: true, parentId: 'programs', alert_display: 'modal', alert_type: 'warning', alert_title: 'hey' });
@@ -5698,9 +5698,9 @@ export const modify_profile_avatar = async function (req, job_id, headers) {
5698
5698
  }
5699
5699
  };
5700
5700
 
5701
- const delete_depended_chats = async function (uid, reference_id = '392_agn_0048da9b2fa2') {
5701
+ const delete_depended_chats = async function (uid, reference_id) {
5702
5702
  const chats_ret = await get_ai_chats({ uid, reference_id });
5703
- console.log(chats_ret.data);
5703
+
5704
5704
  for await (const doc of chats_ret.data.docs) {
5705
5705
  await delete_ai_chat({ conversation_id: doc._id, uid });
5706
5706
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3601",
3
+ "version": "1.1.3603",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",