@apteva/apteva-kit 0.1.84 → 0.1.86
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 +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2991,11 +2991,19 @@ ${widgetContext}` : widgetContext;
|
|
|
2991
2991
|
}
|
|
2992
2992
|
break;
|
|
2993
2993
|
case "tool_stream":
|
|
2994
|
-
if (chunk.tool_id
|
|
2994
|
+
if (chunk.tool_id) {
|
|
2995
2995
|
const toolSegment = contentSegments.find((s) => s.type === "tool" && s.id === chunk.tool_id);
|
|
2996
2996
|
if (toolSegment) {
|
|
2997
|
-
|
|
2998
|
-
|
|
2997
|
+
if (chunk.event === "chunk" && chunk.content) {
|
|
2998
|
+
if (toolSegment.pendingReset) {
|
|
2999
|
+
toolSegment.streamOutput = "";
|
|
3000
|
+
toolSegment.pendingReset = false;
|
|
3001
|
+
}
|
|
3002
|
+
toolSegment.streamOutput = (toolSegment.streamOutput || "") + chunk.content;
|
|
3003
|
+
updateMessage();
|
|
3004
|
+
} else if (chunk.event === "log" || chunk.event === "progress") {
|
|
3005
|
+
toolSegment.pendingReset = true;
|
|
3006
|
+
}
|
|
2999
3007
|
}
|
|
3000
3008
|
}
|
|
3001
3009
|
break;
|