chore: Sever terminal_view <-> tasks_ui dependency (#20946)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-11-21 01:07:14 +01:00 committed by GitHub
parent cbba44900d
commit 536d7e5355
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 56 additions and 53 deletions

View file

@ -3,6 +3,7 @@ use editor::{tasks::task_context, Editor};
use gpui::{AppContext, Task as AsyncTask, ViewContext, WindowContext};
use modal::TasksModal;
use project::{Location, WorktreeId};
use task::TaskId;
use workspace::tasks::schedule_task;
use workspace::{tasks::schedule_resolved_task, Workspace};
@ -25,9 +26,13 @@ pub fn init(cx: &mut AppContext) {
.read(cx)
.task_inventory()
.and_then(|inventory| {
inventory
.read(cx)
.last_scheduled_task(action.task_id.as_ref())
inventory.read(cx).last_scheduled_task(
action
.task_id
.as_ref()
.map(|id| TaskId(id.clone()))
.as_ref(),
)
})
{
if action.reevaluate_context {