Files
openclaw/ui/src/components/markdown-render-options.ts
snowzlmbot e8ad0466ff fix: render assistant transcript headers safely (#99404)
* fix: render assistant transcript headers safely

Co-authored-by: snowzlmbot <293528334+snowzlmbot@users.noreply.github.com>

* fix(markdown): nest crossing annotation spans

* fix(markdown): protect final transport projections

* refactor(markdown): split transcript render ownership

* test(ui): cover assistant transcript render flag

* refactor(markdown): keep transcript helpers private

* docs(changelog): note assistant transcript headers

* chore(plugin-sdk): refresh transcript annotation baseline

* fix(markdown): harden final transcript projections

* docs(changelog): defer transcript note to release

* refactor(markdown): centralize HTML tokenization

* fix(markdown): satisfy lint gates

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: snowzlmbot <293528334+snowzlmbot@users.noreply.github.com>
2026-07-14 02:25:37 -07:00

20 lines
581 B
TypeScript

type MarkdownCodeBlockChrome = "copy" | "none";
export type MarkdownRenderOptions = {
assistantTranscriptRoleHeaders?: boolean;
codeBlockChrome?: MarkdownCodeBlockChrome;
fileLinks?: boolean;
};
export type MarkdownRenderEnv = Required<MarkdownRenderOptions>;
export function normalizeMarkdownRenderOptions(
options: MarkdownRenderOptions = {},
): MarkdownRenderEnv {
return {
assistantTranscriptRoleHeaders: options.assistantTranscriptRoleHeaders ?? false,
codeBlockChrome: options.codeBlockChrome ?? "copy",
fileLinks: options.fileLinks ?? false,
};
}