feat: 优化登录逻辑

This commit is contained in:
2026-01-06 19:42:10 +08:00
parent 7e02429f6e
commit 9c658e9f9f
6 changed files with 30 additions and 30 deletions

View File

@@ -602,9 +602,6 @@ const sendChat = (message, isInstruct = false) => {
const messageContent = isInstruct ? commonType : message;
currentSessionMessageId = IdUtils.generateMessageId();
// 重置消息状态,为新消息做准备
resetMessageState();
// 插入AI消息
const aiMsg = {
msgId: `msg_${chatMsgList.value.length}`,
@@ -627,8 +624,10 @@ const sendChat = (message, isInstruct = false) => {
chatMsgList.value[aiMsgIndex].msg = "发送消息失败,请重试";
chatMsgList.value[aiMsgIndex].isLoading = false;
isSessionActive.value = false;
resetMessageState();
}
// 重置消息状态,为新消息做准备
resetMessageState();
};
// 停止请求函数