@xuda.io/ai_module 1.1.4916 → 1.1.4917

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 +10 -12
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -69,6 +69,7 @@ const db_module = await import(`${module_path}/db_module/index.mjs`);
69
69
  const account_ms = await import(`${module_path}/account_module/index_ms.mjs`);
70
70
  const drive_ms = await import(`${module_path}/drive_module/index_ms.mjs`);
71
71
  const jobs_ms = await import(`${module_path}/jobs_module/index_ms.mjs`);
72
+ const team_ms = await import(`${module_path}/team_module/index_ms.mjs`);
72
73
 
73
74
  var open_ai_status = {};
74
75
  const report_ai_status = function (model, err) {
@@ -1372,8 +1373,8 @@ export const delete_ai_chat = async function (req) {
1372
1373
 
1373
1374
  if (conversation_doc.shared_from_uid) {
1374
1375
  // delete the share , the doc will delete by the remove_team_member
1375
- const team_module = await import(`${module_path}/team_module/index.mjs`);
1376
- save_ret = await team_module.remove_team_member({ team_req_id: conversation_doc.team_req_id });
1376
+
1377
+ save_ret = await team_ms.remove_team_member({ team_req_id: conversation_doc.team_req_id });
1377
1378
  } else {
1378
1379
  conversation_doc.stat = 4;
1379
1380
  conversation_doc.ts = Date.now();
@@ -1405,8 +1406,7 @@ export const archive_ai_chat = async function (req) {
1405
1406
  const account_profile_info = await account_ms.get_active_account_profile_info(uid);
1406
1407
 
1407
1408
  try {
1408
- const team_module = await import(`${module_path}/team_module/index.mjs`);
1409
- await team_module.validate_share_exist(uid, 'chat', conversation_id);
1409
+ await team_ms.validate_share_exist(uid, 'chat', conversation_id);
1410
1410
 
1411
1411
  let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
1412
1412
 
@@ -2021,8 +2021,8 @@ export const delete_ai_agent = async function (req) {
2021
2021
  let save_ret;
2022
2022
  if (prog_doc.studio_meta.shared_from_uid) {
2023
2023
  // delete the share , the doc will delete by the remove_team_member
2024
- const team_module = await import(`${module_path}/team_module/index.mjs`);
2025
- save_ret = await team_module.remove_team_member({ team_req_id: prog_doc.studio_meta.team_req_id });
2024
+
2025
+ save_ret = await team_ms.remove_team_member({ team_req_id: prog_doc.studio_meta.team_req_id });
2026
2026
  } else {
2027
2027
  let agent_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, agent_id);
2028
2028
  agent_doc.stat = 4;
@@ -2095,8 +2095,7 @@ export const archive_ai_agent = async function (req) {
2095
2095
  const account_profile_info = await account_ms.get_active_account_profile_info(uid);
2096
2096
 
2097
2097
  try {
2098
- const team_module = await import(`${module_path}/team_module/index.mjs`);
2099
- await team_module.validate_share_exist(uid, 'ai_agent', agent_id);
2098
+ await team_ms.validate_share_exist(uid, 'ai_agent', agent_id);
2100
2099
 
2101
2100
  let agent_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, agent_id);
2102
2101
 
@@ -2120,8 +2119,7 @@ export const archive_mini_app = async function (req) {
2120
2119
  const account_profile_info = await account_ms.get_active_account_profile_info(uid);
2121
2120
 
2122
2121
  try {
2123
- const team_module = await import(`${module_path}/team_module/index.mjs`);
2124
- await team_module.validate_share_exist(uid, 'miniapp', prog_id);
2122
+ await team_ms.validate_share_exist(uid, 'miniapp', prog_id);
2125
2123
 
2126
2124
  let prog_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, prog_id);
2127
2125
 
@@ -2176,8 +2174,8 @@ export const delete_mini_app = async function (req) {
2176
2174
  let save_ret;
2177
2175
  if (prog_doc.studio_meta.shared_from_uid) {
2178
2176
  // delete the share , the doc will delete by the remove_team_member
2179
- const team_module = await import(`${module_path}/team_module/index.mjs`);
2180
- save_ret = await team_module.remove_team_member({ team_req_id: prog_doc.studio_meta.team_req_id });
2177
+
2178
+ save_ret = await team_ms.remove_team_member({ team_req_id: prog_doc.studio_meta.team_req_id });
2181
2179
  } else {
2182
2180
  prog_doc.stat = 4;
2183
2181
  prog_doc.ts = Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4916",
3
+ "version": "1.1.4917",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",