forked from kent/consciousness
The agent lock was held for the entire duration of turn() — including API streaming and tool dispatch awaits. This blocked the UI thread whenever it needed the lock (render tick, compaction check, etc.), causing 20+ second freezes. Fix: turn() takes Arc<Mutex<Agent>> and manages locking internally. Lock is held briefly for prepare/process phases, released during all I/O (streaming, tool awaits, sleep retries). Also: - check_compaction: spawns task instead of awaiting on event loop - start_memory_scoring: already spawned, no change needed - dispatch_tool_call_unlocked: drops lock before tool handle await - Subconscious screen: renders all agents from state dynamically (no more hardcoded SUBCONSCIOUS_AGENTS list) - Memory scoring shows n/m progress in snapshots Co-Authored-By: Proof of Concept <poc@bcachefs.org> |
||
|---|---|---|
| .. | ||
| agents | ||
| prompts | ||
| api.rs | ||
| audit.rs | ||
| consolidate.rs | ||
| daemon.rs | ||
| defs.rs | ||
| digest.rs | ||
| knowledge.rs | ||
| llm.rs | ||
| mod.rs | ||
| prompts.rs | ||
| subconscious.rs | ||