Commit Graph
2 Commits
Author SHA1 Message Date
SikongJueluo 80108d3a7c 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
2026-09-18 00:02:17 +08:00
SikongJueluo 7190bffd86 feat(ai-judge): show dialog advice widget with verdict and focus
- add AdvicePresenter rendering a pi-native setWidget panel while a
  permission dialog is up: judgment verdict with reason, high-risk skip
  with category, or an unavailable cause
- highlight the decision-relevant command fragment via a focus cascade:
  high-risk match, triggering unit, then executed unit
- clear the widget when permissions:decision resolves the same request
- add dialogAdvice config key (default true, invalid falls back with a
  diagnostic) and cover formatting, lifecycle, and config in tests
2026-09-17 23:42:57 +08:00