yera.runtime.handlers.tree_selector.ansi
Collect tree selections through an interactive ANSI browser.
Symbols
ANSITreeSelectorHandler
Inherits:
BaseHandlerRender a keyboard-driven tree and submit its selected leaf values.
The browser validates the configured selection limits. Activating a configured cancellation action submits a correlated cancelled response without requiring a selected leaf.
Methods
ANSITreeSelectorHandler.__init__
__init__(
console: Console,
) → NoneInitialize the tree selector with its interactive terminal console.
Parameters
console
type: Console
Rich console used to present the selector and validation.
ANSITreeSelectorHandler.push
push(
event: OutputEvent,
) → NoneDisplay the tree and submit the selected leaf values.
Parameters
event
type: OutputEvent
An output event carrying TreeSelectorData.
Raises
TypeError
If the event data is not TreeSelectorData.