From d1880c6e0b96dfcdff955a0a3d74e98db03a2f0f Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 24 Oct 2024 13:39:06 -0400 Subject: [PATCH] assistant: Add implementation for `/delta` argument completion (#19693) This PR fixes a panic that could occur when trying to complete arguments for the `/delta` slash command. We were using `unimplemented!()` instead of providing a default no-op implementation like we do for other slash commands that do not support completing arguments. Closes https://github.com/zed-industries/zed/issues/19686. Release Notes: - Fixed a panic that could occur when trying to complete arguments with the `/delta` command. --- crates/assistant/src/slash_command/delta_command.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/assistant/src/slash_command/delta_command.rs b/crates/assistant/src/slash_command/delta_command.rs index 6f697ecbb9bcba2d72657ba79a88610836eff1dc..9171ec83e923187052de5150feb4abdc25bc5e34 100644 --- a/crates/assistant/src/slash_command/delta_command.rs +++ b/crates/assistant/src/slash_command/delta_command.rs @@ -1,5 +1,5 @@ use crate::slash_command::file_command::{FileCommandMetadata, FileSlashCommand}; -use anyhow::Result; +use anyhow::{anyhow, Result}; use assistant_slash_command::{ ArgumentCompletion, SlashCommand, SlashCommandOutput, SlashCommandOutputSection, }; @@ -37,7 +37,7 @@ impl SlashCommand for DeltaSlashCommand { _workspace: Option>, _cx: &mut WindowContext, ) -> Task>> { - unimplemented!() + Task::ready(Err(anyhow!("this command does not require argument"))) } fn run(