日志控制

This commit is contained in:
chen wei bo
2025-09-21 20:36:25 +08:00
parent e78f6b937e
commit 93bfe3174f
23 changed files with 91 additions and 81 deletions
@@ -357,7 +357,7 @@ export class ChatController {
public loadDialogsFromHistory(roleId?: number): void {
const targetRoleId = roleId || this.chatModel.getCurrentRoleId();
if (!targetRoleId) {
console.warn("Cannot load dialogs: no active role");
logger.warn("Cannot load dialogs: no active role");
return;
}
@@ -508,7 +508,7 @@ export class ChatController {
* @param error 错误对象
*/
private handleError(error: Error): void {
console.error("ChatController error:", error);
logger.error("ChatController error:", error);
this.callback?.onError(error);
}
}