update
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user