mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-17 19:44:45 +08:00
feat: add handling for task timeout and enhance Streamdown plugin for word animation
This commit is contained in:
@@ -3,6 +3,8 @@ import remarkGfm from "remark-gfm";
|
||||
import remarkMath from "remark-math";
|
||||
import type { StreamdownProps } from "streamdown";
|
||||
|
||||
import { rehypeSplitWordsIntoSpans } from "../rehype";
|
||||
|
||||
export const streamdownPlugins = {
|
||||
remarkPlugins: [
|
||||
remarkGfm,
|
||||
@@ -13,6 +15,17 @@ export const streamdownPlugins = {
|
||||
] as StreamdownProps["rehypePlugins"],
|
||||
};
|
||||
|
||||
export const streamdownPluginsWithWordAnimation = {
|
||||
remarkPlugins: [
|
||||
remarkGfm,
|
||||
[remarkMath, { singleDollarTextMath: true }],
|
||||
] as StreamdownProps["remarkPlugins"],
|
||||
rehypePlugins: [
|
||||
[rehypeKatex, { output: "html" }],
|
||||
rehypeSplitWordsIntoSpans,
|
||||
] as StreamdownProps["rehypePlugins"],
|
||||
};
|
||||
|
||||
// Plugins for human messages - no autolink to prevent URL bleeding into adjacent text
|
||||
export const humanMessagePlugins = {
|
||||
remarkPlugins: [
|
||||
|
||||
Reference in New Issue
Block a user