@xuda.io/ai_module 1.1.4933 → 1.1.4934

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 -11
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1794,21 +1794,13 @@ export const get_ai_agent_info = async function (uid, job_id, headers, doc, from
1794
1794
  return ret;
1795
1795
  };
1796
1796
 
1797
- const chat_conversation_count = async function (contact_id, conversation_id) {
1797
+ const chat_conversation_count = async function (agent_id) {
1798
1798
  const counts_ret = await db_module.get_app_couch_view(account_profile_info.app_id, 'chat_conversation_item_counts', {
1799
1799
  reduce: true,
1800
1800
  group_level: 1,
1801
1801
 
1802
- key: [contact_id, conversation_id],
1803
- });
1804
-
1805
- return counts_ret?.rows?.[0]?.value || 0;
1806
- };
1807
- const chat_conversation_read = async function (contact_id, conversation_id) {
1808
- const counts_ret = await db_module.get_app_couch_view(account_profile_info.app_id, 'chat_conversation_item_read', {
1809
- reduce: true,
1810
- group_level: 2,
1811
- key: [uid, contact_id, conversation_id],
1802
+ startkey: [agent_id, ''],
1803
+ endkey: [agent_id, 'zzzzzz'],
1812
1804
  });
1813
1805
 
1814
1806
  return counts_ret?.rows?.[0]?.value || 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4933",
3
+ "version": "1.1.4934",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",