"use client"; import { useI18n } from "@/components/i18n"; import { useContext, useState } from "react"; import { ChatActionsContext } from "@/components/chat"; import { DownloadIcon, MaximizeIcon } from "lucide-react"; import { InvertDiscIcon } from "@/components/artifacts/invert-disc"; import { Toggle } from "@/components/settings/controls"; import { useSessionMermaid } from "@/components/session-overlay"; import { downloadFile } from "@/components/artifacts/download"; import { DispatchCard } from "@/components/artifacts/dispatch-card"; import type { ArtifactPartProps, VisualResult } from "@/src/core"; /** * Visual artifact card (W6 → ack protocol): the tool part's output is the * dispatch ack, so the tool-call box is the DispatchCard (live status via * the chat view's jobs feed). The SVG itself renders from the steer message * (sub-agent result delivery) via VisualOutputCard. * * The SVG is model-authored for the learner's own machine (their own teacher * wrote it, verified by looking) — dangerouslySetInnerHTML is acceptable * here, with a cheap hygiene pass (sanitizeSvg: strip