No description
  • TypeScript 94.1%
  • JavaScript 5.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-22 12:24:00 +02:00
src fix: render exported source patches as diffs 2026-07-22 12:24:00 +02:00
test fix: render exported source patches as diffs 2026-07-22 12:24:00 +02:00
.gitignore feat: scaffold VS Code chat parser 2026-07-22 11:47:54 +02:00
LICENSE feat: scaffold VS Code chat parser 2026-07-22 11:47:54 +02:00
package-lock.json feat: scaffold VS Code chat parser 2026-07-22 11:47:54 +02:00
package.json feat: scaffold VS Code chat parser 2026-07-22 11:47:54 +02:00
README.md feat: render standalone conversation HTML 2026-07-22 11:59:41 +02:00
tsconfig.json feat: scaffold VS Code chat parser 2026-07-22 11:47:54 +02:00

VS Code Chat to HTML

vsc-chat-html converts a JSON file exported from VS Code's Copilot Chat into a readable, self-contained HTML document.

The converter renders the conversation before writing the output. The HTML does not contain an embedded copy of the source JSON, does not fetch external resources, and does not need a web server. Its small client-side script only handles search, collapsible sections, copy buttons, local timestamp formatting, and theme controls.

Requirements

  • Node.js 20 or newer

Install and build

npm install
npm run build

Run the local CLI:

node dist/src/cli.js path/to/chat-export.json

During development, the following command builds and runs the converter:

npm run convert -- path/to/chat-export.json

You can also install the command locally:

npm link
vsc-chat-html path/to/chat-export.json

Usage

vsc-chat-html <input.json> [options]

-o, --output <file>   Write to a specific path
    --title <text>    Override the title derived from the first prompt
    --theme <mode>    Use auto, light, or dark
-h, --help            Show help
-v, --version         Show the version

Without --output, the converter writes an HTML file beside the input file:

chat-export.json  →  chat-export.html

What the page includes

  • User and assistant messages in original response order
  • Safe GitHub-flavored Markdown and syntax-highlighted code
  • Terminal commands, output, exit state, duration, shell, and working directory
  • Subagent prompts, results, models, and nested tool activity
  • Dedicated compaction events with continuation summaries and detailed chronology
  • File edits, workspace operations, task lists, and search result paths
  • Collapsed reasoning text when the export contains readable reasoning
  • Per-turn timestamps, model, token use, credits, active time, waiting time, and tool count
  • Additional request IDs, response IDs, extension information, prompt-token breakdowns, references, and citations
  • Search, responsive navigation, theme controls, print styles, and copy buttons

Unknown response kinds use a generic structured fallback so a newer VS Code export does not break the complete conversion.

Test

npm test

The real files under data/ remain ignored by version control.