From 14b0aafbc72df1fb21318a71033ffbd4aa72b575 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Thu, 12 Feb 2026 22:35:44 -0800 Subject: [PATCH] fix: enable text wrapping inside Rich panels The global console uses soft_wrap=True to prevent wrapping for most output, but this also clips long lines inside panels. Override with soft_wrap=False specifically for panel print calls so panel content wraps properly. --- agent_cli/core/utils.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/agent_cli/core/utils.py b/agent_cli/core/utils.py index 9de41918..2ad9ccd9 100644 --- a/agent_cli/core/utils.py +++ b/agent_cli/core/utils.py @@ -197,7 +197,10 @@ def print_input_panel( style: str = "bold blue", ) -> None: """Prints a panel with the input text.""" - console.print(Panel(text, title=title, subtitle=subtitle, border_style=style)) + console.print( + Panel(text, title=title, subtitle=subtitle, border_style=style), + soft_wrap=False, + ) def print_output_panel( @@ -207,7 +210,10 @@ def print_output_panel( style: str = "bold green", ) -> None: """Prints a panel with the output text.""" - console.print(Panel(text, title=title, subtitle=subtitle, border_style=style)) + console.print( + Panel(text, title=title, subtitle=subtitle, border_style=style), + soft_wrap=False, + ) def print_error_message(message: str, suggestion: str | None = None) -> None: @@ -216,7 +222,10 @@ def print_error_message(message: str, suggestion: str | None = None) -> None: if suggestion: error_text.append("\n\n") error_text.append(suggestion) - console.print(Panel(error_text, title="Error", border_style="bold red")) + console.print( + Panel(error_text, title="Error", border_style="bold red"), + soft_wrap=False, + ) def print_with_style(message: str, style: str = "bold green") -> None: