Show recently-opened files when autocompleting /file without arguments (#12434)

<img width="1588" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/ea63b046-64d6-419e-8135-4863748b58fa">


Release Notes:

- N/A
This commit is contained in:
Antonio Scandurra 2024-05-29 17:46:18 +02:00 committed by GitHub
parent dca5bc5986
commit 66affa969a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 108 additions and 62 deletions

View file

@ -202,9 +202,7 @@ impl AssistantPanel {
let slash_command_registry = SlashCommandRegistry::global(cx);
slash_command_registry.register_command(file_command::FileSlashCommand::new(
workspace.project().clone(),
));
slash_command_registry.register_command(file_command::FileSlashCommand);
slash_command_registry.register_command(
prompt_command::PromptSlashCommand::new(prompt_library.clone()),
);
@ -4190,12 +4188,10 @@ mod tests {
)
.await;
let project = Project::test(fs.clone(), ["/test".as_ref()], cx).await;
let prompt_library = Arc::new(PromptLibrary::default());
let slash_command_registry = SlashCommandRegistry::new();
slash_command_registry
.register_command(file_command::FileSlashCommand::new(project.clone()));
slash_command_registry.register_command(file_command::FileSlashCommand);
slash_command_registry.register_command(prompt_command::PromptSlashCommand::new(
prompt_library.clone(),
));