Spacebar toggle for all agents, persist to config, scan agent directory

- Scan agents directory for all .agent files instead of hardcoded list
- Persist enabled state to ~/.consciousness/agent-enabled.json
- Spacebar on F3 agent list toggles selected agent on/off
- Both subconscious and unconscious agents support toggle
- Disabled agents shown dimmed with "off" indicator
- New agents default to disabled (safe default)

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-09 00:51:10 -04:00
parent 7aba17e5f0
commit c73f037265
6 changed files with 98 additions and 28 deletions

View file

@ -163,7 +163,7 @@ pub fn agents_dir() -> PathBuf {
}
/// Load all agent definitions.
fn load_defs() -> Vec<AgentDef> {
pub fn load_defs() -> Vec<AgentDef> {
let dir = agents_dir();
let Ok(entries) = std::fs::read_dir(&dir) else { return Vec::new() };