aboutsummaryrefslogtreecommitdiff
path: root/src/events.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-22 02:21:12 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-22 02:23:35 +0300
commit0148c1379b76c5c0a9d05588c07dcb06ec32f93f (patch)
tree554766d959c738ca2aa433c3d4b4a7de25568008 /src/events.rs
parenta9ff4012bdca0dbdbc77bc6e53a430689fc899be (diff)
feat: add git worktree workspace management
refs #137
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),
}