@itsaplan/runner 0.8.0 → 0.8.1

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.
Files changed (2) hide show
  1. package/dist/cli.js +8 -9
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -552,6 +552,7 @@ class AnswerStream {
552
552
  send;
553
553
  messageId;
554
554
  queued = [];
555
+ unsent = [];
555
556
  text = "";
556
557
  started = false;
557
558
  line = "";
@@ -603,15 +604,13 @@ class AnswerStream {
603
604
  }
604
605
  async sendQueued() {
605
606
  this.drainText();
606
- if (this.queued.length === 0)
607
- return;
608
- const batch = this.queued;
609
- this.queued = [];
610
- try {
611
- await this.send(batch);
612
- } catch (err) {
613
- this.queued.unshift(...batch);
614
- throw err;
607
+ while (this.unsent.length > 0 || this.queued.length > 0) {
608
+ if (this.unsent.length === 0) {
609
+ this.unsent = this.queued;
610
+ this.queued = [];
611
+ }
612
+ await this.send(this.unsent);
613
+ this.unsent = [];
615
614
  }
616
615
  }
617
616
  async finish(fallback) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itsaplan/runner",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Runs an Itsaplan external agent's queued tasks and answers its chat on your own machine",
5
5
  "keywords": [
6
6
  "itsaplan",