feat(ai): Add auto-scroll functionality to AI chat (#1972)

This commit is contained in:
end-4
2025-09-21 19:51:38 +02:00
committed by GitHub
@@ -209,6 +209,9 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
else {
Ai.sendUserMessage(inputText);
}
// Always scroll to bottom when user sends a message
messageListView.positionViewAtEnd()
}
Process {
@@ -316,6 +319,15 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
property int lastResponseLength: 0
property bool shouldAutoScroll: true
onContentYChanged: shouldAutoScroll = atYEnd
onContentHeightChanged: {
if (shouldAutoScroll) positionViewAtEnd();
}
onCountChanged: { // Auto-scroll when new messages are added
if (shouldAutoScroll) positionViewAtEnd();
}
clip: true
layer.enabled: true
layer.effect: OpacityMask {