2026-07-12 11:28:39 +07:00
|
|
|
//! TUI mode definitions and per-mode input/action handlers, one submodule
|
|
|
|
|
//! per overlay/mode (bash, editor, effort, mcp, quit confirm, rewind, etc.).
|
|
|
|
|
|
2026-07-11 13:16:10 +07:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
|
|
|
pub mod bash;
|
2026-07-12 01:25:52 +07:00
|
|
|
pub mod editor;
|
|
|
|
|
pub mod effort;
|
|
|
|
|
pub mod key_input;
|
|
|
|
|
pub mod mcp;
|
2026-07-12 17:49:34 +07:00
|
|
|
pub mod workflow;
|
2026-07-12 03:14:52 +07:00
|
|
|
|
2026-07-11 13:16:10 +07:00
|
|
|
pub mod quit_confirm;
|
2026-07-12 01:25:52 +07:00
|
|
|
pub mod rewind;
|
2026-07-11 13:16:10 +07:00
|
|
|
pub mod settings;
|
|
|
|
|
pub mod todo;
|
|
|
|
|
|
2026-07-12 11:28:39 +07:00
|
|
|
/// Which input/overlay mode the TUI is currently in; drives both key
|
|
|
|
|
/// routing (`controller/input.rs`) and rendering.
|
2026-07-11 13:16:10 +07:00
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
|
|
|
|
pub enum ModeKind {
|
|
|
|
|
Chat,
|
|
|
|
|
Bash,
|
|
|
|
|
Workflow,
|
|
|
|
|
Help,
|
|
|
|
|
Settings,
|
|
|
|
|
QuitConfirm,
|
2026-07-12 03:14:52 +07:00
|
|
|
|
2026-07-11 13:16:10 +07:00
|
|
|
KeyInput,
|
|
|
|
|
Editor,
|
|
|
|
|
Effort,
|
|
|
|
|
Mcp,
|
|
|
|
|
Todo,
|
|
|
|
|
Rewind,
|
|
|
|
|
Loading,
|
|
|
|
|
}
|