zames_pro 2.67.1 → 2.67.2

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/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.67.2] - 2026-10-08
11
+
12
+ ### Fixed
13
+
14
+ - **input:** a terminal resize no longer leaves a DUPLICATE of the status/
15
+ input block on screen. After a resize the terminal re-flows the lines
16
+ above the block, so the old code re-pinned by padding to the bottom and
17
+ scrolled the previous copy of the block back into view. The repaint now
18
+ clears the visible viewport (`ESC[2J`) before re-pinning; this clears the
19
+ SCREEN, not the scrollback, so the history above is preserved.
20
+
10
21
  ## [2.67.1] - 2026-10-08
11
22
 
12
23
  ### Changed
package/dist/input.js CHANGED
@@ -213,16 +213,12 @@ export class LineEditor {
213
213
  clearTimeout(this._resizeTimer);
214
214
  this._resizeTimer = setTimeout(() => {
215
215
  this._resizeTimer = null;
216
- // Repaint ONLY the status + input block. We deliberately do NOT clear
217
- // the whole viewport here: the operator's scrollback (the tool-call
218
- // lines and answers printed above the input) must stay on screen.
219
- // The relative `ESC[n A` erase cannot be trusted after a resize: the
220
- // terminal re-flowed the longer wrapped lines and the old block row
221
- // is stale, so the block would be redrawn at the wrong row (artifacts
222
- // / duplicated status). The next block write re-pins from scratch
223
- // (home + pad to bottom) instead of relying on the relative move.
224
- // The scrollback above is still preserved — we only move the cursor
225
- // and pad, and never emit ESC[2J ("losing the history is far worse").
216
+ // Repaint the status + input block at the NEW width. The relative
217
+ // `ESC[n A` erase cannot be trusted after a resize: the terminal
218
+ // re-flowed the longer wrapped lines and the old block row is stale,
219
+ // so the block would be redrawn at the wrong row. The block is
220
+ // therefore re-pinned from scratch on the next write (clear + home +
221
+ // pad to bottom).
226
222
  this._resizeRepin = true;
227
223
  this._render();
228
224
  }, 120);
@@ -687,16 +683,22 @@ export class LineEditor {
687
683
  const cols = process.stdout.columns || 80;
688
684
  // After a resize the relative erase is unreliable (the terminal
689
685
  // re-flowed everything and the cursor row changed). Re-DRAW the block
690
- // from a known position instead: erase what we can, go HOME, fill the
691
- // viewport with blank lines (pushing the old content into the
692
- // scrollback — nothing is lost), then draw at the bottom. We never
693
- // emit ESC[2J here, so the operator's history is preserved.
686
+ // from a known position instead: clear the visible viewport, go HOME,
687
+ // fill it with blank lines, then draw at the bottom. ESC[2J clears the
688
+ // SCREEN, not the scrollback, so the history above is preserved.
694
689
  if (this._resizeRepin) {
695
690
  this._resizeRepin = false;
696
691
  this._eraseBlock();
697
692
  this._lastStatusBlock = '';
698
693
  this._blockRows = 0;
699
- process.stdout.write(ESC + '[H');
694
+ // Clear the VISIBLE viewport before re-pinning. After a resize the
695
+ // terminal re-flowed the lines above the block, and padding to the
696
+ // bottom scrolls the OLD copy of the block back into view — without the
697
+ // clear the old status/input stays on screen as a DUPLICATE of the
698
+ // freshly drawn one (the artifact seen on resize). The scrollback buffer
699
+ // is untouched: ESC[2J clears the screen, NOT the scrollback, so the
700
+ // history printed above is still reachable by scrolling up.
701
+ process.stdout.write(ESC + '[2J' + ESC + '[H');
700
702
  this._padToBottom();
701
703
  }
702
704
  // Status line above the input: the spinner/answer text on the left and the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.67.1",
3
+ "version": "2.67.2",
4
4
  "description": "Terminal coding agent that drives chat.deepseek.com through Playwright — no API key required. Reads and edits files, runs commands, commits to git, like Claude Code / Codex CLI.",
5
5
  "type": "module",
6
6
  "bin": {