Cache markdown render output per message part

This commit is contained in:
Shantur Rathore
2025-10-28 14:41:09 +00:00
parent 6597783e85
commit d18e44f721
6 changed files with 140 additions and 63 deletions

View File

@@ -25,7 +25,7 @@ export default function MessagePart(props: MessagePartProps) {
<Match when={partType() === "text"}>
<Show when={!props.part.synthetic && props.part.text}>
<div class="message-text">
<Markdown content={props.part.text} isDark={isDark()} />
<Markdown part={props.part} isDark={isDark()} />
</div>
</Show>
</Match>
@@ -48,7 +48,7 @@ export default function MessagePart(props: MessagePartProps) {
</div>
<Show when={isReasoningExpanded()}>
<div class="message-text mt-2">
<Markdown content={props.part.text || ""} isDark={isDark()} />
<Markdown part={props.part} isDark={isDark()} />
</div>
</Show>
</div>