assistant: Add diagnostics slash command (#12998)

This adds a `diagnostics` command to the assistant which allows to
inject compile errors/warnings into the context.

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner 2024-06-14 17:14:50 +02:00 committed by GitHub
parent bf03f66d02
commit 0d8e6e6b12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 502 additions and 47 deletions

View file

@ -2122,8 +2122,8 @@ impl Snapshot {
self.traverse_from_offset(false, true, include_ignored, start)
}
pub fn entries(&self, include_ignored: bool) -> Traversal {
self.traverse_from_offset(true, true, include_ignored, 0)
pub fn entries(&self, include_ignored: bool, start: usize) -> Traversal {
self.traverse_from_offset(true, true, include_ignored, start)
}
pub fn repositories(&self) -> impl Iterator<Item = (&Arc<Path>, &RepositoryEntry)> {
@ -2555,7 +2555,7 @@ impl LocalSnapshot {
assert_eq!(bfs_paths, dfs_paths_via_iter);
let dfs_paths_via_traversal = self
.entries(true)
.entries(true, 0)
.map(|e| e.path.as_ref())
.collect::<Vec<_>>();
assert_eq!(dfs_paths_via_traversal, dfs_paths_via_iter);