Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Copilot Chat Sync AssistantNew to Visual Studio Code? Get it now.
Copilot Chat Sync Assistant

Copilot Chat Sync Assistant

midstudio

|
1 install
| (0) | Free
Scan and export local GitHub Copilot Chat sessions into stable markdown archives.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Copilot Chat Sync Assistant

Archive, search, and reuse your GitHub Copilot Chat sessions across machines — safely and privately.

VS Code Version License: MIT


What It Does

Copilot Chat Sync Assistant is a VS Code extension that:

  • 📂 Scans your local GitHub Copilot Chat sessions from VS Code's internal storage (read-only)
  • 📝 Exports them as clean, readable Markdown + JSON files with YAML frontmatter (optimized for AI/RAG reuse)
  • 🔒 Redacts API keys, tokens, and other secrets before saving
  • 🗂 Archives all sessions in a stable, Git-friendly folder structure on your machine
  • 🔍 Searches your entire chat history via a Sidebar Tree View or Quick Pick
  • 🔄 Syncs archives between machines via any private Git repository (GitHub, GitLab, self-hosted)
  • 🧠 Brings back context from old sessions into new Copilot chats using the #past_session variable
  • ⚡ Auto-exports in the background so you never lose a session
  • 🕵️ Detects orphaned sessions — chats that disappeared from the UI after workspace path changes

Why Use This Instead of the Built-in "Export Session"?

VS Code has a built-in Chat: Export Session... command, but it only exports one session at a time and requires manual action.

This extension provides:

Feature Built-in Export This Extension
Export all sessions at once ❌ ✅
Beautiful Markdown with YAML frontmatter ❌ ✅
Secret/API key redaction ❌ ✅
Archive index (index.json) ❌ ✅
Git sync across machines ❌ ✅
Sidebar view of all archived chats ❌ ✅
#past_session context injection ❌ ✅
Background auto-export ❌ ✅
Orphaned session detection ❌ ✅

What It Does NOT Do

⚠️ Important: This extension is a read-only scanner and archiver. It does NOT:

  • Use any official GitHub Copilot Chat history API
  • Write to or modify VS Code's internal Copilot storage in MVP mode
  • Provide realtime cloud sync (Git sync is manual or on-close)
  • Guarantee 100% data recovery if VS Code changes its internal format

🔒 Privacy Warning

Your Copilot Chat sessions may contain sensitive information: API keys, internal URLs, code snippets, passwords pasted by mistake, etc.

This extension applies secret redaction by default before writing any file to disk. However:

  • Always review exported files before pushing to a remote Git repository.
  • Consider keeping your archive repo private.
  • If you are on a shared machine, set a custom archivePath outside of shared folders.

Installation

Install from the VS Code Marketplace by searching for Copilot Chat Sync Assistant.

Or install manually:

code --install-extension copilot-chat-sync-assistant-0.1.0.vsix

Quick Start

1. Export your sessions

Open Command Palette (Ctrl+Shift+P) and run:

Copilot Chat Sync: Export All Local Sessions

Your sessions will be saved to ~/CopilotChatArchive by default.

2. Browse your archive

Click the Copilot Chat Archive icon in the Activity Bar (left sidebar) to browse all archived sessions grouped by workspace.

3. Search

Click the 🔍 icon in the Archive sidebar or run:

Copilot Chat Sync: Search Archived Sessions

Archive Folder Structure

~/CopilotChatArchive/
  index.json                           ← Global index of all sessions
  workspaces/
    workspace_5560a56a/                ← Grouped by workspace hash
      sessions/
        2026-05-18_google-play-iap-audit/
          session.md                   ← Human-readable Markdown
          session.json                 ← Normalized JSON model
          raw/
            source-session.json        ← Raw VS Code internal data (optional)

session.md Format

---
schemaVersion: 1
title: "Google Play IAP audit"
createdAt: "2026-05-18T14:30:00Z"
workspaceHash: "5560a56a"
redactionApplied: true
tags:
  - iap
  - google-play
---

# Google Play IAP audit

### 👤 User
How do I verify a purchase receipt on the server side?

---

### 🤖 Assistant
You can verify Google Play receipts by calling the Google Play Developer API...

Git Sync Setup

One-time setup

# Initialize git in your archive folder
cd ~/CopilotChatArchive
git init
git remote add origin git@github.com:yourname/copilot-archive.git
git push --set-upstream origin main

Enable in VS Code Settings

{
  "copilotChatSync.git.enabled": true
}

Push & Pull

Command Description
Copilot Chat Sync: Push Archive to Git Commits and pushes new/updated sessions
Copilot Chat Sync: Pull Archive from Git Pulls latest archive from remote

Chat Variable: #past_session

Bring the context of an old session directly into a new Copilot Chat conversation.

Usage (in the Copilot Chat input box):

Refactor this module the same way we discussed in #past_session:"Google Play IAP audit"

The extension will find the matching archived session, read its Markdown content, and inject it as context into the current Copilot prompt.

Requires VS Code 1.90 or later.


Commands Reference

Command Description
Copilot Chat Sync: Scan Local Sessions Scan and count all local sessions (no file written)
Copilot Chat Sync: Export Current Workspace Sessions Export sessions for all workspaces
Copilot Chat Sync: Export All Local Sessions Same as above (alias)
Copilot Chat Sync: Open Archive Reveal archive folder in OS Explorer
Copilot Chat Sync: Search Archived Sessions Quick Pick search through all archived chats
Copilot Chat Sync: Detect Orphaned Sessions Find sessions that disappeared from the UI
Copilot Chat Sync: Push Archive to Git Commit & push archive to configured remote
Copilot Chat Sync: Pull Archive from Git Pull latest archive from remote
Refresh (Archive view) Reload the Archive sidebar

Settings Reference

Setting Default Description
copilotChatSync.archivePath "" (uses ~/CopilotChatArchive) Custom path to archive folder
copilotChatSync.includeRaw true Save raw VS Code session data alongside exports
copilotChatSync.redactSecrets true Redact API keys and tokens before export
copilotChatSync.git.enabled false Enable Git push/pull commands
copilotChatSync.git.autoSyncOnClose false Auto-export + push when VS Code closes
copilotChatSync.automation.backgroundScanInterval 30 Background scan interval in minutes (0 = disabled)

Troubleshooting

"No sessions found" after scanning

  • Ensure you have opened at least one project with GitHub Copilot Chat active.
  • Check the Copilot Chat Sync Output Channel for scan details.

Exported Markdown is empty or has no messages

  • The internal format of VS Code Copilot Chat storage may have changed. Check Output for Unsupported or unknown format warnings.
  • Please open an issue with a sanitized sample of your session file.

Push fails with "not a git repo"

  • Follow the Git Sync Setup instructions above.
  • Ensure copilotChatSync.git.enabled is set to true.

#past_session not showing in Copilot Chat

  • This feature requires VS Code 1.90 or later.
  • Ensure you have run Export at least once so the archive index.json exists.

Known Limitations

  • The internal storage format of GitHub Copilot Chat (.jsonl mutation logs) is not an official API. Future VS Code updates may change this format.
  • Hard restore of sessions back into VS Code internal storage is not supported in this version, by design.
  • The #past_session variable only performs a simple title-based search (substring match). Semantic search is planned for a future version.

Contributing

Pull requests are welcome. Please open an issue first to discuss major changes.


License

MIT — See LICENSE for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft