瀏覽代碼

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

Aiden Cline 5 月之前
父節點
當前提交
df1c6c9e8d
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

+ 5 - 0
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

@@ -360,6 +360,11 @@ export function Session() {
           dialog.clear()
           dialog.clear()
           return
           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
         await sdk.client.session
           .share({
           .share({
             sessionID: route.sessionID,
             sessionID: route.sessionID,