xml-pipeline/agentserver/console/console_registry.py
dullfig abc5902b60 Fix console registry for cross-module access
- Create separate console_registry module to avoid __main__ vs module import issue
- Handler now correctly finds TUI console instance
- Response output should now appear in TUI output area

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 14:44:10 -08:00

19 lines
426 B
Python

"""
console_registry.py — Global console reference for handlers.
This module provides a central place to register and retrieve
the active console instance, avoiding Python module import issues.
"""
_console = None
def set_console(console):
"""Set the active console instance."""
global _console
_console = console
def get_console():
"""Get the active console instance (or None)."""
return _console