fix stop bug

This commit is contained in:
Chuck1sn
2025-05-26 16:45:27 +08:00
parent e0d5723b5b
commit 9f2f0bc0e0
4 changed files with 10 additions and 9 deletions

View File

@@ -183,17 +183,17 @@ const chatByMode = async (message: string) => {
});
if (isCommandMode.value) {
await actionChat(message);
} else {
if (isLoading.value) {
abortChat();
} else {
await chat(message);
}
} else {
await chat(message);
}
};
const handleSendClick = async () => {
scrollToBottom();
if (isLoading.value) {
abortChat();
return;
}
const validInputMessage = z
.string({ message: "消息不能为空" })
.min(1, "消息不能为空")