@xuda.io/ai_module 1.1.5096 → 1.1.5098
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 +3 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1359,7 +1359,6 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1359
1359
|
};
|
|
1360
1360
|
|
|
1361
1361
|
const get_data_view_conversation_items = async function () {
|
|
1362
|
-
debugger;
|
|
1363
1362
|
let stat_type = filter_type === 'archived' ? 'archived' : 'all';
|
|
1364
1363
|
|
|
1365
1364
|
const ret = await db_module.get_app_couch_view(account_profile_info.app_id, 'chat_conversation_list_items', {
|
|
@@ -1374,10 +1373,10 @@ export const get_ai_chats = async function (req, job_id, headers) {
|
|
|
1374
1373
|
let conversations = {};
|
|
1375
1374
|
let docs = [];
|
|
1376
1375
|
for (let val of ret.rows || []) {
|
|
1377
|
-
if (!conversations[val.value.
|
|
1378
|
-
conversations[val.value.
|
|
1376
|
+
if (!conversations[val.value.conversation_item_id]) {
|
|
1377
|
+
conversations[val.value.conversation_item_id] = {};
|
|
1379
1378
|
}
|
|
1380
|
-
conversations[val.value.
|
|
1379
|
+
conversations[val.value.conversation_item_id][val.value.type] = val.doc;
|
|
1381
1380
|
}
|
|
1382
1381
|
|
|
1383
1382
|
for (let val of ret.rows || []) {
|