mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-28 04:49:21 +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:
@@ -518,22 +518,9 @@ export const HumanMessage = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : typeof content === "string" ? (
|
) : typeof content === "string" ? (
|
||||||
<ReactMarkdown
|
<div className="flex flex-col preserve-lines prose max-w-full">
|
||||||
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]}
|
|
||||||
>
|
|
||||||
{content}
|
{content}
|
||||||
</ReactMarkdown>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
content
|
content
|
||||||
)}
|
)}
|
||||||
|
@@ -43,3 +43,8 @@
|
|||||||
width: 8px; /* Vertical scrollbar width */
|
width: 8px; /* Vertical scrollbar width */
|
||||||
height: 8px; /* Horizontal scrollbar height */
|
height: 8px; /* Horizontal scrollbar height */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Used to create alternatie to React Markdown */
|
||||||
|
.preserve-lines {
|
||||||
|
white-space: pre-wrap; /* Preserves whitespace and wraps text */
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user