feat(ui): add configurable scrollback lines and new‑message alert badge

Introduce `ui.scrollback_lines` (default 2000) to cap the number of chat lines kept in memory, with `0` disabling trimming. Implement automatic trimming of older lines, maintain a scroll offset, and show a “↓ New messages (press G)” badge when new messages arrive off‑screen. Update core UI settings, TUI rendering, chat app state, migrations, documentation, and changelog to reflect the new feature.
This commit is contained in:
2025-10-12 14:23:04 +02:00
parent 82078afd6d
commit 60c859b3ab
6 changed files with 170 additions and 3 deletions

View File

@@ -67,6 +67,9 @@ These settings customize the look and feel of the terminal interface.
- `input_max_rows` (integer, default: `5`)
The maximum number of rows the input panel will expand to before it starts scrolling internally. Increase this value if you prefer to see more of long prompts while editing.
- `scrollback_lines` (integer, default: `2000`)
The maximum number of rendered lines the chat view keeps in memory. Set to `0` to disable trimming entirely if you prefer unlimited history.
## Storage Settings (`[storage]`)
These settings control how conversations are saved and loaded.

View File

@@ -4,7 +4,7 @@ Owlen is still in alpha, so configuration and storage formats may change between
### Schema 1.2.0 (November 2025)
`config.toml` now records `schema_version = "1.2.0"` and introduces the optional `ui.input_max_rows` setting. The new key defaults to `5`, so no manual edits are required unless you prefer a taller input panel. Existing files are updated automatically on load/save.
`config.toml` now records `schema_version = "1.2.0"` and introduces the optional `ui.input_max_rows` and `ui.scrollback_lines` settings. The new keys default to `5` and `2000` respectively, so no manual edits are required unless you want a taller input panel or a different scrollback cap. Existing files are updated automatically on load/save.
### Schema 1.1.0 (October 2025)