ucode-agent 1.24.0 → 1.26.0

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/src/ui/screen.js CHANGED
@@ -340,11 +340,19 @@ export class Screen {
340
340
  * is what makes the transcript read as a sequence of things done rather
341
341
  * than a set of running totals.
342
342
  */
343
- endRun() {
344
- if (this.run) this.paintRun({ live: false });
345
- this.run = null;
346
- this.segment = new Map();
347
- }
343
+ /**
344
+ * Stop adding to the current run, but keep the lines already on screen.
345
+ *
346
+ * A kind of work gets one line for the whole turn. Starting a fresh set
347
+ * whenever the model spoke meant "Creating Tide from the HTML starter" five
348
+ * times down the page and "Reading files" four, each saying the same thing
349
+ * about a different moment. One line that counts up says all of it and
350
+ * costs one row.
351
+ */
352
+ endRun() { this.run = null; }
353
+
354
+ /** A new turn starts with a clean page's worth of lines. */
355
+ newSegment() { this.run = null; this.segment = new Map(); }
348
356
 
349
357
  /** Redraw the run's single line from what it has accumulated. */
350
358
  /**
@@ -869,6 +877,7 @@ export class Screen {
869
877
 
870
878
  /** A turn begins: the timer and step count run until turnEnd(). */
871
879
  turnStart() {
880
+ this.newSegment();
872
881
  this.activity = { start: Date.now(), steps: 0, movedAt: 0 };
873
882
  this.startTimer();
874
883
  }