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.
@@ -1579,6 +1579,9 @@ async function loop(context, options) {
1579
1579
  }
1580
1580
  }
1581
1581
  if (finishReason === "stop") {
1582
+ if (!text) {
1583
+ continue;
1584
+ }
1582
1585
  return text || "Task completed.";
1583
1586
  }
1584
1587
  if (finishReason === "length") {
@@ -1610,6 +1613,9 @@ async function loop(context, options) {
1610
1613
  }
1611
1614
  continue;
1612
1615
  }
1616
+ if (!text) {
1617
+ continue;
1618
+ }
1613
1619
  return text || "Task completed.";
1614
1620
  } catch (error) {
1615
1621
  if (options?.abortSignal?.aborted || error?.name === "AbortError") {