优化chat
This commit is contained in:
1 parent
f42f0a39a5
commit
46d7fff01e
1 file changed
-11
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user