fix: preserve math through streaming HTML repair
Disable only Remend's incomplete-HTML stripping in message/tool content and reasoning rendering. Keep TeX, source data, and sanitization unchanged; unfinished HTML can display literally. PR #266 identified the less-than comparison trigger. This uses an independently authored renderer configuration fix rather than its TeX-spacing workaround, with streaming, incremental, literal-code, and safety regressions.
This commit is contained in:
@@ -24,7 +24,7 @@ import {
|
||||
import { Streamdown } from "streamdown";
|
||||
|
||||
import { transformMathDelimiters } from "@/src/core";
|
||||
import { streamdownPlugins } from "./message";
|
||||
import { streamdownPlugins, streamdownRemend } from "./message";
|
||||
import { mdComponents } from "@/components/md-blocks";
|
||||
import { Shimmer } from "./shimmer";
|
||||
|
||||
@@ -209,7 +209,7 @@ export const ReasoningContent = memo(
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<Streamdown components={mdComponents} plugins={streamdownPlugins}>
|
||||
<Streamdown components={mdComponents} plugins={streamdownPlugins} remend={streamdownRemend}>
|
||||
{transformMathDelimiters(children)}
|
||||
</Streamdown>
|
||||
</CollapsibleContent>
|
||||
|
||||
Reference in New Issue
Block a user