Markdown
A shared streaming-safe reply renderer with compact typography, code blocks, tables, and record references.
Q3 filings for Acme
Here is everything due this quarter. Two filings need your input, and one is already filed. See the filing calendar, or ask about Acme Pte Ltd.
What I checked
- Your GST registration is active
- Two ledger exports are missing
- Sales ledger export
- Purchase ledger export
- Upload both ledger exports
- Review the draft return
- Approve the filing
Returns are due one month after the end of each accounting period.
The filing ID is GSTF5-2026-Q3.
-- Filings due this quarter
SELECT entity, filing, due_date
FROM filings
WHERE due_date < '2027-01-01'
AND status = 'not_started'
ORDER BY due_date;
| Filing | Entity | Due | Amount |
|---|---|---|---|
| GST F5 return · Q3 | Acme Pte Ltd | Oct 31 | 12,400.00 |
| Confirmation statement | Meridian UK Ltd | Nov 14 | 13.00 |
| VAT return · Q3 | Meridian UK Ltd | Dec 7 | 8,240.50 |
Want me to draft a request to your bookkeeper for the two ledger exports?
Usage
import { Markdown } from '@commenda/pathfinder/markdown';
<Markdown content={messagePart.text} isStreaming={status === 'streaming'} />;Pass each text part without flattening tool calls, attachments, or other message parts into Markdown. The renderer needs no chat provider or AI SDK runtime.
Streaming
Incomplete fences and formatting remain readable while content arrives. Finished blocks use the same components and styles as static content.
References
Resolve known record URLs using application data. Pathfinder renders the reference and preview; the application supplies routing and data access.
<Markdown
content={messagePart.text}
referenceConfig={{
resolve: (href, label) =>
href === '/entities/acme'
? {
label,
href,
previewConfig: {
title: 'Acme Pte Ltd',
content: <EntitySummary entity={entity} />,
},
}
: undefined,
}}
/>;Use an icon in the resolved reference to add the correct Pathfinder flag to an entity in a table. The renderer does not infer countries from names.
Tables
Tables use compact Pathfinder cell styles, a pinned first column, horizontal scrolling, copy as TSV, CSV/Markdown downloads, and an expanded dialog. Use Markdown alignment markers (---:) for numeric columns. Rich cell overrides can use existing Pathfinder cells; sorting, editing, and pagination belong in the standalone Table component.
API reference
| Prop | Type | Behavior |
|---|---|---|
contentConditional | string | Required; choose one. children preserves the existing MessageResponse calling pattern |
childrenConditional | string | Required; choose one. children preserves the existing MessageResponse calling pattern |
isStreaming | boolean | Enables incomplete Markdown handling; defaults to false |
isAnimating | boolean | Compatibility alias; explicit isStreaming wins. Does not add word animation |
components | MarkdownComponents | Typed overrides for prose, headings, links, lists, tables/cells, and images |
referenceConfig | ObjectView fields | — |
codeConfig | ObjectView fields | — |
referenceConfigObject fields
| Field | Type | Requirement |
|---|---|---|
resolve | (href: string, label: string) => InlineReferenceProps | Required |
codeConfigObject fields
| Field | Type | Requirement |
|---|---|---|
showLineNumbers | boolean | Optional |
Custom renderers are trusted application code and own their accessibility and URL handling. Raw HTML is not a supported extension mechanism. Math, diagrams, custom tool cards, and executable previews are outside Phase 1; their fences render as code.
Design and accessibility rules
- MARKDOWN-01: Body 13/20; h1/h2 use Heading/15, h3–h6 use Copy/13 Strong. Paragraph gaps 12px; lists 4px between items. No library-default typography.
- MARKDOWN-02: Use this renderer for chat, briefing, and human threads. Keep the application's original message text.
- MARKDOWN-03: Code is inert. Unsafe navigation schemes and executable HTML are not rendered. External links use native browser navigation; app-specific confirmation is an explicit link override.
- MARKDOWN-REF-01: Record references have strong body text and a neutral underline. Preview data belongs to the application.
- MARKDOWN-TABLE-01: Subtle tray, compact semantic table, pinned first column, copy/export/expand controls.
- Streaming marks the content busy but does not announce every token. The conversation layer owns meaningful reply announcements.
Migration notes
// Existing text and stream state can be reused without converting messages.
<Markdown isAnimating={isLiveAssistant && isLastSegment}>
{segment.part.text}
</Markdown>;components remains available. Product-specific question fences, math/Mermaid plugins, link-confirmation providers, and word animations are not silently copied; document those separately before migrating a consumer. See the AI content integration guide.