优化chat

This commit is contained in:
runny committed 2026-05-20 09:54:57 +08:00
1 parent f42f0a39a5
commit 46d7fff01e
1 file changed
-11
-11
View File
@@ -1128,16 +1128,6 @@ const scrollChatToBottom = async () => {
});
};
const scrollToMessage = async (index: number) => {
await nextTick();
const container = chatScrollContainer.value;
if (!container) return;
const el = container.querySelector(`[data-msg-index="${index}"]`) as HTMLElement | null;
if (el) {
el.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
};
const scrollToUserQuestion = async () => {
if (scrollToBottomFrame !== null) {
window.cancelAnimationFrame(scrollToBottomFrame);
@@ -1308,7 +1298,6 @@ const handleSend = async (textOrEvent?: string | Event) => {
return;
}
const userMsgIndex = messages.value.length;
await sendMessage(content, agentId, selectedKb.value);
if (!conversationId.value && history.value.length === 0) {