@flutchai/flutch-sdk 0.6.11 → 0.6.12
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.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5384,6 +5384,10 @@ var EventProcessor = class _EventProcessor {
|
|
|
5384
5384
|
...acc.attachments,
|
|
5385
5385
|
...attachments
|
|
5386
5386
|
];
|
|
5387
|
+
this.sendDelta(channel, {
|
|
5388
|
+
type: "attachments_added",
|
|
5389
|
+
attachments
|
|
5390
|
+
}, onPartial);
|
|
5387
5391
|
this.logger.debug("[ATTACHMENTS] Extracted from send_attachments event", {
|
|
5388
5392
|
extractedCount: attachments.length,
|
|
5389
5393
|
totalAccCount: acc.attachments.length
|
|
@@ -5398,7 +5402,8 @@ var EventProcessor = class _EventProcessor {
|
|
|
5398
5402
|
if (chunk.content) {
|
|
5399
5403
|
blocks.push(...this.normalizeContentBlocks(chunk.content));
|
|
5400
5404
|
}
|
|
5401
|
-
|
|
5405
|
+
const contentHasToolBlocks = blocks.some((block) => block?.type === "tool_use" || block?.type === "tool_call" || block?.type === "input_json_delta");
|
|
5406
|
+
if (!contentHasToolBlocks && Array.isArray(chunk.tool_call_chunks) && chunk.tool_call_chunks.length > 0) {
|
|
5402
5407
|
blocks.push(...this.toolCallChunksToBlocks(chunk.tool_call_chunks));
|
|
5403
5408
|
}
|
|
5404
5409
|
if (blocks.length > 0) {
|