From c122008afc87519d9518fd6fb3043f75eb577970 Mon Sep 17 00:00:00 2001 From: Dwain Maralack Date: Wed, 18 Mar 2026 13:44:17 +0200 Subject: [PATCH] fix(pi-pi): truncate widget message to terminal width Prevents TUI crash when terminal width < message length. The 'No experts found' message was exceeding terminal bounds causing 'Rendered line exceeds terminal width' error. Fixes: truncateToWidth(theme.fg(...), width, '') --- extensions/pi-pi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/pi-pi.ts b/extensions/pi-pi.ts index 97c46d2..7a3449b 100644 --- a/extensions/pi-pi.ts +++ b/extensions/pi-pi.ts @@ -202,7 +202,7 @@ export default function (pi: ExtensionAPI) { return { render(width: number): string[] { if (experts.size === 0) { - return ["", theme.fg("dim", " No experts found. Add agent .md files to .pi/agents/pi-pi/")]; + return ["", truncateToWidth(theme.fg("dim", " No experts found. Add agent .md files to .pi/agents/pi-pi/"), width, "")]; } const cols = Math.min(gridCols, experts.size);