Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent_ui: Remove unused `pending_thread_loads` from agent panel (#54066)
Bennet Bo Fennerd0fc14c2f6dc
diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rsindex 4a72132875b..d04c5567a41 100644--- a/crates/agent_ui/src/agent_panel.rs+++ b/crates/agent_ui/src/agent_panel.rs@@ -761,7 +761,6 @@ pub struct AgentPanel {new_user_onboarding: Entity<AgentPanelOnboarding>,new_user_onboarding_upsell_dismissed: AtomicBool,selected_agent: Agent,- pending_thread_loads: usize,worktree_creation_status: Option<(EntityId, WorktreeCreationStatus)>,_thread_view_subscription: Option<Subscription>,_active_thread_focus_subscription: Option<Subscription>,@@ -1129,7 +1128,6 @@ impl AgentPanel {new_user_onboarding: onboarding,thread_store,selected_agent: Agent::default(),- pending_thread_loads: 0,worktree_creation_status: None,_thread_view_subscription: None,_active_thread_focus_subscription: None,@@ -2490,10 +2488,6 @@ impl AgentPanel {);}- pub fn begin_loading_thread(&mut self) {- self.pending_thread_loads += 1;- }-pub fn load_agent_thread(&mut self,agent: Agent,@@ -2505,7 +2499,6 @@ impl AgentPanel {window: &mut Window,cx: &mut Context<Self>,) {- self.pending_thread_loads = self.pending_thread_loads.saturating_sub(1);if let Some(store) = ThreadMetadataStore::try_global(cx) {let thread_id = store.read(cx)diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rsindex 13d7b71e39e..7baf906f98d 100644--- a/crates/sidebar/src/sidebar.rs+++ b/crates/sidebar/src/sidebar.rs@@ -2142,7 +2142,6 @@ impl Sidebar {let mut existing_panel = None;workspace.update(cx, |workspace, cx| {if let Some(panel) = workspace.panel::<AgentPanel>(cx) {- panel.update(cx, |panel, _cx| panel.begin_loading_thread());existing_panel = Some(panel);}});@@ -2170,7 +2169,6 @@ impl Sidebar {workspace.add_panel(panel.clone(), window, cx);panel.clone()});- panel.update(cx, |panel, _cx| panel.begin_loading_thread());load_thread(panel, &metadata, focus, window, cx);if focus {workspace.focus_panel::<AgentPanel>(window, cx);