mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-19 12:24:46 +08:00
fix: fix markdown table
This commit is contained in:
@@ -2,8 +2,6 @@ import type { Message } from "@langchain/langgraph-sdk";
|
|||||||
import { ExternalLinkIcon, FileIcon } from "lucide-react";
|
import { ExternalLinkIcon, FileIcon } from "lucide-react";
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
import { memo, useMemo } from "react";
|
import { memo, useMemo } from "react";
|
||||||
import rehypeKatex from "rehype-katex";
|
|
||||||
import remarkMath from "remark-math";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
InlineCitationCard,
|
InlineCitationCard,
|
||||||
@@ -31,7 +29,6 @@ import {
|
|||||||
parseUploadedFiles,
|
parseUploadedFiles,
|
||||||
type UploadedFile,
|
type UploadedFile,
|
||||||
} from "@/core/messages/utils";
|
} from "@/core/messages/utils";
|
||||||
import { useRehypeSplitWordsIntoSpans } from "@/core/rehype";
|
|
||||||
import { streamdownPlugins } from "@/core/streamdown";
|
import { streamdownPlugins } from "@/core/streamdown";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
@@ -86,7 +83,6 @@ function MessageContent_({
|
|||||||
message: Message;
|
message: Message;
|
||||||
isLoading?: boolean;
|
isLoading?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const rehypePlugins = useRehypeSplitWordsIntoSpans(isLoading);
|
|
||||||
const isHuman = message.type === "human";
|
const isHuman = message.type === "human";
|
||||||
|
|
||||||
// Extract and parse citations and uploaded files from message content
|
// Extract and parse citations and uploaded files from message content
|
||||||
@@ -211,8 +207,7 @@ function MessageContent_({
|
|||||||
{/* Message content - always show if present */}
|
{/* Message content - always show if present */}
|
||||||
{cleanContent && (
|
{cleanContent && (
|
||||||
<AIElementMessageResponse
|
<AIElementMessageResponse
|
||||||
remarkPlugins={[[remarkMath, { singleDollarTextMath: true }]]}
|
{...streamdownPlugins}
|
||||||
rehypePlugins={[...rehypePlugins, [rehypeKatex, { output: "html" }]]}
|
|
||||||
components={{
|
components={{
|
||||||
a: ({
|
a: ({
|
||||||
href,
|
href,
|
||||||
|
|||||||
Reference in New Issue
Block a user