Make copilot::SignIn open sign-in modal when needed (#30239)

Also:

* Makes sign out show status notifications and errors.
* Reinstall now prompts for sign-in after start.

Addresses some of #29250, but not all of it.

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-05-08 16:52:07 +02:00 committed by GitHub
parent 203cb7a7a2
commit e9a756b5fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 142 additions and 76 deletions

View file

@ -106,14 +106,8 @@ impl Render for InlineCompletionButton {
)
.on_click(
"Reinstall Copilot",
|_, cx| {
if let Some(copilot) = Copilot::global(cx) {
copilot
.update(cx, |copilot, cx| {
copilot.reinstall(cx)
})
.detach();
}
|window, cx| {
copilot::reinstall_and_sign_in(window, cx)
},
),
cx,