@xuda.io/ai_module 1.1.3683 → 1.1.3685
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.
- package/index.mjs +13 -1
- 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
|
-
|
|
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 } };
|
|
@@ -1774,6 +1780,12 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1774
1780
|
break;
|
|
1775
1781
|
}
|
|
1776
1782
|
|
|
1783
|
+
case 'mine': {
|
|
1784
|
+
opt.selector.uid = uid;
|
|
1785
|
+
|
|
1786
|
+
break;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1777
1789
|
default:
|
|
1778
1790
|
// opt.selector.team_req_stat = { $eq: 3 };
|
|
1779
1791
|
break;
|