zames_pro 2.90.7 → 2.90.8

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,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.90.8] - 2026-10-28
11
+
12
+ ### Fixed
13
+
14
+ - **tui:** copy an OSC escape whole and do not count its body as visible width
15
+
10
16
  ## [2.90.7] - 2026-10-28
11
17
 
12
18
  ### Fixed
@@ -178,6 +178,25 @@ export function visLen(s) {
178
178
  i++;
179
179
  i++;
180
180
  }
181
+ else if (s[i] === ']') {
182
+ // OSC (`ESC ] … BEL` / `ESC ] … ESC \`) — e.g. an OSC-8 hyperlink
183
+ // emitted by renderMarkdown. Its body is NOT visible text: without
184
+ // this branch every URL character counted as a column, so a link line
185
+ // measured far wider than it renders (layout/cursor drift) and
186
+ // truncation cut into the middle of the sequence.
187
+ i++;
188
+ while (i < s.length) {
189
+ if (s.charCodeAt(i) === 7) {
190
+ i++;
191
+ break;
192
+ }
193
+ if (s.charCodeAt(i) === 27 && s[i + 1] === String.fromCharCode(92)) {
194
+ i += 2;
195
+ break;
196
+ }
197
+ i++;
198
+ }
199
+ }
181
200
  continue;
182
201
  }
183
202
  const cp = s.codePointAt(i);
@@ -348,6 +367,29 @@ export function truncateToWidth(s, maxCols) {
348
367
  i += seq.length;
349
368
  continue;
350
369
  }
370
+ // OSC (`ESC ] … BEL` or `ESC ] … ESC \`) is the OTHER escape family and is
371
+ // what renderMarkdown emits for OSC-8 hyperlinks. Without this branch the
372
+ // URL's characters counted as visible columns and the cut landed INSIDE
373
+ // the sequence (`\x1b]…`), destroying the link. Copy it whole too; one
374
+ // whose terminator was already lost is kept as-is rather than half-cut.
375
+ if (text.charCodeAt(i) === 27 && text[i + 1] === ']') {
376
+ let j = i + 2;
377
+ while (j < text.length) {
378
+ if (text[j] === String.fromCharCode(7)) {
379
+ j++;
380
+ break;
381
+ }
382
+ if (text.charCodeAt(j) === 27 && text[j + 1] === '\\') {
383
+ j += 2;
384
+ break;
385
+ }
386
+ j++;
387
+ }
388
+ const seq = text.slice(i, j);
389
+ out += seq;
390
+ i = j;
391
+ continue;
392
+ }
351
393
  const cp = text.codePointAt(i);
352
394
  const w = charWidth(cp);
353
395
  if (used + w > budget)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.90.7",
3
+ "version": "2.90.8",
4
4
  "description": "Terminal coding agent that drives a real browser to chat with DeepSeek, Qwen or GLM — 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": {