@xuda.io/ai_module 1.1.5368 → 1.1.5370

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 +8 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1205,7 +1205,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
1205
1205
  let opt = {
1206
1206
  selector: {
1207
1207
  docType: 'chat_conversation',
1208
- stat: 3,
1208
+ stat: { $lt: 4 },
1209
1209
  reference_id: '',
1210
1210
  },
1211
1211
  limit: limit || 9999,
@@ -4981,6 +4981,13 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4981
4981
  } catch (err) {
4982
4982
  debugger;
4983
4983
 
4984
+ conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
4985
+
4986
+ conversation_doc.ts = Date.now();
4987
+ conversation_doc.stat = 3;
4988
+
4989
+ await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_doc);
4990
+
4984
4991
  if (typeof err === 'string') {
4985
4992
  if (err === 'aborted') {
4986
4993
  emitToDashboard('stream_delta', err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5368",
3
+ "version": "1.1.5370",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",