import type { ComponentProps } from 'react'
import { useRouter } from 'wouter'
import ReactMarkdown, { defaultUrlTransform, type ExtraProps } from 'react-markdown'
import rehypeHighlight from 'rehype-highlight'
import remarkGfm from 'remark-gfm'
import { useWorkspaceId } from '@/client/features/workspace/workspace-context'
import { resolveUrl } from '@/lib/navigation'
import { cn } from '@/client/lib/cn'
const remarkPlugins = [remarkGfm]
const rehypePlugins = [rehypeHighlight]
const components = {
code({ node: _node, className, children, ...props }: ComponentProps<'code'> & ExtraProps) {
return (
{children}
)
},
pre({ children }: ComponentProps<'pre'>) {
return (
{children}