@xuda.io/ai_module 1.1.3966 → 1.1.3968
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 +16 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -961,6 +961,7 @@ const get_account_info = async function (uid) {
|
|
|
961
961
|
};
|
|
962
962
|
|
|
963
963
|
const get_user_name = async function (uid) {
|
|
964
|
+
debugger;
|
|
964
965
|
try {
|
|
965
966
|
const account_info = await get_account_info(uid);
|
|
966
967
|
let username = 'unknown';
|
|
@@ -2371,6 +2372,21 @@ export const get_ai_agent_info = async function (uid, job_id, headers, doc, from
|
|
|
2371
2372
|
return doc;
|
|
2372
2373
|
};
|
|
2373
2374
|
|
|
2375
|
+
const get_user_ai_agents = async function (uid) {
|
|
2376
|
+
const app_id = await account_module.get_account_default_project_id(uid);
|
|
2377
|
+
let opt = {
|
|
2378
|
+
selector: {
|
|
2379
|
+
docType: 'studio',
|
|
2380
|
+
stat: 3,
|
|
2381
|
+
'properties.menuType': 'ai_agent',
|
|
2382
|
+
},
|
|
2383
|
+
limit: limit || 9999,
|
|
2384
|
+
skip: skip || 0,
|
|
2385
|
+
sort: ['ts'],
|
|
2386
|
+
};
|
|
2387
|
+
user_agents = await db_module.find_app_couch_query(app_id, opt);
|
|
2388
|
+
};
|
|
2389
|
+
|
|
2374
2390
|
export const get_ai_agents = async function (req, job_id, headers) {
|
|
2375
2391
|
let { uid, _id, search, filter_type = 'all', limit, skip, ai_agent_id } = req;
|
|
2376
2392
|
|