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:
parent
c793bbde84
commit
d5735dab9a
4 changed files with 220 additions and 56 deletions
|
@ -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};
|
||||
|
@ -93,9 +93,10 @@ impl SlashCommand for TabsSlashCommand {
|
|||
sections.push(SlashCommandOutputSection {
|
||||
range: section_start_ix..section_end_ix,
|
||||
render_placeholder: Arc::new(move |id, unfold, _| {
|
||||
FilePlaceholder {
|
||||
EntryPlaceholder {
|
||||
id,
|
||||
path: full_path.clone(),
|
||||
is_directory: false,
|
||||
line_range: None,
|
||||
unfold,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue