acp: Fix model selector sometimes showing no models (#37006)

Bennet Bo Fenner and Antonio Scandurra created

Release Notes:

- acp: Fix an issue where the model selector would sometimes be empty

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>

Change summary

crates/agent_ui/src/acp/model_selector.rs | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

Detailed changes

crates/agent_ui/src/acp/model_selector.rs 🔗

@@ -73,11 +73,8 @@ impl AcpModelPickerDelegate {
                     this.update_in(cx, |this, window, cx| {
                         this.delegate.models = models.ok();
                         this.delegate.selected_model = selected_model.ok();
-                        this.delegate.update_matches(this.query(cx), window, cx)
-                    })?
-                    .await;
-
-                    Ok(())
+                        this.refresh(window, cx)
+                    })
                 }
 
                 refresh(&this, &session_id, cx).await.log_err();