diff --git a/web/src/components/table/tokens/index.jsx b/web/src/components/table/tokens/index.jsx index e0c3d93b..05ccf259 100644 --- a/web/src/components/table/tokens/index.jsx +++ b/web/src/components/table/tokens/index.jsx @@ -88,7 +88,11 @@ function TokensPage() { function openFluentNotification(key) { const { t } = latestRef.current; const SUPPRESS_KEY = 'fluent_notify_suppressed'; - if (localStorage.getItem(SUPPRESS_KEY) === '1') return; + if (modelOptions.length === 0) { + // fire-and-forget; a later effect will refresh the notice content + loadModels() + } + if (!key && localStorage.getItem(SUPPRESS_KEY) === '1') return; const container = document.getElementById('fluent-new-api-container'); if (!container) { Toast.warning(t('未检测到 FluentRead(流畅阅读),请确认扩展已启用')); @@ -96,19 +100,15 @@ function TokensPage() { } setPrefillKey(key || ''); setFluentNoticeOpen(true); - if (modelOptions.length === 0) { - // fire-and-forget; a later effect will refresh the notice content - loadModels() - } Notification.info({ id: 'fluent-detected', title: t('检测到 FluentRead(流畅阅读)'), content: (