From fa011c56d32bd05182145abb703af4c12bb0fbc6 Mon Sep 17 00:00:00 2001 From: Innei Date: Tue, 23 Sep 2025 22:45:01 +0800 Subject: [PATCH] fix(ai-message): adjust layout width for AIMarkdownStreamingMessage - Added a dynamic width calculation to the `AIMarkdownStreamingMessage` component, ensuring it adapts to the AI chat layout width. This change enhances the responsiveness and visual consistency of the message display. These modifications aim to improve the user experience by providing a more flexible and visually appealing chat interface. Signed-off-by: Innei --- .../src/modules/ai-chat/components/message/AIMarkdownMessage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMarkdownMessage.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMarkdownMessage.tsx index 06a1afc2c..362253f50 100644 --- a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMarkdownMessage.tsx +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMarkdownMessage.tsx @@ -17,6 +17,7 @@ export const AIMarkdownStreamingMessage = memo( const className = tw`prose max-w-full dark:prose-invert prose-sm prose-h1:text-2xl prose-h2:text-xl prose-h2:mt-2 prose-h3:text-lg prose-h4:text-base prose-h5:text-base prose-h6:text-sm prose-li:list-disc prose-li:marker:text-accent prose-hr:border-border prose-hr:mx-8 + w-[calc(var(--ai-chat-layout-width,65ch))] ` const stableStreamingState = useRef(isStreaming)