优化聊天部分

This commit is contained in:
2025-09-16 16:55:39 +08:00
parent 76bd04b9f4
commit 9a3525afd3
16 changed files with 1442 additions and 553 deletions
@@ -191,9 +191,6 @@ export class ChatController {
throw new Error("Role ID is not available in ChatModel");
}
// 通知界面消息发送开始
this.callback?.onMessageSent(message);
// 添加用户消息到模型
this.chatModel.addDialog(true, message);
@@ -201,6 +198,9 @@ export class ChatController {
this.dialogManager?.updateDialog(true, message, true);
this.callback?.onDialogUpdated();
// 通知界面消息发送开始
this.callback?.onMessageSent(message);
// 显示加载中的对话
this.dialogManager?.addLoadingDialog();
@@ -469,7 +469,7 @@ export class ChatController {
* 检查是否有指定角色的数据
* @param roleId 角色ID
*/
public hasRoleData(categoryId:string,roleId: number): boolean {
public hasRoleData(categoryId: string, roleId: number): boolean {
return this.chatModel.hasRoleData(roleId);
}