From a50d0f2586873fa92d4bfa3b09a3c332455002fa Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Fri, 1 Aug 2025 22:15:58 -0600 Subject: [PATCH] Make `editor::AcceptPartialCopilotSuggestion` a deprecated alias (#35507) This is consistent with there being no copilot expecific variant of `editor::AcceptEditPrediction`. It also fixes a case where the `disable_ai: true` has effects at init time that aren't undone when changed, added in #35327. Release Notes: - N/A --- crates/editor/src/actions.rs | 3 +-- crates/zed/src/zed/inline_completion_registry.rs | 16 ++-------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/crates/editor/src/actions.rs b/crates/editor/src/actions.rs index 1212651cb3..3a3a57ca64 100644 --- a/crates/editor/src/actions.rs +++ b/crates/editor/src/actions.rs @@ -315,9 +315,8 @@ actions!( [ /// Accepts the full edit prediction. AcceptEditPrediction, - /// Accepts a partial Copilot suggestion. - AcceptPartialCopilotSuggestion, /// Accepts a partial edit prediction. + #[action(deprecated_aliases = ["editor::AcceptPartialCopilotSuggestion"])] AcceptPartialEditPrediction, /// Adds a cursor above the current selection. AddSelectionAbove, diff --git a/crates/zed/src/zed/inline_completion_registry.rs b/crates/zed/src/zed/inline_completion_registry.rs index 55dbea4fe1..bbecd26417 100644 --- a/crates/zed/src/zed/inline_completion_registry.rs +++ b/crates/zed/src/zed/inline_completion_registry.rs @@ -1,10 +1,10 @@ -use client::{Client, DisableAiSettings, UserStore}; +use client::{Client, UserStore}; use collections::HashMap; use copilot::{Copilot, CopilotCompletionProvider}; use editor::Editor; use gpui::{AnyWindowHandle, App, AppContext as _, Context, Entity, WeakEntity}; use language::language_settings::{EditPredictionProvider, all_language_settings}; -use settings::{Settings as _, SettingsStore}; +use settings::SettingsStore; use smol::stream::StreamExt; use std::{cell::RefCell, rc::Rc, sync::Arc}; use supermaven::{Supermaven, SupermavenCompletionProvider}; @@ -192,18 +192,6 @@ fn register_backward_compatible_actions(editor: &mut Editor, cx: &mut Context| { - editor.accept_partial_inline_completion(&Default::default(), window, cx); - }, - )) - .detach(); - } } fn assign_edit_prediction_provider(