tui: F5 thalamus screen, fix HashMap ordering, Screen enum
- Add Thalamus variant to Screen enum (F5) - Fix HashMap iteration ordering causing flickering in F4/F5 screens by using BTreeMap in supervisor and sorting plan_counts - Update screen legend: F1=interact F2=conscious F3=subconscious F4=unconscious F5=thalamus - Add dirty bit field to App (prep for event-driven rendering) Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
604f442215
commit
db42bf6243
2 changed files with 10 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ mod subconscious_screen;
|
|||
mod unconscious_screen;
|
||||
mod thalamus_screen;
|
||||
|
||||
pub(crate) const SCREEN_LEGEND: &str = " F1=interact F2=conscious F3=subconscious F4=unconscious ";
|
||||
pub(crate) const SCREEN_LEGEND: &str = " F1=interact F2=conscious F3=subconscious F4=unconscious F5=thalamus ";
|
||||
/// Subconscious agents — interact with conscious context
|
||||
pub(crate) const SUBCONSCIOUS_AGENTS: &[&str] = &["surface-observe", "journal", "reflect"];
|
||||
/// Unconscious agents — background consolidation
|
||||
|
|
@ -380,6 +380,8 @@ pub(crate) enum Screen {
|
|||
Subconscious,
|
||||
/// F4 — memory daemon status
|
||||
Unconscious,
|
||||
/// F5 — thalamus: channels, presence, attention routing
|
||||
Thalamus,
|
||||
}
|
||||
|
||||
/// Actions triggered by hotkeys, consumed by the main loop.
|
||||
|
|
@ -577,6 +579,7 @@ impl App {
|
|||
KeyCode::F(2) => { self.set_screen(Screen::Conscious); return; }
|
||||
KeyCode::F(3) => { self.set_screen(Screen::Subconscious); return; }
|
||||
KeyCode::F(4) => { self.set_screen(Screen::Unconscious); return; }
|
||||
KeyCode::F(5) => { self.set_screen(Screen::Thalamus); return; }
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
|
@ -677,7 +680,7 @@ impl App {
|
|||
_ => {}
|
||||
}
|
||||
}
|
||||
Screen::Unconscious => {
|
||||
Screen::Unconscious | Screen::Thalamus => {
|
||||
match key.code {
|
||||
KeyCode::PageUp => { self.debug_scroll = self.debug_scroll.saturating_sub(10); return; }
|
||||
KeyCode::PageDown => { self.debug_scroll += 10; return; }
|
||||
|
|
@ -815,6 +818,7 @@ impl App {
|
|||
Screen::Conscious => { self.draw_debug(frame, size); return; }
|
||||
Screen::Subconscious => { self.draw_agents(frame, size); return; }
|
||||
Screen::Unconscious => { self.draw_unconscious(frame, size); return; }
|
||||
Screen::Thalamus => { self.draw_thalamus(frame, size); return; }
|
||||
Screen::Interact => {}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue