agent: Refresh UI when context or thread history changes (#28188)

I found a few more cases where the UI wasn't updated immediately after
an interaction.

Release Notes:

- agent: Fixed delay after removing threads from "Past Interactions"
- agent: Fixed delay after adding/remove context via keyboard
This commit is contained in:
Agus Zubiaga 2025-04-06 09:35:15 -05:00 committed by GitHub
parent b1f7133a7b
commit 57669b4908
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 95 additions and 38 deletions

View file

@ -253,6 +253,8 @@ impl AssistantPanel {
let history_store =
cx.new(|cx| HistoryStore::new(thread_store.clone(), context_store.clone(), cx));
cx.observe(&history_store, |_, _, cx| cx.notify()).detach();
let active_view = ActiveView::thread(thread.clone(), window, cx);
let thread_subscription = cx.subscribe(&thread, |_, _, event, cx| {
if let ThreadEvent::MessageAdded(_) = &event {