AI panel shows multiple times when `cmd+i` is pressed
Summary
When you are editing and press cmd-i in a fresh installation, then the AI panel pops up. But, if you keep pressing the keystroke, then it creates more instances of the panel stacked up instead of just dismissing the action.
For the record. Running Zed: 0.179.5
Steps to see the problem.
- Go into a file
- Press
Cmd+Ia bunch of times
Expected Behavior: Would be nice if instead of creating MORE panels the keystroke would just dismiss the panel.
This also leads to weird cursor errors:
Zed Version and System Specs
Zed: v0.179.5 (Zed) OS: macOS 15.3.2 Memory: 24 GiB Architecture: aarch64
The default bind of cmd-i is:
https://github.com/zed-industries/zed/blob/632f08d2a3b708c6baa8aa6b1bf53c482c3c3a6a/assets/keymaps/default-macos.json#L153
Which makes a textDocument/signatureHelp request to the LSP.
I assume you've rebound cmd-i to `"ctrl-enter": "assistant::InlineAssist" with:
{
"context": "Editor",
"bindings": {
"cmd-i": "assistant::InlineAssist"
}
},
I can reproduce you issue with the above keymapping. Please make sure to explicitly include such details in the future, you have a user config which is triggering this issue (this is not the default, and the default ctrl-enter does not exhibit this behavior).
If you use this instead, repeated presses of cmd-i will not trigger additional prompts:
{
"context": "Editor && mode == full",
"bindings": {
"cmd-i": "assistant::InlineAssist"
}
},
I couldn't figure out how to get cmd-i to be a toggle, the nested context where an Editor inherits from is a funky cornercase that we don't handle well.
Thanks for reporting.
This was fixed. Thanks for reporting.