assistant: Add /rustdoc
slash command (#12453)
This PR adds a `/rustdoc` slash command for retrieving and inserting rustdoc docs into the Assistant. Right now the command accepts the crate name as an argument and will return the top-level docs from `docs.rs`. Release Notes: - N/A
This commit is contained in:
parent
dd328efaa7
commit
08881828ce
8 changed files with 152 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
|||
use crate::prompts::{generate_content_prompt, PromptLibrary, PromptManager};
|
||||
use crate::slash_command::{search_command, tabs_command};
|
||||
use crate::slash_command::{rustdoc_command, search_command, tabs_command};
|
||||
use crate::{
|
||||
assistant_settings::{AssistantDockPosition, AssistantSettings, ZedDotDevModel},
|
||||
codegen::{self, Codegen, CodegenKind},
|
||||
|
@ -210,6 +210,7 @@ impl AssistantPanel {
|
|||
slash_command_registry.register_command(tabs_command::TabsSlashCommand);
|
||||
slash_command_registry.register_command(project_command::ProjectSlashCommand);
|
||||
slash_command_registry.register_command(search_command::SearchSlashCommand);
|
||||
slash_command_registry.register_command(rustdoc_command::RustdocSlashCommand);
|
||||
|
||||
Self {
|
||||
workspace: workspace_handle,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue