chore: Sever terminal_view <-> tasks_ui dependency (#20946)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
cbba44900d
commit
536d7e5355
8 changed files with 56 additions and 53 deletions
|
@ -58,3 +58,43 @@ pub struct OpenRecent {
|
|||
}
|
||||
gpui::impl_actions!(projects, [OpenRecent]);
|
||||
gpui::actions!(projects, [OpenRemote]);
|
||||
|
||||
/// Spawn a task with name or open tasks modal
|
||||
#[derive(PartialEq, Clone, Deserialize, Default)]
|
||||
pub struct Spawn {
|
||||
#[serde(default)]
|
||||
/// Name of the task to spawn.
|
||||
/// If it is not set, a modal with a list of available tasks is opened instead.
|
||||
/// Defaults to None.
|
||||
pub task_name: Option<String>,
|
||||
}
|
||||
|
||||
impl Spawn {
|
||||
pub fn modal() -> Self {
|
||||
Self { task_name: None }
|
||||
}
|
||||
}
|
||||
|
||||
/// Rerun last task
|
||||
#[derive(PartialEq, Clone, Deserialize, Default)]
|
||||
pub struct Rerun {
|
||||
/// Controls whether the task context is reevaluated prior to execution of a task.
|
||||
/// If it is not, environment variables such as ZED_COLUMN, ZED_FILE are gonna be the same as in the last execution of a task
|
||||
/// If it is, these variables will be updated to reflect current state of editor at the time task::Rerun is executed.
|
||||
/// default: false
|
||||
#[serde(default)]
|
||||
pub reevaluate_context: bool,
|
||||
/// Overrides `allow_concurrent_runs` property of the task being reran.
|
||||
/// Default: null
|
||||
#[serde(default)]
|
||||
pub allow_concurrent_runs: Option<bool>,
|
||||
/// Overrides `use_new_terminal` property of the task being reran.
|
||||
/// 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<String>,
|
||||
}
|
||||
|
||||
impl_actions!(task, [Spawn, Rerun]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue