rename attachment_store -> attachment_registry (#11501)
Minor touch up from #11471 Release Notes: - N/A
This commit is contained in:
parent
4eedbdedae
commit
b038fb3729
2 changed files with 10 additions and 9 deletions
|
@ -135,13 +135,14 @@ impl AssistantPanel {
|
||||||
.context("failed to register CreateBufferTool")
|
.context("failed to register CreateBufferTool")
|
||||||
.log_err();
|
.log_err();
|
||||||
|
|
||||||
let mut attachment_store = AttachmentRegistry::new();
|
let mut attachment_registry = AttachmentRegistry::new();
|
||||||
attachment_store.register(ActiveEditorAttachmentTool::new(workspace.clone(), cx));
|
attachment_registry
|
||||||
|
.register(ActiveEditorAttachmentTool::new(workspace.clone(), cx));
|
||||||
|
|
||||||
Self::new(
|
Self::new(
|
||||||
app_state.languages.clone(),
|
app_state.languages.clone(),
|
||||||
Arc::new(tool_registry),
|
Arc::new(tool_registry),
|
||||||
Arc::new(attachment_store),
|
Arc::new(attachment_registry),
|
||||||
app_state.user_store.clone(),
|
app_state.user_store.clone(),
|
||||||
project_index,
|
project_index,
|
||||||
workspace,
|
workspace,
|
||||||
|
@ -154,7 +155,7 @@ impl AssistantPanel {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
language_registry: Arc<LanguageRegistry>,
|
language_registry: Arc<LanguageRegistry>,
|
||||||
tool_registry: Arc<ToolRegistry>,
|
tool_registry: Arc<ToolRegistry>,
|
||||||
attachment_store: Arc<AttachmentRegistry>,
|
attachment_registry: Arc<AttachmentRegistry>,
|
||||||
user_store: Model<UserStore>,
|
user_store: Model<UserStore>,
|
||||||
project_index: Model<ProjectIndex>,
|
project_index: Model<ProjectIndex>,
|
||||||
workspace: WeakView<Workspace>,
|
workspace: WeakView<Workspace>,
|
||||||
|
@ -164,7 +165,7 @@ impl AssistantPanel {
|
||||||
AssistantChat::new(
|
AssistantChat::new(
|
||||||
language_registry,
|
language_registry,
|
||||||
tool_registry.clone(),
|
tool_registry.clone(),
|
||||||
attachment_store,
|
attachment_registry,
|
||||||
user_store,
|
user_store,
|
||||||
project_index,
|
project_index,
|
||||||
workspace,
|
workspace,
|
||||||
|
@ -394,8 +395,8 @@ impl AssistantChat {
|
||||||
let mode = *mode;
|
let mode = *mode;
|
||||||
self.pending_completion = Some(cx.spawn(move |this, mut cx| async move {
|
self.pending_completion = Some(cx.spawn(move |this, mut cx| async move {
|
||||||
let attachments_task = this.update(&mut cx, |this, cx| {
|
let attachments_task = this.update(&mut cx, |this, cx| {
|
||||||
let attachment_store = this.attachment_registry.clone();
|
let attachment_registry = this.attachment_registry.clone();
|
||||||
attachment_store.call_all_attachment_tools(cx)
|
attachment_registry.call_all_attachment_tools(cx)
|
||||||
});
|
});
|
||||||
|
|
||||||
let attachments = maybe!(async {
|
let attachments = maybe!(async {
|
||||||
|
|
|
@ -22,7 +22,7 @@ pub struct ActiveFileButton {
|
||||||
|
|
||||||
impl ActiveFileButton {
|
impl ActiveFileButton {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
attachment_store: Arc<AttachmentRegistry>,
|
attachment_registry: Arc<AttachmentRegistry>,
|
||||||
workspace: View<Workspace>,
|
workspace: View<Workspace>,
|
||||||
cx: &mut ViewContext<Self>,
|
cx: &mut ViewContext<Self>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
@ -31,7 +31,7 @@ impl ActiveFileButton {
|
||||||
cx.defer(move |this, cx| this.update_active_buffer(workspace.clone(), cx));
|
cx.defer(move |this, cx| this.update_active_buffer(workspace.clone(), cx));
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
attachment_registry: attachment_store,
|
attachment_registry,
|
||||||
status: Status::NoFile,
|
status: Status::NoFile,
|
||||||
workspace_subscription,
|
workspace_subscription,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue