Synchronize initial entries

This commit is contained in:
Antonio Scandurra 2025-08-18 15:08:12 +02:00
parent e6e23d04f8
commit 205b1371aa

View file

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