improve ui, scroll new messages

This commit is contained in:
marlon-erler
2024-07-09 18:21:28 +02:00
parent 5667a55b74
commit 8a74d7c389
6 changed files with 44 additions and 43 deletions
+3 -1
View File
@@ -59,10 +59,12 @@ export function ThreadView(chat: Chat) {
);
};
return (
const listElement = (
<div
class="flex-column gap"
children:append={[chat.messages, messageConverter]}
></div>
);
chat.messages.handleAddition(() => listElement.scrollTop = listElement.scrollHeight);
return listElement;
}