Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

collab: Refresh the LLM token once the terms of service have been accepted (#34833)

Bennet Bo Fenner589af59dfe6f
diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs
index 7a454e11cfc..924784109b1 100644
--- a/crates/collab/src/rpc.rs
+++ b/crates/collab/src/rpc.rs
@@ -4167,6 +4167,13 @@ async fn accept_terms_of_service(
response.send(proto::AcceptTermsOfServiceResponse {
accepted_tos_at: accepted_tos_at.timestamp() as u64,
})?;
+
+ // When the user accepts the terms of service, we want to refresh their LLM
+ // token to grant access.
+ session
+ .peer
+ .send(session.connection_id, proto::RefreshLlmToken {})?;
+
Ok(())
}