mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-21 07:26:50 +00:00
fix(reasoning): prevent LLM-hallucinated HTML tags from rendering as DOM elements (#2321)
* fix * add test * fix
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import rehypeRaw from "rehype-raw";
|
||||
import { expect, test } from "vitest";
|
||||
|
||||
import { reasoningPlugins, streamdownPlugins } from "@/core/streamdown/plugins";
|
||||
|
||||
test("streamdownPlugins includes rehypeRaw", () => {
|
||||
expect(streamdownPlugins.rehypePlugins).toContain(rehypeRaw);
|
||||
});
|
||||
|
||||
test("reasoningPlugins does not include rehypeRaw", () => {
|
||||
const flat = reasoningPlugins.rehypePlugins?.flat();
|
||||
expect(flat).not.toContain(rehypeRaw);
|
||||
});
|
||||
Reference in New Issue
Block a user