Skip to main content

Functions

CodeComponent()

Defined in: components/streamdown-text.tsx:61 Custom renderer for syntax highlighted inline code and code blocks. Determines block-level vs inline presentation using the useIsStreamdownCodeBlock hook.

Parameters

__namedParameters
{ children?: ReactNode; components: { Code: ComponentType<Omit<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & { node?: Element; }>; Pre: ComponentType<Omit<DetailedHTMLProps<HTMLAttributes<HTMLPreElement>, HTMLPreElement>, "ref"> & { node?: Element; }>; }; node?: any; } & HTMLAttributes<HTMLElement>

Returns

Element

JsonCodeComponent()

Defined in: components/streamdown-text.tsx:97 Custom code block renderer specialized for JSON formatting. Intercepts text strings in JSON blocks, uses partial JSON decoding to process incomplete/streaming payloads, and renders them inside an AutoScrollJsonViewer tree.

Parameters

__namedParameters
SyntaxHighlighterProps

Returns

Element

StaticStreamdownWrapper()

Defined in: components/streamdown-text.tsx:135 React Component for static, non-animated markdown document presentations. Normalizes carriage returns and processes custom json blocks on-the-fly.

Parameters

props
Omit<StreamdownProps, "children"> & { markdownText: string; } Wrapper parameters.

Returns

Element Static markdown document element.

StreamdownText()

Defined in: components/streamdown-text.tsx:38 React Component to render streaming Markdown text with typing animations and carets. Plugs into @assistant-ui/react-streamdown and supports code syntax highlighting (using Shiki) and Mermaid diagram parsing dynamically.

Parameters

props
Pass-through props.

Returns

Element The streaming Markdown rendering primitive.