-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Description
Summary
Pressing Escape does not cancel or dismiss the inline assist prompt (PromptEditor). Users must click the X button with the mouse to close it, which breaks keyboard-driven workflow.
Steps to Reproduce
- Open any file in Zed
- Select some text or place cursor on a line
- Press
Ctrl+Enterto open inline assist - Press
Escapeto try to cancel/dismiss
Expected Behavior
Pressing Escape should dismiss the inline assist prompt and return focus to the editor, similar to how Escape dismisses other UI elements (command palette, search bar, etc.).
Actual Behavior
Nothing happens. The inline assist prompt remains open. The only way to close it is to click the X button with the mouse.
Attempted Workarounds
Added custom keybindings to user keymap, none of which worked:
{
"context": "PromptEditor",
"bindings": {
"escape": "menu::Cancel"
}
}{
"context": "PromptEditor",
"bindings": {
"escape": "editor::Cancel"
}
}{
"context": "PromptEditor > Editor",
"bindings": {
"escape": "menu::Cancel"
}
}Analysis
Looking at the default keymap, the PromptEditor context has no escape binding defined. There also doesn't appear to be a dedicated action like inline_assistant::Cancel or assistant::CancelInlineAssist in the All Actions documentation.
The agent::Reject action exists but only applies after the AI has generated a response, not for dismissing the prompt itself.
Environment
- OS: macOS
- Zed Version: Latest stable
- Base Keymap: JetBrains
Related Issues
- inline assist: Cursor trapped after closing command palette #25373 (cursor trapped after closing inline assist)
- Keybinding for inline assistant no longer works #22594 (keybinding for inline assistant issues)