Skip to content

The open source coding agent.

TypeScript

tui: add consent dialog when sharing for the first time (#20525)

Aiden Clinedf1c6c9e8da6
diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
index 9800064a3f9..bb00f548f47 100644
--- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
+++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
@@ -360,6 +360,11 @@ export function Session() {
dialog.clear()
return
}
+ if (!kv.get("share_consent", false)) {
+ const ok = await DialogConfirm.show(dialog, "Share Session", "Are you sure you want to share it?")
+ if (ok !== true) return
+ kv.set("share_consent", true)
+ }
await sdk.client.session
.share({
sessionID: route.sessionID,