@xuda.io/ai_module 1.1.3918 → 1.1.3920
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 +1 -26
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1855,38 +1855,13 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1855
1855
|
requests_from.docs.push(doc);
|
|
1856
1856
|
}
|
|
1857
1857
|
}
|
|
1858
|
-
|
|
1859
|
-
// if (filter_type === 'shared' || filter_type === 'all') {
|
|
1860
|
-
// const from_opt = { selector: { docType: 'team_request', access_type: 'chat', team_req_stat: 3, team_req_to_uid: uid }, fields: ['_id', 'team_req_date', 'sender_account_info.email', 'team_req_from_uid', 'share_item_id'] };
|
|
1861
|
-
// const requests_from_res = await db_module.find_couch_query('xuda_team', from_opt);
|
|
1862
|
-
|
|
1863
|
-
// for await (let e of requests_from_res.docs) {
|
|
1864
|
-
// // let doc = { date_created: e.team_req_date, shared_from_uid: e.team_req_from_uid, uid: e.team_req_from_uid, team_req_id: e._id };
|
|
1865
|
-
|
|
1866
|
-
// // if (e.team_req_from_uid) {
|
|
1867
|
-
// // doc.user_contact = await account_module.get_user_card(uid, e.team_req_from_uid);
|
|
1868
|
-
// // }
|
|
1869
|
-
|
|
1870
|
-
// //share_item_id
|
|
1871
|
-
// const app_id = await account_module.get_account_default_project_id(e.team_req_from_uid);
|
|
1872
|
-
// const chat_doc = await db_module.get_app_couch_doc_native(app_id, e.share_item_id);
|
|
1873
|
-
// let doc = chat_doc;
|
|
1874
|
-
// doc.team_req_info = e;
|
|
1875
|
-
// doc.user_contact = await account_module.get_user_card(uid, e.team_req_from_uid);
|
|
1876
|
-
// // doc.title = chat_ret.title;
|
|
1877
|
-
// // doc.chat_image = chat_ret.chat_image;
|
|
1878
|
-
// // doc.team_req_id = e._id;
|
|
1879
|
-
|
|
1880
|
-
// requests_from.docs.push(doc);
|
|
1881
|
-
// }
|
|
1882
|
-
// }
|
|
1883
1858
|
}
|
|
1884
1859
|
|
|
1885
1860
|
// const ai_chats = await db_module.get_app_couch_view(app_id, 'ai_chat_list', {
|
|
1886
1861
|
// key: reference_id || '',
|
|
1887
1862
|
// });
|
|
1888
1863
|
let ai_chats = { docs: [], total_docs: 0 };
|
|
1889
|
-
|
|
1864
|
+
|
|
1890
1865
|
if (filter_type !== 'pending') {
|
|
1891
1866
|
ai_chats = await db_module.find_app_couch_query(app_id, opt);
|
|
1892
1867
|
if (!limit || conversation_id) {
|