From aa1fcd7eb9d7bc33a35a1d0c61c919cefee61924 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 12 Oct 2025 14:17:54 +0200 Subject: [PATCH] ai chat: fix message not fade in until the end when there's code blocks --- .config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml | 2 ++ .../ii/modules/sidebarLeft/aiChat/MessageTextBlock.qml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml b/.config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml index 8462f2432..a85986575 100644 --- a/.config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/aiChat/AiMessage.qml @@ -271,6 +271,8 @@ Rectangle { property bool thinking: root.messageData?.thinking ?? true property bool done: root.messageData?.done ?? false property bool completed: thisBlock.completed ?? false + + property bool forceDisableChunkSplitting: root.messageData.content.includes("```") source: thisBlock.type === "code" ? "MessageCodeBlock.qml" : thisBlock.type === "think" ? "MessageThinkBlock.qml" : diff --git a/.config/quickshell/ii/modules/sidebarLeft/aiChat/MessageTextBlock.qml b/.config/quickshell/ii/modules/sidebarLeft/aiChat/MessageTextBlock.qml index 35ef2da5e..a245b6979 100644 --- a/.config/quickshell/ii/modules/sidebarLeft/aiChat/MessageTextBlock.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/aiChat/MessageTextBlock.qml @@ -24,7 +24,8 @@ ColumnLayout { property string renderedSegmentContent: "" property string shownText: "" - property bool fadeChunkSplitting: !editing && !/\n\|/.test(shownText) && Config.options.sidebar.ai.textFadeIn + property bool forceDisableChunkSplitting: parent?.forceDisableChunkSplitting ?? false + property bool fadeChunkSplitting: !forceDisableChunkSplitting && !editing && !/\n\|/.test(shownText) && Config.options.sidebar.ai.textFadeIn Layout.fillWidth: true