feat(beginner): protect default AI model and prevent repeated onboarding (#1444)

Co-authored-by: Dean <afei.wuhao@gmail.com>
This commit is contained in:
deanokk
2026-03-30 21:04:43 +08:00
committed by GitHub
parent fb0bd13f51
commit 1d6e99c74a
5 changed files with 61 additions and 20 deletions

View File

@@ -23,7 +23,7 @@ import { AuthProvider, useAuth } from './contexts/AuthContext'
import { ConfirmDialogProvider } from './components/common/ConfirmDialog'
import { t } from './i18n/translations'
import { useSystemConfig } from './hooks/useSystemConfig'
import { getUserMode } from './lib/onboarding'
import { getUserMode, hasCompletedBeginnerOnboarding } from './lib/onboarding'
import { OFFICIAL_LINKS } from './constants/branding'
import type {
@@ -352,7 +352,7 @@ function App() {
}, [route])
const showBeginnerOnboarding =
route === '/welcome' && (!!user || hasPersistedAuth) && getUserMode() === 'beginner'
route === '/welcome' && (!!user || hasPersistedAuth) && getUserMode() === 'beginner' && !hasCompletedBeginnerOnboarding()
// Show loading spinner while checking auth or config
if (isLoading || configLoading) {