Scroll chat to bottom on startup

This commit is contained in:
Levi Neely 2026-08-16 13:07:10 +02:00
parent b28330b5d5
commit 57c95e3192
1 changed files with 10 additions and 1 deletions

View File

@ -6,15 +6,22 @@ Item {
id: chatPane
property bool sidebarVisible: true
signal toggleSidebar()
function scrollToBottom() {
chatView.positionViewAtEnd()
}
function loadChat() {
chatModel.reset()
if (ollie.activeSessionId && ollie.activeAgentId) {
var log = ollie.readLogForSession(ollie.activeSessionId, ollie.activeAgentId)
if (log) { chatModel.appendData(log); chatModel.trimFront(20) }
}
scrollToBottom()
}
Component.onCompleted: loadChat()
Component.onCompleted: {
loadChat()
scrollToBottom()
}
ColumnLayout {
anchors.fill: parent
@ -117,6 +124,8 @@ Item {
anchors.margins: 4
visible: ollie.daemonConnected && ollie.activeAgentId !== ""
Component.onCompleted: chatPane.scrollToBottom()
delegate: ChatBlockDelegate {
width: chatView.width - 8
}