@xuda.io/ai_module 1.1.4029 → 1.1.4030
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 +28 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -6283,8 +6283,36 @@ export const unpin_ai_agent = async function (req) {
|
|
|
6283
6283
|
|
|
6284
6284
|
ai_agent_doc.studio_meta.pinned = false;
|
|
6285
6285
|
|
|
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: agent_id,
|
|
6295
|
+
},
|
|
6296
|
+
}),
|
|
6297
|
+
),
|
|
6298
|
+
);
|
|
6299
|
+
|
|
6286
6300
|
const save_ret = await db_module.save_app_couch_doc(app_id, ai_agent_doc);
|
|
6287
6301
|
|
|
6302
|
+
global[`_ai_module_ch`].sendToQueue(
|
|
6303
|
+
'ws_dashboard_module',
|
|
6304
|
+
Buffer.from(
|
|
6305
|
+
JSON.stringify({
|
|
6306
|
+
method: 'emit_message_to_dashboard',
|
|
6307
|
+
data: {
|
|
6308
|
+
service: 'ai_agent_pinned',
|
|
6309
|
+
to: [uid],
|
|
6310
|
+
data: agent_id,
|
|
6311
|
+
},
|
|
6312
|
+
}),
|
|
6313
|
+
),
|
|
6314
|
+
);
|
|
6315
|
+
|
|
6288
6316
|
return save_ret;
|
|
6289
6317
|
} catch (err) {
|
|
6290
6318
|
return {
|