feat(webui): render Mermaid diagrams with Pele (#6302)

* feat(webui): render Mermaid diagrams with Pele

* fix(webui): reserve diagram replacement capacity

* fix(webui): prebundle lazy diagram worker dependencies

* fix(webui): account diagram capacity by encoded size

* fix(webui): use shared hover hints for diagram actions

* docs(webui): focus diagram guide on usage
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-19 17:16:20 +08:00
1 parent 0f3b47bc3a
commit f57018aa7f
40 files changed
+2335 -1458

No files matched your search

@@ -14,6 +14,7 @@ import { useTranslation } from "react-i18next";
import { PromptRail } from "@/components/thread/PromptRail";
import { SubagentThreadMessages, useHasSubagentContent } from "@/components/thread/SubagentTasks";
import { DiagramScope } from "@/components/markdown-diagrams/context";
import { ThreadHistoryStatus } from "@/components/thread/ThreadHistoryStatus";
import { isAgentActivityMember } from "@/components/thread/AgentActivityCluster";
import { ThreadCameraController } from "@/components/thread/thread-camera";
@@ -1028,6 +1029,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
)}
>
<div ref={messageContentRef} className="w-full">
<DiagramScope identity={conversationKey}>
<SubagentThreadMessages
messages={visibleMessages}
temporary={temporary}
@@ -1047,6 +1049,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
onQuoteSelection={onQuoteSelection}
onActivityToggle={yieldCameraToUser}
/>
</DiagramScope>
</div>
<div aria-hidden className="thread-message-end-gap shrink-0" />
<div ref={bottomRef} aria-hidden className="h-px shrink-0" />