@xuda.io/ai_module 1.1.4161 → 1.1.4163

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 +5 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2068,10 +2068,11 @@ const create_image = async function (uid, prompt, model = 'gpt-image-1-mini', si
2068
2068
 
2069
2069
  const get_studio_doc = async function (req) {
2070
2070
  let { uid, _id } = req;
2071
+ const account_profile_info = await account_module.get_active_account_profile_info(uid);
2071
2072
 
2072
2073
  const app_id = await account_module.get_account_default_project_id(uid);
2073
2074
  try {
2074
- let data = await db_module.get_app_couch_doc_native(app_id, _id);
2075
+ let data = await db_module.get_app_couch_doc_native(account_profile_info.app_id, _id);
2075
2076
 
2076
2077
  if (data?.studio_meta?.createdByUid !== uid) delete data.agentConfig; //throw new Error('doctype not supported');
2077
2078
  return { code: 7, data };
@@ -2382,6 +2383,8 @@ export const get_ai_agent_info = async function (uid, job_id, headers, doc, from
2382
2383
  };
2383
2384
 
2384
2385
  const get_user_ai_agents = async function (uid) {
2386
+ const account_profile_info = await account_module.get_active_account_profile_info(uid);
2387
+
2385
2388
  const app_id = await account_module.get_account_default_project_id(uid);
2386
2389
  let opt = {
2387
2390
  selector: {
@@ -2390,7 +2393,7 @@ const get_user_ai_agents = async function (uid) {
2390
2393
  'properties.menuType': 'ai_agent',
2391
2394
  },
2392
2395
  };
2393
- return await db_module.find_app_couch_query(app_id, opt);
2396
+ return await db_module.find_app_couch_query(account_profile_info.app_id, opt);
2394
2397
  };
2395
2398
 
2396
2399
  export const get_ai_agents = async function (req, job_id, headers) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4161",
3
+ "version": "1.1.4163",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",