Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
assistant: Show an error when `/fetch` returns no content (#16001)
Marshall Bowers2bc503771bf1
diff --git a/crates/assistant/src/slash_command/fetch_command.rs b/crates/assistant/src/slash_command/fetch_command.rsindex e1a784f71ae..e3b1b92aba1 100644--- a/crates/assistant/src/slash_command/fetch_command.rs+++ b/crates/assistant/src/slash_command/fetch_command.rs@@ -150,6 +150,10 @@ impl SlashCommand for FetchSlashCommand {let url = SharedString::from(url);cx.foreground_executor().spawn(async move {let text = text.await?;+ if text.trim().is_empty() {+ bail!("no textual content found");+ }+let range = 0..text.len();Ok(SlashCommandOutput {text,