refactor(chat): launch external browser without dialog

This commit is contained in:
2026-07-09 14:25:20 +08:00
parent 0106fba877
commit 0659e52d29
5 changed files with 19 additions and 164 deletions
+1 -8
View File
@@ -17,7 +17,6 @@ import {
ChatInputBar,
ChatInsufficientCreditsBanner,
ChatUnlockDialogs,
ExternalBrowserDialog,
FirstRechargeOfferBanner,
FullscreenImageViewer,
PwaInstallOverlay,
@@ -92,7 +91,7 @@ export function ChatScreen() {
loginStatus: authState.loginStatus,
});
const shouldShowPwaInstall = state.historyLoaded && state.messages.length >= 10;
const externalBrowserPrompt = useExternalBrowserPrompt({
useExternalBrowserPrompt({
hasInitialized: authState.hasInitialized,
isLoading: authState.isLoading,
loginStatus: authState.loginStatus,
@@ -198,12 +197,6 @@ export function ChatScreen() {
{/* PWA 安装提示触发器(聊天消息数量达到阈值后才允许弹出) */}
<PwaInstallOverlay enabled={shouldShowPwaInstall} />
<ExternalBrowserDialog
open={externalBrowserPrompt.open}
onClose={externalBrowserPrompt.close}
onConfirm={() => void externalBrowserPrompt.confirm()}
/>
<ChatUnlockDialogs
unlockPaywallRequest={unlockPaywallRequest}
onCloseInsufficientCreditsDialog={closeInsufficientCreditsDialog}