Skip to content

Commit bab816c

Browse files
rekram1-nodeliuzeming
authored andcommitted
tui: add consent dialog when sharing for the first time (anomalyco#20525)
1 parent afa5896 commit bab816c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • packages/opencode/src/cli/cmd/tui/routes/session

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,11 @@ export function Session() {
370370
dialog.clear()
371371
return
372372
}
373+
if (!kv.get("share_consent", false)) {
374+
const ok = await DialogConfirm.show(dialog, "Share Session", "Are you sure you want to share it?")
375+
if (ok !== true) return
376+
kv.set("share_consent", true)
377+
}
373378
await sdk.client.session
374379
.share({
375380
sessionID: route.sessionID,

0 commit comments

Comments
 (0)