console_output_screen
console_output_screen
¶
Palette-reachable list of all dispatched-action console logs.
The Console output command surfaces every
ConsoleLogEntry from the
session — running and finished alike — so output that would once have
scrolled past in a suspended terminal stays reachable inside the TUI
(issue #473). Selecting an entry opens its
WorkerLogScreen view.
The list is a snapshot taken when the screen opens; reopen it to pick up newly dispatched actions. Entries are in-memory only — forgotten when the app closes.
ConsoleOutputScreen(registry)
¶
Bases: ModalScreen[None]
Modal list of the session's ConsoleLogEntry objects.
Pushed from the Console output command-palette entry. Picking a
row opens that entry's
WorkerLogScreen on
top — closing it returns here.
Snapshot registry's entries (most-recent first) for display.
Source code in src/terok/tui/console_output_screen.py
BINDINGS = [Binding('escape', 'dismiss', 'Close')]
class-attribute
instance-attribute
¶
CSS = '\n ConsoleOutputScreen {\n align: center middle;\n }\n\n #console-output-dialog {\n width: 80%;\n height: 70%;\n border: heavy $primary;\n border-title-align: right;\n background: $surface;\n padding: 1 2;\n }\n\n #console-output-list {\n height: 1fr;\n border: round $primary-darken-2;\n margin-bottom: 1;\n }\n\n #console-output-empty {\n height: 1fr;\n color: $text-muted;\n content-align: center middle;\n }\n\n .console-output-command {\n color: $text-muted;\n }\n\n #console-output-buttons {\n height: 3;\n align-horizontal: right;\n }\n '
class-attribute
instance-attribute
¶
compose()
¶
Lay out the entry list (or an empty-state label) and a Close button.
Source code in src/terok/tui/console_output_screen.py
on_list_view_selected(event)
¶
Open the picked entry's WorkerLogScreen view.