fix(tui): Avoid warning on text editor

This commit is contained in:
famez
2026-03-01 10:18:42 +01:00
parent 1d483dbe82
commit 0dc1db0013

View File

@@ -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