Allow extensions to suggest packages for /docs
completions (#16185)
This PR gives extensions the ability to suggest packages to show up in `/docs` completions by default. Release Notes: - N/A
This commit is contained in:
parent
c6a1d9aa33
commit
aa12ae0e3c
5 changed files with 64 additions and 1 deletions
|
@ -135,6 +135,13 @@ world extension {
|
|||
/// Returns the output from running the provided slash command.
|
||||
export run-slash-command: func(command: slash-command, argument: option<string>, worktree: option<borrow<worktree>>) -> result<slash-command-output, string>;
|
||||
|
||||
/// Returns a list of packages as suggestions to be included in the `/docs`
|
||||
/// search results.
|
||||
///
|
||||
/// This can be used to provide completions for known packages (e.g., from the
|
||||
/// local project or a registry) before a package has been indexed.
|
||||
export suggest-docs-packages: func(provider-name: string) -> result<list<string>, string>;
|
||||
|
||||
/// Indexes the docs for the specified package.
|
||||
export index-docs: func(provider-name: string, package-name: string, database: borrow<key-value-store>) -> result<_, string>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue