edit predictions: Improve UX when there's no keybinding for accepting predictions (#25815)

If the user already binds `tab`/`alt-tab`/`alt-l` to a different action
in a conflicting context and hasn't assigned a different keybinding for
`editor::AcceptEditPrediction`, we would show broken popovers with no
bindings:

![CleanShot 2025-02-28 at 12 46
13@2x](https://github.com/user-attachments/assets/a2c6a8ad-5e11-46ef-8031-62e1e6900244)

Instead, they will now see an error-variant of every popover which
includes a tooltip with a short description and buttons to open the
keymap, and open a new docs section explaining the issue in detail and
how to fix it.

![CleanShot 2025-02-28 at 12 48
11@2x](https://github.com/user-attachments/assets/36329b1f-6374-4735-9fbc-8fccab70e881)

Note: I included the docs change in this PR because it's ok to deploy
before the release, as it also applies to existing versions.

Release Notes:

- edit predictions: Improve UX when there's no keybinding for accepting
predictions

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo <danilo@zed.dev>
This commit is contained in:
Agus Zubiaga 2025-03-04 11:28:36 -03:00 committed by GitHub
parent 76a81607de
commit f31749c81b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 167 additions and 26 deletions

View file

@ -329,6 +329,7 @@ pub enum IconName {
ZedPredictUp,
ZedPredictDown,
ZedPredictDisabled,
ZedPredictError,
ZedXCopilot,
}