Remove dead code: append_text, needs_assistant_marker, target param

append_text was the TextDelta streaming handler — replaced by
append_streaming on Agent entries. needs_assistant_marker tracked
turn boundaries for the old message path. target removed from
Agent::turn — routing now determined by entry content.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-05 22:40:38 -04:00
parent f390fa1617
commit 36d698a3e1
4 changed files with 3 additions and 37 deletions

View file

@ -222,15 +222,6 @@ fn strip_ansi(text: &str) -> String {
out
}
fn is_zero_width(ch: char) -> bool {
matches!(ch,
'\u{200B}'..='\u{200F}' |
'\u{2028}'..='\u{202F}' |
'\u{2060}'..='\u{2069}' |
'\u{FEFF}'
)
}
fn new_textarea(lines: Vec<String>) -> tui_textarea::TextArea<'static> {
let mut ta = tui_textarea::TextArea::new(lines);
ta.set_cursor_line_style(Style::default());
@ -287,27 +278,6 @@ impl PaneState {
}
}
fn append_text(&mut self, text: &str) {
let clean = strip_ansi(text);
if self.use_markdown {
self.md_buffer.push_str(&clean);
} else {
for ch in clean.chars() {
if ch == '\n' {
let line = std::mem::take(&mut self.current_line);
self.lines.push(Line::styled(line, Style::default().fg(self.current_color)));
self.markers.push(Marker::None);
} else if ch == '\t' {
self.current_line.push_str(" ");
} else if ch.is_control() || is_zero_width(ch) {
} else {
self.current_line.push(ch);
}
}
}
self.evict();
}
fn flush_pending(&mut self) {
if self.use_markdown && !self.md_buffer.is_empty() {
let parsed = parse_markdown(&self.md_buffer);
@ -385,7 +355,6 @@ pub(crate) struct InteractScreen {
history_index: Option<usize>,
active_pane: ActivePane,
pane_areas: [Rect; 3],
needs_assistant_marker: bool,
turn_started: Option<std::time::Instant>,
call_started: Option<std::time::Instant>,
call_timeout_secs: u64,
@ -414,7 +383,6 @@ impl InteractScreen {
history_index: None,
active_pane: ActivePane::Conversation,
pane_areas: [Rect::default(); 3],
needs_assistant_marker: false,
turn_started: None,
call_started: None,
call_timeout_secs: 60,

View file

@ -345,7 +345,6 @@ pub async fn run(
) -> Result<()> {
let agent = &mind.agent;
let shared_mind = &mind.shared;
let turn_watch = mind.turn_watch();
// UI-owned state
let mut idle_state = crate::thalamus::idle::State::new();
idle_state.load();