@xuda.io/ai_module 1.1.3573 → 1.1.3575
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 +12 -7
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2354,10 +2354,15 @@ export const get_ai_agents = async function (req, job_id, headers) {
|
|
|
2354
2354
|
//////////////
|
|
2355
2355
|
|
|
2356
2356
|
const app_id = await account_module.get_account_default_project_id(uid);
|
|
2357
|
-
const user_agents = await db_module.get_app_couch_view(app_id, 'studio_docs_by_type', {
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
});
|
|
2357
|
+
// const user_agents = await db_module.get_app_couch_view(app_id, 'studio_docs_by_type', {
|
|
2358
|
+
// key: 'ai_agent',
|
|
2359
|
+
// include_docs: true,
|
|
2360
|
+
// });
|
|
2361
|
+
|
|
2362
|
+
let user_agents = [];
|
|
2363
|
+
if (filter_type !== 'pending') {
|
|
2364
|
+
user_agents = await db_module.find_app_couch_query(app_id, opt);
|
|
2365
|
+
}
|
|
2361
2366
|
|
|
2362
2367
|
////// FROM - IN
|
|
2363
2368
|
let requests_from = { docs: [] };
|
|
@@ -2392,9 +2397,9 @@ export const get_ai_agents = async function (req, job_id, headers) {
|
|
|
2392
2397
|
//////////////////////
|
|
2393
2398
|
|
|
2394
2399
|
let docs = [];
|
|
2395
|
-
for (let
|
|
2396
|
-
row.value._id = row.id;
|
|
2397
|
-
let doc = await get_ai_agent_info(uid, job_id, headers,
|
|
2400
|
+
for (let doc of user_agents.docs) {
|
|
2401
|
+
// row.value._id = row.id;
|
|
2402
|
+
let doc = await get_ai_agent_info(uid, job_id, headers, doc);
|
|
2398
2403
|
|
|
2399
2404
|
docs.push(doc);
|
|
2400
2405
|
}
|