From 57d3d49335e2fd6e06af195342861d2e2f9d9e3e Mon Sep 17 00:00:00 2001 From: Gemini AI Date: Mon, 29 Dec 2025 20:17:52 +0400 Subject: [PATCH] fix: TypeScript error in react-markdown code component --- components/AIAssist.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/AIAssist.tsx b/components/AIAssist.tsx index 28b4780..18bc235 100644 --- a/components/AIAssist.tsx +++ b/components/AIAssist.tsx @@ -973,9 +973,10 @@ export default function AIAssist() { remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeHighlight]} components={{ - code({ node, inline, className, children, ...props }) { + code({ node, className, children, ...props }: any) { const match = /language-(\w+)/.exec(className || ""); - return !inline ? ( + const isInline = !match && !String(children).includes('\n'); + return !isInline ? (
                                             {parseStreamingContent(msg.content, msg.agent || "general").chatDisplay || (msg.role === "assistant" ? "..." : "")}