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:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user