Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Make slash command descriptions consistent (#18595)
Danilo Leal8a18c94f33fc
diff --git a/crates/assistant/src/slash_command/auto_command.rs b/crates/assistant/src/slash_command/auto_command.rsindex 14cee296820..14bbb7c8412 100644--- a/crates/assistant/src/slash_command/auto_command.rs+++ b/crates/assistant/src/slash_command/auto_command.rs@@ -31,11 +31,11 @@ impl SlashCommand for AutoCommand {}fn description(&self) -> String {- "Automatically infer what context to add, based on your prompt".into()+ "Automatically infer what context to add".into()}fn menu_text(&self) -> String {- "Automatically Infer Context".into()+ self.description()}fn label(&self, cx: &AppContext) -> CodeLabel {diff --git a/crates/assistant/src/slash_command/delta_command.rs b/crates/assistant/src/slash_command/delta_command.rsindex 6a66ad3f09a..6f697ecbb9b 100644--- a/crates/assistant/src/slash_command/delta_command.rs+++ b/crates/assistant/src/slash_command/delta_command.rs@@ -19,11 +19,11 @@ impl SlashCommand for DeltaSlashCommand {}fn description(&self) -> String {- "re-insert changed files".into()+ "Re-insert changed files".into()}fn menu_text(&self) -> String {- "Re-insert Changed Files".into()+ self.description()}fn requires_argument(&self) -> bool {diff --git a/crates/assistant/src/slash_command/diagnostics_command.rs b/crates/assistant/src/slash_command/diagnostics_command.rsindex 3f79c016750..146a4e5d366 100644--- a/crates/assistant/src/slash_command/diagnostics_command.rs+++ b/crates/assistant/src/slash_command/diagnostics_command.rs@@ -95,7 +95,7 @@ impl SlashCommand for DiagnosticsSlashCommand {}fn menu_text(&self) -> String {- "Insert Diagnostics".into()+ self.description()}fn requires_argument(&self) -> bool {diff --git a/crates/assistant/src/slash_command/fetch_command.rs b/crates/assistant/src/slash_command/fetch_command.rsindex 23d3c884a8e..3a01bb645a3 100644--- a/crates/assistant/src/slash_command/fetch_command.rs+++ b/crates/assistant/src/slash_command/fetch_command.rs@@ -104,11 +104,11 @@ impl SlashCommand for FetchSlashCommand {}fn description(&self) -> String {- "insert URL contents".into()+ "Insert fetched URL contents".into()}fn menu_text(&self) -> String {- "Insert fetched URL contents".into()+ self.description()}fn requires_argument(&self) -> bool {diff --git a/crates/assistant/src/slash_command/file_command.rs b/crates/assistant/src/slash_command/file_command.rsindex 260c6b0e2a0..6da56d06417 100644--- a/crates/assistant/src/slash_command/file_command.rs+++ b/crates/assistant/src/slash_command/file_command.rs@@ -110,11 +110,11 @@ impl SlashCommand for FileSlashCommand {}fn description(&self) -> String {- "insert file".into()+ "Insert file".into()}fn menu_text(&self) -> String {- "Insert File".into()+ self.description()}fn requires_argument(&self) -> bool {diff --git a/crates/assistant/src/slash_command/now_command.rs b/crates/assistant/src/slash_command/now_command.rsindex eb0ca926f01..221ba05cafc 100644--- a/crates/assistant/src/slash_command/now_command.rs+++ b/crates/assistant/src/slash_command/now_command.rs@@ -19,11 +19,11 @@ impl SlashCommand for NowSlashCommand {}fn description(&self) -> String {- "insert the current date and time".into()+ "Insert current date and time".into()}fn menu_text(&self) -> String {- "Insert Current Date and Time".into()+ self.description()}fn requires_argument(&self) -> bool {diff --git a/crates/assistant/src/slash_command/project_command.rs b/crates/assistant/src/slash_command/project_command.rsindex 197e91d91ad..58fef8f3387 100644--- a/crates/assistant/src/slash_command/project_command.rs+++ b/crates/assistant/src/slash_command/project_command.rs@@ -47,11 +47,11 @@ impl SlashCommand for ProjectSlashCommand {}fn description(&self) -> String {- "Generate semantic searches based on the current context".into()+ "Generate a semantic search based on context".into()}fn menu_text(&self) -> String {- "Project Context".into()+ self.description()}fn requires_argument(&self) -> bool {diff --git a/crates/assistant/src/slash_command/prompt_command.rs b/crates/assistant/src/slash_command/prompt_command.rsindex effbcc0f90c..978c6d7504c 100644--- a/crates/assistant/src/slash_command/prompt_command.rs+++ b/crates/assistant/src/slash_command/prompt_command.rs@@ -16,11 +16,11 @@ impl SlashCommand for PromptSlashCommand {}fn description(&self) -> String {- "insert prompt from library".into()+ "Insert prompt from library".into()}fn menu_text(&self) -> String {- "Insert Prompt from Library".into()+ self.description()}fn requires_argument(&self) -> bool {diff --git a/crates/assistant/src/slash_command/search_command.rs b/crates/assistant/src/slash_command/search_command.rsindex f0f3ee3d25c..c7183e95bbc 100644--- a/crates/assistant/src/slash_command/search_command.rs+++ b/crates/assistant/src/slash_command/search_command.rs@@ -34,11 +34,11 @@ impl SlashCommand for SearchSlashCommand {}fn description(&self) -> String {- "semantic search".into()+ "Search your project semantically".into()}fn menu_text(&self) -> String {- "Semantic Search".into()+ self.description()}fn requires_argument(&self) -> bool {diff --git a/crates/assistant/src/slash_command/symbols_command.rs b/crates/assistant/src/slash_command/symbols_command.rsindex 1cf8536c0db..887b57ba995 100644--- a/crates/assistant/src/slash_command/symbols_command.rs+++ b/crates/assistant/src/slash_command/symbols_command.rs@@ -17,11 +17,11 @@ impl SlashCommand for OutlineSlashCommand {}fn description(&self) -> String {- "insert symbols for active tab".into()+ "Insert symbols for active tab".into()}fn menu_text(&self) -> String {- "Insert Symbols for Active Tab".into()+ self.description()}fn complete_argument(diff --git a/crates/assistant/src/slash_command/tab_command.rs b/crates/assistant/src/slash_command/tab_command.rsindex bdf8450d43b..0bff4730d8e 100644--- a/crates/assistant/src/slash_command/tab_command.rs+++ b/crates/assistant/src/slash_command/tab_command.rs@@ -24,11 +24,11 @@ impl SlashCommand for TabSlashCommand {}fn description(&self) -> String {- "insert open tabs (active tab by default)".to_owned()+ "Insert open tabs (active tab by default)".to_owned()}fn menu_text(&self) -> String {- "Insert Open Tabs".to_owned()+ self.description()}fn requires_argument(&self) -> bool {diff --git a/crates/assistant/src/slash_command/terminal_command.rs b/crates/assistant/src/slash_command/terminal_command.rsindex 1d0293c235d..1d4959fb199 100644--- a/crates/assistant/src/slash_command/terminal_command.rs+++ b/crates/assistant/src/slash_command/terminal_command.rs@@ -29,11 +29,11 @@ impl SlashCommand for TerminalSlashCommand {}fn description(&self) -> String {- "insert terminal output".into()+ "Insert terminal output".into()}fn menu_text(&self) -> String {- "Insert Terminal Output".into()+ self.description()}fn requires_argument(&self) -> bool {diff --git a/crates/assistant/src/slash_command/workflow_command.rs b/crates/assistant/src/slash_command/workflow_command.rsindex c66dd9bebff..071b4feaf43 100644--- a/crates/assistant/src/slash_command/workflow_command.rs+++ b/crates/assistant/src/slash_command/workflow_command.rs@@ -29,11 +29,11 @@ impl SlashCommand for WorkflowSlashCommand {}fn description(&self) -> String {- "insert a prompt that opts into the edit workflow".into()+ "Insert prompt to opt into the edit workflow".into()}fn menu_text(&self) -> String {- "Insert Workflow Prompt".into()+ self.description()}fn requires_argument(&self) -> bool {diff --git a/crates/assistant/src/slash_command_picker.rs b/crates/assistant/src/slash_command_picker.rsindex 4b57dcfb330..58023848b0e 100644--- a/crates/assistant/src/slash_command_picker.rs+++ b/crates/assistant/src/slash_command_picker.rs@@ -184,7 +184,7 @@ impl PickerDelegate for SlashCommandDelegate {h_flex().group(format!("command-entry-label-{ix}")).w_full()- .min_w(px(220.))+ .min_w(px(250.)).child(v_flex().child(@@ -203,7 +203,9 @@ impl PickerDelegate for SlashCommandDelegate {div().font_buffer(cx).child(- Label::new(args).size(LabelSize::Small),+ Label::new(args)+ .size(LabelSize::Small)+ .color(Color::Muted),).visible_on_hover(format!("command-entry-label-{ix}"