+ {labels.dictation[dictation.problem]} + +
+ )} +
+ {s.text}
+
+ );
+ case "strong":
+ return {s.text};
+ case "em":
+ return {s.text};
+ case "link":
+ return (
+
+ {renderLink({
+ href: s.href,
+ internal: isInternalHref(s.href),
+ className: "ck-link",
+ children: s.text,
+ })}
+
+ );
+ case "cite": {
+ const known = s.ids.filter((id) => citations?.[id]);
+ if (known.length === 0) return null;
+ return (
+ `${id} — ${citations![id]!.label}\n${citations![id]!.detail}`)
+ .join("\n\n")}
+ >
+ {known.join(" ")}
+
+ );
+ }
+ default:
+ return {s.text};
+ }
+ })}
+ >
+ );
+}
+
+/**
+ * Model output as readable text: paragraphs, lists, headings, bold, italic,
+ * code, links and citations. Never HTML — nothing here can inject markup.
+ */
+export function Markdown({
+ text,
+ citations,
+ renderLink = defaultRenderLink,
+ className,
+}: {
+ text: string;
+ citations?: CitationMap;
+ renderLink?: RenderLink;
+ className?: string;
+}) {
+ const inline = (t: string) => (
+
+ {b.code}
+
+ );
+ case "ul":
+ case "ol": {
+ const List = b.kind;
+ return (
+ + {inline(b.text)} +
+ ); + case "quote": + return{inline(b.text)}; + default: + return
{inline(b.text)}
; + } + })} ++ {message.content || labels.failed} +
+ ) : ( ++ + + + + + {live.status ?? labels.working} +
+ )} + {onStop && ( + + )} ++ {labels.stopped} +
+ )} + {children} + +