{"record":{"id":"3fcc8424aeaea37d","repo":"zed-industries/zed","slug":"untitled-buffer-selection-mentions-are-not-support","errorCode":null,"errorMessage":"Untitled buffer selection mentions are not supported for paste","messagePattern":"Untitled buffer selection mentions are not supported for paste","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent_ui/src/mention_set.rs","lineNumber":164,"sourceCode":"                line_range,\n                ..\n            } => self.confirm_mention_for_symbol(abs_path, line_range, cx),\n            MentionUri::Skill {\n                skill_file_path, ..\n            } => self.confirm_mention_for_skill(skill_file_path, cx),\n            MentionUri::Diagnostics {\n                include_errors,\n                include_warnings,\n            } => self.confirm_mention_for_diagnostics(include_errors, include_warnings, cx),\n            MentionUri::GitDiff { base_ref } => {\n                self.confirm_mention_for_git_diff(base_ref.into(), cx)\n            }\n            MentionUri::Selection {\n                abs_path: Some(abs_path),\n                line_range,\n                ..\n            } => self.confirm_mention_for_symbol(abs_path, line_range, cx),\n            MentionUri::Selection { abs_path: None, .. } => Task::ready(Err(anyhow!(\n                \"Untitled buffer selection mentions are not supported for paste\"\n            ))),\n            MentionUri::PastedImage { .. }\n            | MentionUri::TerminalSelection { .. }\n            | MentionUri::MergeConflict { .. }\n            | MentionUri::Rule { .. } => {\n                Task::ready(Err(anyhow!(\"Unsupported mention URI type for paste\")))\n            }\n        }\n    }\n\n    pub fn remove_mention(&mut self, crease_id: &CreaseId, cx: &mut App) {\n        self.mentions.remove(crease_id);\n        self.crease_entities.remove(crease_id);\n        self.recompute_disambiguation(cx);\n    }\n\n    pub fn creases(&self) -> HashSet<CreaseId> {","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/agent_ui/src/mention_set.rs#L146-L182","documentation":"Raised by confirm_mention_for_uri when pasting a mention whose URI is a Selection with no abs_path — i.e. a selection in an untitled (unsaved) buffer. Converting a selection mention into pasteable content requires a real file to read from; untitled buffers have no path, so the guard rejects the paste. The offending input is the Selection mention with abs_path: None.","triggerScenarios":"Thrown at crates/agent_ui/src/mention_set.rs:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Save the untitled buffer to disk before copying its selection mention","Copy the selected text directly instead of pasting it as a mention"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}