zed-industries/zed · error

unexpected rule URI

Error message

unexpected rule URI

What it means

Error "unexpected rule URI" thrown in zed-industries/zed.

Source

Thrown at crates/agent_ui/src/mention_set.rs:353

            }
            MentionUri::Selection { .. } => {
                debug_panic!("unexpected selection URI");
                Task::ready(Err(anyhow!("unexpected selection URI")))
            }
            MentionUri::TerminalSelection { .. } => {
                debug_panic!("unexpected terminal URI");
                Task::ready(Err(anyhow!("unexpected terminal URI")))
            }
            MentionUri::GitDiff { base_ref } => {
                self.confirm_mention_for_git_diff(base_ref.into(), cx)
            }
            MentionUri::MergeConflict { .. } => {
                debug_panic!("unexpected merge conflict URI");
                Task::ready(Err(anyhow!("unexpected merge conflict URI")))
            }
            MentionUri::Rule { .. } => {
                debug_panic!("unexpected rule URI");
                Task::ready(Err(anyhow!("unexpected rule URI")))
            }
        };
        let task = cx
            .spawn(async move |_, _| task.await.map_err(|e| e.to_string()))
            .shared();
        self.mentions.insert(crease_id, (mention_uri, task.clone()));
        if let Some(entity) = crease_entity {
            self.crease_entities.insert(crease_id, entity);
        }
        self.recompute_disambiguation(cx);

        // Notify the user if we failed to load the mentioned context
        let workspace = workspace.downgrade();
        cx.spawn(async move |this, mut cx| {
            let result = task.await.notify_workspace_async_err(workspace, &mut cx);
            drop(tx);
            if result.is_none() {
                this.update(cx, |this, cx| {

View on GitHub (pinned to bc538def45)

When it happens

Trigger: Thrown at crates/agent_ui/src/mention_set.rs:353 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16). Data as JSON: /api/errors/244f25beee8c7824. Report an issue: GitHub.