Kill UiMessage variants replaced by state-driven rendering

sync_from_agent reads directly from agent entries, so remove:
- UserInput (pending input shown from MindState.input)
- ToolCall, ToolResult (shown from entries on completion)
- ToolStarted, ToolFinished (replaced by shared active_tools)
- replay_session_to_ui (sync_from_agent handles replay)

-139 lines. Remaining variants are streaming (TextDelta, Reasoning),
status bar state, or ephemeral UI messages (Info, Debug).

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-05 21:21:08 -04:00
parent 306788e0f1
commit 1745e03550
5 changed files with 5 additions and 139 deletions

View file

@ -651,10 +651,6 @@ pub async fn collect_stream(
let args: serde_json::Value =
serde_json::from_str(&call.function.arguments).unwrap_or_default();
let args_summary = summarize_args(&call.function.name, &args);
let _ = ui_tx.send(UiMessage::ToolCall {
name: call.function.name.clone(),
args_summary: args_summary.clone(),
});
let is_background = args.get("run_in_background")
.and_then(|v| v.as_bool())
.unwrap_or(false);

View file

@ -510,10 +510,6 @@ impl Agent {
let args_summary = summarize_args(&call.function.name, &args);
let _ = ui_tx.send(UiMessage::Activity(format!("calling: {}", call.function.name)));
let _ = ui_tx.send(UiMessage::ToolCall {
name: call.function.name.clone(),
args_summary: args_summary.clone(),
});
// Spawn tool, track it
let call_clone = call.clone();
@ -561,10 +557,6 @@ impl Agent {
ds.tool_errors += 1;
}
let _ = ui_tx.send(UiMessage::ToolResult {
name: call.function.name.clone(),
result: output.clone(),
});
self.active_tools.lock().unwrap().retain(|t| t.id != call.id);
// Tag memory_render results for context deduplication