assistant: Add glob matching for file slash command (#13137)
This PR adds support for glob matching when using the `file` slash command inside the assistant panel: https://github.com/zed-industries/zed/assets/53836821/696612d2-486c-4ab0-bf3c-d23a3eeefd25 Release Notes: - N/A
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use super::{
|
||||
file_command::{codeblock_fence_for_path, FilePlaceholder},
|
||||
file_command::{codeblock_fence_for_path, EntryPlaceholder},
|
||||
SlashCommand, SlashCommandOutput,
|
||||
};
|
||||
use anyhow::{anyhow, Result};
|
||||
@@ -84,9 +84,10 @@ impl SlashCommand for ActiveSlashCommand {
|
||||
sections: vec![SlashCommandOutputSection {
|
||||
range,
|
||||
render_placeholder: Arc::new(move |id, unfold, _| {
|
||||
FilePlaceholder {
|
||||
EntryPlaceholder {
|
||||
id,
|
||||
path: path.clone(),
|
||||
is_directory: false,
|
||||
line_range: None,
|
||||
unfold,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user