rename attachment_store -> attachment_registry (#11501)

Minor touch up from #11471

Release Notes:

- N/A
This commit is contained in:
Kyle Kelley 2024-05-07 09:18:18 -07:00 committed by GitHub
parent 4eedbdedae
commit b038fb3729
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 9 deletions

View File

@ -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 {

View File

@ -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,
}