aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/components/markdown/renderer.tsx
blob: 12e47331736f6bebd7fd5975e75d553cbc6b634a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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>;
};