@xuda.io/ai_module 1.1.5333 → 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.
- package/index.mjs +7 -7
- 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.
|
|
2000
|
+
opt.selector['studio_meta.installed_from_app_uid'] = { $gt: null };
|
|
2001
2001
|
break;
|
|
2002
2002
|
}
|
|
2003
2003
|
|
|
@@ -2104,7 +2104,7 @@ export const get_ai_agents = async function (req, job_id, headers) {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
debugger;
|
|
2106
2106
|
// purchased
|
|
2107
|
-
if (doc.studio_meta.
|
|
2107
|
+
if (doc.studio_meta.installed_from_app_uid && doc.studio_meta.installed_from_app_id) {
|
|
2108
2108
|
reference_doc = _.cloneDeep(doc);
|
|
2109
2109
|
doc = await db_module.get_app_couch_doc_native(reference_doc.studio_meta.installed_from_app_id, doc._id);
|
|
2110
2110
|
doc.reference_doc = reference_doc;
|
|
@@ -4349,9 +4349,9 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4349
4349
|
const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.shared_from_uid);
|
|
4350
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);
|
|
4351
4351
|
ai_agent_doc.reference_doc = reference_doc;
|
|
4352
|
-
} else if (ai_agent_doc.studio_meta.
|
|
4352
|
+
} else if (ai_agent_doc.studio_meta.installed_from_app_uid) {
|
|
4353
4353
|
const reference_doc = _.cloneDeep(ai_agent_doc);
|
|
4354
|
-
const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.
|
|
4354
|
+
const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.installed_from_app_uid);
|
|
4355
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);
|
|
4356
4356
|
ai_agent_doc.reference_doc = reference_doc;
|
|
4357
4357
|
}
|
|
@@ -4673,7 +4673,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
|
|
|
4673
4673
|
|
|
4674
4674
|
const tool = await get_plugin_tool(
|
|
4675
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,
|
|
4676
|
-
ai_agent_doc?.reference_doc?.studio_meta?.shared_from_uid || ai_agent_doc?.reference_doc?.studio_meta?.
|
|
4676
|
+
ai_agent_doc?.reference_doc?.studio_meta?.shared_from_uid || ai_agent_doc?.reference_doc?.studio_meta?.installed_from_app_uid || uid,
|
|
4677
4677
|
val.plugin_id,
|
|
4678
4678
|
val.plugin_method,
|
|
4679
4679
|
{},
|
|
@@ -11097,9 +11097,9 @@ export const get_chat_suggestions = async function (req) {
|
|
|
11097
11097
|
const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.shared_from_uid);
|
|
11098
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);
|
|
11099
11099
|
ai_agent_doc.reference_doc = reference_doc;
|
|
11100
|
-
} else if (ai_agent_doc.studio_meta.
|
|
11100
|
+
} else if (ai_agent_doc.studio_meta.installed_from_app_uid) {
|
|
11101
11101
|
const reference_doc = _.cloneDeep(ai_agent_doc);
|
|
11102
|
-
const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.
|
|
11102
|
+
const app_id = await get_account_default_project_id(ai_agent_doc.studio_meta.installed_from_app_uid);
|
|
11103
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);
|
|
11104
11104
|
ai_agent_doc.reference_doc = reference_doc;
|
|
11105
11105
|
}
|