Use the term "edit prediction" over "inline completion" (#24211)

Note that this does *not* involve any breaking code changes.

cc @0xtimsb - I didn't change any settings or anything here. That can
happen separately!

Release Notes:

- N/A
This commit is contained in:
Richard Feldman 2025-02-04 13:33:01 -05:00 committed by GitHub
parent c64b26110c
commit 667396c44b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 56 additions and 56 deletions

View file

@ -510,7 +510,7 @@ fn for_snowflake(
),
Event::InlineCompletion(e) => (
format!(
"Inline Completion {}",
"Edit Prediction {}",
if e.suggestion_accepted {
"Accepted"
} else {
@ -520,7 +520,7 @@ fn for_snowflake(
serde_json::to_value(e).unwrap(),
),
Event::InlineCompletionRating(e) => (
"Inline Completion Rated".to_string(),
"Edit Prediction Rated".to_string(),
serde_json::to_value(e).unwrap(),
),
Event::Call(e) => {

View file

@ -393,7 +393,7 @@ mod tests {
assert_eq!(editor.text(cx), "one.\ntwo\nthree\n");
});
// Ensure existing inline completion is interpolated when inserting again.
// Ensure existing edit prediction is interpolated when inserting again.
cx.simulate_keystroke("c");
executor.run_until_parked();
cx.update_editor(|editor, _, cx| {

View file

@ -678,7 +678,7 @@ pub struct Editor {
/// Used to prevent flickering as the user types while the menu is open
stale_inline_completion_in_menu: Option<InlineCompletionState>,
// enable_inline_completions is a switch that Vim can use to disable
// inline completions based on its mode.
// edit predictions based on its mode.
enable_inline_completions: bool,
show_inline_completions_override: Option<bool>,
menu_inline_completions_policy: MenuInlineCompletionsPolicy,
@ -4927,8 +4927,8 @@ impl Editor {
.and_then(|file| Some(file.path().extension()?.to_string_lossy().to_string()));
let event_type = match accepted {
true => "Inline Completion Accepted",
false => "Inline Completion Discarded",
true => "Edit Prediction Accepted",
false => "Edit Prediction Discarded",
};
telemetry::event!(
event_type,

View file

@ -368,8 +368,8 @@ pub struct EditorSettingsContent {
/// Default: false
pub show_signature_help_after_edits: Option<bool>,
/// Whether to show the inline completions next to the completions provided by a language server.
/// Only has an effect if inline completion provider supports it.
/// Whether to show the edit predictions next to the completions provided by a language server.
/// Only has an effect if edit prediction provider supports it.
///
/// Default: true
pub show_inline_completions_in_menu: Option<bool>,

View file

@ -59,7 +59,7 @@ pub fn all_language_settings<'a>(
/// The settings for all languages.
#[derive(Debug, Clone)]
pub struct AllLanguageSettings {
/// The inline completion settings.
/// The edit prediction settings.
pub inline_completions: InlineCompletionSettings,
defaults: LanguageSettings,
languages: HashMap<LanguageName, LanguageSettings>,
@ -109,10 +109,10 @@ pub struct LanguageSettings {
/// - `"!<language_server_id>"` - A language server ID prefixed with a `!` will be disabled.
/// - `"..."` - A placeholder to refer to the **rest** of the registered language servers for this language.
pub language_servers: Vec<String>,
/// Controls whether inline completions are shown immediately (true)
/// Controls whether edit predictions are shown immediately (true)
/// or manually by triggering `editor::ShowInlineCompletion` (false).
pub show_inline_completions: bool,
/// Controls whether inline completions are shown in the given language
/// Controls whether edit predictions are shown in the given language
/// scopes.
pub inline_completions_disabled_in: Vec<String>,
/// Whether to show tabs and spaces in the editor.
@ -195,7 +195,7 @@ impl LanguageSettings {
}
}
/// The provider that supplies inline completions.
/// The provider that supplies edit predictions.
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum InlineCompletionProvider {
@ -206,13 +206,13 @@ pub enum InlineCompletionProvider {
Zed,
}
/// The settings for inline completions, such as [GitHub Copilot](https://github.com/features/copilot)
/// The settings for edit predictions, such as [GitHub Copilot](https://github.com/features/copilot)
/// or [Supermaven](https://supermaven.com).
#[derive(Clone, Debug, Default)]
pub struct InlineCompletionSettings {
/// The provider that supplies inline completions.
/// The provider that supplies edit predictions.
pub provider: InlineCompletionProvider,
/// A list of globs representing files that inline completions should be disabled for.
/// A list of globs representing files that edit predictions should be disabled for.
pub disabled_globs: Vec<GlobMatcher>,
}
@ -222,7 +222,7 @@ pub struct AllLanguageSettingsContent {
/// The settings for enabling/disabling features.
#[serde(default)]
pub features: Option<FeaturesContent>,
/// The inline completion settings.
/// The edit prediction settings.
#[serde(default)]
pub inline_completions: Option<InlineCompletionSettingsContent>,
/// The default language settings.
@ -322,13 +322,13 @@ pub struct LanguageSettingsContent {
/// Default: ["..."]
#[serde(default)]
pub language_servers: Option<Vec<String>>,
/// Controls whether inline completions are shown immediately (true)
/// Controls whether edit predictions are shown immediately (true)
/// or manually by triggering `editor::ShowInlineCompletion` (false).
///
/// Default: true
#[serde(default)]
pub show_inline_completions: Option<bool>,
/// Controls whether inline completions are shown in the given language
/// Controls whether edit predictions are shown in the given language
/// scopes.
///
/// Example: ["string", "comment"]
@ -400,10 +400,10 @@ pub struct LanguageSettingsContent {
pub show_completion_documentation: Option<bool>,
}
/// The contents of the inline completion settings.
/// The contents of the edit prediction settings.
#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq)]
pub struct InlineCompletionSettingsContent {
/// A list of globs representing files that inline completions should be disabled for.
/// A list of globs representing files that edit predictions should be disabled for.
#[serde(default)]
pub disabled_globs: Option<Vec<String>>,
}
@ -414,7 +414,7 @@ pub struct InlineCompletionSettingsContent {
pub struct FeaturesContent {
/// Whether the GitHub Copilot feature is enabled.
pub copilot: Option<bool>,
/// Determines which inline completion provider to use.
/// Determines which edit prediction provider to use.
pub inline_completion_provider: Option<InlineCompletionProvider>,
}
@ -876,7 +876,7 @@ impl AllLanguageSettings {
}
}
/// Returns whether inline completions are enabled for the given path.
/// Returns whether edit predictions are enabled for the given path.
pub fn inline_completions_enabled_for_path(&self, path: &Path) -> bool {
!self
.inline_completions
@ -885,7 +885,7 @@ impl AllLanguageSettings {
.any(|glob| glob.is_match(path))
}
/// Returns whether inline completions are enabled for the given language and path.
/// Returns whether edit predictions are enabled for the given language and path.
pub fn inline_completions_enabled(
&self,
language: Option<&Arc<Language>>,

View file

@ -34,7 +34,7 @@ impl SupermavenCompletionProvider {
}
}
// Computes the inline completion from the difference between the completion text.
// Computes the edit prediction from the difference between the completion text.
// this is defined by greedily matching the buffer text against the completion text, with any leftover buffer placed at the end.
// for example, given the completion text "moo cows are cool" and the buffer text "cowsre pool", the completion state would be
// the inlays "moo ", " a", and "cool" which will render as "[moo ]cows[ a]re [cool]pool" in the editor.

View file

@ -295,7 +295,7 @@ impl Render for QuickActionBar {
);
menu = menu.toggleable_entry(
"Inline Completions",
"Edit Predictions",
inline_completions_enabled,
IconPosition::Start,
Some(editor::actions::ToggleInlineCompletions.boxed_clone()),

View file

@ -274,7 +274,7 @@ impl Render for ZedPredictModal {
if self.user_store.read(cx).current_user().is_some() {
let copy = match self.sign_in_status {
SignInStatus::Idle => "Get accurate and instant edit predictions at every keystroke. Before setting Zed as your inline completions provider:",
SignInStatus::Idle => "Get accurate and instant edit predictions at every keystroke. Before setting Zed as your edit prediction provider:",
SignInStatus::SignedIn => "Almost there! Ensure you:",
SignInStatus::Waiting => unreachable!(),
};
@ -423,7 +423,7 @@ impl Render for ZedPredictModal {
)
} else {
base.child(
Label::new("To set Zed as your inline completions provider, please sign in.")
Label::new("To set Zed as your edit prediction provider, please sign in.")
.color(Color::Muted),
)
.child(

View file

@ -880,7 +880,7 @@ and then another
) {
self.rated_completions.insert(completion.id);
telemetry::event!(
"Inline Completion Rated",
"Edit Prediction Rated",
rating,
input_events = completion.input_events,
input_excerpt = completion.input_excerpt,