edit predictions: Cache settings across renders (#24581)

We were reading edit prediction settings too often, causing frames to be
dropped. We'll now cache them and update them from
`update_visible_inline_completion`.

Release Notes:

- N/A
This commit is contained in:
Agus Zubiaga 2025-02-10 17:57:25 -03:00 committed by GitHub
parent 973cb916f3
commit 0af048a7cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 124 additions and 102 deletions

View file

@ -104,7 +104,7 @@ impl Render for QuickActionBar {
let git_blame_inline_enabled = editor.git_blame_inline_enabled();
let show_git_blame_gutter = editor.show_git_blame_gutter();
let auto_signature_help_enabled = editor.auto_signature_help_enabled(cx);
let show_inline_completions = editor.should_show_inline_completions(cx);
let show_edit_predictions = editor.edit_predictions_enabled();
let inline_completion_enabled = editor.inline_completions_enabled(cx);
(
@ -114,7 +114,7 @@ impl Render for QuickActionBar {
git_blame_inline_enabled,
show_git_blame_gutter,
auto_signature_help_enabled,
show_inline_completions,
show_edit_predictions,
inline_completion_enabled,
)
};