user: InteractScreen extracted, all screens use ScreenView trait
InteractScreen in chat.rs owns conversation/autonomous/tools panes, textarea, input history, scroll state. App is now just shared state (status, sampling params, agent_state, channel_status, idle_info). Event loop holds InteractScreen separately for UiMessage routing. Overlay screens (F2-F5) in screens vec. F-key switching preserves state across screen changes. handle_ui_message moved from App to InteractScreen. handle_key split: global keys on App, screen keys in tick(). draw dispatch eliminated — each screen draws itself. Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
8418bc9bc9
commit
68f115b880
8 changed files with 276 additions and 259 deletions
|
|
@ -27,7 +27,7 @@ impl ScreenView for SubconsciousScreen {
|
|||
fn label(&self) -> &'static str { "subconscious" }
|
||||
|
||||
fn tick(&mut self, frame: &mut Frame, area: Rect,
|
||||
key: Option<KeyEvent>, app: &App) -> Option<ScreenAction> {
|
||||
key: Option<KeyEvent>, app: &mut App) -> Option<ScreenAction> {
|
||||
// Handle keys
|
||||
if let Some(key) = key {
|
||||
match key.code {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue