Make slash command descriptions consistent (#18595)

Danilo Leal and Marshall Bowers created

This PR adds a description constant in most of the slash command files
so that both the editor _and_ footer pickers use the same string. In
terms of copywriting, I did some tweaking to reduce the longer ones a
bit. Also standardized them all to use sentence case, as opposed to each
instance using a different convention. The editor picker needs more
work, though, given the arguments and descriptions are being cut at the
moment. This should happen in a follow-up!

<img width="900" alt="Screenshot 2024-10-01 at 7 25 19 PM"
src="https://github.com/user-attachments/assets/e8759eff-0de9-4a4d-a026-366d85507b3c">

---

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

Change summary

crates/assistant/src/slash_command/auto_command.rs        | 4 ++--
crates/assistant/src/slash_command/delta_command.rs       | 4 ++--
crates/assistant/src/slash_command/diagnostics_command.rs | 2 +-
crates/assistant/src/slash_command/fetch_command.rs       | 4 ++--
crates/assistant/src/slash_command/file_command.rs        | 4 ++--
crates/assistant/src/slash_command/now_command.rs         | 4 ++--
crates/assistant/src/slash_command/project_command.rs     | 4 ++--
crates/assistant/src/slash_command/prompt_command.rs      | 4 ++--
crates/assistant/src/slash_command/search_command.rs      | 4 ++--
crates/assistant/src/slash_command/symbols_command.rs     | 4 ++--
crates/assistant/src/slash_command/tab_command.rs         | 4 ++--
crates/assistant/src/slash_command/terminal_command.rs    | 4 ++--
crates/assistant/src/slash_command/workflow_command.rs    | 4 ++--
crates/assistant/src/slash_command_picker.rs              | 6 ++++--
14 files changed, 29 insertions(+), 27 deletions(-)

Detailed changes

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 {

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 {

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 {

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 {

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 {

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 {

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 {

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 {

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(

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 {

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 {

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 {

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}"