Problem: No hook to apply post-processing (e.g., box drawing, emoji prefixes) without wrapping every call.
Why it matters: Enables reusable UI components (e.g., “info” boxes) without repetitive code.
Proposed solution: Add register_transform(name, func) where func(text, styles) returns modified text. In Console.__call__, apply registered transforms in order before emitting RESET_ALL.
Notes: Keep transforms stateless; provide unregister_transform. Use cases: brackets, icons, conditional dimming.
Problem: No hook to apply post-processing (e.g., box drawing, emoji prefixes) without wrapping every call.
Why it matters: Enables reusable UI components (e.g., “info” boxes) without repetitive code.
Proposed solution: Add
register_transform(name, func)wherefunc(text, styles)returns modified text. InConsole.__call__, apply registered transforms in order before emittingRESET_ALL.Notes: Keep transforms stateless; provide
unregister_transform. Use cases: brackets, icons, conditional dimming.