@apteva/apteva-kit 0.1.71 → 0.1.72
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.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -6
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1518,7 +1518,7 @@ function MarkdownContent({ content, className = "" }) {
|
|
|
1518
1518
|
|
|
1519
1519
|
// src/components/Chat/ToolCall.tsx
|
|
1520
1520
|
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1521
|
-
function ToolCall({ name, status, isReceiving = false }) {
|
|
1521
|
+
function ToolCall({ name, status, isReceiving = false, inputLength = 0 }) {
|
|
1522
1522
|
if (status === "preparing") {
|
|
1523
1523
|
return /* @__PURE__ */ jsxs8("div", { className: `apteva-tool-card apteva-tool-card-preparing ${isReceiving ? "apteva-tool-receiving" : ""}`, children: [
|
|
1524
1524
|
/* @__PURE__ */ jsxs8("svg", { className: "apteva-tool-icon apteva-tool-icon-spin", fill: "none", viewBox: "0 0 24 24", children: [
|
|
@@ -1528,10 +1528,10 @@ function ToolCall({ name, status, isReceiving = false }) {
|
|
|
1528
1528
|
/* @__PURE__ */ jsxs8("span", { className: "apteva-tool-label", children: [
|
|
1529
1529
|
/* @__PURE__ */ jsx11("strong", { children: name }),
|
|
1530
1530
|
/* @__PURE__ */ jsx11("span", { className: "apteva-tool-status-text", children: " preparing" }),
|
|
1531
|
-
/* @__PURE__ */ jsxs8("span", { className: "apteva-tool-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1531
|
+
inputLength > 0 && /* @__PURE__ */ jsxs8("span", { className: "apteva-tool-char-count", children: [
|
|
1532
|
+
" (",
|
|
1533
|
+
inputLength,
|
|
1534
|
+
" chars)"
|
|
1535
1535
|
] })
|
|
1536
1536
|
] })
|
|
1537
1537
|
] });
|
|
@@ -1765,7 +1765,8 @@ function Message({ message, onAction, enableWidgets, onWidgetRender }) {
|
|
|
1765
1765
|
{
|
|
1766
1766
|
name: segment.name,
|
|
1767
1767
|
status: segment.status || (segment.result !== void 0 ? "completed" : "running"),
|
|
1768
|
-
isReceiving: segment.isReceiving
|
|
1768
|
+
isReceiving: segment.isReceiving,
|
|
1769
|
+
inputLength: segment.inputLength
|
|
1769
1770
|
}
|
|
1770
1771
|
) }, segment.id)
|
|
1771
1772
|
);
|
|
@@ -2961,6 +2962,7 @@ ${widgetContext}` : widgetContext;
|
|
|
2961
2962
|
const toolSegment = contentSegments.find((s) => s.type === "tool" && s.id === chunk.tool_id);
|
|
2962
2963
|
if (toolSegment) {
|
|
2963
2964
|
toolSegment.isReceiving = true;
|
|
2965
|
+
toolSegment.inputLength = toolInputBuffer.length;
|
|
2964
2966
|
updateMessage();
|
|
2965
2967
|
if (receivingTimeout) clearTimeout(receivingTimeout);
|
|
2966
2968
|
receivingTimeout = setTimeout(() => {
|