tasks: Refresh available tasks in editor when tasks.json changes (#11811)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz
2024-05-14 21:26:35 +02:00
committed by GitHub
parent 0ae0b08c38
commit 1db136ff65
6 changed files with 126 additions and 50 deletions
+4
View File
@@ -1581,6 +1581,10 @@ impl Editor {
editor.refresh_inlay_hints(InlayHintRefreshReason::RefreshRequested, cx);
};
}));
let task_inventory = project.read(cx).task_inventory().clone();
project_subscriptions.push(cx.observe(&task_inventory, |editor, _, cx| {
editor.tasks_update_task = Some(editor.refresh_runnables(cx));
}));
}
}