From 205b1371aad3956073259db45bc12fc70e553671 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 18 Aug 2025 15:08:12 +0200 Subject: [PATCH] Synchronize initial entries --- crates/agent_ui/src/acp/thread_view.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rs index 4dd0a3b7f63b3104426cfd582c819da9ceb9b160..38036ad3c49c3522b7e5c42141492ca7a46a75e1 100644 --- a/crates/agent_ui/src/acp/thread_view.rs +++ b/crates/agent_ui/src/acp/thread_view.rs @@ -308,8 +308,13 @@ impl AcpThreadView { let action_log_subscription = cx.observe(&action_log, |_, _, cx| cx.notify()); - this.list_state - .splice(0..0, thread.read(cx).entries().len()); + let count = thread.read(cx).entries().len(); + this.list_state.splice(0..0, count); + this.entry_view_state.update(cx, |view_state, cx| { + for ix in 0..count { + view_state.sync_entry(ix, &thread, window, cx); + } + }); AgentDiff::set_active_thread(&workspace, thread.clone(), window, cx);