@xuda.io/ai_module 1.1.5402 → 1.1.5404

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.
Files changed (2) hide show
  1. package/index.mjs +22 -11
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4709,22 +4709,33 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4709
4709
  },
4710
4710
  tool_resources,
4711
4711
  modelSettings,
4712
- hooks: {
4713
- onToolStart(context, tool, details) {
4714
- console.log('onToolStart', context, tool, details);
4715
- // emitToDashboard('agent_tool_start', tool.name);
4716
- },
4717
- onToolEnd(context, tool, result, details) {
4718
- console.log('onToolEnd', context, tool, details);
4719
- // emitToDashboard('agent_tool_end', tool.name);
4720
- },
4721
- },
4712
+ // hooks: {
4713
+ // onToolStart(context, tool, details) {
4714
+ // console.log('onToolStart', context, tool, details);
4715
+ // // emitToDashboard('agent_tool_start', tool.name);
4716
+ // },
4717
+ // onToolEnd(context, tool, result, details) {
4718
+ // console.log('onToolEnd', context, tool, details);
4719
+ // // emitToDashboard('agent_tool_end', tool.name);
4720
+ // },
4721
+ // },
4722
4722
  });
4723
4723
 
4724
4724
  if (eligible_agent) {
4725
4725
  // allow read only agents if not ai_agent scope
4726
4726
  if (!prompt_suggestion_activated) {
4727
- init_agent_hooks(agent);
4727
+ // init_agent_hooks(agent);
4728
+ agent.on('onToolStart', (context, tool, details) => {
4729
+ debugger;
4730
+ // emitToDashboard('agent_tool_start', tool.name);
4731
+ // emitToDashboard('stream_phase', `Starting ${tool.name} tool`);
4732
+ });
4733
+
4734
+ agent.on('onToolEnd', (context, tool, details) => {
4735
+ debugger;
4736
+ // emitToDashboard('agent_tool_start', tool.name);
4737
+ // emitToDashboard('stream_phase', `Starting ${tool.name} tool`);
4738
+ });
4728
4739
  }
4729
4740
  list.push(agent);
4730
4741
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5402",
3
+ "version": "1.1.5404",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",