Run slash commands both on enter and on argument completion that requires it (#16283)

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov
2024-08-15 19:36:30 +03:00
committed by GitHub
parent 5a30e29848
commit c45adce2e3
9 changed files with 61 additions and 34 deletions
@@ -42,6 +42,9 @@ pub trait SlashCommand: 'static + Send + Sync {
cx: &mut WindowContext,
) -> Task<Result<Vec<ArgumentCompletion>>>;
fn requires_argument(&self) -> bool;
fn accepts_arguments(&self) -> bool {
self.requires_argument()
}
fn run(
self: Arc<Self>,
arguments: &[String],