consciousness/src/mind
ProofOfConcept 48beb8b663 Revert to tokio::sync::Mutex, fix lock-across-await bugs, move input ownership to InteractScreen
The std::sync::Mutex detour caught every place a MutexGuard lived
across an await point in Agent::turn — the compiler enforced Send
safety that tokio::sync::Mutex silently allows. With those fixed,
switch back to tokio::sync::Mutex (std::sync blocks tokio worker
threads and panics inside the runtime).

Input and command dispatch now live in InteractScreen (chat.rs):
- Enter pushes directly to SharedMindState.input (no app.submitted hop)
- sync_from_agent displays pending input with dimmed color
- Slash command table moved from event_loop.rs to chat.rs
- cmd_switch_model kept as pub fn for tool-initiated switches

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
2026-04-05 21:13:48 -04:00
..
dmn.rs mind: double-buffer MindState for UI diffing 2026-04-05 03:24:08 -04:00
identity.rs split out src/mind 2026-04-04 02:46:32 -04:00
log.rs Kill socket, read/write subcommands 2026-04-05 05:58:51 -04:00
mod.rs Revert to tokio::sync::Mutex, fix lock-across-await bugs, move input ownership to InteractScreen 2026-04-05 21:13:48 -04:00