sanook-cli 0.5.10 → 0.5.13
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 +23 -0
- package/dist/commands.js +14 -0
- package/dist/i18n/en.js +5 -1
- package/dist/i18n/th.js +5 -1
- package/dist/loop.js +48 -19
- package/dist/memory-store.js +20 -7
- package/dist/memory.js +57 -6
- package/dist/persona.js +10 -0
- package/dist/prompt-safety.js +13 -0
- package/dist/prompt-size.js +5 -3
- package/dist/ui/app.js +38 -25
- package/dist/ui/banner.js +4 -6
- package/dist/ui/brain-wizard.js +6 -4
- package/dist/ui/input-view.js +55 -26
- package/dist/ui/markdown.js +3 -3
- package/dist/ui/overlay.js +36 -18
- package/dist/ui/queue.js +3 -2
- package/dist/ui/render.js +27 -8
- package/dist/ui/session-panel.js +3 -5
- package/dist/ui/setup.js +21 -19
- package/dist/ui/status.js +8 -9
- package/dist/ui/text-width.js +52 -0
- package/dist/ui/thinking-panel.js +4 -3
- package/dist/ui/tool-trail.js +4 -4
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { clipToWidth } from './text-width.js';
|
|
1
2
|
const THINKING_CHAR_LIMIT = 2_000;
|
|
2
3
|
const THINKING_LINE_LIMIT = 6;
|
|
4
|
+
// display-width aware: the panel body is the model's Thai reasoning — .length-based clipping under-fills
|
|
5
|
+
// the line and can split a cluster (orphaned tone mark)
|
|
3
6
|
function clip(text, width) {
|
|
4
|
-
|
|
5
|
-
return '';
|
|
6
|
-
return text.length > width ? `${text.slice(0, Math.max(0, width - 3))}...` : text;
|
|
7
|
+
return clipToWidth(text, width, '...');
|
|
7
8
|
}
|
|
8
9
|
function normalize(text) {
|
|
9
10
|
return text.replace(/\s+/g, ' ').trim();
|
package/dist/ui/tool-trail.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
2
|
import { describeToolCall } from './tool-activity.js';
|
|
3
|
+
import { clipToWidth, padEndToWidth } from './text-width.js';
|
|
3
4
|
export const TOOL_TRAIL_LIMIT = 6;
|
|
5
|
+
// display-width aware (Thai filenames / emoji activity titles) so the trail columns stay aligned
|
|
4
6
|
function clip(text, width) {
|
|
5
|
-
|
|
6
|
-
return '';
|
|
7
|
-
return text.length > width ? `${text.slice(0, Math.max(0, width - 3))}...` : text;
|
|
7
|
+
return clipToWidth(text, width, '...');
|
|
8
8
|
}
|
|
9
9
|
function normalizeWhitespace(text) {
|
|
10
10
|
return text.replace(/\s+/g, ' ').trim();
|
|
@@ -103,7 +103,7 @@ export function toolTrailLines(items, columns, mode = 'expanded') {
|
|
|
103
103
|
for (const item of items) {
|
|
104
104
|
const marker = markerForStatus(item.status);
|
|
105
105
|
const detail = item.detail ? ` ${clip(item.detail, detailWidth)}` : '';
|
|
106
|
-
lines.push(`${marker} ${clip(item.name, nameWidth)
|
|
106
|
+
lines.push(`${marker} ${padEndToWidth(clip(item.name, nameWidth), nameWidth)} ${item.status.padEnd(7)}${detail}`);
|
|
107
107
|
}
|
|
108
108
|
return lines.map((line) => clip(line, width));
|
|
109
109
|
}
|
package/package.json
CHANGED