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

@@ -357,7 +357,7 @@ export default function ToolCall(props: ToolCallProps) {
return (
<div class="tool-call-bash">
<div class="message-text">
<Markdown content={fullOutput} isDark={isDark()} />
<Markdown part={{ type: "text", text: fullOutput }} isDark={isDark()} />
</div>
</div>
)
@@ -384,7 +384,7 @@ export default function ToolCall(props: ToolCallProps) {
if (hasMarkdownCodeBlocks(truncated)) {
return (
<div class="message-text">
<Markdown content={truncated} isDark={isDark()} />
<Markdown part={{ type: "text", text: truncated }} isDark={isDark()} />
</div>
)
}
@@ -479,7 +479,7 @@ export default function ToolCall(props: ToolCallProps) {
if (hasMarkdownCodeBlocks(truncated)) {
return (
<div class="message-text">
<Markdown content={truncated} isDark={isDark()} />
<Markdown part={{ type: "text", text: truncated }} isDark={isDark()} />
</div>
)
}