From 0148c1379b76c5c0a9d05588c07dcb06ec32f93f Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Fri, 22 May 2026 02:21:12 +0300 Subject: feat: add git worktree workspace management refs #137 --- src/events.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/events.rs') 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 }, /// Background git status refresh completed for workspaces. GitStatusRefreshed { results: Vec }, + /// Background `git worktree add` completed. + WorktreeAddFinished(WorktreeAddResult), + /// Background `git worktree remove` completed. + WorktreeRemoveFinished(WorktreeRemoveResult), } -- cgit v1.2.3