zames_pro 2.67.1 → 2.67.3

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,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.67.3] - 2026-10-08
11
+
12
+ ### Fixed
13
+
14
+ - **input:** a terminal resize no longer clears the whole viewport. The
15
+ 2.67.2 fix removed the duplicate footer by clearing the screen (`ESC[2J`),
16
+ but that pushed the history above into the scrollback and left a blank gap
17
+ between the input line and the text the operator was reading. The block is
18
+ now erased with a RELATIVE move (the cursor row within the block), which
19
+ lands on the block top row after a reflow and clears ONLY our own rows —
20
+ the history above stays visible and in place.
21
+
22
+ ## [2.67.2] - 2026-10-08
23
+
24
+ ### Fixed
25
+
26
+ - **input:** a terminal resize no longer leaves a DUPLICATE of the status/
27
+ input block on screen. After a resize the terminal re-flows the lines
28
+ above the block, so the old code re-pinned by padding to the bottom and
29
+ scrolled the previous copy of the block back into view. The repaint now
30
+ clears the visible viewport (`ESC[2J`) before re-pinning; this clears the
31
+ SCREEN, not the scrollback, so the history above is preserved.
32
+
10
33
  ## [2.67.1] - 2026-10-08
11
34
 
12
35
  ### 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);
@@ -685,19 +681,25 @@ export class LineEditor {
685
681
  }
686
682
  _writeBlock() {
687
683
  const cols = process.stdout.columns || 80;
688
- // After a resize the relative erase is unreliable (the terminal
689
- // 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.
684
+ // After a resize the terminal re-flowed the lines above the block, so
685
+ // the block's ABSOLUTE row changed. But the cursor is still on the input
686
+ // line and `_eraseBlock` moves up by the cursor row WITHIN the block — a
687
+ // RELATIVE move that still lands on the block top row, whatever the
688
+ // reflow did. So we clear ONLY our own block (status + input) and leave
689
+ // the history above it visible and in place. We deliberately do NOT clear
690
+ // the whole viewport (ESC[2J): that pushed the history into the scrollback
691
+ // and left a blank gap between the footer and the text the operator was
692
+ // reading (they had to scroll up to see their own chat). `_blockRows` is
693
+ // kept so the shrink-padding (`_padShrink`) can still push a shorter block
694
+ // back down to the bottom.
694
695
  if (this._resizeRepin) {
695
696
  this._resizeRepin = false;
696
697
  this._eraseBlock();
697
698
  this._lastStatusBlock = '';
699
+ // Forget the old block height: after a reflow the shrink-padding must
700
+ // not add scroll (it would push the freshly drawn block up and open a
701
+ // gap above the footer). The normal path records the new height.
698
702
  this._blockRows = 0;
699
- process.stdout.write(ESC + '[H');
700
- this._padToBottom();
701
703
  }
702
704
  // Status line above the input: the spinner/answer text on the left and the
703
705
  // token context right-aligned on the SAME row (10k · 12%). The context is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.67.1",
3
+ "version": "2.67.3",
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": {