assistant: Show an indicator when a crate is being indexed (#13174)

This PR adds an indicator when a crate is being indexed as part of the
`/rustdoc` command invocation.


https://github.com/zed-industries/zed/assets/1486634/0dd4b663-658c-4be5-a342-cfbd7a938fca

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-06-17 17:39:38 -04:00 committed by GitHub
parent 7aa28c9b24
commit 59104a08fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 60 additions and 7 deletions

View file

@ -71,6 +71,11 @@ impl RustdocStore {
}
}
/// Returns whether the crate with the given name is currently being indexed.
pub fn is_indexing(&self, crate_name: &CrateName) -> bool {
self.indexing_tasks_by_crate.read().contains_key(crate_name)
}
pub async fn load(
&self,
crate_name: CrateName,