Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
rename attachment_store -> attachment_registry (#11501)
Kyle Kelleyb038fb372931
diff --git a/crates/assistant2/src/assistant2.rs b/crates/assistant2/src/assistant2.rsindex 3dff299e321..cb6a1dad6f4 100644--- a/crates/assistant2/src/assistant2.rs+++ b/crates/assistant2/src/assistant2.rs@@ -135,13 +135,14 @@ impl AssistantPanel {.context("failed to register CreateBufferTool").log_err();- let mut attachment_store = AttachmentRegistry::new();- attachment_store.register(ActiveEditorAttachmentTool::new(workspace.clone(), cx));+ let mut attachment_registry = AttachmentRegistry::new();+ attachment_registry+ .register(ActiveEditorAttachmentTool::new(workspace.clone(), cx));Self::new(app_state.languages.clone(),Arc::new(tool_registry),- Arc::new(attachment_store),+ Arc::new(attachment_registry),app_state.user_store.clone(),project_index,workspace,@@ -154,7 +155,7 @@ impl AssistantPanel {pub fn new(language_registry: Arc<LanguageRegistry>,tool_registry: Arc<ToolRegistry>,- attachment_store: Arc<AttachmentRegistry>,+ attachment_registry: Arc<AttachmentRegistry>,user_store: Model<UserStore>,project_index: Model<ProjectIndex>,workspace: WeakView<Workspace>,@@ -164,7 +165,7 @@ impl AssistantPanel {AssistantChat::new(language_registry,tool_registry.clone(),- attachment_store,+ attachment_registry,user_store,project_index,workspace,@@ -394,8 +395,8 @@ impl AssistantChat {let mode = *mode;self.pending_completion = Some(cx.spawn(move |this, mut cx| async move {let attachments_task = this.update(&mut cx, |this, cx| {- let attachment_store = this.attachment_registry.clone();- attachment_store.call_all_attachment_tools(cx)+ let attachment_registry = this.attachment_registry.clone();+ attachment_registry.call_all_attachment_tools(cx)});let attachments = maybe!(async {diff --git a/crates/assistant2/src/ui/active_file_button.rs b/crates/assistant2/src/ui/active_file_button.rsindex 3a2ac8e04db..10415785686 100644--- a/crates/assistant2/src/ui/active_file_button.rs+++ b/crates/assistant2/src/ui/active_file_button.rs@@ -22,7 +22,7 @@ pub struct ActiveFileButton {impl ActiveFileButton {pub fn new(- attachment_store: Arc<AttachmentRegistry>,+ attachment_registry: Arc<AttachmentRegistry>,workspace: View<Workspace>,cx: &mut ViewContext<Self>,) -> Self {@@ -31,7 +31,7 @@ impl ActiveFileButton {cx.defer(move |this, cx| this.update_active_buffer(workspace.clone(), cx));Self {- attachment_registry: attachment_store,+ attachment_registry,status: Status::NoFile,workspace_subscription,}