@apteva/apteva-kit 0.1.64 → 0.1.65

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.d.mts CHANGED
@@ -443,6 +443,7 @@ interface StreamChunk {
443
443
  request_id?: string;
444
444
  tool_id?: string;
445
445
  tool_name?: string;
446
+ tool_display_name?: string;
446
447
  error?: string;
447
448
  message?: string;
448
449
  }
package/dist/index.d.ts CHANGED
@@ -443,6 +443,7 @@ interface StreamChunk {
443
443
  request_id?: string;
444
444
  tool_id?: string;
445
445
  tool_name?: string;
446
+ tool_display_name?: string;
446
447
  error?: string;
447
448
  message?: string;
448
449
  }
package/dist/index.js CHANGED
@@ -2696,13 +2696,14 @@ ${widgetContext}` : widgetContext;
2696
2696
  break;
2697
2697
  case "tool_call":
2698
2698
  if (chunk.tool_id && chunk.tool_name) {
2699
+ const displayName = chunk.tool_display_name || chunk.tool_name;
2699
2700
  if (currentTextBuffer) {
2700
2701
  contentSegments.push({ type: "text", content: currentTextBuffer });
2701
2702
  currentTextBuffer = "";
2702
2703
  }
2703
- contentSegments.push({ type: "tool", id: chunk.tool_id, name: chunk.tool_name });
2704
+ contentSegments.push({ type: "tool", id: chunk.tool_id, name: displayName });
2704
2705
  toolInputBuffer = "";
2705
- setChatToolName(chunk.tool_name);
2706
+ setChatToolName(displayName);
2706
2707
  _optionalChain([onToolCall, 'optionalCall', _70 => _70(chunk.tool_name, chunk.tool_id)]);
2707
2708
  updateMessage();
2708
2709
  }
@@ -2921,8 +2922,9 @@ ${commandInstruction}` : commandInstruction;
2921
2922
  const estimatedProgress = Math.min(Math.round(accumulatedContent.length / 10), 90);
2922
2923
  setProgress(estimatedProgress);
2923
2924
  } else if (chunk.type === "tool_call" && chunk.tool_name) {
2925
+ const displayName = chunk.tool_display_name || chunk.tool_name;
2924
2926
  lastToolName = chunk.tool_name;
2925
- setCurrentToolName(chunk.tool_name);
2927
+ setCurrentToolName(displayName);
2926
2928
  _optionalChain([onToolCall, 'optionalCall', _79 => _79(chunk.tool_name, chunk.tool_id || "")]);
2927
2929
  accumulatedContent = "";
2928
2930
  setStreamedContent("");