forked from kent/consciousness
subconscious screen: show full context window
Previously only showed Conversation section; now shows System, Identity, Journal, and Conversation — making tools visible in the debug view. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
125927e2f1
commit
ef80398466
1 changed files with 19 additions and 3 deletions
|
|
@ -223,10 +223,26 @@ impl SubconsciousScreen {
|
|||
|
||||
agent.context.try_lock().ok()
|
||||
.map(|ctx| {
|
||||
let mut views = Vec::new();
|
||||
views.push(section_to_view("System", ctx.system()));
|
||||
views.push(section_to_view("Identity", ctx.identity()));
|
||||
views.push(section_to_view("Journal", ctx.journal()));
|
||||
|
||||
// Conversation: skip to fork point for subconscious agents
|
||||
let conv = ctx.conversation();
|
||||
let view = section_to_view("Conversation", conv);
|
||||
let fork = fork_point.min(view.children.len());
|
||||
view.children.into_iter().skip(fork).collect()
|
||||
let conv_view = section_to_view("Conversation", conv);
|
||||
let fork = fork_point.min(conv_view.children.len());
|
||||
let conv_children: Vec<SectionView> = conv_view.children
|
||||
.into_iter().skip(fork).collect();
|
||||
views.push(SectionView {
|
||||
name: format!("Conversation ({} entries)", conv_children.len()),
|
||||
tokens: conv_children.iter().map(|c| c.tokens).sum(),
|
||||
content: String::new(),
|
||||
children: conv_children,
|
||||
status: String::new(),
|
||||
});
|
||||
|
||||
views
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue