zames_pro 2.82.1 → 2.82.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.82.3] - 2026-10-22
11
+
12
+ ### Fixed
13
+
14
+ - **answer-parse:** a line-boundary cut never keeps a lone surrogate
15
+
16
+ ## [2.82.2] - 2026-10-22
17
+
18
+ ### Fixed
19
+
20
+ - **banner:** a zero content width still renders the real fields
21
+
10
22
  ## [2.82.1] - 2026-10-22
11
23
 
12
24
  ### Fixed
@@ -23,12 +23,23 @@ export function truncateToolResult(text, limit) {
23
23
  const nl = text.lastIndexOf(NL, limit);
24
24
  // Cut AFTER the newline (include it) so the kept part is a whole number of
25
25
  // lines — a cut that EXCLUDED the newline left a half line before the marker.
26
- if (nl >= searchFrom)
26
+ if (nl >= searchFrom) {
27
27
  cut = nl + 1;
28
- // Never split a surrogate PAIR (an emoji / astral CJK char): the high half
29
- // alone is a lone surrogate — a broken code point some channels replace with
30
- // '?' or truncate at. Step back one unit so the pair is dropped WHOLE.
28
+ // The char that would end the kept text is the one BEFORE the newline.
29
+ // Stepping back here drops only the dangling newline, so the high
30
+ // surrogate is never the last unit the model sees.
31
+ const beforeNl = text.charCodeAt(cut - 2);
32
+ if (beforeNl >= 0xd800 && beforeNl <= 0xdbff) {
33
+ cut--;
34
+ const hi = text.charCodeAt(cut - 1);
35
+ if (hi >= 0xd800 && hi <= 0xdbff)
36
+ cut--;
37
+ }
38
+ }
31
39
  else {
40
+ // Never split a surrogate PAIR (an emoji / astral CJK char): the high half
41
+ // alone is a lone surrogate — a broken code point some channels replace
42
+ // with '?' or truncate at. Step back one unit so the pair is dropped WHOLE.
32
43
  const c = text.charCodeAt(cut - 1);
33
44
  if (c >= 0xd800 && c <= 0xdbff)
34
45
  cut--;
package/dist/banner.js CHANGED
@@ -14,7 +14,14 @@ function width(s) {
14
14
  * longer than the inner width are truncated with an ellipsis.
15
15
  */
16
16
  function box(lines, maxWidth, border = '#c8b06a') {
17
- const inner = Math.max(10, Math.min(maxWidth - 4, Math.max(...lines.map(width)) + 2));
17
+ // A caller may pass 0 ("auto") or a tiny width on a narrow terminal. With
18
+ // `maxWidth - 4` going negative the inner width collapsed to the 10-column
19
+ // floor while every content line was clipped to `inner - 2`, so the title,
20
+ // version and directory were replaced by a bare `…` — the banner was drawn
21
+ // but said nothing. Fall back to a width that still fits the real fields.
22
+ const widest = Math.max(...lines.map(width)) + 2;
23
+ const base = Number.isFinite(maxWidth) && maxWidth >= 12 ? maxWidth : widest + 4;
24
+ const inner = Math.max(10, Math.min(base - 4, widest));
18
25
  const top = theme.prompt('╭' + '─'.repeat(inner) + '╮');
19
26
  const bottom = theme.prompt('╰' + '─'.repeat(inner) + '╯');
20
27
  const body = lines.map((l) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.82.1",
3
+ "version": "2.82.3",
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": {