inline_completion_button: Add menu option to toggle "Eager Preview"s for edit predictions (#24685)

This PR adds a menu option to the edit prediction menu to toggle the
"Eager Preview" behavior:

<img width="252" alt="Screenshot 2025-02-11 at 2 44 52 PM"
src="https://github.com/user-attachments/assets/232e879b-3c11-4edd-a549-f284e2bca391"
/>

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-02-11 15:02:52 -05:00 committed by GitHub
parent 12163c9b45
commit aab3e0495d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 42 additions and 9 deletions

View file

@ -250,7 +250,7 @@ pub struct AllLanguageSettingsContent {
pub features: Option<FeaturesContent>,
/// The edit prediction settings.
#[serde(default)]
pub edit_predictions: Option<InlineCompletionSettingsContent>,
pub edit_predictions: Option<EditPredictionSettingsContent>,
/// The default language settings.
#[serde(flatten)]
pub defaults: LanguageSettingsContent,
@ -428,7 +428,7 @@ pub struct LanguageSettingsContent {
/// The contents of the edit prediction settings.
#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema, PartialEq)]
pub struct InlineCompletionSettingsContent {
pub struct EditPredictionSettingsContent {
/// A list of globs representing files that edit predictions should be disabled for.
/// This list adds to a pre-existing, sensible default set of globs.
/// Any additional ones you add are combined with them.