import { Typography } from "antd"; import { Markdown } from "markdown-to-jsx/react"; import type { PartProps } from "./types"; import { CodeBlock } from "./CodeBlock"; import { MarkdownTable } from "./MarkdownTable"; interface TextPartProps extends PartProps { isStreaming: boolean; role: string; } export function TextPart({ isStreaming, part, role }: TextPartProps) { const text = typeof part["text"] === "string" ? part["text"] : ""; return (
{role === "user" ? ( {text} ) : ( {text} )}
); }