Merge pull request #14 from Jasonzhu1207/fix/chinese-garbled-text

fix: clean up garbled Chinese text
This commit is contained in:
Jason
2026-04-10 20:23:30 +08:00
committed by GitHub
6 changed files with 14 additions and 14 deletions

View File

@@ -729,7 +729,7 @@ export class ConfigService {
// === 工具方法 ===
/**
* 获取当前 wxid 对应的图片密钥,优先从 wxidConfigs 中取,找不到则回退到全局<EFBFBD><EFBFBD>
* 获取当前 wxid 对应的图片密钥,优先从 wxidConfigs 中取,找不到则回退到全局
*/
getImageKeysForCurrentWxid(): { xorKey: unknown; aesKey: string } {
const wxid = this.get('myWxid')

View File

@@ -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[] = []

View File

@@ -279,7 +279,7 @@ class InsightService {
}
/**
* 测<EFBFBD><EFBFBD><EFBFBD> API 连接,返回 { success, message }。
* 测 API 连接,返回 { success, message }。
* 供设置页"测试连接"按钮调用。
*/
async testConnection(): Promise<{ success: boolean; message: string }> {
@@ -438,7 +438,7 @@ class InsightService {
}
/**
* 获取今日全局已触发次数(所有会话合计),用于 prompt 中告知模<EFBFBD><EFBFBD><EFBFBD>全局上下文。
* 获取今日全局已触发次数(所有会话合计),用于 prompt 中告知模全局上下文。
*/
private getTodayTotalTriggerCount(): number {
this.resetIfNewDay()
@@ -668,7 +668,7 @@ class InsightService {
return
}
// ── 构建 prompt ─────────────<EFBFBD><EFBFBD><EFBFBD>───────────────────────────────<EFBFBD><EFBFBD><EFBFBD>────────────
// ── 构建 prompt ────────────────────────────────────────────────────────────
// 今日触发统计(让模型具备时间与克制感)
const sessionTriggerTimes = this.recordTrigger(sessionId)

View File

@@ -125,7 +125,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
setHttpApiToken(token)
await configService.setHttpApiToken(token)
showMessage('已生成<EFBFBD><EFBFBD>保存新的 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(`切换更新渠道<EFBFBD><EFBFBD>败: ${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('已获取图片<EFBFBD><EFBFBD>钥')
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
/>
<button className="btn btn-secondary" onClick={handleCopyApiUrl} title="复<EFBFBD><EFBFBD><EFBFBD>">
<button className="btn btn-secondary" onClick={handleCopyApiUrl} title="复">
<Copy size={16} />
</button>
</div>
@@ -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 <EFBFBD><EFBFBD>证失败', false)
showMessage(verifyResult.error || 'Windows Hello 证失败', false)
return
}
@@ -3598,7 +3598,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
onClick={handleSetupHello}
disabled={!helloAvailable || isSettingHello || !authEnabled || !helloPassword}
>
{isSettingHello ? '<EFBFBD><EFBFBD><EFBFBD>置中...' : '开启与设置'}
{isSettingHello ? '置中...' : '开启与设置'}
</button>
)}
</div>

View File

@@ -1127,7 +1127,7 @@ export default function SnsPage() {
activeContactsCountTaskIdRef.current = null
}
finishBackgroundTask(taskId, 'completed', {
detail: '鑱旂郴浜烘湅鍙嬪湀鏉℃暟琛ョ畻瀹屾垚',
detail: '联系人朋友圈条数补算完成',
progressText: `${totalTargets}/${totalTargets}`
})
}

View File

@@ -505,7 +505,7 @@ export async function setExportDefaultTxtColumns(columns: string[]): Promise<voi
await config.set(CONFIG_KEYS.EXPORT_DEFAULT_TXT_COLUMNS, columns)
}
// 获取导出默认并发<EFBFBD><EFBFBD>
// 获取导出默认并发
export async function getExportDefaultConcurrency(): Promise<number | null> {
const value = await config.get(CONFIG_KEYS.EXPORT_DEFAULT_CONCURRENCY)
if (typeof value === 'number' && Number.isFinite(value)) return value