@apteva/apteva-kit 0.1.33 → 0.1.34

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/dist/index.mjs CHANGED
@@ -2288,6 +2288,7 @@ var Chat = forwardRef(function Chat2({
2288
2288
  onFileUpload,
2289
2289
  onComplete,
2290
2290
  onError,
2291
+ onToolCall,
2291
2292
  onToolResult,
2292
2293
  // UI
2293
2294
  placeholder,
@@ -2480,6 +2481,7 @@ ${widgetContext}` : widgetContext;
2480
2481
  contentSegments.push({ type: "tool", id: chunk.tool_id, name: chunk.tool_name });
2481
2482
  toolInputBuffer = "";
2482
2483
  setChatToolName(chunk.tool_name);
2484
+ onToolCall?.(chunk.tool_name, chunk.tool_id);
2483
2485
  updateMessage();
2484
2486
  }
2485
2487
  break;
@@ -2699,6 +2701,7 @@ ${commandInstruction}` : commandInstruction;
2699
2701
  } else if (chunk.type === "tool_call" && chunk.tool_name) {
2700
2702
  lastToolName = chunk.tool_name;
2701
2703
  setCurrentToolName(chunk.tool_name);
2704
+ onToolCall?.(chunk.tool_name, chunk.tool_id || "");
2702
2705
  accumulatedContent = "";
2703
2706
  setStreamedContent("");
2704
2707
  } else if (chunk.type === "tool_result") {