fix(desktop): console.log 清理 — 替换为结构化 logger

将 desktop/src 中 23 处 console.log 替换为 createLogger() 结构化日志:
- 生产构建自动静默 debug/info 级别
- 保留 console.error 用于关键错误可见性
- 新增 dompurify 依赖修复 XSS 防护引入缺失

涉及文件: App.tsx, offlineStore.ts, autonomy-manager.ts,
gateway-auth.ts, llm-service.ts, request-helper.ts,
security-index.ts, skill-discovery.ts, use-onboarding.ts 等 16 个文件
This commit is contained in:
iven
2026-03-30 16:22:16 +08:00
parent 544358764e
commit ecd7f2e928
16 changed files with 140 additions and 68 deletions

View File

@@ -41,6 +41,7 @@
"@tauri-apps/plugin-opener": "^2.5.3",
"@xyflow/react": "^12.10.1",
"clsx": "^2.1.1",
"dompurify": "^3.3.3",
"framer-motion": "^12.38.0",
"lucide-react": "^0.577.0",
"react": "^19.2.4",
@@ -62,6 +63,7 @@
"@tauri-apps/cli": "^2.10.1",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.1.0",
"@types/dompurify": "^3.2.0",
"@types/js-yaml": "^4.0.9",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",