diff --git a/crates/assistant/src/slash_command/prompt_command.rs b/crates/assistant/src/slash_command/prompt_command.rs index 1b2769add8..0eba5a6dc1 100644 --- a/crates/assistant/src/slash_command/prompt_command.rs +++ b/crates/assistant/src/slash_command/prompt_command.rs @@ -77,6 +77,11 @@ impl SlashCommand for PromptSlashCommand { }); cx.foreground_executor().spawn(async move { let mut prompt = prompt.await?; + + if prompt.starts_with('/') { + // Prevent an edge case where the inserted prompt starts with a slash command (that leads to funky rendering). + prompt.insert(0, '\n'); + } if prompt.is_empty() { prompt.push('\n'); }