From 0dc1db00134f2e9379f97884293c86d52a5abe09 Mon Sep 17 00:00:00 2001 From: famez Date: Sun, 1 Mar 2026 10:18:42 +0100 Subject: [PATCH] fix(tui): Avoid warning on text editor --- pentestagent/interface/tui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pentestagent/interface/tui.py b/pentestagent/interface/tui.py index 00f15bb..0a888bb 100644 --- a/pentestagent/interface/tui.py +++ b/pentestagent/interface/tui.py @@ -2226,7 +2226,8 @@ Be concise. Use the actual data from notes.""" elif cmd_lower == "/tools": # Open the interactive tools browser (split-pane). try: - await self.push_screen(ToolsScreen(tools=self.agent.get_tools())) + if self.agent: + await self.push_screen(ToolsScreen(tools=self.agent.get_tools())) except Exception: # Fallback: list tools in the system area if UI push fails from ..runtime.runtime import detect_environment