aboutsummaryrefslogtreecommitdiff
path: root/src/app/runtime_mutations.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-07-04 14:44:52 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-07-04 14:44:52 +0300
commitc97e0986277e95144f79da3fce5b3fd443f3922f (patch)
treeeea9c75345a489233ccb93f6e5cc248b4286d8c5 /src/app/runtime_mutations.rs
parentedd08e895fc65e07e500a1fe80e88202deae6b8d (diff)
refactor: route worktree tui actions through runtime wrappers
Diffstat (limited to 'src/app/runtime_mutations.rs')
-rw-r--r--src/app/runtime_mutations.rs26
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))
+ }
}