Animate Zeta button while generating completions (#22899)

Release Notes:

- N/A

Co-authored-by: Thorsten <thorsten@zed.dev>
This commit is contained in:
Antonio Scandurra 2025-01-09 16:24:35 +01:00 committed by GitHub
parent 7d905d0791
commit e64a56ffad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 106 additions and 29 deletions

View file

@ -28,6 +28,7 @@ pub trait InlineCompletionProvider: 'static + Sized {
cursor_position: language::Anchor,
cx: &AppContext,
) -> bool;
fn is_refreshing(&self) -> bool;
fn refresh(
&mut self,
buffer: Model<Buffer>,
@ -63,6 +64,7 @@ pub trait InlineCompletionProviderHandle {
) -> bool;
fn show_completions_in_menu(&self) -> bool;
fn show_completions_in_normal_mode(&self) -> bool;
fn is_refreshing(&self, cx: &AppContext) -> bool;
fn refresh(
&self,
buffer: Model<Buffer>,
@ -116,6 +118,10 @@ where
self.read(cx).is_enabled(buffer, cursor_position, cx)
}
fn is_refreshing(&self, cx: &AppContext) -> bool {
self.read(cx).is_refreshing()
}
fn refresh(
&self,
buffer: Model<Buffer>,