@xuda.io/ai_module 1.1.5035 → 1.1.5037
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 +10 -8
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1322,11 +1322,11 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1322
1322
|
|
|
1323
1323
|
//====================
|
|
1324
1324
|
|
|
1325
|
-
let
|
|
1325
|
+
let stat_type = 'all';
|
|
1326
1326
|
|
|
1327
1327
|
switch (filter_type) {
|
|
1328
1328
|
case 'archived': {
|
|
1329
|
-
|
|
1329
|
+
stat_type = 'archived';
|
|
1330
1330
|
break;
|
|
1331
1331
|
}
|
|
1332
1332
|
case 'shared': {
|
|
@@ -1335,11 +1335,11 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1335
1335
|
break;
|
|
1336
1336
|
}
|
|
1337
1337
|
|
|
1338
|
-
case 'mine': {
|
|
1339
|
-
|
|
1338
|
+
// case 'mine': {
|
|
1339
|
+
// opt.selector.uid = uid;
|
|
1340
1340
|
|
|
1341
|
-
|
|
1342
|
-
}
|
|
1341
|
+
// break;
|
|
1342
|
+
// }
|
|
1343
1343
|
|
|
1344
1344
|
default:
|
|
1345
1345
|
// opt.selector.team_req_stat = { $eq: 3 };
|
|
@@ -1347,10 +1347,12 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1347
1347
|
}
|
|
1348
1348
|
|
|
1349
1349
|
const profile_id = account_profile_info.is_main ? account_profile_info.account_profile_id : 'all';
|
|
1350
|
+
const conversation_type = conversation_type ? conversation_type : 'all';
|
|
1351
|
+
const mine_uid = filter_type === 'mine' ? uid : 'all';
|
|
1350
1352
|
|
|
1351
1353
|
const ret = await db_module.get_app_couch_view(account_profile_info.app_id, 'ai_chat_list', {
|
|
1352
|
-
startkey: [profile_id,
|
|
1353
|
-
endkey: [profile_id,
|
|
1354
|
+
startkey: [profile_id, filter_type, conversation_type, reference_id, mine_uid, 0],
|
|
1355
|
+
endkey: [profile_id, filter_type, conversation_type, reference_id, mine_uid, 9999999999999],
|
|
1354
1356
|
limit: parseInt(limit) || 9999,
|
|
1355
1357
|
skip: parseInt(skip) || 0,
|
|
1356
1358
|
include_docs: true,
|