feat(display): add configurable multi-backend display system

This commit is contained in:
2026-03-15 21:17:16 -07:00
parent ac1306373d
commit d7b044ceae
6 changed files with 78 additions and 17 deletions

View File

@@ -193,11 +193,9 @@ class WebSocketDisplay:
def _run_async(self, coro):
"""Run coroutine in background."""
try:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(coro)
except Exception:
pass
asyncio.run(coro)
except Exception as e:
print(f"WebSocket async error: {e}")
def start_server(self):
"""Start the WebSocket server in a background thread."""
@@ -224,6 +222,8 @@ class WebSocketDisplay:
if self._http_thread is not None:
return
self._http_running = True
self._http_running = True
self._http_thread = threading.Thread(
target=self._run_async, args=(self._run_http_server(),), daemon=True