assistant: Fix evaluating slash commands in slash command output (like /default
) (#20864)
This PR fixes an issue where slash commands in the output of other slash commands were not being evaluated when configured to do so. Closes https://github.com/zed-industries/zed/issues/20820. Release Notes: - Fixed slash commands from other slash commands (like `/default`) not being evaluated (Preview only).
This commit is contained in:
parent
6a2c712990
commit
f5cbfa718e
3 changed files with 45 additions and 30 deletions
|
@ -69,6 +69,10 @@ impl SlashCommand for DefaultSlashCommand {
|
|||
text.push('\n');
|
||||
}
|
||||
|
||||
if !text.ends_with('\n') {
|
||||
text.push('\n');
|
||||
}
|
||||
|
||||
Ok(SlashCommandOutput {
|
||||
sections: vec![SlashCommandOutputSection {
|
||||
range: 0..text.len(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue