diff options
| author | Youen Chéné <youen.chene@gadz.org> | 2025-09-07 14:33:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-07 13:33:28 +0100 |
| commit | 9dd93f84104c79182e68768d26c8ce7be99bed89 (patch) | |
| tree | 2d9bf22f2925ab64182133d8e88f3964fa4315d8 /apps/web/components/dashboard | |
| parent | 09948144eb06260f7773d079b53fce551f55188e (diff) | |
| download | karakeep-9dd93f84104c79182e68768d26c8ce7be99bed89.tar.zst | |
feat(web): render AI summary in markdown (#1869)
* feat: wrap bookmark summary with MarkdownReadonly component to render Markdown properly.
* fix: hydration errors because of the markdown component
Diffstat (limited to 'apps/web/components/dashboard')
| -rw-r--r-- | apps/web/components/dashboard/bookmarks/SummarizeBookmarkArea.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/web/components/dashboard/bookmarks/SummarizeBookmarkArea.tsx b/apps/web/components/dashboard/bookmarks/SummarizeBookmarkArea.tsx index b5e89a01..e75886e1 100644 --- a/apps/web/components/dashboard/bookmarks/SummarizeBookmarkArea.tsx +++ b/apps/web/components/dashboard/bookmarks/SummarizeBookmarkArea.tsx @@ -1,5 +1,6 @@ import React from "react"; import { ActionButton } from "@/components/ui/action-button"; +import { MarkdownReadonly } from "@/components/ui/markdown/markdown-readonly"; import LoadingSpinner from "@/components/ui/spinner"; import { toast } from "@/components/ui/use-toast"; import { useClientConfig } from "@/lib/clientConfig"; @@ -52,11 +53,11 @@ function AISummary({ onClick={() => !isExpanded && setIsExpanded(true)} > <div className="h-full rounded-lg bg-accent p-2"> - <p - className={`text-sm text-gray-700 dark:text-gray-300 ${!isExpanded && "line-clamp-3"}`} + <MarkdownReadonly + className={`text-sm ${!isExpanded && "line-clamp-3"}`} > {summary} - </p> + </MarkdownReadonly> {isExpanded && ( <span className="flex justify-end gap-2 pt-2"> <ActionButton |
