@xuda.io/ai_module 1.1.3715 → 1.1.3717
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 +10 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2456,9 +2456,9 @@ export const get_ai_agents = async function (req, job_id, headers) {
|
|
|
2456
2456
|
|
|
2457
2457
|
//share_item_id
|
|
2458
2458
|
const app_id = await account_module.get_account_default_project_id(e.team_req_from_uid);
|
|
2459
|
-
const
|
|
2460
|
-
doc.properties.menuName =
|
|
2461
|
-
doc.studio_meta.agent_image =
|
|
2459
|
+
const ai_agent_doc = await db_module.get_app_couch_doc_native(app_id, e.share_item_id);
|
|
2460
|
+
doc.properties.menuName = ai_agent_doc.properties.menuName;
|
|
2461
|
+
doc.studio_meta.agent_image = ai_agent_doc.studio_meta.agent_image;
|
|
2462
2462
|
|
|
2463
2463
|
requests_from.docs.push(doc);
|
|
2464
2464
|
}
|
|
@@ -2468,6 +2468,13 @@ export const get_ai_agents = async function (req, job_id, headers) {
|
|
|
2468
2468
|
|
|
2469
2469
|
let docs = [];
|
|
2470
2470
|
for (let doc of user_agents.docs) {
|
|
2471
|
+
let reference_doc;
|
|
2472
|
+
if (doc.studio_meta.shared_from_uid) {
|
|
2473
|
+
reference_doc = _.cloneDeep(doc);
|
|
2474
|
+
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
|
+
doc.reference_doc = reference_doc;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2471
2478
|
let info_doc = await get_ai_agent_info(uid, job_id, headers, doc);
|
|
2472
2479
|
|
|
2473
2480
|
docs.push(info_doc);
|
|
@@ -2780,7 +2787,6 @@ export const get_apps = async function (req, job_id, headers) {
|
|
|
2780
2787
|
let docs = [];
|
|
2781
2788
|
for (let doc of user_apps.docs) {
|
|
2782
2789
|
let reference_doc;
|
|
2783
|
-
|
|
2784
2790
|
if (doc.studio_meta.shared_from_uid) {
|
|
2785
2791
|
reference_doc = _.cloneDeep(doc);
|
|
2786
2792
|
doc = await db_module.get_app_couch_doc_native(reference_doc.studio_meta.shared_from_app_id, reference_doc.studio_meta.share_item_id);
|