Agent Panel: Send keyboard shortcut does not work on macOS
Summary
The Send button on the Agent panel shows a shortcut of ⌘↵ on macOS, but it just inserts a new line.
Description
Steps to trigger the problem:
- Run Zed on macOS.
- Configure for a local install of ollama with
codellama:latestas the model. - Open the Agent panel.
- Enter a prompt and press
⌘↵. Actual Behavior: A new line is inserted. Expected Behavior: The prompt is sent to the LLM.
Zed Version and System Specs
Zed: v0.179.5 (Zed) OS: macOS 14.7.4 Memory: 64 GiB Architecture: aarch64
Hey, thanks for the issue! I can't reproduce it, though. When I hit cmd-enter in the new Agent Panel, nothing happens. But cmd-enter does send the prompt in the old Assistant (or "Text Thread" now).
Thanks — it's still happening for me. I've attached my settings.
I'm using the textmate base_keymap — could that be it? Is the key perhaps set to something different there, but Zed is displaying the default shortcut rather than what's actually in the keymap?
settings.json
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"telemetry": {
"metrics": false,
"diagnostics": false
},
"features": {
"edit_prediction_provider": "none"
},
"language_models": {
"ollama": {
"api_url": "http://localhost:11434",
"available_models": [
{
"name": "codellama:latest",
"display_name": "CodeLlama",
"max_tokens": 16384
},
{
"name": "qwen2.5-coder:latest",
"display_name": "Qwen Coder",
"max_tokens": 16384
}
]
}
},
"ui_font_size": 16,
"buffer_font_size": 16,
"theme": {
"mode": "dark",
"light": "One Light",
"dark": "Catppuccin Macchiato"
},
"base_keymap": "TextMate",
"buffer_font_family": "Drafting*Mono Nerd Font",
"buffer_font_fallbacks": [
"Zed Plex Mono"
],
"buffer_font_features": {
// Disable ligatures:
"calt": false
},
"buffer_line_height": {
"custom": 1.45
},
"cursor_blink": false,
"scrollbar": {
"show": "always"
},
"seed_search_query_from_cursor": "selection",
"assistant": {
"version": "2",
"enabled": true,
"default_model": {
"provider": "ollama",
"model": "qwen2.5-coder:latest"
}
},
"tabs": {
"git_status": true,
"close_position": "right",
"file_icons": true,
"activate_on_close": "left_neighbour"
},
"tab_size": 2,
"journal": {
"hour_format": "hour24"
},
"terminal": {
"dock": "right",
"blinking": "off",
"line_height": {
"custom": 1.45
}
},
"prettier": {
"printWidth": 120,
"useTabs": false,
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "always"
},
"languages": {
"Markdown": {
"remove_trailing_whitespace_on_save": false
}
},
"soft_wrap": "editor_width"
}
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"telemetry": {
"metrics": false,
"diagnostics": false
},
"features": {
"edit_prediction_provider": "none"
},
"language_models": {
"ollama": {
"api_url": "http://localhost:11434",
"available_models": [
{
"name": "codellama:latest",
"display_name": "CodeLlama",
"max_tokens": 16384
},
{
"name": "qwen2.5-coder:latest",
"display_name": "Qwen Coder",
"max_tokens": 16384
}
]
}
},
"ui_font_size": 16,
"buffer_font_size": 16,
"theme": {
"mode": "dark",
"light": "One Light",
"dark": "Catppuccin Macchiato"
},
"base_keymap": "TextMate",
"buffer_font_family": "Drafting*Mono Nerd Font",
"buffer_font_fallbacks": [
"Zed Plex Mono"
],
"buffer_font_features": {
// Disable ligatures:
"calt": false
},
"buffer_line_height": {
"custom": 1.45
},
"cursor_blink": false,
"scrollbar": {
"show": "always"
},
"seed_search_query_from_cursor": "selection",
"assistant": {
"version": "2",
"enabled": true,
"default_model": {
"provider": "ollama",
"model": "qwen2.5-coder:latest"
}
},
"tabs": {
"git_status": true,
"close_position": "right",
"file_icons": true,
"activate_on_close": "left_neighbour"
},
"tab_size": 2,
"journal": {
"hour_format": "hour24"
},
"terminal": {
"dock": "right",
"blinking": "off",
"line_height": {
"custom": 1.45
}
},
"prettier": {
"printWidth": 120,
"useTabs": false,
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "always"
},
"languages": {
"Markdown": {
"remove_trailing_whitespace_on_save": false
}
},
"soft_wrap": "editor_width"
}
@unikitty37 You are right, if I change the base keymap to TextMate I experience the same issue. That is helpful to know, we'll see if we can find the issue.
@unikitty37 alright I looked into this some more and it is due to the fact that the TextMate bindings set cmd-enter to have this behavior in all editor contexts.
In order to avoid issues, the simplest fix would be to add the following to your keymap.json (zed: open keymap from the command palette)
{
"context": "MessageEditor > Editor",
"bindings": {
"cmd-enter": "agent::ChatWithFollow"
}
}
This pulls in the default behavior we have in the Agent Panel, and will be more specific than the default keybinding from TextMate.
Hopefully this helps, let us know if you run into any more issues!