diff --git a/crates/edit_prediction_ui/src/edit_prediction_button.rs b/crates/edit_prediction_ui/src/edit_prediction_button.rs index dc27afac817ffbf53804dadbe400097948b42e9b..ff267dbff71cc2d9c821bb6e998396929c23b5bd 100644 --- a/crates/edit_prediction_ui/src/edit_prediction_button.rs +++ b/crates/edit_prediction_ui/src/edit_prediction_button.rs @@ -303,8 +303,14 @@ impl Render for EditPredictionButton { div().child( PopoverMenu::new("ollama") .menu(move |window, cx| { - this.update(cx, |this, cx| this.build_ollama_context_menu(window, cx)) - .ok() + this.update(cx, |this, cx| { + this.build_edit_prediction_context_menu( + EditPredictionProvider::Ollama, + window, + cx, + ) + }) + .ok() }) .anchor(Corner::BottomRight) .trigger_with_tooltip( @@ -1025,20 +1031,6 @@ impl EditPredictionButton { }) } - fn build_ollama_context_menu( - &self, - window: &mut Window, - cx: &mut Context, - ) -> Entity { - ContextMenu::build(window, cx, |menu, window, cx| { - let menu = self.build_language_settings_menu(menu, window, cx); - let menu = - self.add_provider_switching_section(menu, EditPredictionProvider::Ollama, cx); - - menu - }) - } - fn build_edit_prediction_context_menu( &self, provider: EditPredictionProvider,