move UI commands from Mind to event_loop

/quit, /help, /save handled directly in the UI event loop.
/model and /model <name> moved to event_loop as cmd_switch_model().
Mind no longer needs tui::App for any command handling.

Mind's handle_command now only has commands that genuinely need
Mind state: /new, /retry, /score (turn_in_progress, DMN, scoring).

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2026-04-05 02:29:44 -04:00
parent 804d55a702
commit 178824fa01
3 changed files with 111 additions and 107 deletions

View file

@ -90,8 +90,8 @@ pub struct Agent {
pub context: ContextState,
/// Shared live context summary — TUI reads this directly for debug screen.
pub shared_context: SharedContextState,
/// App config — used to reload identity on compaction.
app_config: crate::config::AppConfig,
/// App config — used to reload identity on compaction and model switching.
pub app_config: crate::config::AppConfig,
pub prompt_file: String,
/// Stable session ID for memory-search dedup across turns.
pub session_id: String,