Make slash commands more discoverable (#12480)

<img width="648" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/a63df904-fbbe-4e0a-80b2-c98ebee90690">

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2024-05-30 16:45:05 +02:00 committed by GitHub
parent 436a8fa0ce
commit a259042f92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 172 additions and 100 deletions

View file

@ -27,7 +27,7 @@ impl SlashCommand for ExtensionSlashCommand {
self.command.description.clone()
}
fn tooltip_text(&self) -> String {
fn menu_text(&self) -> String {
self.command.tooltip_text.clone()
}

View file

@ -1178,8 +1178,8 @@ impl ExtensionStore {
}
for (slash_command_name, slash_command) in &manifest.slash_commands {
this.slash_command_registry
.register_command(ExtensionSlashCommand {
this.slash_command_registry.register_command(
ExtensionSlashCommand {
command: crate::wit::SlashCommand {
name: slash_command_name.to_string(),
description: slash_command.description.to_string(),
@ -1188,7 +1188,9 @@ impl ExtensionStore {
},
extension: wasm_extension.clone(),
host: this.wasm_host.clone(),
});
},
false,
);
}
}
this.wasm_extensions.extend(wasm_extensions);