@apteva/apteva-kit 0.1.63 → 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
@@ -596,13 +596,14 @@ function parseWidgetsFromText(text) {
596
596
  const trimmedJson = jsonContent.trim();
597
597
  const parsed = JSON.parse(trimmedJson);
598
598
  const widgetId = `widget-${widgetType}-${simpleHash(trimmedJson)}`;
599
- const { meta, ...props } = parsed;
599
+ const { meta, actions, ...props } = parsed;
600
600
  segments.push({
601
601
  type: "widget",
602
602
  widget: {
603
603
  type: widgetType,
604
604
  id: widgetId,
605
605
  props,
606
+ ...actions && { actions },
606
607
  ...meta && { meta }
607
608
  }
608
609
  });
@@ -2695,13 +2696,14 @@ ${widgetContext}` : widgetContext;
2695
2696
  break;
2696
2697
  case "tool_call":
2697
2698
  if (chunk.tool_id && chunk.tool_name) {
2699
+ const displayName = chunk.tool_display_name || chunk.tool_name;
2698
2700
  if (currentTextBuffer) {
2699
2701
  contentSegments.push({ type: "text", content: currentTextBuffer });
2700
2702
  currentTextBuffer = "";
2701
2703
  }
2702
- contentSegments.push({ type: "tool", id: chunk.tool_id, name: chunk.tool_name });
2704
+ contentSegments.push({ type: "tool", id: chunk.tool_id, name: displayName });
2703
2705
  toolInputBuffer = "";
2704
- setChatToolName(chunk.tool_name);
2706
+ setChatToolName(displayName);
2705
2707
  _optionalChain([onToolCall, 'optionalCall', _70 => _70(chunk.tool_name, chunk.tool_id)]);
2706
2708
  updateMessage();
2707
2709
  }
@@ -2920,8 +2922,9 @@ ${commandInstruction}` : commandInstruction;
2920
2922
  const estimatedProgress = Math.min(Math.round(accumulatedContent.length / 10), 90);
2921
2923
  setProgress(estimatedProgress);
2922
2924
  } else if (chunk.type === "tool_call" && chunk.tool_name) {
2925
+ const displayName = chunk.tool_display_name || chunk.tool_name;
2923
2926
  lastToolName = chunk.tool_name;
2924
- setCurrentToolName(chunk.tool_name);
2927
+ setCurrentToolName(displayName);
2925
2928
  _optionalChain([onToolCall, 'optionalCall', _79 => _79(chunk.tool_name, chunk.tool_id || "")]);
2926
2929
  accumulatedContent = "";
2927
2930
  setStreamedContent("");