From 9199f975dd4bedd80cda7e2482134af4f59a226a Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Thu, 28 Aug 2025 18:33:43 -0600 Subject: [PATCH] Resolve merge conflicts --- .../zed/src/zed/edit_prediction_registry.rs | 7 ---- crates/zeta/src/zeta.rs | 42 +------------------ 2 files changed, 1 insertion(+), 48 deletions(-) diff --git a/crates/zed/src/zed/edit_prediction_registry.rs b/crates/zed/src/zed/edit_prediction_registry.rs index e21720c1a1ef6900f3fb74a6b068ed2c0c0303f8..7b8b98018e6d6c608574ab81e912e8a98e363046 100644 --- a/crates/zed/src/zed/edit_prediction_registry.rs +++ b/crates/zed/src/zed/edit_prediction_registry.rs @@ -203,14 +203,7 @@ fn assign_edit_prediction_provider( } } -<<<<<<< HEAD - let workspace = window.root::().flatten(); - - let zeta = - zeta::Zeta::register(workspace, worktree, client.clone(), user_store, cx); -======= let zeta = zeta::Zeta::register(worktree, client.clone(), user_store, cx); ->>>>>>> main if let Some(buffer) = &singleton_buffer && buffer.read(cx).file().is_some() diff --git a/crates/zeta/src/zeta.rs b/crates/zeta/src/zeta.rs index ecdba5139f5444ad6426283a7b9e30d072c473e1..11c51e317a172973af27c78d56c2e1005f9ef56a 100644 --- a/crates/zeta/src/zeta.rs +++ b/crates/zeta/src/zeta.rs @@ -27,7 +27,7 @@ use collections::{HashMap, HashSet, VecDeque}; use futures::AsyncReadExt; use gpui::{ App, AppContext as _, AsyncApp, Context, Entity, EntityId, Global, SemanticVersion, - SharedString, Subscription, Task, actions, + SharedString, Subscription, Task, WeakEntity, actions, }; use http_client::{AsyncBody, HttpClient, Method, Request, Response}; use input_excerpt::excerpt_for_cursor_position; @@ -234,10 +234,6 @@ impl std::fmt::Debug for EditPrediction { } pub struct Zeta { -<<<<<<< HEAD - workspace: WeakEntity, -======= ->>>>>>> main client: Arc, events: VecDeque, registered_buffers: HashMap, @@ -276,10 +272,6 @@ impl Zeta { } pub fn register( -<<<<<<< HEAD - workspace: Option>, -======= ->>>>>>> main worktree: Option>, client: Arc, user_store: Entity, @@ -311,16 +303,7 @@ impl Zeta { self.user_store.read(cx).edit_prediction_usage() } -<<<<<<< HEAD - fn new( - workspace: Option>, - client: Arc, - user_store: Entity, - cx: &mut Context, - ) -> Self { -======= fn new(client: Arc, user_store: Entity, cx: &mut Context) -> Self { ->>>>>>> main let refresh_llm_token_listener = RefreshLlmTokenListener::global(cx); let data_collection_choice = Self::load_data_collection_choices(); @@ -363,13 +346,6 @@ impl Zeta { } Self { -<<<<<<< HEAD - workspace: workspace.map_or_else( - || WeakEntity::new_invalid(), - |workspace| workspace.downgrade(), - ), -======= ->>>>>>> main client, events: VecDeque::with_capacity(MAX_EVENT_COUNT), shown_completions: VecDeque::with_capacity(MAX_SHOWN_COMPLETION_COUNT), @@ -466,12 +442,7 @@ impl Zeta { fn request_completion_impl( &mut self, -<<<<<<< HEAD - workspace: Option>, project: Option>, -======= - project: Option<&Entity>, ->>>>>>> main buffer: &Entity, cursor: language::Anchor, can_collect_data: CanCollectData, @@ -815,9 +786,7 @@ and then another ) -> Task>> { use std::future::ready; -<<<<<<< HEAD self.request_completion_impl( - None, project, buffer, position, @@ -825,11 +794,6 @@ and then another cx, |_params| ready(Ok((response, None))), ) -======= - self.request_completion_impl(project, buffer, position, false, cx, |_params| { - ready(Ok((response, None))) - }) ->>>>>>> main } pub fn request_completion( @@ -841,10 +805,6 @@ and then another cx: &mut Context, ) -> Task>> { self.request_completion_impl( -<<<<<<< HEAD - self.workspace.upgrade(), -======= ->>>>>>> main project, buffer, position,