IT BUILDS: Full AST migration compiles — zero errors
All callers migrated from old context types to AstNode/ContextState. Killed: Message, Role (api), ConversationEntry, ContextEntry, ContextSection, working_stack, api/parsing.rs, api/types.rs, api/openai.rs, context_old.rs. Oneshot standalone path stubbed (needs completions API rewrite). 12 warnings remaining (dead code cleanup). Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
d0d876e067
commit
e587431f9a
5 changed files with 99 additions and 224 deletions
|
|
@ -13,7 +13,7 @@ use ratatui::{
|
|||
};
|
||||
|
||||
use super::{App, ScreenView, screen_legend};
|
||||
use crate::agent::context::{AstNode, NodeBody, Role};
|
||||
use crate::agent::context::{AstNode, NodeBody, Role, Ast};
|
||||
use crate::mind::MindCommand;
|
||||
|
||||
// --- Slash command table ---
|
||||
|
|
@ -149,6 +149,7 @@ enum Marker {
|
|||
Assistant,
|
||||
}
|
||||
|
||||
#[derive(PartialEq)]
|
||||
enum PaneTarget {
|
||||
Conversation,
|
||||
ConversationAssistant,
|
||||
|
|
@ -836,7 +837,7 @@ impl ScreenView for InteractScreen {
|
|||
agent.expire_activities();
|
||||
app.status.prompt_tokens = agent.last_prompt_tokens();
|
||||
app.status.model = agent.model().to_string();
|
||||
app.status.context_budget = agent.context.format_budget();
|
||||
app.status.context_budget = format!("{} tokens", agent.context.tokens());
|
||||
app.activity = agent.activities.last()
|
||||
.map(|a| a.label.clone())
|
||||
.unwrap_or_default();
|
||||
|
|
|
|||
|
|
@ -152,9 +152,8 @@ impl SubconsciousScreen {
|
|||
snap.forked_agent.as_ref()
|
||||
.and_then(|agent| agent.try_lock().ok())
|
||||
.map(|ag| {
|
||||
let conv = ag.context.conversation.clone();
|
||||
// Only show entries from fork point onward
|
||||
let mut view = section_to_view(&conv);
|
||||
let conv = ag.context.conversation();
|
||||
let mut view = section_to_view("Conversation", conv);
|
||||
let fork = snap.fork_point.min(view.children.len());
|
||||
view.children = view.children.split_off(fork);
|
||||
vec![view]
|
||||
|
|
@ -179,7 +178,7 @@ impl SubconsciousScreen {
|
|||
.unwrap_or_else(|| "—".to_string());
|
||||
let entries = snap.forked_agent.as_ref()
|
||||
.and_then(|a| a.try_lock().ok())
|
||||
.map(|ag| ag.context.conversation.len().saturating_sub(snap.fork_point))
|
||||
.map(|ag| ag.context.conversation().len().saturating_sub(snap.fork_point))
|
||||
.unwrap_or(0);
|
||||
ListItem::from(Line::from(vec![
|
||||
Span::styled(&snap.name, Style::default().fg(Color::Gray)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue