Add a SlashCommandResult
type alias (#19633)
This PR adds a new `SlashCommandResult` type alias. We're going to be changing what slash commands can return in order to support streaming, so having this type alias in place will make that switch a bit more neat. Release Notes: - N/A
This commit is contained in:
parent
8bfd27b00b
commit
9c0dba4ce1
21 changed files with 87 additions and 54 deletions
|
@ -56,6 +56,8 @@ pub struct ArgumentCompletion {
|
|||
pub replace_previous_arguments: bool,
|
||||
}
|
||||
|
||||
pub type SlashCommandResult = Result<SlashCommandOutput>;
|
||||
|
||||
pub trait SlashCommand: 'static + Send + Sync {
|
||||
fn name(&self) -> String;
|
||||
fn label(&self, _cx: &AppContext) -> CodeLabel {
|
||||
|
@ -87,7 +89,7 @@ pub trait SlashCommand: 'static + Send + Sync {
|
|||
// perhaps another kind of delegate is needed here.
|
||||
delegate: Option<Arc<dyn LspAdapterDelegate>>,
|
||||
cx: &mut WindowContext,
|
||||
) -> Task<Result<SlashCommandOutput>>;
|
||||
) -> Task<SlashCommandResult>;
|
||||
}
|
||||
|
||||
pub type RenderFoldPlaceholder = Arc<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue