From d74ba8ca9e49d9d94a4e59a0ee0bdbd1128af76e Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Thu, 18 Jun 2026 16:05:05 +0300 Subject: fix: emit plugin lifecycle events from ui worktree flows refs #662 --- src/app/api/workspaces.rs | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src/app/api/workspaces.rs') diff --git a/src/app/api/workspaces.rs b/src/app/api/workspaces.rs index cdfd4ec5..d1d7bf5c 100644 --- a/src/app/api/workspaces.rs +++ b/src/app/api/workspaces.rs @@ -63,29 +63,7 @@ impl App { crate::logging::workspace_renamed(&workspace.id); } } - let workspace = self.workspace_info(index); - let tab = self - .tab_info(index, 0) - .expect("new workspace should have an initial tab"); - let root_pane = self - .root_pane_info(index, 0) - .expect("new workspace should have an initial root pane"); - self.emit_event(EventEnvelope { - event: EventKind::WorkspaceCreated, - data: EventData::WorkspaceCreated { - workspace: workspace.clone(), - }, - }); - self.emit_event(EventEnvelope { - event: EventKind::TabCreated, - data: EventData::TabCreated { tab: tab.clone() }, - }); - self.emit_event(EventEnvelope { - event: EventKind::PaneCreated, - data: EventData::PaneCreated { - pane: root_pane.clone(), - }, - }); + self.emit_workspace_open_events(index); encode_success( id, self.workspace_created_result(index) -- cgit v1.2.3