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:
dailz
2026-04-12 10:52:03 +08:00
parent ef4c2e7383
commit c6e83cb8c2
4 changed files with 451 additions and 11 deletions

View File

@@ -23,3 +23,4 @@ crossterm = "0.29"
clap = { version = "4", features = ["derive"] }
log-viewer-core = { path = "crates/core" }
textwrap = "0.16"
tempfile = "3"