@flutchai/flutch-sdk 0.6.10 → 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.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
- if (Array.isArray(chunk.tool_call_chunks) && chunk.tool_call_chunks.length > 0) {
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) {
@@ -6357,9 +6362,10 @@ var UniversalGraphModule = class _UniversalGraphModule {
6357
6362
  // Graph engines
6358
6363
  {
6359
6364
  provide: LangGraphEngine,
6360
- useFactory: /* @__PURE__ */ __name((eventProcessor) => new LangGraphEngine(eventProcessor, void 0), "useFactory"),
6365
+ useFactory: /* @__PURE__ */ __name((eventProcessor, configService) => new LangGraphEngine(eventProcessor, configService), "useFactory"),
6361
6366
  inject: [
6362
- EventProcessor
6367
+ EventProcessor,
6368
+ ConfigService
6363
6369
  ]
6364
6370
  },
6365
6371
  BuilderRegistryService,