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
|
@ -1,6 +1,8 @@
|
|||
use super::{file_command::append_buffer_to_output, SlashCommand, SlashCommandOutput};
|
||||
use anyhow::{Context, Result};
|
||||
use assistant_slash_command::{ArgumentCompletion, SlashCommandOutputSection};
|
||||
use assistant_slash_command::{
|
||||
ArgumentCompletion, SlashCommand, SlashCommandOutput, SlashCommandOutputSection,
|
||||
SlashCommandResult,
|
||||
};
|
||||
use collections::{HashMap, HashSet};
|
||||
use editor::Editor;
|
||||
use futures::future::join_all;
|
||||
|
@ -14,6 +16,8 @@ use ui::{ActiveTheme, WindowContext};
|
|||
use util::ResultExt;
|
||||
use workspace::Workspace;
|
||||
|
||||
use crate::slash_command::file_command::append_buffer_to_output;
|
||||
|
||||
pub(crate) struct TabSlashCommand;
|
||||
|
||||
const ALL_TABS_COMPLETION_ITEM: &str = "all";
|
||||
|
@ -132,7 +136,7 @@ impl SlashCommand for TabSlashCommand {
|
|||
workspace: WeakView<Workspace>,
|
||||
_delegate: Option<Arc<dyn LspAdapterDelegate>>,
|
||||
cx: &mut WindowContext,
|
||||
) -> Task<Result<SlashCommandOutput>> {
|
||||
) -> Task<SlashCommandResult> {
|
||||
let tab_items_search = tab_items_for_queries(
|
||||
Some(workspace),
|
||||
arguments,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue