@xuda.io/ai_module 1.1.3713 → 1.1.3716
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 +4 -8
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2434,10 +2434,6 @@ export const get_ai_agents = async function (req, job_id, headers) {
|
|
|
2434
2434
|
//////////////
|
|
2435
2435
|
|
|
2436
2436
|
const app_id = await account_module.get_account_default_project_id(uid);
|
|
2437
|
-
// const user_agents = await db_module.get_app_couch_view(app_id, 'studio_docs_by_type', {
|
|
2438
|
-
// key: 'ai_agent',
|
|
2439
|
-
// include_docs: true,
|
|
2440
|
-
// });
|
|
2441
2437
|
|
|
2442
2438
|
let user_agents = { docs: [] };
|
|
2443
2439
|
if (filter_type !== 'pending') {
|
|
@@ -2452,7 +2448,7 @@ export const get_ai_agents = async function (req, job_id, headers) {
|
|
|
2452
2448
|
|
|
2453
2449
|
for await (let e of requests_from_res.docs) {
|
|
2454
2450
|
let doc = { ts: e.team_req_date, pending: true, properties: {}, studio_meta: { createdByUid: e.team_req_from_uid }, team_req_id: e._id };
|
|
2455
|
-
|
|
2451
|
+
|
|
2456
2452
|
if (e.team_req_from_uid) {
|
|
2457
2453
|
doc.user_contact = await account_module.get_user_card(uid, e.team_req_from_uid);
|
|
2458
2454
|
doc.icon_pattern = doc.user_contact.profile_avatar;
|
|
@@ -2460,9 +2456,9 @@ export const get_ai_agents = async function (req, job_id, headers) {
|
|
|
2460
2456
|
|
|
2461
2457
|
//share_item_id
|
|
2462
2458
|
const app_id = await account_module.get_account_default_project_id(e.team_req_from_uid);
|
|
2463
|
-
const
|
|
2464
|
-
doc.properties.menuName =
|
|
2465
|
-
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;
|
|
2466
2462
|
|
|
2467
2463
|
requests_from.docs.push(doc);
|
|
2468
2464
|
}
|