diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-04 14:44:52 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-04 14:44:52 +0300 |
| commit | c97e0986277e95144f79da3fce5b3fd443f3922f (patch) | |
| tree | eea9c75345a489233ccb93f6e5cc248b4286d8c5 /src/app/runtime_mutations.rs | |
| parent | edd08e895fc65e07e500a1fe80e88202deae6b8d (diff) | |
refactor: route worktree tui actions through runtime wrappers
Diffstat (limited to 'src/app/runtime_mutations.rs')
| -rw-r--r-- | src/app/runtime_mutations.rs | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/app/runtime_mutations.rs b/src/app/runtime_mutations.rs index 99cd3623..61a97dcd 100644 --- a/src/app/runtime_mutations.rs +++ b/src/app/runtime_mutations.rs @@ -1,7 +1,7 @@ use crate::api::schema::{ LayoutSetSplitRatioParams, Method, PaneFocusDirectionParams, PaneRenameParams, PaneResizeParams, PaneSplitParams, PaneSwapParams, PaneTarget, PaneZoomParams, TabTarget, - WorkspaceTarget, + WorkspaceTarget, WorktreeCreateParams, WorktreeOpenParams, WorktreeRemoveParams, }; use super::App; @@ -98,4 +98,28 @@ impl App { ) -> String { self.dispatch_runtime_mutation(id, Method::LayoutSetSplitRatio(params)) } + + pub(crate) fn runtime_worktree_create_deferred( + &mut self, + id: &'static str, + params: WorktreeCreateParams, + ) -> Option<String> { + self.dispatch_deferred_runtime_mutation(id, Method::WorktreeCreate(params)) + } + + pub(crate) fn runtime_worktree_open( + &mut self, + id: &'static str, + params: WorktreeOpenParams, + ) -> String { + self.dispatch_runtime_mutation(id, Method::WorktreeOpen(params)) + } + + pub(crate) fn runtime_worktree_remove_deferred( + &mut self, + id: &'static str, + params: WorktreeRemoveParams, + ) -> Option<String> { + self.dispatch_deferred_runtime_mutation(id, Method::WorktreeRemove(params)) + } } |
