Diagram ChatInteractive Mermaid diagrams and Apache ECharts charts beside VS Code chat. Draw with your agent, select items, ask follow-up questions and edit the source. Requires VS Code 1.143 or later. Chat features need an agent that supports extension tools, such as GitHub Copilot. Diagrams in Markdown files open and edit without chat. InstallInstall Diagram Chat from the Visual Studio Marketplace, or run:
To build from source, see CONTRIBUTING.md. Get startedOpen VS Code's Chat view and enable Diagram tools under Chat: Open Customizations → Tools (or Configure Tools in Local chat). Try:
Select a node in the panel, type “What could go wrong at this step?” in its message field, and press Send to chat. The request includes your selection and continues in chat. Use your usual chat agent or select Diagram for a session focused on drawing and explaining diagrams. You can also attach files with
Ask to change the current diagram, start a new one, or explain it. Diagram: Show Panel reopens the panel. Tools report render errors and layout warnings for the agent to repair. Try “Show everything downstream of this service”, “Insert a cache on this connection”, or “Explain the rows behind this bar”. Agents can preview changes, save alternatives and add callouts. See the tools reference for these workflows. The panel
Diagrams follow your VS Code theme, high contrast included. Agents can mark items, for example to walk you through a diagram, and can ask you to pick items as an answer. Diagrams in MarkdownTo try the panel without chat, paste this into a Markdown file:
Click Open in Diagram above the block, or run Diagram: Open Diagram at Cursor. Both Charts from dataDiagram can chart inline data, a file or a command's output. It reads CSV, TSV, JSON, JSON Lines, Markdown tables and common terminal tables, including sizes such as Charts can filter, aggregate, sort and limit rows, and split into a panel per value of a column. See chart data for formats, chart types and settings. For custom charts, the model can write an ECharts option directly. Chat toolsReference See the tools reference for details. Agents can read SecurityVS Code asks before running a command, reading a data file outside the workspace or exporting HTML through a tool. File links outside the workspace require confirmation; website links follow VS Code's trusted-domain settings. Commands and ECharts options with JavaScript need a trusted workspace; in an untrusted workspace, reading workspace files also asks first. The panel loads no remote content; exported HTML files load their renderer from a CDN when opened. Chat sends your prompt, attachments and tool results, including diagram context read by the agent, to the model selected in VS Code. Opening and editing a Markdown diagram does not require a model. LimitsData files and command output are limited to 10 MiB, commands to 60 seconds, tables to 1,000,000 cells and Mermaid sources to 50,000 characters. Summarize larger datasets before charting them. See the full reference for supported features and limits. FeedbackReport issues and contribute on GitHub. See CONTRIBUTING.md to build and test the extension. Licensed under Apache-2.0. |