@xuda.io/ai_module 1.1.3726 → 1.1.3728
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 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2469,11 +2469,18 @@ export const get_ai_agents = async function (req, job_id, headers) {
|
|
|
2469
2469
|
let docs = [];
|
|
2470
2470
|
for (let doc of user_agents.docs) {
|
|
2471
2471
|
let reference_doc;
|
|
2472
|
+
// shares
|
|
2472
2473
|
if (doc.studio_meta.shared_from_uid && doc.studio_meta.shared_from_app_id) {
|
|
2473
2474
|
reference_doc = _.cloneDeep(doc);
|
|
2474
2475
|
doc = await db_module.get_app_couch_doc_native(reference_doc.studio_meta.shared_from_app_id, reference_doc.studio_meta.share_item_id);
|
|
2475
2476
|
doc.reference_doc = reference_doc;
|
|
2476
2477
|
}
|
|
2478
|
+
// purchased
|
|
2479
|
+
if (doc.studio_meta.installed_from_uid && doc.studio_meta.installed_from_app_id) {
|
|
2480
|
+
reference_doc = _.cloneDeep(doc);
|
|
2481
|
+
doc = await db_module.get_app_couch_doc_native(reference_doc.studio_meta.shared_from_app_id, reference_doc.studio_meta.share_item_id);
|
|
2482
|
+
doc.reference_doc = reference_doc;
|
|
2483
|
+
}
|
|
2477
2484
|
|
|
2478
2485
|
let info_doc = await get_ai_agent_info(uid, job_id, headers, doc);
|
|
2479
2486
|
|