@apteva/apteva-kit 0.1.82 → 0.1.83
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 +22 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -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,16 @@ 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.
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "
|
|
1545
|
+
streamOutput ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "apteva-tool-stream-output", children: [
|
|
1546
|
+
" ",
|
|
1547
|
+
streamOutput
|
|
1548
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1549
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "apteva-tool-status-text", children: " running" }),
|
|
1550
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "apteva-tool-dots", children: [
|
|
1551
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "." }),
|
|
1552
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "." }),
|
|
1553
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "." })
|
|
1554
|
+
] })
|
|
1550
1555
|
] })
|
|
1551
1556
|
] })
|
|
1552
1557
|
] });
|
|
@@ -1764,7 +1769,8 @@ function Message({ message, onAction, enableWidgets, onWidgetRender }) {
|
|
|
1764
1769
|
name: segment.name,
|
|
1765
1770
|
status: segment.status || (segment.result !== void 0 ? "completed" : "running"),
|
|
1766
1771
|
isReceiving: segment.isReceiving,
|
|
1767
|
-
inputLength: segment.inputLength
|
|
1772
|
+
inputLength: segment.inputLength,
|
|
1773
|
+
streamOutput: segment.streamOutput
|
|
1768
1774
|
}
|
|
1769
1775
|
) }, segment.id)
|
|
1770
1776
|
);
|
|
@@ -2986,6 +2992,15 @@ ${widgetContext}` : widgetContext;
|
|
|
2986
2992
|
}
|
|
2987
2993
|
}
|
|
2988
2994
|
break;
|
|
2995
|
+
case "tool_stream":
|
|
2996
|
+
if (chunk.tool_id && chunk.event === "chunk" && chunk.content) {
|
|
2997
|
+
const toolSegment = contentSegments.find((s) => s.type === "tool" && s.id === chunk.tool_id);
|
|
2998
|
+
if (toolSegment) {
|
|
2999
|
+
toolSegment.streamOutput = (toolSegment.streamOutput || "") + chunk.content;
|
|
3000
|
+
updateMessage();
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
break;
|
|
2989
3004
|
case "tool_result":
|
|
2990
3005
|
if (chunk.tool_id) {
|
|
2991
3006
|
const toolSegment = contentSegments.find((s) => s.type === "tool" && s.id === chunk.tool_id);
|