@assistant-ui/react 0.5.79 → 0.5.81

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
@@ -10,7 +10,7 @@ import {
10
10
  toLanguageModelMessages,
11
11
  toLanguageModelTools,
12
12
  toolResultStream
13
- } from "./chunk-SNNYBBO6.mjs";
13
+ } from "./chunk-RHM73CQE.mjs";
14
14
  import {
15
15
  __export
16
16
  } from "./chunk-BJPOCE4O.mjs";
@@ -3923,12 +3923,21 @@ function assistantDecoderStream() {
3923
3923
  const { toolCallId: id, toolName: name } = value;
3924
3924
  toolCallNames.set(id, name);
3925
3925
  currentToolCall = { id, name, argsText: "" };
3926
+ controller.enqueue({
3927
+ type: "tool-call-delta",
3928
+ toolCallType: "function",
3929
+ toolCallId: id,
3930
+ toolName: name,
3931
+ argsTextDelta: ""
3932
+ });
3926
3933
  break;
3927
3934
  }
3928
3935
  case "c" /* ToolCallDelta */: {
3929
3936
  const { toolCallId, argsTextDelta } = value;
3930
3937
  const toolName = toolCallNames.get(toolCallId);
3931
- currentToolCall.argsText += argsTextDelta;
3938
+ if (currentToolCall?.id === toolCallId) {
3939
+ currentToolCall.argsText += argsTextDelta;
3940
+ }
3932
3941
  controller.enqueue({
3933
3942
  type: "tool-call-delta",
3934
3943
  toolCallType: "function",