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 <tukon479@gmail.com>
This commit is contained in:
Innei
2025-09-23 22:45:01 +08:00
parent a2eb94528d
commit fa011c56d3
@@ -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)