Simplify context config: personality_nodes and agent_nodes

Replace complex context_groups (with ContextGroup struct, ContextSource
enum, labels, keys arrays) with simple string lists:
- personality_nodes: loaded into main session context
- agent_nodes: loaded into subconscious agent context

Removed ~200 lines of code. The distinction between session and agent
context is now just which list you're in, not a per-group flag.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2026-04-15 02:37:49 -04:00
parent 688e8dbc3e
commit a88428d642
4 changed files with 62 additions and 260 deletions

View file

@ -293,19 +293,19 @@ async fn resolve(
Some(Resolved { text: out, keys: all_keys })
}
// agent-context — personality/identity groups from load-context config
// agent-context — agent identity nodes from config
"agent-context" => {
let cfg = crate::config::get();
let mut text = String::new();
let mut keys = Vec::new();
for group in &cfg.context_groups {
if !group.agent { continue; }
let entries = crate::cli::node::get_group_content(group, &cfg).await;
for (key, content) in entries {
use std::fmt::Write;
writeln!(text, "--- {} ({}) ---", key, group.label).ok();
writeln!(text, "{}\n", content).ok();
keys.push(key);
for key in &cfg.agent_nodes {
if let Ok(content) = crate::hippocampus::memory_render(None, key, Some(true)).await {
if !content.trim().is_empty() {
use std::fmt::Write;
writeln!(text, "--- {} ---", key).ok();
writeln!(text, "{}\n", content.trim()).ok();
keys.push(key.clone());
}
}
}
if text.is_empty() { None }