Skip to content

Panic on /terminal if Assistant has been dragged out of dock #27522

@notpeter

Description

@notpeter

Summary

Reproducible Panic if you type /terminal in Assistant1 once it's been undocked.

Steps to trigger the problem:

  1. Open an assistant panel
  2. Drag the "New Chat" tab to the middle/editor pane.
  3. Type /terminal and press enter.

Actual Behavior: Panic! at the disco

Expected Behavior: don't panic

Zed Version and System Specs

Zed: v0.181.0 (Zed Nightly 7e4320f)
OS: macOS 15.3.2
Memory: 64 GiB
Architecture: aarch64

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

{
  "thread": "main",
  "payload": "cannot read assistant_context_editor::context_editor::ContextEditor while it is already being updated",
  "location_data": {
    "file": "/Users/administrator/actions-runner/_work/zed/zed/crates/gpui/src/app/entity_map.rs",
    "line": 139
  },
  "backtrace": [
    "backtrace::capture::Backtrace::create::h52f9271ec334a762+13385456",
    "backtrace::capture::Backtrace::new::hce8e52c9de3d5882+13385264",
    "zed::reliability::init_panic_hook::{{closure}}::h44d1c76342e5b0bf+96274416",
    "std::panicking::rust_panic_with_hook::hc9e2ec2a12b10e12+76129788",
    "std::panicking::begin_panic_handler::{{closure}}::h3b6449e2eb83bf4c+76128616",
    "std::sys::backtrace::__rust_end_short_backtrace::h38d85099ddd107a3+76122984",
    "_rust_begin_unwind+76127788",
    "core::panicking::panic_fmt::hd4003258f6ab7b29+105792448",
    "gpui::app::entity_map::double_lease_panic::h69d54bfa771bcc55+1203680",
    "<gpui::app::entity_map::Entity<T> as workspace::item::ItemHandle>::act_as_type::h99446228eb397d94+2106948",
    "<assistant_slash_commands::terminal_command::TerminalSlashCommand as assistant_slash_command::SlashCommand>::run::hb5f37c6136eb6eb5+9911540",
    "assistant_context_editor::context_editor::ContextEditor::run_command::hb6ff1de595544e66+8228984",
    "assistant_context_editor::slash_command::SlashCommandCompletionProvider::complete_command_name::{{closure}}::{{closure}}::{{closure}}::{{closure}}::{{closure}}::{{closure}}::h09c4d2160bfcf24a+8517980",
    "editor::Editor::do_completion::h0e80bc3b2ae9522c+29277948",
    "editor::element::register_action::{{closure}}::he64232ac7d8d3414+28476140",
    "gpui::window::Window::dispatch_action_on_node::h1028865f684712ec+40691600",
    "gpui::window::Window::dispatch_event::h38363d97b7ec6954+40753604",
    "gpui::window::Window::new::{{closure}}::hf21f645428f86131+40634924",
    "gpui::platform::mac::window::handle_key_event::hd8b9bc39b5a1bdcb+40451484",
    "<gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::run::hf175604a325e58b2+40380348",
    "gpui::app::Application::run::h10d8f80177ae39b3+94153252",
    "zed::main::hb8cef8b601c7c1fc+96297632",
    "std::sys::backtrace::__rust_begin_short_backtrace::h750b8f5b79cb41c4+96136488",
    "std::rt::lang_start::{{closure}}::h698c5cfaedcebc0e+96729192",
    "std::rt::lang_start_internal::h5f91760815528aa2+76065024",
    "_main+96311704"
  ],
  "app_version": "0.181.0",
  "app_commit_sha": "7e4320f587bf36fcba8e9f7858ad9172e7e8f702",
  "release_channel": "nightly",
  "target": "aarch64-apple-darwin",
  "os_name": "macOS",
  "os_version": "15.3.2",
  "architecture": "aarch64",
  "panicked_on": 1743016343405,
  "system_id": "e6b5b705-51bf-4704-80d7-4964627c0c04",
  "installation_id": "9146990d-7463-4795-bdf0-9357bd824f4b",
  "session_id": "2aaf9c02-be82-4b39-9307-f3580ed35228"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ai/assistantAI feedback for Assistant (inline or panel)state:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions