feat(cli): --demo demonstration mode flag + app plumbing (#22, ADR-0047 D1)
Add `--demo` (and the RDBMS_PLAYGROUND_DEMO env fallback) to enter demonstration mode, threaded onto App.demo_mode through run_loop — mirrors the --no-undo plumbing. Off by default, zero footprint when off. The --help line advertises only the visible keystroke badges; the Ctrl+] caption trigger is kept low-profile (ADR-0047 D6 updated). Phase A of ADR-0047; behaviour (badges/captions) lands in B and C.
This commit is contained in:
+11
@@ -368,6 +368,14 @@ pub struct App {
|
||||
/// flag; the `undo` / `redo` commands then report undo is off
|
||||
/// rather than emitting a prepare action.
|
||||
pub undo_enabled: bool,
|
||||
/// Whether **demonstration mode** is active this session (ADR-0047,
|
||||
/// issue #22). `true` under `--demo` / `RDBMS_PLAYGROUND_DEMO`. When
|
||||
/// off (the default) none of the demo key handling or overlay
|
||||
/// rendering runs — zero footprint. When on, otherwise-invisible
|
||||
/// keys raise a transient badge (set by the runtime, see
|
||||
/// `demo_badge`) and `Ctrl+]` drives the stealth step-caption
|
||||
/// buffer (`demo_caption` / `demo_capturing`).
|
||||
pub demo_mode: bool,
|
||||
/// The DSL → SQL teaching echo (ADR-0038) for the command currently
|
||||
/// being rendered: set from the success event just before its handler
|
||||
/// runs, consumed by `note_ok_summary` (which pushes it beneath
|
||||
@@ -512,6 +520,9 @@ impl App {
|
||||
// Undo is on by default; the runtime flips this off for
|
||||
// a `--no-undo` session (ADR-0006 Amendment 1).
|
||||
undo_enabled: true,
|
||||
// Demo mode is off by default; the runtime flips it on for
|
||||
// a `--demo` session (ADR-0047).
|
||||
demo_mode: false,
|
||||
pending_echo: None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user