refactor: add Cmd trait with CmdContext and first command implementations

Define Cmd trait (execute returns Vec<Box<dyn Effect>>) and CmdContext
(read-only state snapshot). Implement navigation commands (MoveSelection,
JumpTo*, ScrollRows), mode commands (EnterMode, Quit, SaveAndQuit),
cell operations (ClearSelectedCell, YankCell, PasteCell), and view
commands (TransposeAxes, Save, EnterSearchMode).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Edward Langley
2026-04-03 22:38:56 -07:00
parent 9421d01da5
commit 0c751b7b8b
2 changed files with 439 additions and 0 deletions

View File

@ -5,6 +5,7 @@
//! The headless CLI (--cmd / --script) routes through here, and the TUI
//! App also calls dispatch() for every user action that mutates state.
pub mod cmd;
pub mod dispatch;
pub mod parse;
pub mod types;