Rework remote task synchronization (#18746)

Reworks the way tasks are stored, accessed and synchronized in the
`project`.
Now both collab and ssh remote projects use the same TaskStorage kind to
get the task context from the remote host, and worktree task templates
are synchronized along with other worktree settings.

Release Notes:

- Adds ssh support to tasks, improves collab-remote projects' tasks sync
This commit is contained in:
Kirill Bulatov authored and GitHub committed 2024-10-09 22:28:42 +03:00
1 parent 9a636daf4d
commit e8f67192da
18 files changed
+1262 -1366

No files matched your search

+7 -3
View File
@@ -36,9 +36,13 @@ pub fn schedule_resolved_task(
if !omit_history {
resolved_task.resolved = Some(spawn_in_terminal.clone());
workspace.project().update(cx, |project, cx| {
project.task_inventory().update(cx, |inventory, _| {
inventory.task_scheduled(task_source_kind, resolved_task);
})
if let Some(task_inventory) =
project.task_store().read(cx).task_inventory().cloned()
{
task_inventory.update(cx, |inventory, _| {
inventory.task_scheduled(task_source_kind, resolved_task);
})
}
});
}
cx.emit(crate::Event::SpawnTask(Box::new(spawn_in_terminal)));