Require accepting ToS when enabling zeta (#23255)

Note: Design hasn't been reviewed yet, but the logic is done

When the user switches the inline completion provider to `zed`, we'll
show a modal prompting them to accept terms if they haven't done so:


https://github.com/user-attachments/assets/3fc6d368-c00a-4dcb-9484-fbbbb5eb859e

If they dismiss the modal, they'll be able to get to it again from the
inline completion button:


https://github.com/user-attachments/assets/cf842778-5538-4e06-9ed8-21579981cc47

This also stops zeta sending requests that will fail immediately when
ToS are not accepted.

Release Notes:

- N/A

---------

Co-authored-by: Richard <richard@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Joao <joao@zed.dev>
This commit is contained in:
Agus Zubiaga
2025-01-20 11:48:49 -03:00
committed by GitHub
co-authored by Richard Danilo Leal Joao
parent 5bb696e6d7
commit 919803a4f4
19 changed files with 427 additions and 23 deletions
Generated
+15
View File
@@ -3959,6 +3959,7 @@ dependencies = [
"util",
"uuid",
"workspace",
"zed_predict_tos",
]
[[package]]
@@ -6304,6 +6305,7 @@ name = "inline_completion_button"
version = "0.1.0"
dependencies = [
"anyhow",
"client",
"copilot",
"editor",
"feature_flags",
@@ -6323,6 +6325,7 @@ dependencies = [
"ui",
"workspace",
"zed_actions",
"zed_predict_tos",
"zeta",
]
@@ -16337,6 +16340,7 @@ dependencies = [
"winresource",
"workspace",
"zed_actions",
"zed_predict_tos",
"zeta",
]
@@ -16450,6 +16454,17 @@ dependencies = [
"zed_extension_api 0.1.0",
]
[[package]]
name = "zed_predict_tos"
version = "0.1.0"
dependencies = [
"client",
"gpui",
"menu",
"ui",
"workspace",
]
[[package]]
name = "zed_prisma"
version = "0.0.4"