Add "Fix with Assistant" code action on lines with diagnostics (#18163)

Release Notes:

- Added a new "Fix with Assistant" action on code with errors or
warnings.

---------

Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2024-09-23 11:40:34 -06:00 committed by GitHub
parent 1efe87029b
commit 7051bc00c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 418 additions and 72 deletions

View file

@ -2708,7 +2708,7 @@ async fn test_apply_code_actions_with_commands(cx: &mut gpui::TestAppContext) {
.next()
.await;
let action = actions.await[0].clone();
let action = actions.await.unwrap()[0].clone();
let apply = project.update(cx, |project, cx| {
project.apply_code_action(buffer.clone(), action, true, cx)
});
@ -5046,6 +5046,7 @@ async fn test_multiple_language_server_actions(cx: &mut gpui::TestAppContext) {
vec!["TailwindServer code action", "TypeScriptServer code action"],
code_actions_task
.await
.unwrap()
.into_iter()
.map(|code_action| code_action.lsp_action.title)
.sorted()