@xuda.io/ai_module 1.1.4031 → 1.1.4032
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 +15 -16
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6266,6 +6266,19 @@ export const pin_ai_agent = async function (req) {
|
|
|
6266
6266
|
|
|
6267
6267
|
const save_ret = await db_module.save_app_couch_doc(app_id, ai_agent_doc);
|
|
6268
6268
|
|
|
6269
|
+
global[`_ai_module_ch`].sendToQueue(
|
|
6270
|
+
'ws_dashboard_module',
|
|
6271
|
+
Buffer.from(
|
|
6272
|
+
JSON.stringify({
|
|
6273
|
+
method: 'emit_message_to_dashboard',
|
|
6274
|
+
data: {
|
|
6275
|
+
service: 'ai_agent_pinned',
|
|
6276
|
+
to: [uid],
|
|
6277
|
+
data: await get_ai_agent_info(uid, job_id, headers, ai_agent_doc),
|
|
6278
|
+
},
|
|
6279
|
+
}),
|
|
6280
|
+
),
|
|
6281
|
+
);
|
|
6269
6282
|
return save_ret;
|
|
6270
6283
|
} catch (err) {
|
|
6271
6284
|
return {
|
|
@@ -6283,20 +6296,6 @@ export const unpin_ai_agent = async function (req, job_id, headers) {
|
|
|
6283
6296
|
|
|
6284
6297
|
ai_agent_doc.studio_meta.pinned = false;
|
|
6285
6298
|
|
|
6286
|
-
global[`_ai_module_ch`].sendToQueue(
|
|
6287
|
-
'ws_dashboard_module',
|
|
6288
|
-
Buffer.from(
|
|
6289
|
-
JSON.stringify({
|
|
6290
|
-
method: 'emit_message_to_dashboard',
|
|
6291
|
-
data: {
|
|
6292
|
-
service: 'ai_agent_unpinned',
|
|
6293
|
-
to: [uid],
|
|
6294
|
-
data: await get_ai_agent_info(uid, job_id, headers, ai_agent_doc),
|
|
6295
|
-
},
|
|
6296
|
-
}),
|
|
6297
|
-
),
|
|
6298
|
-
);
|
|
6299
|
-
|
|
6300
6299
|
const save_ret = await db_module.save_app_couch_doc(app_id, ai_agent_doc);
|
|
6301
6300
|
|
|
6302
6301
|
global[`_ai_module_ch`].sendToQueue(
|
|
@@ -6305,9 +6304,9 @@ export const unpin_ai_agent = async function (req, job_id, headers) {
|
|
|
6305
6304
|
JSON.stringify({
|
|
6306
6305
|
method: 'emit_message_to_dashboard',
|
|
6307
6306
|
data: {
|
|
6308
|
-
service: '
|
|
6307
|
+
service: 'ai_agent_unpinned',
|
|
6309
6308
|
to: [uid],
|
|
6310
|
-
data:
|
|
6309
|
+
data: await get_ai_agent_info(uid, job_id, headers, ai_agent_doc),
|
|
6311
6310
|
},
|
|
6312
6311
|
}),
|
|
6313
6312
|
),
|