@xuda.io/ai_module 1.1.4958 → 1.1.4959

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.
Files changed (2) hide show
  1. package/index.mjs +3 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -48,12 +48,10 @@ import UglifyJS from 'uglify-js';
48
48
 
49
49
  global._ = _;
50
50
 
51
- // const { get_xuda_couch } = await import(`${module_path}/db_module/index.mjs`);
52
-
53
51
  const _common = await import(path.join(process.env.XUDA_HOME, 'common', 'xuda_node_common.mjs'));
54
52
  const _utils = await import(path.join(process.env.XUDA_HOME, 'common', 'xuda-cpi-utils.mjs'));
55
53
 
56
- const { get_active_account_profile_info, get_user_card } = await import(path.join(process.env.XUDA_HOME, 'common', 'cache_cpi.mjs'));
54
+ const { get_active_account_profile_info, get_user_card, get_account_name } = await import(path.join(process.env.XUDA_HOME, 'common', 'cache_cpi.mjs'));
57
55
 
58
56
  const { createDoc, valid_menuType } = await import(`${runtime_modules_path}/xuda-studio-doc-utils.mjs`);
59
57
  const { xudaPrase } = await import(`${runtime_modules_path}/xuda-cli-plugin-html-parser-module.esm.mjs`);
@@ -1836,7 +1834,7 @@ export const get_ai_agent_info = async function (uid, job_id, headers, doc, from
1836
1834
 
1837
1835
  if (!from_marketplace) {
1838
1836
  if (doc?.reference_doc?.studio_meta?.shared_from_uid) {
1839
- const shared_from_uid_ret = await account_ms.get_account_name({ uid_query: doc.reference_doc.studio_meta.shared_from_uid });
1837
+ const shared_from_uid_ret = await get_account_name({ uid_query: doc.reference_doc.studio_meta.shared_from_uid });
1840
1838
  doc.icon_pattern = shared_from_uid_ret.data.profile_avatar;
1841
1839
  }
1842
1840
  }
@@ -3998,7 +3996,7 @@ const ai_chat_conversation = async function (req, job_id, headers) {
3998
3996
  const app_id = await account_ms.get_account_default_project_id(uid);
3999
3997
  const app_obj = await get_app_obj(account_profile_info.app_id);
4000
3998
  const userName = await account_ms.get_user_name(uid);
4001
- const account_info = (await account_ms.get_account_name({ uid })).data;
3999
+ const account_info = (await get_account_name({ uid })).data;
4002
4000
  let context = { ...{ app_id: account_profile_info.app_id, uid, userName, account_info, app_obj, account_id: uid }, ...extractClientInfo(headers) };
4003
4001
  const d = new Intl.DateTimeFormat('en-US').format(new Date());
4004
4002
  if (!visitors[d]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4958",
3
+ "version": "1.1.4959",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",