feat(app): introduce MessageState trait and handler for AppMessage dispatch

- Add `MessageState` trait defining UI reaction callbacks for generation lifecycle, model updates, provider status, resize, and tick events.
- Implement `App::handle_message` to route `AppMessage` variants to the provided `MessageState` and determine exit condition.
- Add `handler.rs` module with the trait and dispatch logic; re-export `MessageState` in `app/mod.rs`.
- Extend `ActiveGeneration` with a public `request_id` getter and clean up dead code annotations.
- Implement empty `MessageState` for `ChatApp` to integrate UI handling.
- Add `log` crate dependency for warning messages.
This commit is contained in:
2025-10-16 21:58:26 +02:00
parent 7effade1d3
commit bcd52d526c
4 changed files with 144 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ uuid = { workspace = true }
serde_json.workspace = true
serde.workspace = true
chrono = { workspace = true }
log = { workspace = true }
[dev-dependencies]
tokio-test = { workspace = true }