docs/design/web-shell-markdown-chart.md
Qwen Code Web Shell currently owns a standalone echarts-fulldata parser,
sanitizer, data-ref resolver, chart lifecycle, styling, and Chart/Data view in
EchartsFullDataBlock.tsx. The same behavior is now maintained and published
by @datafe-open/markdown-chart*.
Keeping both implementations makes the Web Shell renderer drift from the shared Markdown chart protocol and duplicates security, streaming, and ECharts lifecycle fixes. In particular, Web Shell only knows whether the whole assistant message is streaming, while the shared component distinguishes a closed chart fence from the active incomplete tail fence.
ReactMarkdown with
@datafe-open/markdown-chart-react's provider and route registered chart
fences through its pre adapter and block component.@datafe-open/markdown-chart and
@datafe-open/markdown-chart-echarts.markdown-chart fences and registered
aliases, including echarts-fulldata, without importing ECharts or supplying
host customization.markdown.chart.registry and createMarkdownChartRegistry as explicit
override APIs for controlled data refs, custom labels/loading/error behavior,
or a host-selected runtime.createEchartsFullDataRenderer and EchartsFullDataBlock as deprecated
compatibility surfaces. They delegate rendering to the shared component
instead of retaining a second parser or chart lifecycle.WebShellCodeBlockRenderInfo.isStreaming as the whole-message state
used by existing custom renderers.isIncomplete to legacy/custom renderCodeBlock callbacks so the
deprecated compatibility renderer can use the same block-level boundary.loadEcharts and resolveDataRef callback shapes to the
shared renderer.artifact:// and
session-file://) and normalized-path checks as the default registry policy
and in the deprecated adapter.markdown.renderCodeBlock precedence when no explicit
markdown.chart override is supplied. Existing
createEchartsFullDataRenderer({ loadEcharts, resolveDataRef }) integrations
therefore continue to use their host callbacks unchanged.markdown-chart skill; Web Shell renders its output by default but
does not inject or auto-load the skill.@datafe-open/markdown-chart* packages and echarts as Web
Shell runtime dependencies.| Area | Files |
|---|---|
| Shared adapter | packages/web-shell/client/components/messages/MarkdownChartRenderer.tsx |
| Removed duplicate implementation | packages/web-shell/client/components/messages/EchartsFullDataBlock.tsx, its CSS module, and its implementation-heavy tests |
| Streaming metadata | packages/web-shell/client/components/messages/Markdown.tsx, packages/web-shell/client/customization.tsx |
| Public API and docs | packages/web-shell/client/index.tsx, packages/web-shell/client/main.tsx, packages/web-shell/README.md |
| Packaging | packages/web-shell/package.json, packages/web-shell/vite.lib.config.ts, root lockfile |
| Validation | focused Web Shell renderer and Markdown tests |
@datafe-open/markdown-chart* 0.1.12 packages, which
include localized labels, blockquote-aware streaming fence completion, and
restored tooltip safety invariants.markdown-chart skill for new integrations.markdown-chart as the integration protocol while retaining
legacy fenced blocks internally for existing hosts.EchartsFullDataBlock-specific types after downstream usage is audited.