Expand description
Panic hook implementation for terminal UI applications This module provides a panic hook that restores terminal state when a panic occurs, preventing terminal corruption, and provides enhanced panic formatting for different build types.
Structs§
- TuiPanic
Guard - A guard struct that automatically registers and unregisters TUI state with the panic hook system.
Functions§
- init_
panic_ hook - Initialize the panic hook to restore terminal state on panic and provide better formatting
- is_
debug_ mode - Get whether the application is in debug mode
- mark_
tui_ deinitialized - Mark that TUI has been deinitialized to prevent further restoration attempts
- mark_
tui_ initialized - Mark that TUI has been initialized so panic hook knows to restore terminal
- print_
error_ report - Print an application error using color-eyre when enabled, otherwise fallback formatting.
- restore_
tui - Restore terminal to a usable state after a panic
- set_
app_ metadata - Set application metadata used by release panic reports.
- set_
color_ eyre_ enabled - Set whether color-eyre formatting should be used for debug panic/error reporting.
- set_
debug_ mode - Set whether the application is in debug mode
- set_
show_ diagnostics - Set whether diagnostics (ERROR-level logs, warnings) should be displayed in the TUI.
Driven by
ui.show_diagnostics_in_transcriptin vtcode.toml. - show_
diagnostics - Get whether diagnostics should be displayed in the TUI