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:
Jason Lee 2024-05-29 17:40:43 +08:00 committed by GitHub
parent 36d0b71f27
commit 3c6c850390
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 77 additions and 16 deletions

View file

@ -7,7 +7,7 @@ mod vscode_format;
use collections::{hash_map, HashMap, HashSet};
use gpui::SharedString;
use serde::Serialize;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
use std::str::FromStr;
use std::{borrow::Cow, path::Path};
@ -17,7 +17,7 @@ pub use vscode_format::VsCodeTaskFile;
/// Task identifier, unique within the application.
/// Based on it, task reruns and terminal tabs are managed.
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Deserialize)]
pub struct TaskId(pub String);
/// TerminalWorkDir describes where a task should be run