zames_pro 2.82.62 → 2.82.63
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 +6 -0
- package/dist/input/layout.js +19 -2
- package/package.json +1 -1
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.82.63] - 2026-10-23
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **tui:** truncateToWidth never cuts inside an ANSI escape
|
|
15
|
+
|
|
10
16
|
## [2.82.62] - 2026-10-23
|
|
11
17
|
|
|
12
18
|
### Fixed
|
package/dist/input/layout.js
CHANGED
|
@@ -322,12 +322,29 @@ export function truncateToWidth(s, maxCols) {
|
|
|
322
322
|
const budget = Math.max(0, width - 1);
|
|
323
323
|
let used = 0;
|
|
324
324
|
let out = '';
|
|
325
|
-
|
|
326
|
-
|
|
325
|
+
let i = 0;
|
|
326
|
+
while (i < text.length) {
|
|
327
|
+
// Copy an ANSI escape WHOLE (zero columns). Counting its code points
|
|
328
|
+
// consumed the budget and the cut landed inside the sequence
|
|
329
|
+
// (`\x1b[3…`), leaving a broken control sequence with no visible text.
|
|
330
|
+
if (text.charCodeAt(i) === 27 && text[i + 1] === '[') {
|
|
331
|
+
let j = i + 2;
|
|
332
|
+
while (j < text.length && !/[A-Za-z]/.test(text[j]))
|
|
333
|
+
j++;
|
|
334
|
+
const seq = text.slice(i, Math.min(j + 1, text.length));
|
|
335
|
+
// A sequence the budget cannot even finish is dropped, never split.
|
|
336
|
+
out += seq;
|
|
337
|
+
i += seq.length;
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
const cp = text.codePointAt(i);
|
|
341
|
+
const w = charWidth(cp);
|
|
327
342
|
if (used + w > budget)
|
|
328
343
|
break;
|
|
344
|
+
const ch = String.fromCodePoint(cp);
|
|
329
345
|
out += ch;
|
|
330
346
|
used += w;
|
|
347
|
+
i += ch.length;
|
|
331
348
|
}
|
|
332
349
|
return out + '…';
|
|
333
350
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zames_pro",
|
|
3
|
-
"version": "2.82.
|
|
3
|
+
"version": "2.82.63",
|
|
4
4
|
"description": "Terminal coding agent that drives a real browser to chat with DeepSeek, Qwen and other web LLMs — 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": {
|