Expand description
Top-level app state — composed of mode, conversation log, prompt buffer, and a shared handle to the engine-state mirror.
Ownership rules:
AppStateis !Send because of the crossterm backend it will eventually render through; keep it single-threaded.- The engine-state mirror is
Arc<RwLock<EngineState>>and is written only by the WS subscriber task; the app reads it. - Command execution is async and happens in the event loop,
not in
submit_prompt.submit_promptonly buffers the line intoAppState::pending_input; the loop drains it. - Persistence is optional. When a
SessionSinkis present, every log entry is recorded synchronously.
Structs§
- AppState
- Friction
Pause - Live state of a friction-pause overlay.
Enums§
- Active
Overlay - Runtime representation of a live overlay. This exists as a
separate enum (not just
OverlayTarget) so overlays can carry ephemeral state — scroll offset, filter text, a timer, a typed-confirm buffer — that the input + render layers mutate without going back through dispatch. - Friction
Outcome - Why a friction-pause overlay ended. Used by the event loop to decide whether to re-dispatch the pending command or drop it.
- Risk
Overlay Trigger - Why the
ActiveOverlay::Riskoverlay opened.