From 7e82ca80825b38381d7a71ffe1348097d86181eb Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Wed, 13 Nov 2024 14:57:30 +0100 Subject: [PATCH] Always allow rerunning the tasks using the tab button (#20591) Release Notes: - Improved task tabs to always rerun tasks on click --- crates/terminal_view/src/terminal_view.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs index 6bd1496c97400d2034981e68607fc957517cd420..de501ab80a57f120eaaaed795663f6f9eb5999d6 100644 --- a/crates/terminal_view/src/terminal_view.rs +++ b/crates/terminal_view/src/terminal_view.rs @@ -1046,14 +1046,20 @@ impl Item for TerminalView { .on_click(move |_, cx| { cx.dispatch_action(Box::new(tasks_ui::Rerun { task_id: Some(task_id.clone()), - ..tasks_ui::Rerun::default() + allow_concurrent_runs: Some(true), + use_new_terminal: Some(false), + reevaluate_context: false, })); }) }; let (icon, icon_color, rerun_button) = match terminal.task() { Some(terminal_task) => match &terminal_task.status { - TaskStatus::Running => (IconName::Play, Color::Disabled, None), + TaskStatus::Running => ( + IconName::Play, + Color::Disabled, + Some(rerun_button(terminal_task.id.clone())), + ), TaskStatus::Unknown => ( IconName::Warning, Color::Warning,