@causyne/agent 1.19.0 → 1.20.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.
@@ -469,6 +469,15 @@ export class StageSurface {
469
469
  return rows.length;
470
470
  }
471
471
 
472
+ /** Clear the transcript without printing through to scrollback (for session switching). */
473
+ clearTranscript() {
474
+ this.evicted = [];
475
+ this.transcript.clear();
476
+ this.lastHeight = 0;
477
+ this.stage.invalidate();
478
+ this.viewport.toBottom();
479
+ }
480
+
472
481
  /**
473
482
  * The terminal changed size. Callers must debounce — ChatPrompt already
474
483
  * settles resize at RESIZE_SETTLE_MS.
@@ -80,14 +80,14 @@ export class StatusLine {
80
80
 
81
81
  /** Session-lifetime facts, set once from the same info as the header. */
82
82
  setSession(info = {}) {
83
- this.model = shortModel(info.model);
84
- this.provider = info.provider ? String(info.provider) : '';
85
- this.tier = info.tier ? String(info.tier) : '';
83
+ if (info.model !== undefined) this.model = shortModel(info.model);
84
+ if (info.provider !== undefined) this.provider = info.provider ? String(info.provider) : '';
85
+ if (info.tier !== undefined) this.tier = info.tier ? String(info.tier) : '';
86
86
  // The idle footer answers "where am I and how much room is left", which is
87
87
  // what opencode's permanent footer shows (cwd left, context right). Neither
88
88
  // fact was reachable once the session header had scrolled away.
89
- this.cwd = info.cwd ? String(info.cwd) : '';
90
- this.contextLimit = Number(info.contextLimit) || 0;
89
+ if (info.cwd !== undefined) this.cwd = info.cwd ? String(info.cwd) : '';
90
+ if (info.contextLimit !== undefined) this.contextLimit = Number(info.contextLimit) || 0;
91
91
  return this;
92
92
  }
93
93