@adhdev/daemon-standalone 0.8.91 → 0.8.93

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
@@ -29825,8 +29825,10 @@ var require_dist2 = __commonJS({
29825
29825
  accumulatedRawBuffer = "";
29826
29826
  /** Current visible terminal screen snapshot */
29827
29827
  terminalScreen = new TerminalScreen(24, 80);
29828
- /** Max accumulated buffer size (last 50KB) */
29829
- static MAX_ACCUMULATED_BUFFER = 5e4;
29828
+ /** Max accumulated buffer size. Sized to comfortably hold a single long
29829
+ * Hermes turn (tool calls + reasoning + final bubble) without the
29830
+ * rolling window pushing the turn's ╭─ opening line out of view. */
29831
+ static MAX_ACCUMULATED_BUFFER = 262144;
29830
29832
  currentTurnScope = null;
29831
29833
  traceEntries = [];
29832
29834
  traceSeq = 0;
@@ -30108,8 +30110,20 @@ var require_dist2 = __commonJS({
30108
30110
  }
30109
30111
  }
30110
30112
  this.recentOutputBuffer = (this.recentOutputBuffer + cleanData).slice(-1e3);
30113
+ const prevAccumulatedLen = this.accumulatedBuffer.length;
30114
+ const prevAccumulatedRawLen = this.accumulatedRawBuffer.length;
30111
30115
  this.accumulatedBuffer = (this.accumulatedBuffer + cleanData).slice(-_ProviderCliAdapter.MAX_ACCUMULATED_BUFFER);
30112
30116
  this.accumulatedRawBuffer = (this.accumulatedRawBuffer + rawData).slice(-_ProviderCliAdapter.MAX_ACCUMULATED_BUFFER);
30117
+ if (this.currentTurnScope) {
30118
+ const droppedClean = prevAccumulatedLen + cleanData.length - this.accumulatedBuffer.length;
30119
+ const droppedRaw = prevAccumulatedRawLen + rawData.length - this.accumulatedRawBuffer.length;
30120
+ if (droppedClean > 0) {
30121
+ this.currentTurnScope.bufferStart = Math.max(0, this.currentTurnScope.bufferStart - droppedClean);
30122
+ }
30123
+ if (droppedRaw > 0) {
30124
+ this.currentTurnScope.rawBufferStart = Math.max(0, this.currentTurnScope.rawBufferStart - droppedRaw);
30125
+ }
30126
+ }
30113
30127
  this.resolveStartupState("output");
30114
30128
  this.scheduleSettle();
30115
30129
  }