@xuda.io/ai_module 1.1.4956 → 1.1.4958
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 +8 -8
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -18,8 +18,6 @@ import _ from 'lodash';
|
|
|
18
18
|
import { NodeVM, VMScript } from 'vm2';
|
|
19
19
|
import admin from 'firebase-admin';
|
|
20
20
|
|
|
21
|
-
import { get_active_account_profile_info } from '/var/xuda/common/cache_cpi.mjs ';
|
|
22
|
-
|
|
23
21
|
puppeteer.use(StealthPlugin());
|
|
24
22
|
import process from 'process';
|
|
25
23
|
import { File } from 'node:buffer'; // Node 20+
|
|
@@ -55,6 +53,8 @@ global._ = _;
|
|
|
55
53
|
const _common = await import(path.join(process.env.XUDA_HOME, 'common', 'xuda_node_common.mjs'));
|
|
56
54
|
const _utils = await import(path.join(process.env.XUDA_HOME, 'common', 'xuda-cpi-utils.mjs'));
|
|
57
55
|
|
|
56
|
+
const { get_active_account_profile_info, get_user_card } = await import(path.join(process.env.XUDA_HOME, 'common', 'cache_cpi.mjs'));
|
|
57
|
+
|
|
58
58
|
const { createDoc, valid_menuType } = await import(`${runtime_modules_path}/xuda-studio-doc-utils.mjs`);
|
|
59
59
|
const { xudaPrase } = await import(`${runtime_modules_path}/xuda-cli-plugin-html-parser-module.esm.mjs`);
|
|
60
60
|
const { cast } = await import(`${runtime_modules_path}/xuda-get-cast-util-module.mjs`);
|
|
@@ -1279,7 +1279,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1279
1279
|
let doc = { date_created: e.team_req_date, pending: true, uid: e.team_req_from_uid, team_req_id: e._id };
|
|
1280
1280
|
|
|
1281
1281
|
if (e.team_req_from_uid) {
|
|
1282
|
-
doc.user_contact = await
|
|
1282
|
+
doc.user_contact = await get_user_card(uid, e.team_req_from_uid);
|
|
1283
1283
|
}
|
|
1284
1284
|
|
|
1285
1285
|
//share_item_id
|
|
@@ -1341,7 +1341,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1341
1341
|
// }
|
|
1342
1342
|
// }
|
|
1343
1343
|
|
|
1344
|
-
doc.user_contact = await
|
|
1344
|
+
doc.user_contact = await get_user_card(uid, doc.uid);
|
|
1345
1345
|
|
|
1346
1346
|
doc.privilege = doc.uid === uid || doc?.account_profile_info?.uid === uid;
|
|
1347
1347
|
|
|
@@ -1817,7 +1817,7 @@ export const get_ai_agent_info = async function (uid, job_id, headers, doc, from
|
|
|
1817
1817
|
}
|
|
1818
1818
|
|
|
1819
1819
|
if (doc?.studio_meta?.createdByUid) {
|
|
1820
|
-
doc.user_contact = await
|
|
1820
|
+
doc.user_contact = await get_user_card(uid, doc.studio_meta.createdByUid);
|
|
1821
1821
|
}
|
|
1822
1822
|
if (!from_marketplace) {
|
|
1823
1823
|
doc.interactions = 0;
|
|
@@ -1968,7 +1968,7 @@ export const get_ai_agents = async function (req, job_id, headers) {
|
|
|
1968
1968
|
let doc = { ts: e.team_req_date, pending: true, properties: {}, studio_meta: { createdByUid: e.team_req_from_uid }, team_req_id: e._id };
|
|
1969
1969
|
|
|
1970
1970
|
if (e.team_req_from_uid) {
|
|
1971
|
-
doc.user_contact = await
|
|
1971
|
+
doc.user_contact = await get_user_card(uid, e.team_req_from_uid);
|
|
1972
1972
|
doc.icon_pattern = doc.user_contact.profile_avatar;
|
|
1973
1973
|
}
|
|
1974
1974
|
|
|
@@ -2346,7 +2346,7 @@ export const get_apps = async function (req, job_id, headers) {
|
|
|
2346
2346
|
let doc = { ts: e.team_req_date, pending: true, properties: {}, studio_meta: { createdByUid: e.team_req_from_uid }, team_req_id: e._id };
|
|
2347
2347
|
|
|
2348
2348
|
if (e.team_req_from_uid) {
|
|
2349
|
-
doc.user_contact = await
|
|
2349
|
+
doc.user_contact = await get_user_card(uid, e.team_req_from_uid);
|
|
2350
2350
|
}
|
|
2351
2351
|
|
|
2352
2352
|
//share_item_id
|
|
@@ -2371,7 +2371,7 @@ export const get_apps = async function (req, job_id, headers) {
|
|
|
2371
2371
|
doc.reference_doc = reference_doc;
|
|
2372
2372
|
}
|
|
2373
2373
|
|
|
2374
|
-
doc.user_contact = await
|
|
2374
|
+
doc.user_contact = await get_user_card(uid, doc.studio_meta.createdByUid);
|
|
2375
2375
|
|
|
2376
2376
|
doc.privilege = doc.studio_meta.createdByUid === uid || doc?.studio_meta?.account_profile_info?.uid === uid;
|
|
2377
2377
|
|