//! Help mode: static help text and the action that opens/closes the help overlay. use crate::app::runtime::actions::Action; use crate::app::state::types::Overlay; pub const HELP_TEXT: &str = "\ Keybindings: Ctrl+C Quit Ctrl+D Close overlay Ctrl+H Help Ctrl+P Settings Ctrl+A Toggle yolo arm Ctrl+B Bash panel Ctrl+T Todo panel Ctrl+W Workflow panel Ctrl+K Key input Ctrl+L Learning dashboard Ctrl+U Usage dashboard Esc Close overlay Enter Submit / confirm Slash commands: /help Show this help /quit Quit session /mode Switch mode (chat, bash, workflow) /lesson Interactive lesson manager /clear Clear transcript"; /// Route an incoming action while the help overlay is open. /// /// Flow: `CloseOverlay` passes through unchanged; any other action is /// treated as "open help" (idempotent — re-opens the overlay it's already on). /// /// Return: the `Action` to actually dispatch. pub fn handle_help_action(action: &Action) -> Action { match action { Action::CloseOverlay => Action::CloseOverlay, _ => Action::OpenOverlay(Overlay::Help), } }