Files
logViewer/crates/tui/Cargo.toml
dailz 280c3f5014 feat(tui): add Tab key to toggle JSON pretty-print
Press Tab to switch JSON log lines between raw single-line and indented
multi-line format (2-space indent, like jq output). Only JSON Object lines
are affected; plain text lines stay unchanged.

- Add json_format bool field to App, toggled by Tab
- Add format_json_line() standalone function with serde_json::to_string_pretty
- Integrate into recompute_wrap_cache with \n-split sub-line wrapping
- Center viewport on cursor after cache rebuild to prevent jump on toggle
- Add 12 unit tests covering format, toggle, and edge cases

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-11 11:38:30 +08:00

13 lines
244 B
TOML

[package]
name = "log-viewer-tui"
version = "0.1.0"
edition = "2024"
[dependencies]
ratatui.workspace = true
crossterm.workspace = true
clap.workspace = true
anyhow.workspace = true
log-viewer-core.workspace = true
serde_json.workspace = true