This commit is contained in:
2025-09-21 10:35:27 +08:00
parent 9559e436e6
commit 8e82ebf724
8 changed files with 569 additions and 309 deletions
+5 -10
View File
@@ -194,13 +194,6 @@ export class ChatController {
TipsPanel.show(LanguageUtils.getText("chat_error_code_1004"));
}
// 添加用户消息到模型
this.chatModel.addDialog(true, message);
// 更新对话显示 - 用户消息
this.dialogManager?.updateDialog(true, message, true);
this.callback?.onDialogUpdated(true);
// 通知界面消息发送开始
this.callback?.onMessageSent(message);
@@ -215,12 +208,14 @@ export class ChatController {
);
if (response) {
// 移除加载中的对话
//this.dialogManager?.removeLoadingDialog();
// 添加用户消息到模型
this.chatModel.addDialog(true, message);
// 更新对话显示 - 用户消息
this.dialogManager?.updateDialog(true, message, true);
this.callback?.onDialogUpdated(true);
// 添加AI回复到模型 (保持完整消息)
this.chatModel.addDialog(false, response);
// 更新对话显示 - AI回复 (使用分段显示)
this.dialogManager?.updateDialogWithSegments(false, response);
this.callback?.onDialogUpdated(false);