@pentoshi/clai 3.11.5 → 3.11.6
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/dist/tui-v2/components/pager/pager-line.js +7 -4
- package/dist/tui-v2/components/pager/pager-line.js.map +1 -1
- package/dist/tui-v2/components/pager/pager.js +2 -2
- package/dist/tui-v2/components/pager/pager.js.map +1 -1
- package/dist/tui-v2/components/transcript/assistant-message.js +5 -3
- package/dist/tui-v2/components/transcript/assistant-message.js.map +1 -1
- package/dist/tui-v2/components/transcript/file-diff-card.js +3 -0
- package/dist/tui-v2/components/transcript/file-diff-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/selectable-line.d.ts +13 -0
- package/dist/tui-v2/components/transcript/selectable-line.js +11 -0
- package/dist/tui-v2/components/transcript/selectable-line.js.map +1 -1
- package/dist/tui-v2/components/transcript/thinking-block.js +7 -4
- package/dist/tui-v2/components/transcript/thinking-block.js.map +1 -1
- package/dist/tui-v2/components/transcript/tool-card.js +3 -3
- package/dist/tui-v2/components/transcript/tool-card.js.map +1 -1
- package/dist/tui-v2/rendering/pager-chrome.d.ts +14 -3
- package/dist/tui-v2/rendering/pager-chrome.js +86 -23
- package/dist/tui-v2/rendering/pager-chrome.js.map +1 -1
- package/dist/tui-v2/rendering/pager-markdown.js +5 -0
- package/dist/tui-v2/rendering/pager-markdown.js.map +1 -1
- package/dist/ui/code-block.d.ts +8 -0
- package/dist/ui/code-block.js +33 -6
- package/dist/ui/code-block.js.map +1 -1
- package/dist/ui/markdown.js +37 -3
- package/dist/ui/markdown.js.map +1 -1
- package/dist/ui/text-width.d.ts +27 -0
- package/dist/ui/text-width.js +36 -0
- package/dist/ui/text-width.js.map +1 -0
- package/dist/version.generated.d.ts +2 -2
- package/dist/version.generated.js +2 -2
- package/package.json +12 -12
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Column budgeting for text a terminal may shape wider than we measure.
|
|
3
|
+
*
|
|
4
|
+
* `string-width` implements wcwidth: a Devanagari matra counts 0, a ZWJ counts
|
|
5
|
+
* 0, CJK counts 2. OpenTUI's own buffer agrees with that model — verified
|
|
6
|
+
* headlessly, its cells hold whole grapheme clusters and an end-of-row marker
|
|
7
|
+
* survives on Devanagari, CJK, combining-Latin and ZWJ-emoji rows.
|
|
8
|
+
*
|
|
9
|
+
* Real terminals do not always agree. Their font shapers give Devanagari
|
|
10
|
+
* clusters more columns than wcwidth claims, which pushes the tail of such a
|
|
11
|
+
* line into columns the renderer believes are blank. Those cells are outside
|
|
12
|
+
* every row's box, so damage tracking never rewrites them and the tail glyphs
|
|
13
|
+
* pile up down the column as the viewport scrolls (a Hindi poster label seeding
|
|
14
|
+
* a stray `अ`/`ब`/`'` at the pane edge).
|
|
15
|
+
*
|
|
16
|
+
* Reserving the larger of wcwidth and the UTF-16 unit count makes those lines
|
|
17
|
+
* wrap earlier, so the tail never reaches the disputed columns. Confirmed
|
|
18
|
+
* against a real terminal: with this measure the leaked glyph set shrank; with
|
|
19
|
+
* plain `string-width` it grew back. Identical for ASCII, and CJK still gets its
|
|
20
|
+
* double-width treatment.
|
|
21
|
+
*
|
|
22
|
+
* Cost: a complex-script line can wrap a column or two early, and a bordered
|
|
23
|
+
* panel's right edge can sit slightly inside on such rows. Both are cosmetic;
|
|
24
|
+
* the leak is not.
|
|
25
|
+
*/
|
|
26
|
+
/** Columns to reserve for `text` — never fewer than a terminal may use. */
|
|
27
|
+
export declare function renderColumns(text: string): number;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Column budgeting for text a terminal may shape wider than we measure.
|
|
3
|
+
*
|
|
4
|
+
* `string-width` implements wcwidth: a Devanagari matra counts 0, a ZWJ counts
|
|
5
|
+
* 0, CJK counts 2. OpenTUI's own buffer agrees with that model — verified
|
|
6
|
+
* headlessly, its cells hold whole grapheme clusters and an end-of-row marker
|
|
7
|
+
* survives on Devanagari, CJK, combining-Latin and ZWJ-emoji rows.
|
|
8
|
+
*
|
|
9
|
+
* Real terminals do not always agree. Their font shapers give Devanagari
|
|
10
|
+
* clusters more columns than wcwidth claims, which pushes the tail of such a
|
|
11
|
+
* line into columns the renderer believes are blank. Those cells are outside
|
|
12
|
+
* every row's box, so damage tracking never rewrites them and the tail glyphs
|
|
13
|
+
* pile up down the column as the viewport scrolls (a Hindi poster label seeding
|
|
14
|
+
* a stray `अ`/`ब`/`'` at the pane edge).
|
|
15
|
+
*
|
|
16
|
+
* Reserving the larger of wcwidth and the UTF-16 unit count makes those lines
|
|
17
|
+
* wrap earlier, so the tail never reaches the disputed columns. Confirmed
|
|
18
|
+
* against a real terminal: with this measure the leaked glyph set shrank; with
|
|
19
|
+
* plain `string-width` it grew back. Identical for ASCII, and CJK still gets its
|
|
20
|
+
* double-width treatment.
|
|
21
|
+
*
|
|
22
|
+
* Cost: a complex-script line can wrap a column or two early, and a bordered
|
|
23
|
+
* panel's right edge can sit slightly inside on such rows. Both are cosmetic;
|
|
24
|
+
* the leak is not.
|
|
25
|
+
*/
|
|
26
|
+
import stringWidth from "string-width";
|
|
27
|
+
// biome-ignore lint: ANSI escape sequences are intentional.
|
|
28
|
+
const SGR = /\x1b\[[0-9;]*m/g;
|
|
29
|
+
/** Columns to reserve for `text` — never fewer than a terminal may use. */
|
|
30
|
+
export function renderColumns(text) {
|
|
31
|
+
if (text.length === 0)
|
|
32
|
+
return 0;
|
|
33
|
+
const plain = text.includes("\x1b") ? text.replace(SGR, "") : text;
|
|
34
|
+
return Math.max(stringWidth(plain), plain.length);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=text-width.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-width.js","sourceRoot":"","sources":["../../src/ui/text-width.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC,4DAA4D;AAC5D,MAAM,GAAG,GAAG,iBAAiB,CAAC;AAE9B,2EAA2E;AAC3E,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACnE,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* AUTO-GENERATED by scripts/sync-version.mjs — do not edit by hand.
|
|
3
3
|
* Source of truth: package.json "version".
|
|
4
4
|
*/
|
|
5
|
-
export declare const VERSION: "3.11.
|
|
6
|
-
export declare const VERSION_TAG: "v3.11.
|
|
5
|
+
export declare const VERSION: "3.11.6";
|
|
6
|
+
export declare const VERSION_TAG: "v3.11.6";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* AUTO-GENERATED by scripts/sync-version.mjs — do not edit by hand.
|
|
3
3
|
* Source of truth: package.json "version".
|
|
4
4
|
*/
|
|
5
|
-
export const VERSION = "3.11.
|
|
6
|
-
export const VERSION_TAG = "v3.11.
|
|
5
|
+
export const VERSION = "3.11.6";
|
|
6
|
+
export const VERSION_TAG = "v3.11.6";
|
|
7
7
|
//# sourceMappingURL=version.generated.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pentoshi/clai",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.6",
|
|
4
4
|
"description": "A fast, cross-platform AI CLI assistant with ask and agent modes for shell tasks, file operations, and cybersecurity workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@inquirer/prompts": "8.5.2",
|
|
62
|
-
"@opentui/core": "0.4.
|
|
63
|
-
"@opentui/keymap": "0.4.
|
|
64
|
-
"@opentui/react": "0.4.
|
|
62
|
+
"@opentui/core": "0.4.5",
|
|
63
|
+
"@opentui/keymap": "0.4.5",
|
|
64
|
+
"@opentui/react": "0.4.5",
|
|
65
65
|
"chalk": "5.6.2",
|
|
66
66
|
"cheerio": "1.2.0",
|
|
67
67
|
"commander": "14.0.3",
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
},
|
|
73
73
|
"optionalDependencies": {
|
|
74
74
|
"@napi-rs/keyring": "1.3.0",
|
|
75
|
-
"@opentui/core-darwin-x64": "0.4.
|
|
76
|
-
"@opentui/core-darwin-arm64": "0.4.
|
|
77
|
-
"@opentui/core-linux-x64": "0.4.
|
|
78
|
-
"@opentui/core-linux-arm64": "0.4.
|
|
79
|
-
"@opentui/core-win32-x64": "0.4.
|
|
80
|
-
"@opentui/core-win32-arm64": "0.4.
|
|
81
|
-
"@opentui/core-linux-x64-musl": "0.4.
|
|
82
|
-
"@opentui/core-linux-arm64-musl": "0.4.
|
|
75
|
+
"@opentui/core-darwin-x64": "0.4.5",
|
|
76
|
+
"@opentui/core-darwin-arm64": "0.4.5",
|
|
77
|
+
"@opentui/core-linux-x64": "0.4.5",
|
|
78
|
+
"@opentui/core-linux-arm64": "0.4.5",
|
|
79
|
+
"@opentui/core-win32-x64": "0.4.5",
|
|
80
|
+
"@opentui/core-win32-arm64": "0.4.5",
|
|
81
|
+
"@opentui/core-linux-x64-musl": "0.4.5",
|
|
82
|
+
"@opentui/core-linux-arm64-musl": "0.4.5"
|
|
83
83
|
},
|
|
84
84
|
"overrides": {
|
|
85
85
|
"encoding-sniffer": "1.0.2"
|