From c97e0986277e95144f79da3fce5b3fd443f3922f Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sat, 4 Jul 2026 14:44:52 +0300 Subject: refactor: route worktree tui actions through runtime wrappers --- src/app/runtime_mutations.rs | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/app/runtime_mutations.rs') 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 { + 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 { + self.dispatch_deferred_runtime_mutation(id, Method::WorktreeRemove(params)) + } } -- cgit v1.2.3