Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

assistant: Slash command tweaks (#16140)

Piotr Osiewicz0bc9fc94870a
diff --git a/crates/assistant/src/assistant.rs b/crates/assistant/src/assistant.rs
index 406cf380891..77c9a381c64 100644
--- a/crates/assistant/src/assistant.rs
+++ b/crates/assistant/src/assistant.rs
@@ -36,7 +36,7 @@ use settings::{update_settings_file, Settings, SettingsStore};
use slash_command::{
active_command, default_command, diagnostics_command, docs_command, fetch_command,
file_command, now_command, project_command, prompt_command, search_command, symbols_command,
- tabs_command, term_command, workflow_command,
+ tabs_command, terminal_command, workflow_command,
};
use std::sync::Arc;
pub(crate) use streaming_diff::*;
@@ -277,9 +277,9 @@ fn register_slash_commands(prompt_builder: Option<Arc<PromptBuilder>>, cx: &mut
slash_command_registry.register_command(tabs_command::TabsSlashCommand, true);
slash_command_registry.register_command(project_command::ProjectSlashCommand, true);
slash_command_registry.register_command(prompt_command::PromptSlashCommand, true);
- slash_command_registry.register_command(default_command::DefaultSlashCommand, true);
- slash_command_registry.register_command(term_command::TermSlashCommand, true);
- slash_command_registry.register_command(now_command::NowSlashCommand, true);
+ slash_command_registry.register_command(default_command::DefaultSlashCommand, false);
+ slash_command_registry.register_command(terminal_command::TerminalSlashCommand, true);
+ slash_command_registry.register_command(now_command::NowSlashCommand, false);
slash_command_registry.register_command(diagnostics_command::DiagnosticsSlashCommand, true);
if let Some(prompt_builder) = prompt_builder {
slash_command_registry.register_command(
diff --git a/crates/assistant/src/slash_command.rs b/crates/assistant/src/slash_command.rs
index 516fe2fa5eb..0fd7dbcd855 100644
--- a/crates/assistant/src/slash_command.rs
+++ b/crates/assistant/src/slash_command.rs
@@ -29,7 +29,7 @@ pub mod prompt_command;
pub mod search_command;
pub mod symbols_command;
pub mod tabs_command;
-pub mod term_command;
+pub mod terminal_command;
pub mod workflow_command;
pub(crate) struct SlashCommandCompletionProvider {
diff --git a/crates/assistant/src/slash_command/term_command.rs b/crates/assistant/src/slash_command/terminal_command.rs
similarity index 94%
rename from crates/assistant/src/slash_command/term_command.rs
rename to crates/assistant/src/slash_command/terminal_command.rs
index 277e13238f6..54534bf7450 100644
--- a/crates/assistant/src/slash_command/term_command.rs
+++ b/crates/assistant/src/slash_command/terminal_command.rs
@@ -15,17 +15,17 @@ use crate::DEFAULT_CONTEXT_LINES;
use super::create_label_for_command;
-pub(crate) struct TermSlashCommand;
+pub(crate) struct TerminalSlashCommand;
const LINE_COUNT_ARG: &str = "--line-count";
-impl SlashCommand for TermSlashCommand {
+impl SlashCommand for TerminalSlashCommand {
fn name(&self) -> String {
- "term".into()
+ "terminal".into()
}
fn label(&self, cx: &AppContext) -> CodeLabel {
- create_label_for_command("term", &[LINE_COUNT_ARG], cx)
+ create_label_for_command("terminal", &[LINE_COUNT_ARG], cx)
}
fn description(&self) -> String {