Skip to content

Move bierner.markdown-mermaid into core#316332

Merged
mjbvz merged 4 commits into
mainfrom
dev/mjbvz/build-in-mermaid
May 15, 2026
Merged

Move bierner.markdown-mermaid into core#316332
mjbvz merged 4 commits into
mainfrom
dev/mjbvz/build-in-mermaid

Conversation

@mjbvz
Copy link
Copy Markdown
Collaborator

@mjbvz mjbvz commented May 13, 2026

This makes my mermaid markdown extension builtin. As part of this I've renamed chat-mermaid-features to the more generic markdown-mermaid-features since this once extension now contributes a consistent mermaid UX for chat, notebooks, and previews

Fixes #293028
Depends on #316329

This makes my mermaid markdown extension builtin. As part of this I've renamed `chat-mermaid-features` to the more generic `markdown-mermaid-features` since this once extension now contributes a consistent mermaid UX for chat, notebooks, and previews

Fixes #293028
Copilot AI review requested due to automatic review settings May 13, 2026 23:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the built-in Mermaid chat-only extension with a broader Mermaid Markdown extension that supports chat rendering, Markdown previews, and notebook Markdown output.

Changes:

  • Adds a new mermaid-markdown-features extension with Markdown-it integration, preview scripts, notebook renderer support, chat renderer support, commands, configuration, and build scripts.
  • Removes the old mermaid-chat-features extension and updates build/npm/lint references to the new extension name.
  • Updates Copilot’s Ask agent tool reference to the new Mermaid renderer extension id.
Show a summary per file
File Description
extensions/mermaid-markdown-features/package.json Defines the new extension contributions, settings, commands, renderers, tools, and scripts.
extensions/mermaid-markdown-features/package.nls.json Adds localized package/configuration strings.
extensions/mermaid-markdown-features/README.md Documents the bundled Mermaid Markdown extension.
extensions/mermaid-markdown-features/tsconfig.json Adds TypeScript configuration for extension sources.
extensions/mermaid-markdown-features/tsconfig.browser.json Adds browser build TypeScript configuration.
extensions/mermaid-markdown-features/esbuild.mts Adds Node extension bundling entrypoint.
extensions/mermaid-markdown-features/esbuild.browser.mts Adds browser extension bundling entrypoint.
extensions/mermaid-markdown-features/esbuild.webview.mts Adds webview/notebook/preview bundling.
extensions/mermaid-markdown-features/cgmanifest.json Adds component governance manifest placeholder.
extensions/mermaid-markdown-features/.gitignore Ignores generated Mermaid webview outputs.
extensions/mermaid-markdown-features/.npmrc Adds npm install settings for the extension.
extensions/mermaid-markdown-features/.vscodeignore Excludes source/build files from packaged extension output.
extensions/mermaid-markdown-features/src/extension.ts Activates chat, commands, configuration refresh, and Markdown-it integration.
extensions/mermaid-markdown-features/src/chatOutputRenderer.ts Renames chat renderer ids/commands and adds editor/context support.
extensions/mermaid-markdown-features/src/editorManager.ts Renames editor preview view type and improves preview controls.
extensions/mermaid-markdown-features/src/webviewManager.ts Adds shared command context typing for Mermaid webviews.
extensions/mermaid-markdown-features/src/markdownMermaid/markdownIt.ts Adds Markdown-it parsing/highlighting support for Mermaid blocks.
extensions/mermaid-markdown-features/src/markdownMermaid/config.ts Injects Mermaid preview configuration into rendered Markdown.
extensions/mermaid-markdown-features/src/util/dispose.ts Adds disposable helpers for extension-side resources.
extensions/mermaid-markdown-features/src/util/html.ts Adds HTML escaping helper.
extensions/mermaid-markdown-features/src/util/uuid.ts Adds UUID helper for webview nonces/ids.
extensions/mermaid-markdown-features/preview-src/shared/index.ts Adds shared Mermaid rendering/config/addon logic.
extensions/mermaid-markdown-features/preview-src/shared/diagramManager.ts Adds shared pan/zoom/resize diagram UI management.
extensions/mermaid-markdown-features/preview-src/shared/diagramStyles.css Adds shared Mermaid diagram control styles.
extensions/mermaid-markdown-features/preview-src/shared/config.ts Defines shared preview configuration types.
extensions/mermaid-markdown-features/preview-src/shared/disposable.ts Adds shared disposable interface.
extensions/mermaid-markdown-features/preview-src/shared/css.d.ts Adds CSS module typing for preview bundling.
extensions/mermaid-markdown-features/preview-src/shared/iconPackConfig.ts Registers icon packs for Mermaid diagrams.
extensions/mermaid-markdown-features/preview-src/markdown/index.ts Adds Markdown preview Mermaid rendering bootstrap.
extensions/mermaid-markdown-features/preview-src/notebook/index.ts Adds notebook Markdown Mermaid renderer integration.
extensions/mermaid-markdown-features/preview-src/chat/index.ts Adds chat webview bootstrap.
extensions/mermaid-markdown-features/preview-src/chat/index-editor.ts Adds editor preview control wiring.
extensions/mermaid-markdown-features/preview-src/chat/mermaidWebview.ts Updates chat/editor pan-zoom handling with pan mode.
extensions/mermaid-markdown-features/preview-src/chat/vscodeApi.ts Adds VS Code webview API typing.
extensions/mermaid-markdown-features/preview-src/chat/tsconfig.json Updates chat webview TypeScript paths.
extensions/mermaid-chat-features/package.json Removes the old Mermaid chat-only extension manifest.
extensions/mermaid-chat-features/package.nls.json Removes old extension localization strings.
extensions/mermaid-chat-features/package-lock.json Removes old extension dependency lockfile.
extensions/mermaid-chat-features/README.md Removes old extension README.
extensions/mermaid-chat-features/src/extension.ts Removes old extension activation code.
extensions/mermaid-chat-features/esbuild.webview.mts Removes old webview build script.
extensions/mermaid-chat-features/.gitignore Removes old generated-output ignore entry.
extensions/esbuild-webview-common.mts Updates shared webview esbuild defaults.
extensions/copilot/src/extension/agents/vscode-node/askAgentProvider.ts Points Ask agent Mermaid tool usage to the new extension id.
eslint.config.js Updates lint project/file references for the renamed extension.
build/npm/dirs.ts Updates npm install directory list for the renamed extension.
build/lib/extensions.ts Updates extension media build script list.
build/gulpfile.extensions.ts Updates extension compilation list.
build/filters.ts Updates validation filters for generated Mermaid outputs.
.eslint-ignore Ignores generated output folders for the new extension.

Copilot's findings

Files not reviewed (1)
  • extensions/mermaid-chat-features/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

extensions/mermaid-markdown-features/preview-src/shared/diagramManager.ts:449

  • The never value for markdown-mermaid.mouseNavigation.enabled is not honored here. Because this check only blocks the alt mode without Alt pressed, ClickDragMode.Never falls through and enables dragging without any modifier; wheel/Alt zoom is also still enabled. Please branch explicitly for Never so mouse navigation is disabled when the setting says so.
  • Files reviewed: 37/51 changed files
  • Comments generated: 5

Comment thread extensions/esbuild-webview-common.mts Outdated
Comment thread extensions/mermaid-markdown-features/package.nls.json Outdated
Comment thread extensions/mermaid-markdown-features/package.json Outdated
mjbvz and others added 3 commits May 15, 2026 10:26
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mjbvz mjbvz marked this pull request as ready for review May 15, 2026 17:27
@mjbvz mjbvz enabled auto-merge May 15, 2026 17:28
@mjbvz mjbvz merged commit 35b08e3 into main May 15, 2026
24 of 25 checks passed
@mjbvz mjbvz deleted the dev/mjbvz/build-in-mermaid branch May 15, 2026 20:12
@vs-code-engineering vs-code-engineering Bot added this to the 1.121.0 milestone May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Built-in Mermaid.js support for Markdown previews

3 participants