supermemory/apps/web/app/components/markdown/renderer.tsx
2025-01-20 17:50:45 -07:00

10 lines
No EOL
384 B
TypeScript

import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
import { type LLMOutputComponent } from "@llm-ui/react";
// Customize this component with your own styling
export const MarkdownComponent: LLMOutputComponent = ({ blockMatch }) => {
const markdown = blockMatch.output;
return <ReactMarkdown remarkPlugins={[remarkGfm]}>{markdown}</ReactMarkdown>;
};