task: Add re-run task button to terminal title (#12379)
Release Notes: - Added re-run task button to terminal title. Close #12277 ## Demo https://github.com/zed-industries/zed/assets/5518/4cd05fa5-4255-412b-8583-68e22f86561e --------- Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
This commit is contained in:
parent
36d0b71f27
commit
3c6c850390
7 changed files with 77 additions and 16 deletions
|
@ -9,7 +9,7 @@ use gpui::{
|
|||
};
|
||||
use picker::{highlighted_match_with_paths::HighlightedText, Picker, PickerDelegate};
|
||||
use project::{Project, TaskSourceKind};
|
||||
use task::{ResolvedTask, TaskContext, TaskTemplate};
|
||||
use task::{ResolvedTask, TaskContext, TaskId, TaskTemplate};
|
||||
use ui::{
|
||||
div, h_flex, v_flex, ActiveTheme, Button, ButtonCommon, ButtonSize, Clickable, Color,
|
||||
FluentBuilder as _, Icon, IconButton, IconButtonShape, IconName, IconSize, IntoElement,
|
||||
|
@ -54,6 +54,9 @@ pub struct Rerun {
|
|||
/// Default: null
|
||||
#[serde(default)]
|
||||
pub use_new_terminal: Option<bool>,
|
||||
|
||||
/// If present, rerun the task with this ID, otherwise rerun the last task.
|
||||
pub task_id: Option<TaskId>,
|
||||
}
|
||||
|
||||
impl_actions!(task, [Rerun, Spawn]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue