Merge pull request #2623 from Molecule-AI/fix/canvas-chat-agent-prose-invert
fix(canvas): agent chat bubble dark-mode prose contrast (regression #2618)
This commit is contained in:
commit
954d2172f0
@ -792,7 +792,18 @@ function MyChatPanel({ workspaceId, data }: Props) {
|
||||
}`}
|
||||
>
|
||||
{msg.content && (
|
||||
<div className={`prose prose-sm max-w-none [&>p]:mb-1 [&>p:last-child]:mb-0 ${msg.role === "user" ? "prose-invert" : ""}`}>
|
||||
<div
|
||||
className={`prose prose-sm max-w-none [&>p]:mb-1 [&>p:last-child]:mb-0 ${
|
||||
msg.role === "user"
|
||||
? "prose-invert"
|
||||
// Agent bubbles use bg-zinc-700 in dark mode; without
|
||||
// prose-invert the Tailwind Typography plugin keeps
|
||||
// its default DARK body color → unreadable dark-on-dark.
|
||||
// Light mode keeps default prose colors against the
|
||||
// warm surface-card bg.
|
||||
: "dark:prose-invert"
|
||||
}`}
|
||||
>
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>{msg.content}</ReactMarkdown>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user