日志控制
This commit is contained in:
@@ -22,6 +22,7 @@ import { ConfigManager } from "../../manager/ConfigManager";
|
||||
import LanguageUtils from "../../../Main/Common/LanguageUtils";
|
||||
import { Dialog } from "../../data/DialogData";
|
||||
import { InnerMsgCode } from "../../../Main/Config/InnerMsgCode";
|
||||
import { logger } from "db://assets/Scripts/Main/Common/Logger";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -132,7 +133,7 @@ export class RecordPanel extends li_BaseView {
|
||||
this.allMessages = ChatHistoryManager.Instance.loadHistory(this.id);
|
||||
|
||||
if (this.allMessages.length === 0) {
|
||||
console.log(`No chat history found for role ${this.id}`);
|
||||
logger.log(`No chat history found for role ${this.id}`);
|
||||
this.updateLoadMoreBtn();
|
||||
return;
|
||||
}
|
||||
@@ -170,7 +171,7 @@ export class RecordPanel extends li_BaseView {
|
||||
// 添加到已显示的消息列表
|
||||
this.displayedMessages.push(...newDialogs);
|
||||
|
||||
console.log(
|
||||
logger.log(
|
||||
`Loaded page ${this.currentPage + 1}, showing ${
|
||||
this.displayedMessages.length
|
||||
}/${this.allMessages.length} messages`
|
||||
@@ -234,7 +235,7 @@ export class RecordPanel extends li_BaseView {
|
||||
*/
|
||||
public clearHistory() {
|
||||
ChatHistoryManager.Instance.clearHistory(this.id);
|
||||
console.log(`Cleared chat history for role ${this.id}`);
|
||||
logger.log(`Cleared chat history for role ${this.id}`);
|
||||
|
||||
// 重置数据
|
||||
this.allMessages = [];
|
||||
|
||||
Reference in New Issue
Block a user