@xuda.io/ai_module 1.1.5454 → 1.1.5455

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 +7 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4156,9 +4156,10 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4156
4156
  try {
4157
4157
  if (!conversation_item_id && out_conversation_item_save_ret.code < 0) throw new Error(out_conversation_item_save_ret.data);
4158
4158
 
4159
+ let conversation_item_doc;
4159
4160
  if (conversation_item_id) {
4160
- const conversation_item_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_item_id);
4161
- prompt = conversation_item_doc.text || conversation_item_doc.prompt;
4161
+ conversation_item_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_item_id);
4162
+ // prompt = conversation_item_doc.text || conversation_item_doc.prompt;
4162
4163
  chat_suggestion_activated = true;
4163
4164
  }
4164
4165
 
@@ -4897,6 +4898,10 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4897
4898
  stream,
4898
4899
  };
4899
4900
 
4901
+ if (chat_suggestion_activated) {
4902
+ opt.previousResponseId = conversation_item_doc.conversation_item_reference_id;
4903
+ }
4904
+
4900
4905
  // await update_job('submitting chat');
4901
4906
  emitToDashboard('stream_phase', 'Submitting chat', { update: true });
4902
4907
  init_agent_hooks(_agent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5454",
3
+ "version": "1.1.5455",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",