diff --git a/src/lib/components/chat/Messages/Markdown/ColonFenceBlock.svelte b/src/lib/components/chat/Messages/Markdown/ColonFenceBlock.svelte index 2206a8735d..71f9d4f2d3 100644 --- a/src/lib/components/chat/Messages/Markdown/ColonFenceBlock.svelte +++ b/src/lib/components/chat/Messages/Markdown/ColonFenceBlock.svelte @@ -18,9 +18,12 @@ export let onTaskClick: Function = () => {}; export let onSourceClick: Function = () => {}; - const fenceType: string = token.fenceType ?? 'default'; + $: fenceType = token.fenceType ?? 'default'; + $: attributes = token.attributes ?? {}; - const label = fenceType.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase()); + $: label = + attributes.subject || fenceType.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase()); + $: header = attributes.recipient ? `${label} · ${attributes.recipient}` : label; let copied = false; @@ -34,13 +37,16 @@