@xuda.io/ai_module 1.1.3682 → 1.1.3684

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 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1704,7 +1704,13 @@ export const get_chat_conversation = async function (req) {
1704
1704
 
1705
1705
  try {
1706
1706
  const project_db = await get_account_project_db(uid);
1707
- const conversation_doc = await project_db.get(conversation_id);
1707
+ let conversation_doc = await project_db.get(conversation_id);
1708
+ let reference_doc;
1709
+ if (conversation_doc.shared_from_uid) {
1710
+ reference_doc = _.cloneDeep(conversation_doc);
1711
+ conversation_doc = await db_module.get_app_couch_doc_native(reference_doc.shared_from_app_id, reference_doc.share_item_id);
1712
+ conversation_doc.reference_doc = reference_doc;
1713
+ }
1708
1714
  let conversation = await client.conversations.items.list(conversation_id, { limit, order, after });
1709
1715
 
1710
1716
  return { code: 15, data: { conversation, ...conversation_doc } };
@@ -1873,7 +1879,7 @@ export const get_ai_chats = async function (req, job_id, headers) {
1873
1879
 
1874
1880
  if (doc.shared_from_uid) {
1875
1881
  reference_doc = _.cloneDeep(doc);
1876
- doc = reference_doc;
1882
+ doc = await db_module.get_app_couch_doc_native(reference_doc.shared_from_app_id, reference_doc.share_item_id);
1877
1883
  doc.reference_doc = reference_doc;
1878
1884
  }
1879
1885
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3682",
3
+ "version": "1.1.3684",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",