@xuda.io/ai_module 1.1.4127 → 1.1.4129

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 +4 -8
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1723,8 +1723,8 @@ export const get_chat_conversation = async function (req) {
1723
1723
 
1724
1724
  export const get_ai_chats = async function (req, job_id, headers) {
1725
1725
  let { uid, reference_id, _id, search, filter_type = 'all', conversation_type, limit, skip, conversation_id } = req;
1726
-
1727
- const active_account_profile_id = await account_module.get_active_account_profile(uid);
1726
+ debugger;
1727
+ const active_account_profile_info = await account_module.get_active_account_profile_info(uid);
1728
1728
 
1729
1729
  const get_conversation_background = function (doc) {
1730
1730
  let deg = 145;
@@ -1805,10 +1805,6 @@ export const get_ai_chats = async function (req, job_id, headers) {
1805
1805
  opt.selector.conversation_type = conversation_type;
1806
1806
  }
1807
1807
 
1808
- if (active_account_profile_id) {
1809
- opt.selector.account_profile_id = active_account_profile_id;
1810
- }
1811
-
1812
1808
  if (reference_id) {
1813
1809
  opt.selector.reference_id = reference_id;
1814
1810
  }
@@ -1867,7 +1863,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
1867
1863
  let ai_chats = { docs: [], total_docs: 0 };
1868
1864
 
1869
1865
  if (filter_type !== 'pending') {
1870
- ai_chats = await db_module.find_app_couch_query(app_id, opt);
1866
+ ai_chats = await db_module.find_app_couch_query(active_account_profile_info.app_id, opt);
1871
1867
  if (!limit || conversation_id) {
1872
1868
  ai_chats.total_docs = ai_chats.docs.length;
1873
1869
  } else {
@@ -1876,7 +1872,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
1876
1872
  opt.limit = 9999;
1877
1873
  opt.fields = ['_id'];
1878
1874
 
1879
- const counter = await db_module.find_app_couch_query(app_id, opt);
1875
+ const counter = await db_module.find_app_couch_query(active_account_profile_info.app_id, opt);
1880
1876
  ai_chats.total_docs = counter.docs.length;
1881
1877
  }
1882
1878
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4127",
3
+ "version": "1.1.4129",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",