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
|
@ -4,6 +4,7 @@ use std::sync::Arc;
|
|||
use anyhow::Result;
|
||||
use assistant_slash_command::{
|
||||
ArgumentCompletion, SlashCommand, SlashCommandOutput, SlashCommandOutputSection,
|
||||
SlashCommandResult,
|
||||
};
|
||||
use chrono::Local;
|
||||
use gpui::{Task, WeakView};
|
||||
|
@ -48,7 +49,7 @@ impl SlashCommand for NowSlashCommand {
|
|||
_workspace: WeakView<Workspace>,
|
||||
_delegate: Option<Arc<dyn LspAdapterDelegate>>,
|
||||
_cx: &mut WindowContext,
|
||||
) -> Task<Result<SlashCommandOutput>> {
|
||||
) -> Task<SlashCommandResult> {
|
||||
let now = Local::now();
|
||||
let text = format!("Today is {now}.", now = now.to_rfc2822());
|
||||
let range = 0..text.len();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue