@assistant-ui/react 0.5.78 → 0.5.80

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-RRW3NW2F.mjs";
14
14
  import {
15
15
  __export
16
16
  } from "./chunk-BJPOCE4O.mjs";
@@ -3927,17 +3927,15 @@ function assistantDecoderStream() {
3927
3927
  }
3928
3928
  case "c" /* ToolCallDelta */: {
3929
3929
  const { toolCallId, argsTextDelta } = value;
3930
- if (currentToolCall?.id !== toolCallId) {
3931
- throw new Error(
3932
- `Received tool call delta for unknown tool call "${toolCallId}".`
3933
- );
3930
+ const toolName = toolCallNames.get(toolCallId);
3931
+ if (currentToolCall?.id === toolCallId) {
3932
+ currentToolCall.argsText += argsTextDelta;
3934
3933
  }
3935
- currentToolCall.argsText += argsTextDelta;
3936
3934
  controller.enqueue({
3937
3935
  type: "tool-call-delta",
3938
3936
  toolCallType: "function",
3939
- toolCallId: currentToolCall.id,
3940
- toolName: currentToolCall.name,
3937
+ toolCallId,
3938
+ toolName,
3941
3939
  argsTextDelta
3942
3940
  });
3943
3941
  break;