refactor: 清理渲染进程全部 58 处 console.log/warn/error

- 所有错误日志统一走 logService(logError/logWarn/logInfo)
- 无 logService 的地方补上对应调用
- 纯调试 trace 直接删除(桌面应用看不到 console)
- ollama.ts 流式解析错误改为静默跳过(非关键)
- 执行日志面板信息量不变
This commit is contained in:
thzxx
2026-04-07 01:42:56 +08:00
parent f174e7d737
commit 60152fb443
14 changed files with 24 additions and 73 deletions
-2
View File
@@ -65,7 +65,6 @@ class AppState {
}
const old = this._state[key];
if (old == null || typeof old !== 'object') {
console.warn(`[State] setIn 失败: ${key} 不是对象`);
return;
}
const newRoot = Array.isArray(old) ? [...(old as unknown[])] : { ...(old as Record<string, unknown>) };
@@ -111,7 +110,6 @@ class AppState {
if (!this._listeners.has(key)) return;
for (const cb of this._listeners.get(key)!) {
try { cb(value, old); } catch (e) {
console.error(`[State] 监听器错误 (${key}):`, e);
}
}
}