feat: expand intelligent investigation workspace
This commit is contained in:
@@ -2,8 +2,11 @@ import { cn } from "@/shared/ui/cn";
|
||||
import { MessageResponse } from "@/shared/ai-elements/message";
|
||||
import { defaultRehypePlugins } from "streamdown";
|
||||
import { artifactLinkComponents, artifactLinksPlugin } from "./artifact-markdown";
|
||||
import { ReadableMarkdownDiagram, ReadableMarkdownTable } from "@/shared/ai-elements/markdown-reading";
|
||||
|
||||
const responseRehypePlugins = [...Object.values(defaultRehypePlugins), artifactLinksPlugin];
|
||||
const responseComponents = { ...artifactLinkComponents, table: ReadableMarkdownTable };
|
||||
const responsePlugins = { renderers: [{ language: "mermaid", component: ReadableMarkdownDiagram }] };
|
||||
|
||||
type StreamingTokenResponseProps = {
|
||||
content: string;
|
||||
@@ -32,7 +35,8 @@ export function StreamingTokenResponse({
|
||||
mode="streaming"
|
||||
parseIncompleteMarkdown={true}
|
||||
rehypePlugins={responseRehypePlugins}
|
||||
components={artifactLinkComponents}
|
||||
components={responseComponents}
|
||||
plugins={responsePlugins}
|
||||
>
|
||||
{content}
|
||||
</MessageResponse>
|
||||
|
||||
Reference in New Issue
Block a user