diff --git a/surfsense_web/components/assistant-ui/markdown-text.tsx b/surfsense_web/components/assistant-ui/markdown-text.tsx index 8c4cff96f..651aa0cd5 100644 --- a/surfsense_web/components/assistant-ui/markdown-text.tsx +++ b/surfsense_web/components/assistant-ui/markdown-text.tsx @@ -20,6 +20,7 @@ import remarkMath from "remark-math"; import "katex/dist/katex.min.css"; import { InlineCitation, UrlCitation } from "@/components/assistant-ui/inline-citation"; import { TooltipIconButton } from "@/components/assistant-ui/tooltip-icon-button"; +import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; import { cn } from "@/lib/utils"; function stripThemeBackgrounds( @@ -370,43 +371,40 @@ const defaultComponents = memoizeMarkdownComponents({
), table: ({ className, ...props }) => ( -
- +
+
), + thead: ({ className, ...props }) => ( + + ), + tbody: ({ className, ...props }) => ( + + ), th: ({ className, children, ...props }) => ( - + ), td: ({ className, children, ...props }) => ( - + ), tr: ({ className, ...props }) => ( - td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg", - className - )} - {...props} - /> + ), sup: ({ className, ...props }) => ( a]:text-xs [&>a]:no-underline", className)} {...props} />
{processChildrenWithCitations(children)} - {processChildrenWithCitations(children)} -