From 9b24dd23d2988ee13bca58d876facea4672d11c6 Mon Sep 17 00:00:00 2001 From: GH05TCREW Date: Fri, 26 Dec 2025 05:02:09 -0700 Subject: [PATCH] style: remove vertical bars from TUI message display --- pentestagent/interface/tui.py | 36 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/pentestagent/interface/tui.py b/pentestagent/interface/tui.py index 85a614a..e4b1a96 100644 --- a/pentestagent/interface/tui.py +++ b/pentestagent/interface/tui.py @@ -191,14 +191,12 @@ class ThinkingMessage(Static): def render(self) -> Text: text = Text() - text.append("| ", style="#3a3a3a") text.append("* ", style="#9a9a9a") text.append("Thinking\n", style="bold #9a9a9a") - # Wrap content - use 70 chars to account for sidebar + prefix - for line in wrap_text_lines(self.thinking_content, width=70): - text.append("| ", style="#3a3a3a") - text.append(f"{line}\n", style="#6b6b6b italic") + # Wrap content + for line in wrap_text_lines(self.thinking_content, width=90): + text.append(f" {line}\n", style="#6b6b6b italic") return text @@ -217,16 +215,14 @@ class ToolMessage(Static): def render(self) -> Text: text = Text() - text.append("| ", style="#3a3a3a") text.append(f"{self.TOOL_ICON} ", style=self.TOOL_COLOR) text.append(f"{self.tool_name}", style=self.TOOL_COLOR) text.append("\n", style="") - # Wrap args and show each line with vertical bar + # Wrap args if self.tool_args: - for line in wrap_text_lines(self.tool_args, width=100): - text.append("| ", style="#3a3a3a") - text.append(f"{line}\n", style="#6b6b6b") + for line in wrap_text_lines(self.tool_args, width=110): + text.append(f" {line}\n", style="#6b6b6b") return text @@ -244,15 +240,13 @@ class ToolResultMessage(Static): def render(self) -> Text: text = Text() - text.append("| ", style="#3a3a3a") text.append(f"{self.RESULT_ICON} ", style=self.RESULT_COLOR) text.append(f"{self.tool_name} output", style=self.RESULT_COLOR) text.append("\n", style="") if self.result: - for line in wrap_text_lines(self.result, width=100): - text.append("| ", style="#3a3a3a") - text.append(f"{line}\n", style="#5a5a5a") + for line in wrap_text_lines(self.result, width=110): + text.append(f" {line}\n", style="#5a5a5a") return text @@ -266,14 +260,12 @@ class AssistantMessage(Static): def render(self) -> Text: text = Text() - text.append("| ", style="#525252") text.append(">> ", style="#9a9a9a") text.append("PentestAgent\n", style="bold #d4d4d4") - # Wrap content - use 70 chars to account for sidebar + prefix - for line in wrap_text_lines(self.message_content, width=70): - text.append("| ", style="#525252") - text.append(f"{line}\n", style="#d4d4d4") + # Wrap content + for line in wrap_text_lines(self.message_content, width=90): + text.append(f" {line}\n", style="#d4d4d4") return text @@ -287,11 +279,9 @@ class UserMessage(Static): def render(self) -> Text: text = Text() - text.append("| ", style="#6b6b6b") # phantom border text.append("> ", style="#9a9a9a") - text.append("You\n", style="bold #d4d4d4") # specter - text.append("| ", style="#6b6b6b") # phantom border - text.append(f"{self.message_content}\n", style="#d4d4d4") # specter + text.append("You\n", style="bold #d4d4d4") + text.append(f" {self.message_content}\n", style="#d4d4d4") return text