Skip to content

Commit df1c6c9

Browse files
authored
tui: add consent dialog when sharing for the first time (#20525)
1 parent 789d86f commit df1c6c9

File tree

1 file changed

+5
-0
lines changed
  • packages/opencode/src/cli/cmd/tui/routes/session

1 file changed

+5
-0
lines changed

packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,11 @@ export function Session() {
360360
dialog.clear()
361361
return
362362
}
363+
if (!kv.get("share_consent", false)) {
364+
const ok = await DialogConfirm.show(dialog, "Share Session", "Are you sure you want to share it?")
365+
if (ok !== true) return
366+
kv.set("share_consent", true)
367+
}
363368
await sdk.client.session
364369
.share({
365370
sessionID: route.sessionID,

0 commit comments

Comments
 (0)