@apteva/apteva-kit 0.1.82 → 0.1.84
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +20 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -23
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -440,7 +440,7 @@ interface ChatResponse {
|
|
|
440
440
|
widgets?: any[];
|
|
441
441
|
}
|
|
442
442
|
interface StreamChunk {
|
|
443
|
-
type: 'start' | 'thread_id' | 'request_id' | 'content' | 'token' | 'tool_call' | 'tool_input_delta' | 'tool_use' | 'tool_result' | 'stop' | 'widget' | 'complete' | 'done' | 'error';
|
|
443
|
+
type: 'start' | 'thread_id' | 'request_id' | 'content' | 'token' | 'tool_call' | 'tool_input_delta' | 'tool_use' | 'tool_result' | 'tool_stream' | 'stop' | 'widget' | 'complete' | 'done' | 'error';
|
|
444
444
|
content?: string;
|
|
445
445
|
widget?: any;
|
|
446
446
|
thread_id?: string;
|
|
@@ -450,6 +450,8 @@ interface StreamChunk {
|
|
|
450
450
|
tool_display_name?: string;
|
|
451
451
|
error?: string;
|
|
452
452
|
message?: string;
|
|
453
|
+
event?: 'chunk' | 'log' | 'progress';
|
|
454
|
+
progress?: number;
|
|
453
455
|
}
|
|
454
456
|
declare class AptevaClient {
|
|
455
457
|
private config;
|
package/dist/index.d.ts
CHANGED
|
@@ -440,7 +440,7 @@ interface ChatResponse {
|
|
|
440
440
|
widgets?: any[];
|
|
441
441
|
}
|
|
442
442
|
interface StreamChunk {
|
|
443
|
-
type: 'start' | 'thread_id' | 'request_id' | 'content' | 'token' | 'tool_call' | 'tool_input_delta' | 'tool_use' | 'tool_result' | 'stop' | 'widget' | 'complete' | 'done' | 'error';
|
|
443
|
+
type: 'start' | 'thread_id' | 'request_id' | 'content' | 'token' | 'tool_call' | 'tool_input_delta' | 'tool_use' | 'tool_result' | 'tool_stream' | 'stop' | 'widget' | 'complete' | 'done' | 'error';
|
|
444
444
|
content?: string;
|
|
445
445
|
widget?: any;
|
|
446
446
|
thread_id?: string;
|
|
@@ -450,6 +450,8 @@ interface StreamChunk {
|
|
|
450
450
|
tool_display_name?: string;
|
|
451
451
|
error?: string;
|
|
452
452
|
message?: string;
|
|
453
|
+
event?: 'chunk' | 'log' | 'progress';
|
|
454
|
+
progress?: number;
|
|
453
455
|
}
|
|
454
456
|
declare class AptevaClient {
|
|
455
457
|
private config;
|
package/dist/index.js
CHANGED
|
@@ -1521,7 +1521,7 @@ function MarkdownContent({ content, className = "" }) {
|
|
|
1521
1521
|
|
|
1522
1522
|
// src/components/Chat/ToolCall.tsx
|
|
1523
1523
|
|
|
1524
|
-
function ToolCall({ name, status, isReceiving = false, inputLength = 0 }) {
|
|
1524
|
+
function ToolCall({ name, status, isReceiving = false, inputLength = 0, streamOutput }) {
|
|
1525
1525
|
if (status === "preparing") {
|
|
1526
1526
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-tool-card apteva-tool-card-preparing", children: [
|
|
1527
1527
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { className: "apteva-tool-icon apteva-tool-icon-spin", fill: "none", viewBox: "0 0 24 24", children: [
|
|
@@ -1542,11 +1542,14 @@ function ToolCall({ name, status, isReceiving = false, inputLength = 0 }) {
|
|
|
1542
1542
|
] }),
|
|
1543
1543
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "apteva-tool-label", children: [
|
|
1544
1544
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: name }),
|
|
1545
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "apteva-tool-
|
|
1546
|
-
/* @__PURE__ */ _jsxruntime.
|
|
1547
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "
|
|
1548
|
-
/* @__PURE__ */ _jsxruntime.
|
|
1549
|
-
|
|
1545
|
+
streamOutput ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "apteva-tool-stream-separator", children: " \xB7 " }) : null,
|
|
1546
|
+
streamOutput ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "apteva-tool-stream-output", children: streamOutput }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1547
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "apteva-tool-status-text", children: " running" }),
|
|
1548
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "apteva-tool-dots", children: [
|
|
1549
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "." }),
|
|
1550
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "." }),
|
|
1551
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "." })
|
|
1552
|
+
] })
|
|
1550
1553
|
] })
|
|
1551
1554
|
] })
|
|
1552
1555
|
] });
|
|
@@ -1764,7 +1767,8 @@ function Message({ message, onAction, enableWidgets, onWidgetRender }) {
|
|
|
1764
1767
|
name: segment.name,
|
|
1765
1768
|
status: segment.status || (segment.result !== void 0 ? "completed" : "running"),
|
|
1766
1769
|
isReceiving: segment.isReceiving,
|
|
1767
|
-
inputLength: segment.inputLength
|
|
1770
|
+
inputLength: segment.inputLength,
|
|
1771
|
+
streamOutput: segment.streamOutput
|
|
1768
1772
|
}
|
|
1769
1773
|
) }, segment.id)
|
|
1770
1774
|
);
|
|
@@ -2986,6 +2990,15 @@ ${widgetContext}` : widgetContext;
|
|
|
2986
2990
|
}
|
|
2987
2991
|
}
|
|
2988
2992
|
break;
|
|
2993
|
+
case "tool_stream":
|
|
2994
|
+
if (chunk.tool_id && chunk.event === "chunk" && chunk.content) {
|
|
2995
|
+
const toolSegment = contentSegments.find((s) => s.type === "tool" && s.id === chunk.tool_id);
|
|
2996
|
+
if (toolSegment) {
|
|
2997
|
+
toolSegment.streamOutput = chunk.content;
|
|
2998
|
+
updateMessage();
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
break;
|
|
2989
3002
|
case "tool_result":
|
|
2990
3003
|
if (chunk.tool_id) {
|
|
2991
3004
|
const toolSegment = contentSegments.find((s) => s.type === "tool" && s.id === chunk.tool_id);
|