diff --git a/crates/assistant2/src/assistant2.rs b/crates/assistant2/src/assistant2.rs index 3dff299e32..cb6a1dad6f 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, tool_registry: Arc, - attachment_store: Arc, + attachment_registry: Arc, user_store: Model, project_index: Model, workspace: WeakView, @@ -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.rs index 3a2ac8e04d..1041578568 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, + attachment_registry: Arc, workspace: View, cx: &mut ViewContext, ) -> 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, }