fix(ai-judge): truncate advice widget with visible-width awareness

- delegate widget line truncation to pi-tui truncateToWidth so ANSI
  styling and double-width CJK reasons count visible cells only
- replace the code-point clamp that crashed the TUI when a Chinese
  reason rendered wider than the terminal
- add @earendil-works/pi-tui peer and dev dependencies
- cover CJK reasons at several terminal widths in tests
This commit is contained in:
2026-09-18 00:02:17 +08:00
parent 962d90dec8
commit 80108d3a7c
4 changed files with 50 additions and 15 deletions
+3
View File
@@ -223,6 +223,9 @@ importers:
'@earendil-works/pi-coding-agent':
specifier: ^0.85.1
version: 0.85.1(supports-color@7.2.0)(ws@8.21.3)(zod@4.6.5)
'@earendil-works/pi-tui':
specifier: ^0.85.1
version: 0.85.1
'@gotgenes/pi-permission-system':
specifier: ^32.0.2
version: 32.0.2(@earendil-works/pi-coding-agent@0.85.1)(@earendil-works/pi-tui@0.85.1)