diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-04 16:10:33 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-04 16:51:10 +0300 |
| commit | 89fe8975db69e3c92623d531b50ad791878e28fe (patch) | |
| tree | afb25105516213e6362468b0b4bc55690ac03d77 /src/app/input/modal.rs | |
| parent | 5d9212a55acf4db05b8c5cdf3fee3c56ac404cf7 (diff) | |
refactor: route tui runtime mutations through typed adapters
Diffstat (limited to 'src/app/input/modal.rs')
| -rw-r--r-- | src/app/input/modal.rs | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/app/input/modal.rs b/src/app/input/modal.rs index ba1fd2d4..82d393d6 100644 --- a/src/app/input/modal.rs +++ b/src/app/input/modal.rs @@ -933,14 +933,12 @@ impl App { match self.state.mode { Mode::RenameWorkspace if !self.state.workspaces.is_empty() && !new_name.is_empty() => { let workspace_id = self.public_workspace_id(self.state.selected); - self.dispatch_runtime_mutation( + self.runtime_workspace_rename( "tui.workspace.rename", - crate::api::schema::Method::WorkspaceRename( - crate::api::schema::WorkspaceRenameParams { - workspace_id, - label: new_name, - }, - ), + crate::api::schema::WorkspaceRenameParams { + workspace_id, + label: new_name, + }, ); } Mode::RenameTab if self.state.creating_new_tab => { @@ -950,15 +948,15 @@ impl App { } else { Some(new_name) }; - self.dispatch_runtime_mutation( + self.runtime_tab_create( "tui.tab.create_named", - crate::api::schema::Method::TabCreate(crate::api::schema::TabCreateParams { + crate::api::schema::TabCreateParams { workspace_id: None, cwd: None, focus: true, label, env: Default::default(), - }), + }, ); } Mode::RenameTab if !new_name.is_empty() => { @@ -976,14 +974,12 @@ impl App { .is_some_and(|name| new_name == name); if !keep_auto_name { if let Some(tab_id) = self.public_tab_id(ws_idx, tab_idx) { - self.dispatch_runtime_mutation( + self.runtime_tab_rename( "tui.tab.rename", - crate::api::schema::Method::TabRename( - crate::api::schema::TabRenameParams { - tab_id, - label: new_name, - }, - ), + crate::api::schema::TabRenameParams { + tab_id, + label: new_name, + }, ); } } |
