pulse-coder-engine 0.0.1-alpha.12 → 0.0.1-alpha.13

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 CHANGED
@@ -527,6 +527,9 @@ async function loop(context, options) {
527
527
  }
528
528
  }
529
529
  if (finishReason === "stop") {
530
+ if (!text) {
531
+ continue;
532
+ }
530
533
  return text || "Task completed.";
531
534
  }
532
535
  if (finishReason === "length") {
@@ -558,6 +561,9 @@ async function loop(context, options) {
558
561
  }
559
562
  continue;
560
563
  }
564
+ if (!text) {
565
+ continue;
566
+ }
561
567
  return text || "Task completed.";
562
568
  } catch (error) {
563
569
  if (options?.abortSignal?.aborted || error?.name === "AbortError") {