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:
Kent Overstreet 2026-04-08 15:29:52 -04:00
parent d0d876e067
commit e587431f9a
5 changed files with 99 additions and 224 deletions

View file

@ -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();