From afa8bb5fe0e3dada8c731bc665b146a90912664a Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 10 Apr 2026 00:01:31 +0800 Subject: [PATCH 1/4] fix: clean up garbled Chinese text --- electron/services/config.ts | 2 +- electron/services/imageDecryptService.ts | 4 ++-- electron/services/insightService.ts | 6 +++--- src/pages/SettingsPage.tsx | 12 ++++++------ src/pages/SnsPage.tsx | 2 +- src/services/config.ts | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/electron/services/config.ts b/electron/services/config.ts index 87029c9..9f37183 100644 --- a/electron/services/config.ts +++ b/electron/services/config.ts @@ -729,7 +729,7 @@ export class ConfigService { // === 工具方法 === /** - * 获取当前 wxid 对应的图片密钥,优先从 wxidConfigs 中取,找不到则回退到全局��置 + * 获取当前 wxid 对应的图片密钥,优先从 wxidConfigs 中取,找不到则回退到全局配置 */ getImageKeysForCurrentWxid(): { xorKey: unknown; aesKey: string } { const wxid = this.get('myWxid') diff --git a/electron/services/imageDecryptService.ts b/electron/services/imageDecryptService.ts index 37b41f2..b0d8513 100644 --- a/electron/services/imageDecryptService.ts +++ b/electron/services/imageDecryptService.ts @@ -934,7 +934,7 @@ export class ImageDecryptService { } catch { } } - // --- 绛栫暐 B: 鏂扮増 Session 鍝堝笇璺緞鐚滄祴 --- + // --- 策略 B: 新版 Session 哈希路径猜测 --- try { const entries = await fs.readdir(root, { withFileTypes: true }) const sessionDirs = entries @@ -1833,7 +1833,7 @@ export class ImageDecryptService { } /** - * 浠?wxgf 鏁版嵁涓彁鍙?HEVC NALU 瑁告祦 + * 从 wxgf 数据中提取 HEVC NALU 裸流 */ private extractHevcNalu(buffer: Buffer): Buffer | null { const nalUnits: Buffer[] = [] diff --git a/electron/services/insightService.ts b/electron/services/insightService.ts index 305cfd6..e03d657 100644 --- a/electron/services/insightService.ts +++ b/electron/services/insightService.ts @@ -279,7 +279,7 @@ class InsightService { } /** - * 测��� API 连接,返回 { success, message }。 + * 测试 API 连接,返回 { success, message }。 * 供设置页"测试连接"按钮调用。 */ async testConnection(): Promise<{ success: boolean; message: string }> { @@ -438,7 +438,7 @@ class InsightService { } /** - * 获取今日全局已触发次数(所有会话合计),用于 prompt 中告知模���全局上下文。 + * 获取今日全局已触发次数(所有会话合计),用于 prompt 中告知模型全局上下文。 */ private getTodayTotalTriggerCount(): number { this.resetIfNewDay() @@ -668,7 +668,7 @@ class InsightService { return } - // ── 构建 prompt ─────────────���───────────────────────────────���──────────── + // ── 构建 prompt ──────────────────────────────────────────────────────────── // 今日触发统计(让模型具备时间与克制感) const sessionTriggerTimes = this.recordTrigger(sessionId) diff --git a/src/pages/SettingsPage.tsx b/src/pages/SettingsPage.tsx index 35f989f..92a9b5f 100644 --- a/src/pages/SettingsPage.tsx +++ b/src/pages/SettingsPage.tsx @@ -125,7 +125,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { setHttpApiToken(token) await configService.setHttpApiToken(token) - showMessage('已生成��保存新的 Access Token', true) + showMessage('已生成并保存新的 Access Token', true) } const clearApiToken = async () => { @@ -635,7 +635,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { showMessage(`已切换到${channelLabel}更新渠道,正在检查更新`, true) await handleCheckUpdate() } catch (e: any) { - showMessage(`切换更新渠道��败: ${e}`, false) + showMessage(`切换更新渠道失败: ${e}`, false) } } @@ -1230,7 +1230,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { if (result.success && result.aesKey) { if (typeof result.xorKey === 'number') setImageXorKey(`0x${result.xorKey.toString(16).toUpperCase().padStart(2, '0')}`) setImageAesKey(result.aesKey) - setImageKeyStatus('已获取图片��钥') + setImageKeyStatus('已获取图片密钥') showMessage('已自动获取图片密钥', true) const newXorKey = typeof result.xorKey === 'number' ? result.xorKey : 0 const newAesKey = result.aesKey @@ -3232,7 +3232,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { value={`http://${httpApiHost}:${httpApiPort}`} readOnly /> - @@ -3366,7 +3366,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { try { const verifyResult = await window.electronAPI.auth.hello('请验证您的身份以开启 Windows Hello') if (!verifyResult.success) { - showMessage(verifyResult.error || 'Windows Hello ��证失败', false) + showMessage(verifyResult.error || 'Windows Hello 验证失败', false) return } @@ -3598,7 +3598,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { onClick={handleSetupHello} disabled={!helloAvailable || isSettingHello || !authEnabled || !helloPassword} > - {isSettingHello ? '���置中...' : '开启与设置'} + {isSettingHello ? '配置中...' : '开启与设置'} )} diff --git a/src/pages/SnsPage.tsx b/src/pages/SnsPage.tsx index b9bf6b0..88909a3 100644 --- a/src/pages/SnsPage.tsx +++ b/src/pages/SnsPage.tsx @@ -1127,7 +1127,7 @@ export default function SnsPage() { activeContactsCountTaskIdRef.current = null } finishBackgroundTask(taskId, 'completed', { - detail: '鑱旂郴浜烘湅鍙嬪湀鏉℃暟琛ョ畻瀹屾垚', + detail: '联系人朋友圈条数补算完成', progressText: `${totalTargets}/${totalTargets}` }) } diff --git a/src/services/config.ts b/src/services/config.ts index 16cf4e6..fe24a9b 100644 --- a/src/services/config.ts +++ b/src/services/config.ts @@ -505,7 +505,7 @@ export async function setExportDefaultTxtColumns(columns: string[]): Promise { const value = await config.get(CONFIG_KEYS.EXPORT_DEFAULT_CONCURRENCY) if (typeof value === 'number' && Number.isFinite(value)) return value From ddf6b63aec039996faa86cd343c72938f3c6745f Mon Sep 17 00:00:00 2001 From: cc <98377878+hicccc77@users.noreply.github.com> Date: Fri, 10 Apr 2026 20:34:16 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/SettingsPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/SettingsPage.tsx b/src/pages/SettingsPage.tsx index 5c13eb1..0e9015a 100644 --- a/src/pages/SettingsPage.tsx +++ b/src/pages/SettingsPage.tsx @@ -2872,7 +2872,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) { type="password" className="field-input" style={{ width: '100%' }} - placeholder="110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw" + placeholder="在此处填入你的 Telegram Bot Token" value={aiInsightTelegramToken} onChange={(e) => { const val = e.target.value From efb5cd3586bcd668efdf197246e2aaa88ea163c5 Mon Sep 17 00:00:00 2001 From: Tosd0 <65720409+Tosd0@users.noreply.github.com> Date: Fri, 10 Apr 2026 20:59:24 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix(notification):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=99=BD=E5=90=8D=E5=8D=95=E4=B8=BA=E7=A9=BA=E6=97=B6=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=99=A8=E5=AE=8C=E5=85=A8=E5=A4=B1=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/windows/notificationWindow.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/electron/windows/notificationWindow.ts b/electron/windows/notificationWindow.ts index f3c8eca..f93fcd6 100644 --- a/electron/windows/notificationWindow.ts +++ b/electron/windows/notificationWindow.ts @@ -115,12 +115,12 @@ export async function showNotification(data: any) { // 检查会话过滤 const filterMode = config.get("notificationFilterMode") || "all"; const filterList = config.get("notificationFilterList") || []; - const sessionId = data.sessionId; + const sessionId = typeof data.sessionId === "string" ? data.sessionId : ""; - if (sessionId && filterMode !== "all" && filterList.length > 0) { - const isInList = filterList.includes(sessionId); + if (filterMode !== "all") { + const isInList = sessionId !== "" && filterList.includes(sessionId); if (filterMode === "whitelist" && !isInList) { - // 白名单模式:不在列表中则不显示 + // 白名单模式:不在列表中则不显示(空列表视为全部拦截) return; } if (filterMode === "blacklist" && isInList) { From 3be90d00e5f1be3d92cb7b37254638baed4fe082 Mon Sep 17 00:00:00 2001 From: Tosd0 <65720409+Tosd0@users.noreply.github.com> Date: Fri, 10 Apr 2026 20:59:54 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix(notification):=20=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E8=B1=81=E5=85=8D=E4=BC=9A=E8=AF=9D=E7=99=BD?= =?UTF-8?q?/=E9=BB=91=E5=90=8D=E5=8D=95=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/windows/notificationWindow.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electron/windows/notificationWindow.ts b/electron/windows/notificationWindow.ts index f93fcd6..21bbf01 100644 --- a/electron/windows/notificationWindow.ts +++ b/electron/windows/notificationWindow.ts @@ -116,8 +116,10 @@ export async function showNotification(data: any) { const filterMode = config.get("notificationFilterMode") || "all"; const filterList = config.get("notificationFilterList") || []; const sessionId = typeof data.sessionId === "string" ? data.sessionId : ""; + // 系统通知(如 "WeFlow 准备就绪")不是聊天消息,不应受会话白/黑名单影响 + const isSystemNotification = sessionId.startsWith("weflow-"); - if (filterMode !== "all") { + if (!isSystemNotification && filterMode !== "all") { const isInList = sessionId !== "" && filterList.includes(sessionId); if (filterMode === "whitelist" && !isInList) { // 白名单模式:不在列表中则不显示(空列表视为全部拦截)