Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>ChatEx - Claude Code EnhancementsNew to Visual Studio Code? Get it now.
ChatEx - Claude Code Enhancements

ChatEx - Claude Code Enhancements

yacper

|
1 install
| (0) | Free
Enhance the Claude Code chat panel: show local Markdown images, render Mermaid diagrams, list sessions started through the Agent SDK (such as Paseo) in the session history, and re-apply automatically after Claude Code updates.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ChatEx - Claude Code Enhancements

Enhancements for the Claude Code chat panel: show local images, render Mermaid diagrams, and list sessions started through the Agent SDK (such as Paseo on a phone) in the session history. When Claude Code updates, this extension patches the new version again on its own.

Formerly published as Image & Mermaid for Claude Code (yacper.claude-code-image-mermaid). If that extension is still installed, ChatEx offers to uninstall it. Settings were renamed from claudeCodeImageMermaid.* to chatex.*.

This is an unofficial community extension. It is not affiliated with or endorsed by Anthropic.

What it adds

Local images. The Claude Code chat panel normally replaces Markdown images with [Image]. With this extension, these sources are displayed:

Image source Example
Absolute path /tmp/chart.png
file:// URL file:///home/me/chart.png
Workspace-relative path docs/chart.png
Windows path C:\work\chart.png
Inline data data:image/png;base64,...

Images are loaded from the workspace folders, the system temp directory, /tmp and your home directory. Remote http(s) images stay blocked, so chat content cannot leak through image URLs.

Agent SDK sessions in the history. Claude Code's session history hides sessions started through the Agent SDK, for example sessions that Paseo starts when you use Claude Code from a phone. Their transcripts are stored next to your other sessions, and this extension lists them so you can open and continue them in VS Code. Don't continue a session in VS Code while it is still open on the phone: both sides would append to the same transcript. Listed SDK sessions are treated like any other session, so Claude Code's inactive-session auto-archiving applies to them too (archiving only hides a session and can be undone). Sessions started by Paseo are shown with their Paseo title instead of their last prompt (Claude Code generates no title for SDK sessions). A title you set with Rename in VS Code still wins. Turn this off with chatex.paseoTitles. Turn off listing SDK sessions with chatex.showSdkSessions.

Mermaid diagrams. A ```mermaid code block is rendered as an SVG diagram above its source. The source block and its copy button stay below the diagram. Diagrams follow the light or dark VS Code theme. While a reply is still streaming, incomplete source keeps the last diagram that rendered. Mermaid runs with securityLevel: "strict", and the extension bundles its own copy, so nothing is fetched from the network.

How it works

Claude Code has no extension API for its chat panel. This extension edits Claude Code's installed extension.js and webview/index.js:

  • The images and diagrams are added by a small script that watches the rendered chat. It inserts them next to Claude Code's own [Image] placeholders and mermaid code blocks and does not depend on Claude Code's internal component code, so most Claude Code releases keep working without an update of this extension.
  • The original files are backed up as *.orig next to them.
  • All edits are computed before anything is written. If a Claude Code release changes the few places the patch relies on, both files stay untouched and you get an error notification. If only an optional place is missing (the one for file:// and data: images, or the one for Agent SDK sessions), everything else is still patched and a warning is written to the output channel.
  • The patch is re-applied automatically when VS Code starts, and when a Claude Code update is downloaded.

After a patch is applied, a notification offers Reload Window. The patched code is only loaded after a reload.

Notifications

When Notification
A Claude Code version was patched Patched Claude Code 2.1.301. Reload the window ... with Reload Window / Show Log
Patch failed (for example, a Claude Code release this extension does not support yet) Error with the version and the reason, plus Show Log. Each distinct failure is shown once per version.
Already patched Silent on startup. The Apply Patch Now command reports it.

Details are written to the ChatEx output channel.

Commands

Command Description
ChatEx: Apply Patch Now Patch now and report the result, including "already patched" and repeated failures.
ChatEx: Show Patch Status Show the patch state of every installed Claude Code version.
ChatEx: Restore Original Claude Code Files Restore the backups, remove the bundled Mermaid and turn off automatic patching.

Settings

Setting Default Description
chatex.autoPatch true Patch on startup and after Claude Code updates.
chatex.paseoTitles true Show Paseo-started sessions with their Paseo title in the session history.
chatex.showSdkSessions true List sessions started through the Agent SDK (such as Paseo) in the session history. Takes effect the next time the list is opened.

Uninstalling

When this extension is uninstalled, VS Code runs its uninstall hook, which restores the original Claude Code files. You can also run Restore Original Claude Code Files first. Reinstalling Claude Code restores it too.

Notes

  • VS Code may show "Your Code installation appears to be corrupt" for some modified extensions. This does not apply to Claude Code, which is a regular marketplace extension, but VS Code's own extension integrity checks could change in future versions.
  • Works in local windows, WSL and Remote-SSH. The extension runs on the same host as Claude Code.
  • Mermaid is © its authors, MIT licensed. The bundled license is at media/mermaid.LICENSE.

中文说明

ChatEx 增强 Claude Code 聊天面板,前身是 Image & Mermaid for Claude Code(yacper.claude-code-image-mermaid)。如果旧扩展仍在,ChatEx 会提示卸载;设置项前缀由 claudeCodeImageMermaid.* 改为 chatex.*。

在 Claude Code 聊天面板中显示本地图片(绝对路径、file://、工作区相对路径、Windows 路径、data:),并把 mermaid 代码块渲染成图。外部 http(s) 图片仍会被拦截。

Claude Code 的会话历史默认隐藏通过 Agent SDK 发起的会话(例如手机经 Paseo 发起的会话)。本插件会把它们列出来,在 VS Code 里可以直接打开、继续对话。不要在手机端仍打开时于 VS Code 继续同一会话,否则两边会写入同一份记录。可用 chatex.showSdkSessions(默认开启)关闭。Paseo 发起的会话显示 Paseo 中的标题,而不是最后一条提问;在 VS Code 中重命名过的标题仍优先,可用 chatex.paseoTitles(默认开启)关闭。

图片和图表由一个监听聊天渲染结果的脚本添加,不依赖 Claude Code 内部组件代码,因此 Claude Code 的大多数更新都不需要本插件跟着更新。Claude Code 每次更新后,本插件都会自动重新打补丁。补丁成功会提示“重新加载窗口”,失败会显示原因,并且原文件不会被修改。可以通过 还原 Claude Code 原始文件 命令恢复原状,卸载本插件时也会自动还原。

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft