move startup orchestration from mind to event_loop

The top-level run() that creates Mind, wires channels, spawns the
Mind event loop, and starts the UI event loop is orchestration —
it belongs with the UI entry point, not in the cognitive layer.

Renamed to event_loop::start(cli). mind/mod.rs is now purely the
Mind struct: state machine, MindCommand, and the run loop.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2026-04-05 04:29:56 -04:00
parent e449cda40f
commit 57b0f94b54
3 changed files with 38 additions and 40 deletions

View file

@ -757,7 +757,7 @@ pub async fn main() {
return;
}
if let Err(e) = crate::mind::run(cli).await {
if let Err(e) = crate::user::event_loop::start(cli).await {
let _ = crossterm::terminal::disable_raw_mode();
let _ = crossterm::execute!(
std::io::stdout(),