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

@ -232,8 +232,8 @@ impl ContextPickerCompletionProvider {
url_to_fetch.to_string(),
))
.await?;
context_store.update(cx, |context_store, _| {
context_store.add_fetched_url(url_to_fetch.to_string(), content)
context_store.update(cx, |context_store, cx| {
context_store.add_fetched_url(url_to_fetch.to_string(), content, cx)
})
})
.detach_and_log_err(cx);