fix virtual message list scrolling (#1089)

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
ekko
2026-05-28 15:22:18 +08:00
committed by GitHub
co-authored by Codex
parent d610c3d1b9
commit 9d2e82cd06
6 changed files with 103 additions and 30 deletions
@@ -96,6 +96,10 @@ function scrollToMessage(messageId: string) {
listRef.value?.scrollToMessage(messageId);
}
function scrollToAnchor(messageId: string, anchorId: string) {
listRef.value?.scrollToAnchor(messageId, anchorId);
}
async function handleTopReach() {
const session = chatStore.activeSession;
if (!session?.hasMoreBefore || session.isLoadingOlderMessages) return;
@@ -156,6 +160,12 @@ watch(currentToolCalls, () => {
if (!isNearBottom()) return;
scrollToBottom();
});
defineExpose({
scrollToBottom,
scrollToMessage,
scrollToAnchor,
});
</script>
<template>