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.
@@ -1534,6 +1534,9 @@ async function loop(context, options) {
1534
1534
  }
1535
1535
  }
1536
1536
  if (finishReason === "stop") {
1537
+ if (!text) {
1538
+ continue;
1539
+ }
1537
1540
  return text || "Task completed.";
1538
1541
  }
1539
1542
  if (finishReason === "length") {
@@ -1565,6 +1568,9 @@ async function loop(context, options) {
1565
1568
  }
1566
1569
  continue;
1567
1570
  }
1571
+ if (!text) {
1572
+ continue;
1573
+ }
1568
1574
  return text || "Task completed.";
1569
1575
  } catch (error) {
1570
1576
  if (options?.abortSignal?.aborted || error?.name === "AbortError") {