Send and receive Copilot events

This commit is contained in:
Kirill Bulatov 2023-09-19 21:53:31 +03:00
parent 9eadfc80ba
commit 556f398780
2 changed files with 42 additions and 24 deletions

View file

@ -276,8 +276,12 @@ pub struct Copilot {
server_id: LanguageServerId,
}
pub enum Event {
CopilotReady,
}
impl Entity for Copilot {
type Event = ();
type Event = Event;
fn app_will_quit(
&mut self,
@ -881,6 +885,7 @@ impl Copilot {
self.register_buffer(&buffer, cx);
}
}
cx.emit(Event::CopilotReady);
}
request::SignInStatus::NotAuthorized { .. } => {
server.sign_in_status = SignInStatus::Unauthorized;