From 52834047f2489ea02ffdf1e3bff527279e79a511 Mon Sep 17 00:00:00 2001 From: Roe-xin Date: Tue, 3 Mar 2026 19:19:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=AF=8F=E6=AC=A1=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=83=BD=E6=98=BE=E7=A4=BA=E8=AF=95=E7=94=A8=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=AC=A2=E8=BF=8E=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 hasWelcomed 标记,不再记录是否已显示 - 试用用户每次打开聊天面板都会看到欢迎弹窗 --- src/panels/ICHelperPanel.ts | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/panels/ICHelperPanel.ts b/src/panels/ICHelperPanel.ts index 71287d2..bdc5ff6 100644 --- a/src/panels/ICHelperPanel.ts +++ b/src/panels/ICHelperPanel.ts @@ -540,12 +540,10 @@ export async function showICHelperPanel( { console.log("[ICHelperPanel] 收到 checkWelcomeModal 消息"); const userInfo = getCachedUserInfo(); - const hasWelcomed = context.globalState.get("pluginTrialWelcomed"); console.log("[ICHelperPanel] 用户信息:", userInfo); console.log("[ICHelperPanel] isPluginTrial:", userInfo?.isPluginTrial); console.log("[ICHelperPanel] pluginTrialExpiresAt:", userInfo?.pluginTrialExpiresAt); - console.log("[ICHelperPanel] hasWelcomed:", hasWelcomed); if (userInfo?.isPluginTrial === true) { // undefined 表示无效,不显示 @@ -567,16 +565,11 @@ export async function showICHelperPanel( } } - // 未过期或长期有效(null),且未显示过欢迎弹窗 - if (!hasWelcomed) { - await context.globalState.update("pluginTrialWelcomed", true); - console.log("[ICHelperPanel] ✅ 发送 showWelcomeModal 命令到前端"); - panel.webview.postMessage({ - command: "showWelcomeModal", - }); - } else { - console.log("[ICHelperPanel] 已显示过欢迎弹窗"); - } + // 未过期或长期有效(null),显示欢迎弹窗 + console.log("[ICHelperPanel] ✅ 发送 showWelcomeModal 命令到前端"); + panel.webview.postMessage({ + command: "showWelcomeModal", + }); } else { console.log("[ICHelperPanel] 非试用用户"); }