diff --git a/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml b/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml index f84972f3e..ef232fbaa 100644 --- a/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml @@ -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 {