language_model: Refresh the LLM token upon receiving a UserUpdated
message from Cloud (#35839)
This PR makes it so we refresh the LLM token upon receiving a `UserUpdated` message from Cloud over the WebSocket connection. Release Notes: - N/A
This commit is contained in:
parent
d110459ef8
commit
50482a6bc2
4 changed files with 21 additions and 19 deletions
|
@ -193,7 +193,7 @@ pub fn init(client: &Arc<Client>, cx: &mut App) {
|
|||
});
|
||||
}
|
||||
|
||||
pub type MessageToClientHandler = Box<dyn Fn(&MessageToClient, &App) + Send + Sync + 'static>;
|
||||
pub type MessageToClientHandler = Box<dyn Fn(&MessageToClient, &mut App) + Send + Sync + 'static>;
|
||||
|
||||
struct GlobalClient(Arc<Client>);
|
||||
|
||||
|
@ -1684,7 +1684,7 @@ impl Client {
|
|||
|
||||
pub fn add_message_to_client_handler(
|
||||
self: &Arc<Client>,
|
||||
handler: impl Fn(&MessageToClient, &App) + Send + Sync + 'static,
|
||||
handler: impl Fn(&MessageToClient, &mut App) + Send + Sync + 'static,
|
||||
) {
|
||||
self.message_to_client_handlers
|
||||
.lock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue