zames_pro 2.67.2 → 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,18 @@ 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
+
10
22
  ## [2.67.2] - 2026-10-08
11
23
 
12
24
  ### Fixed
package/dist/input.js CHANGED
@@ -681,25 +681,25 @@ export class LineEditor {
681
681
  }
682
682
  _writeBlock() {
683
683
  const cols = process.stdout.columns || 80;
684
- // After a resize the relative erase is unreliable (the terminal
685
- // re-flowed everything and the cursor row changed). Re-DRAW the block
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.
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.
689
695
  if (this._resizeRepin) {
690
696
  this._resizeRepin = false;
691
697
  this._eraseBlock();
692
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.
693
702
  this._blockRows = 0;
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');
702
- this._padToBottom();
703
703
  }
704
704
  // Status line above the input: the spinner/answer text on the left and the
705
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.2",
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": {