diff --git a/crates/acp_thread/src/mention.rs b/crates/acp_thread/src/mention.rs index 43dfe7610e34a0399a27a1d28858b938acfc2e0f..0b6c0b482b8b048dbb0f6c4c3991a6255a1ef548 100644 --- a/crates/acp_thread/src/mention.rs +++ b/crates/acp_thread/src/mention.rs @@ -337,7 +337,11 @@ impl MentionUri { MentionUri::PastedImage => Url::parse("zed:///agent/pasted-image").unwrap(), MentionUri::Directory { abs_path } => { let mut url = Url::parse("file:///").unwrap(); - url.set_path(&abs_path.to_string_lossy()); + let mut path_str = abs_path.to_string_lossy().into_owned(); + if !path_str.ends_with('/') { + path_str.push('/'); + } + url.set_path(&path_str); url } MentionUri::Symbol {