mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-09 20:39:29 +02:00
Remove React Markdown for human messages (#1562)
* Remove React Markdown for human messages * Update globals.css * add formatting * formatting --------- Co-authored-by: “Pablo <“pablo@danswer.ai”>
This commit is contained in:
parent
0c642f25dd
commit
e1e1f036a7
@ -518,22 +518,9 @@ export const HumanMessage = ({
|
||||
</div>
|
||||
</div>
|
||||
) : typeof content === "string" ? (
|
||||
<ReactMarkdown
|
||||
className="prose max-w-full"
|
||||
components={{
|
||||
a: ({ node, ...props }) => (
|
||||
<a
|
||||
{...props}
|
||||
className="text-blue-500 hover:text-blue-700"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
/>
|
||||
),
|
||||
}}
|
||||
remarkPlugins={[remarkGfm]}
|
||||
>
|
||||
<div className="flex flex-col preserve-lines prose max-w-full">
|
||||
{content}
|
||||
</ReactMarkdown>
|
||||
</div>
|
||||
) : (
|
||||
content
|
||||
)}
|
||||
|
@ -43,3 +43,8 @@
|
||||
width: 8px; /* Vertical scrollbar width */
|
||||
height: 8px; /* Horizontal scrollbar height */
|
||||
}
|
||||
|
||||
/* Used to create alternatie to React Markdown */
|
||||
.preserve-lines {
|
||||
white-space: pre-wrap; /* Preserves whitespace and wraps text */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user