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:
parent
bf03f66d02
commit
0d8e6e6b12
12 changed files with 502 additions and 47 deletions
|
@ -305,7 +305,7 @@ impl RandomizedTest for ProjectCollaborationTest {
|
|||
.filter(|worktree| {
|
||||
let worktree = worktree.read(cx);
|
||||
worktree.is_visible()
|
||||
&& worktree.entries(false).any(|e| e.is_file())
|
||||
&& worktree.entries(false, 0).any(|e| e.is_file())
|
||||
&& worktree.root_entry().map_or(false, |e| e.is_dir())
|
||||
})
|
||||
.choose(rng)
|
||||
|
@ -427,14 +427,14 @@ impl RandomizedTest for ProjectCollaborationTest {
|
|||
.filter(|worktree| {
|
||||
let worktree = worktree.read(cx);
|
||||
worktree.is_visible()
|
||||
&& worktree.entries(false).any(|e| e.is_file())
|
||||
&& worktree.entries(false, 0).any(|e| e.is_file())
|
||||
})
|
||||
.choose(rng)
|
||||
});
|
||||
let Some(worktree) = worktree else { continue };
|
||||
let full_path = worktree.read_with(cx, |worktree, _| {
|
||||
let entry = worktree
|
||||
.entries(false)
|
||||
.entries(false, 0)
|
||||
.filter(|e| e.is_file())
|
||||
.choose(rng)
|
||||
.unwrap();
|
||||
|
@ -1206,8 +1206,8 @@ impl RandomizedTest for ProjectCollaborationTest {
|
|||
guest_project.remote_id(),
|
||||
);
|
||||
assert_eq!(
|
||||
guest_snapshot.entries(false).collect::<Vec<_>>(),
|
||||
host_snapshot.entries(false).collect::<Vec<_>>(),
|
||||
guest_snapshot.entries(false, 0).collect::<Vec<_>>(),
|
||||
host_snapshot.entries(false, 0).collect::<Vec<_>>(),
|
||||
"{} has different snapshot than the host for worktree {:?} ({:?}) and project {:?}",
|
||||
client.username,
|
||||
host_snapshot.abs_path(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue