aboutsummaryrefslogtreecommitdiff
path: root/src/events.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/events.rs')
-rw-r--r--src/events.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/events.rs b/src/events.rs
index 2e0143e3..90a65957 100644
--- a/src/events.rs
+++ b/src/events.rs
@@ -7,6 +7,19 @@ use crate::detect::{Agent, AgentState};
use crate::layout::PaneId;
use crate::workspace::WorkspaceGitStatus;
+#[derive(Debug)]
+pub struct WorktreeAddResult {
+ pub path: std::path::PathBuf,
+ pub result: Result<(), String>,
+}
+
+#[derive(Debug)]
+pub struct WorktreeRemoveResult {
+ pub workspace_id: String,
+ pub path: std::path::PathBuf,
+ pub result: Result<(), String>,
+}
+
/// An event from a background task to the main loop.
#[derive(Debug)]
pub enum AppEvent {
@@ -52,4 +65,8 @@ pub enum AppEvent {
ClipboardWrite { content: Vec<u8> },
/// Background git status refresh completed for workspaces.
GitStatusRefreshed { results: Vec<WorkspaceGitStatus> },
+ /// Background `git worktree add` completed.
+ WorktreeAddFinished(WorktreeAddResult),
+ /// Background `git worktree remove` completed.
+ WorktreeRemoveFinished(WorktreeRemoveResult),
}