Skip to content

Assistant commands/keybinds should be disabled when agent is disabled #48713

@injust

Description

@injust

Reproduction steps

  1. Disable the agent, i.e.
{
    "agent": { "enabled": false }
}
  1. Search the command palette for assistant
  2. Try to rebind ctrl-enter in some global context like Workspace or Pane, e.g.
{
    {
        "context": "Pane",
        "use_key_equivalents": true,
        "bindings": { "ctrl-enter": "workspace::ToggleZoom" }
    }
}

Current vs. Expected behavior

When the agent is disabled, assistant commands still appear in the command palette, unlike agent commands.

When you try to rebind ctrl-enter, it doesn't work until you change the context to also rebind in 2 specific scenarios (!ContextEditor > Editor && mode == full and Terminal) where default keybinds exist for the assistant. So you end up with this:

{
    {
        "context": "Pane || (!ContextEditor > Editor && mode == full) || Terminal",
        "use_key_equivalents": true,
        "bindings": { "ctrl-enter": "workspace::ToggleZoom" }
    }
}

This is not a great experience for customizing keybinds as it requires digging into the default keybinds or the keyboard context view. Ideally, the default assistant keybinds would be removed entirely when the agent is disabled.

Zed version and system specs

Zed: v0.222.4+stable.147.b385025df963c9e8c3f74cc4dadb1c4b29b3c6f0 (Zed)
OS: macOS 15.7.3
Memory: 16 GiB
Architecture: x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aiRelated to Agent Panel, Edit Prediction, Copilot, or other AI featuresarea:controls/keybindsKeyboard shortcuts, mapping, binding, keymaps, etccommunity championIssues filed by our amazing community champions! 🫶frequency:alwaysBug that happens for everyone on every platform no matter how they use Zedpriority:P3Papercuts, minor issues with a clear workaround, cosmetic bugsstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions