@xuda.io/ai_module 1.1.5332 → 1.1.5334

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 +8 -7
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1997,7 +1997,7 @@ export const get_ai_agents = async function (req, job_id, headers) {
1997
1997
  }
1998
1998
 
1999
1999
  case 'purchased': {
2000
- opt.selector['studio_meta.installed_from_uid'] = { $gt: null };
2000
+ opt.selector['studio_meta.installed_from_app_uid'] = { $gt: null };
2001
2001
  break;
2002
2002
  }
2003
2003
 
@@ -2102,8 +2102,9 @@ export const get_ai_agents = async function (req, job_id, headers) {
2102
2102
  doc.reference_doc = reference_doc;
2103
2103
  doc.stat = reference_doc.stat;
2104
2104
  }
2105
+ debugger;
2105
2106
  // purchased
2106
- if (doc.studio_meta.installed_from_uid && doc.studio_meta.installed_from_app_id) {
2107
+ if (doc.studio_meta.installed_from_app_uid && doc.studio_meta.installed_from_app_id) {
2107
2108
  reference_doc = _.cloneDeep(doc);
2108
2109
  doc = await db_module.get_app_couch_doc_native(reference_doc.studio_meta.installed_from_app_id, doc._id);
2109
2110
  doc.reference_doc = reference_doc;
@@ -4348,9 +4349,9 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4348
4349
  const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.shared_from_uid);
4349
4350
  ai_agent_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, ai_agent_doc.studio_meta.share_item_id);
4350
4351
  ai_agent_doc.reference_doc = reference_doc;
4351
- } else if (ai_agent_doc.studio_meta.installed_from_uid) {
4352
+ } else if (ai_agent_doc.studio_meta.installed_from_app_uid) {
4352
4353
  const reference_doc = _.cloneDeep(ai_agent_doc);
4353
- const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.installed_from_uid);
4354
+ const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.installed_from_app_uid);
4354
4355
  ai_agent_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, ai_agent_doc.studio_meta.share_item_id);
4355
4356
  ai_agent_doc.reference_doc = reference_doc;
4356
4357
  }
@@ -4672,7 +4673,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4672
4673
 
4673
4674
  const tool = await get_plugin_tool(
4674
4675
  ai_agent_doc?.reference_doc?.studio_meta?.shared_from_app_id || ai_agent_doc?.reference_doc?.studio_meta?.installed_from_app_id || account_profile_info.app_id,
4675
- ai_agent_doc?.reference_doc?.studio_meta?.shared_from_uid || ai_agent_doc?.reference_doc?.studio_meta?.installed_from_uid || uid,
4676
+ ai_agent_doc?.reference_doc?.studio_meta?.shared_from_uid || ai_agent_doc?.reference_doc?.studio_meta?.installed_from_app_uid || uid,
4676
4677
  val.plugin_id,
4677
4678
  val.plugin_method,
4678
4679
  {},
@@ -11096,9 +11097,9 @@ export const get_chat_suggestions = async function (req) {
11096
11097
  const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.shared_from_uid);
11097
11098
  ai_agent_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, ai_agent_doc.studio_meta.share_item_id);
11098
11099
  ai_agent_doc.reference_doc = reference_doc;
11099
- } else if (ai_agent_doc.studio_meta.installed_from_uid) {
11100
+ } else if (ai_agent_doc.studio_meta.installed_from_app_uid) {
11100
11101
  const reference_doc = _.cloneDeep(ai_agent_doc);
11101
- const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.installed_from_uid);
11102
+ const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.installed_from_app_uid);
11102
11103
  ai_agent_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, ai_agent_doc.studio_meta.share_item_id);
11103
11104
  ai_agent_doc.reference_doc = reference_doc;
11104
11105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5332",
3
+ "version": "1.1.5334",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",