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
@@ -41,7 +41,6 @@ export async function initMemoryManager(): Promise<void> {
memoryCache = await db.getAllMemories();
state.set('memoryEntries', memoryCache);
console.log(`[Memory] 初始化完成,加载 ${memoryCache.length} 条记忆`);
logMemory(`初始化完成, 加载 ${memoryCache.length}`);
}
@@ -323,7 +322,6 @@ ${conversationText.slice(0, 4000)}
if (count > 0) logMemory(`自动提取 ${count}`);
return count;
} catch (err) {
console.warn('[Memory] 自动提取失败:', err);
logWarn('记忆自动提取失败', (err as Error).message);
return 0;
}