Rename remaining mentions of "inline completion" to "edit prediction" (#35512)
Release Notes: - N/A
This commit is contained in:
parent
85885723a9
commit
65018c28c0
43 changed files with 480 additions and 498 deletions
|
@ -76,7 +76,7 @@ gpui_tokio.workspace = true
|
|||
http_client.workspace = true
|
||||
image_viewer.workspace = true
|
||||
indoc.workspace = true
|
||||
inline_completion_button.workspace = true
|
||||
edit_prediction_button.workspace = true
|
||||
inspector_ui.workspace = true
|
||||
install_cli.workspace = true
|
||||
jj_ui.workspace = true
|
||||
|
|
|
@ -51,9 +51,9 @@ use workspace::{
|
|||
};
|
||||
use zed::{
|
||||
OpenListener, OpenRequest, RawOpenRequest, app_menus, build_window_options,
|
||||
derive_paths_with_position, handle_cli_connection, handle_keymap_file_changes,
|
||||
handle_settings_changed, handle_settings_file_changes, initialize_workspace,
|
||||
inline_completion_registry, open_paths_with_positions,
|
||||
derive_paths_with_position, edit_prediction_registry, handle_cli_connection,
|
||||
handle_keymap_file_changes, handle_settings_changed, handle_settings_file_changes,
|
||||
initialize_workspace, open_paths_with_positions,
|
||||
};
|
||||
|
||||
use crate::zed::OpenRequestKind;
|
||||
|
@ -559,11 +559,7 @@ pub fn main() {
|
|||
web_search::init(cx);
|
||||
web_search_providers::init(app_state.client.clone(), cx);
|
||||
snippet_provider::init(cx);
|
||||
inline_completion_registry::init(
|
||||
app_state.client.clone(),
|
||||
app_state.user_store.clone(),
|
||||
cx,
|
||||
);
|
||||
edit_prediction_registry::init(app_state.client.clone(), app_state.user_store.clone(), cx);
|
||||
let prompt_builder = PromptBuilder::load(app_state.fs.clone(), stdout_is_a_pty(), cx);
|
||||
agent_ui::init(
|
||||
app_state.fs.clone(),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
mod app_menus;
|
||||
pub mod component_preview;
|
||||
pub mod inline_completion_registry;
|
||||
pub mod edit_prediction_registry;
|
||||
#[cfg(target_os = "macos")]
|
||||
pub(crate) mod mac_only_instance;
|
||||
mod migrate;
|
||||
|
@ -332,18 +332,18 @@ pub fn initialize_workspace(
|
|||
show_software_emulation_warning_if_needed(specs, window, cx);
|
||||
}
|
||||
|
||||
let inline_completion_menu_handle = PopoverMenuHandle::default();
|
||||
let edit_prediction_menu_handle = PopoverMenuHandle::default();
|
||||
let edit_prediction_button = cx.new(|cx| {
|
||||
inline_completion_button::InlineCompletionButton::new(
|
||||
edit_prediction_button::EditPredictionButton::new(
|
||||
app_state.fs.clone(),
|
||||
app_state.user_store.clone(),
|
||||
inline_completion_menu_handle.clone(),
|
||||
edit_prediction_menu_handle.clone(),
|
||||
cx,
|
||||
)
|
||||
});
|
||||
workspace.register_action({
|
||||
move |_, _: &inline_completion_button::ToggleMenu, window, cx| {
|
||||
inline_completion_menu_handle.toggle(window, cx);
|
||||
move |_, _: &edit_prediction_button::ToggleMenu, window, cx| {
|
||||
edit_prediction_menu_handle.toggle(window, cx);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use supermaven::{Supermaven, SupermavenCompletionProvider};
|
|||
use ui::Window;
|
||||
use util::ResultExt;
|
||||
use workspace::Workspace;
|
||||
use zeta::{ProviderDataCollection, ZetaInlineCompletionProvider};
|
||||
use zeta::{ProviderDataCollection, ZetaEditPredictionProvider};
|
||||
|
||||
pub fn init(client: Arc<Client>, user_store: Entity<UserStore>, cx: &mut App) {
|
||||
let editors: Rc<RefCell<HashMap<WeakEntity<Editor>, AnyWindowHandle>>> = Rc::default();
|
||||
|
@ -171,7 +171,7 @@ fn register_backward_compatible_actions(editor: &mut Editor, cx: &mut Context<Ed
|
|||
editor
|
||||
.register_action(cx.listener(
|
||||
|editor, _: &copilot::Suggest, window: &mut Window, cx: &mut Context<Editor>| {
|
||||
editor.show_inline_completion(&Default::default(), window, cx);
|
||||
editor.show_edit_prediction(&Default::default(), window, cx);
|
||||
},
|
||||
))
|
||||
.detach();
|
||||
|
@ -207,7 +207,7 @@ fn assign_edit_prediction_provider(
|
|||
|
||||
match provider {
|
||||
EditPredictionProvider::None => {
|
||||
editor.set_edit_prediction_provider::<ZetaInlineCompletionProvider>(None, window, cx);
|
||||
editor.set_edit_prediction_provider::<ZetaEditPredictionProvider>(None, window, cx);
|
||||
}
|
||||
EditPredictionProvider::Copilot => {
|
||||
if let Some(copilot) = Copilot::global(cx) {
|
||||
|
@ -265,7 +265,7 @@ fn assign_edit_prediction_provider(
|
|||
ProviderDataCollection::new(zeta.clone(), singleton_buffer, cx);
|
||||
|
||||
let provider =
|
||||
cx.new(|_| zeta::ZetaInlineCompletionProvider::new(zeta, data_collection));
|
||||
cx.new(|_| zeta::ZetaEditPredictionProvider::new(zeta, data_collection));
|
||||
|
||||
editor.set_edit_prediction_provider(Some(provider), window, cx);
|
||||
}
|
|
@ -381,7 +381,7 @@ impl Render for QuickActionBar {
|
|||
}
|
||||
|
||||
if has_edit_prediction_provider {
|
||||
let mut inline_completion_entry = ContextMenuEntry::new("Edit Predictions")
|
||||
let mut edit_prediction_entry = ContextMenuEntry::new("Edit Predictions")
|
||||
.toggleable(IconPosition::Start, edit_predictions_enabled_at_cursor && show_edit_predictions)
|
||||
.disabled(!edit_predictions_enabled_at_cursor)
|
||||
.action(
|
||||
|
@ -401,12 +401,12 @@ impl Render for QuickActionBar {
|
|||
}
|
||||
});
|
||||
if !edit_predictions_enabled_at_cursor {
|
||||
inline_completion_entry = inline_completion_entry.documentation_aside(DocumentationSide::Left, |_| {
|
||||
edit_prediction_entry = edit_prediction_entry.documentation_aside(DocumentationSide::Left, |_| {
|
||||
Label::new("You can't toggle edit predictions for this file as it is within the excluded files list.").into_any_element()
|
||||
});
|
||||
}
|
||||
|
||||
menu = menu.item(inline_completion_entry);
|
||||
menu = menu.item(edit_prediction_entry);
|
||||
}
|
||||
|
||||
menu = menu.separator();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue