feat(tui): add AppMode, level_cache and config integration
Add AppMode enum (Normal/Settings), level_cache field populated in recompute_wrap_cache via detect_level(), color_config loaded from TOML in main.rs. Refactor handle_key for mode dispatch with S key to enter settings. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use clap::Parser;
|
||||
|
||||
mod app;
|
||||
mod color;
|
||||
mod ui;
|
||||
|
||||
#[derive(Parser)]
|
||||
@@ -20,6 +21,7 @@ fn main() -> anyhow::Result<()> {
|
||||
let mut terminal = ratatui::Terminal::new(backend)?;
|
||||
|
||||
let mut app = app::App::new();
|
||||
app.color_config = log_viewer_core::config::ColorConfig::load();
|
||||
|
||||
if let Some(file) = cli.files.first()
|
||||
&& let Err(e) = app.load_file(file)
|
||||
|
||||
Reference in New Issue
Block a user