Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
assistant: Show a message when no docs providers are available (#14207)
Marshall Bowers45c54d189a53
diff --git a/crates/assistant/src/slash_command/docs_command.rs b/crates/assistant/src/slash_command/docs_command.rsindex c7e90edfd70..53b02eb128e 100644--- a/crates/assistant/src/slash_command/docs_command.rs+++ b/crates/assistant/src/slash_command/docs_command.rs@@ -121,6 +121,14 @@ impl SlashCommand for DocsSlashCommand {match args {DocsSlashCommandArgs::NoProvider => {let providers = indexed_docs_registry.list_providers();+ if providers.is_empty() {+ return Ok(vec![ArgumentCompletion {+ label: "No available docs providers.".to_string(),+ new_text: String::new(),+ run_command: false,+ }]);+ }+Ok(providers.into_iter().map(|provider| ArgumentCompletion {