refactor: 清理渲染进程全部 58 处 console.log/warn/error
- 所有错误日志统一走 logService(logError/logWarn/logInfo) - 无 logService 的地方补上对应调用 - 纯调试 trace 直接删除(桌面应用看不到 console) - ollama.ts 流式解析错误改为静默跳过(非关键) - 执行日志面板信息量不变
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
import { state, KEYS } from '../state/state.js';
|
||||
import { logError } from '../services/log-service.js';
|
||||
import { marked } from '../utils/marked-config.js';
|
||||
import { escapeHtml, formatTime } from '../utils/utils.js';
|
||||
import type { ChatSession, ChatMessage, ToolCallRecord } from '../types.js';
|
||||
@@ -396,7 +397,7 @@ async function nativeSaveFile(defaultName: string, content: string): Promise<voi
|
||||
if (!filePath) return;
|
||||
const result = await bridge.fs.writeFile(filePath, content, 'utf-8');
|
||||
if (!result.success) {
|
||||
console.error('[ChatArea] 导出失败:', result.error);
|
||||
logError('导出失败', result.error);
|
||||
}
|
||||
} else {
|
||||
// 回退
|
||||
|
||||
Reference in New Issue
Block a user