Fix infinite loop in assemble_excerpts (#44195)

Also, expand the number of identifiers fetched.

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld
2025-12-05 06:51:26 +00:00
committed by GitHub
parent 42583c1141
commit d6241b17d3
4 changed files with 204 additions and 176 deletions
@@ -480,16 +480,16 @@ impl EditPredictionStore {
shown_predictions: Default::default(),
};
this.enable_or_disable_context_retrieval(cx);
this.configure_context_retrieval(cx);
let weak_this = cx.weak_entity();
cx.on_flags_ready(move |_, cx| {
weak_this
.update(cx, |this, cx| this.enable_or_disable_context_retrieval(cx))
.update(cx, |this, cx| this.configure_context_retrieval(cx))
.ok();
})
.detach();
cx.observe_global::<SettingsStore>(|this, cx| {
this.enable_or_disable_context_retrieval(cx);
this.configure_context_retrieval(cx);
})
.detach();
@@ -1770,7 +1770,7 @@ impl EditPredictionStore {
cx.notify();
}
fn enable_or_disable_context_retrieval(&mut self, cx: &mut Context<'_, EditPredictionStore>) {
fn configure_context_retrieval(&mut self, cx: &mut Context<'_, EditPredictionStore>) {
self.use_context = cx.has_flag::<Zeta2FeatureFlag>()
&& all_language_settings(None, cx).edit_predictions.use_context;
}