From fe26ab68094bc731e0d51a8ad94cb00ad6513b5b Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 8 Apr 2026 21:49:33 -0400 Subject: [PATCH] Remove unused delete_history_entry method (#53436) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the unused `ConversationView::delete_history_entry` method and its now-unused `ThreadMetadataStore` import. The method had zero callers — the same functionality is covered by `ThreadHistoryView::remove_thread` and `ThreadsArchiveView::delete_thread`. Release Notes: - N/A --- crates/agent_ui/src/conversation_view.rs | 26 ++---------------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/crates/agent_ui/src/conversation_view.rs b/crates/agent_ui/src/conversation_view.rs index 66c8b2b8e8a052c0ee8d16cbfacb8c6c02a77e03..d38e1344701fc8681b0feaf2fa7843611750532d 100644 --- a/crates/agent_ui/src/conversation_view.rs +++ b/crates/agent_ui/src/conversation_view.rs @@ -78,7 +78,7 @@ use crate::agent_diff::AgentDiff; use crate::entry_view_state::{EntryViewEvent, ViewEvent}; use crate::message_editor::{MessageEditor, MessageEditorEvent}; use crate::profile_selector::{ProfileProvider, ProfileSelector}; -use crate::thread_metadata_store::ThreadMetadataStore; + use crate::ui::{AgentNotification, AgentNotificationEvent}; use crate::{ Agent, AgentDiffPane, AgentInitialContent, AgentPanel, AllowAlways, AllowOnce, @@ -2648,29 +2648,6 @@ impl ConversationView { pub fn history(&self) -> Option<&Entity> { self.as_connected().and_then(|c| c.history.as_ref()) } - - pub fn delete_history_entry(&mut self, session_id: &acp::SessionId, cx: &mut Context) { - let Some(connected) = self.as_connected() else { - return; - }; - - let Some(history) = &connected.history else { - return; - }; - let task = history.update(cx, |history, cx| history.delete_session(&session_id, cx)); - task.detach_and_log_err(cx); - - if let Some(store) = ThreadMetadataStore::try_global(cx) { - store.update(cx, |store, cx| store.delete(session_id.clone(), cx)); - } - - let session_id = session_id.clone(); - cx.spawn(async move |_this, cx| { - crate::thread_worktree_archive::cleanup_thread_archived_worktrees(&session_id, cx) - .await; - }) - .detach(); - } } fn loading_contents_spinner(size: IconSize) -> AnyElement { @@ -2840,6 +2817,7 @@ pub(crate) mod tests { use workspace::{Item, MultiWorkspace}; use crate::agent_panel; + use crate::thread_metadata_store::ThreadMetadataStore; use super::*;