RC

rrabb/copilot-chat-exporter

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 质量 71 趋势 14MIT

Export VSCode copilot chat sessions to rich markdown containing very rich info like tool calls/results, reasoning, memory, AI thoughts etc.

概览

Export a VS Code Copilot chat session to a single, human-readable Markdown archive: prompts, agent reasoning, tool calls, terminal output, code blocks, edited files, token cost, and timing. The exporter reads VS Code's native chat journal (chatSessions/ .jsonl) as the definitive conversation source. The current GUI title comes from the workspace chat index in state.vscdb, because a manual rename is not always written back to the journal. Other details are enriched best-effort from the sibling chat-session-resources, transcripts, debug-logs, and memory-tool stores. It only ever reads local files. See docs/CHAT-SESSION-TITLES.md for the title fields, storage locations, precedence, and VS Code source references. When a sibling transcript retains an apply_patch request, the Markdown links each touched file,shows submitted +added and -deleted operation counts, and includes the recorded patch in a collapsible ~~~diff block.

README

以下为原文 README 节选,完整内容请查看原文。

copilot-chat-exporter

Export a VS Code Copilot chat session to a single, human-readable Markdown archive: prompts, agent reasoning, tool calls, terminal output, code blocks, edited files, token cost, and timing.

The exporter reads VS Code’s native chat journal (chatSessions/.jsonl) as the definitive conversation source. The current GUI title comes from the workspace chat index in state.vscdb, because a manual rename is not always written back to the journal. Other details are enriched best-effort from the sibling chat-session-resources, transcripts, debug-logs, and memory-tool stores. It only ever reads local files. See docs/CHAT-SESSION-TITLES.md for the title fields, storage locations, precedence, and VS Code source references.

When a sibling transcript retains an apply_patch request, the Markdown links each touched file,shows submitted +added and -deleted operation counts, and includes the recorded patch in a collapsible ~~~diff block. The journal remains authoritative for turn order and tool identity. Repeated edits count repeatedly, so these values are not a reconstruction of the final Git diff. When patch arguments are unavailable, the export keeps the journal-derived file path and labels the change details unavailable instead of reporting the current file’s total line count.

Project goal

Capture every Copilot chat session on a machine, whatever its type or location, and export each one to a rich review artifact (Markdown first, HTML later) that keeps as much of what the Copilot chat shows as the stored data allows: prompts, readable reasoning, tool calls with inputs and outputs, file changes, models, credits, tokens, timing and code blocks. The purpose is review and playback (why and how something was done, including the human’s and the model’s reasoning) and confidence before a chat is deleted.

There are two stages. The listing reports (--list, basic and detailed HTML) identify every session and where its data lives. The export turns one session into the review artifact. The listing is complete for the stores the tool reads; export supports Local chats and Agent Host/Copilot CLI conversations, with Local fidelity work in progress. See docs/SPEC.md for scope, the source capability matrix and non-goals.

Principles: evidence before inference, unknown is never shown as zero, every omission is reported with a reason instead of hidden, and the tool only reads local files and never writes native VS Code or Copilot storage.

Install

Zero runtime dependencies - Node built-ins only. Drop the folder into any repo, or add it as a workspace member:

// host package.json
"workspaces": ["tools/*"],
"scripts": {
  "ai:export:chat": "node ./tools/copilot-chat-exporter/src/cli.ts"
}

Requires Node >= 22.18, where TypeScript type stripping is on by default, so src/cli.ts runs

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add rrabb/copilot-chat-exporter
新手?先看 mcpskill.org 教程 →