Skip to content

VSCode Extension: Bring Persistent Memory to GitHub Copilot #134

Description

@thedotmack

Summary

We're building a VSCode extension to bring claude-mem's persistent memory capabilities to GitHub Copilot. This will enable Copilot to remember past conversations, decisions, and context across sessions - just like it currently works with Claude Code.

📚 Developer Cheat Sheet

👉 VSCode Extension Developer Cheat Sheet

This comprehensive guide provides everything you need to contribute without access to the claude-mem knowledge base:

  • Quick start setup (get running in 5 minutes)
  • Complete Worker Service API reference
  • All TypeScript type definitions with examples
  • Step-by-step lifecycle flow diagrams
  • VSCode API integration guide
  • Copy-pasteable code examples (WorkerClient, Chat Participant, Tools)
  • Error handling patterns
  • Testing strategy
  • Development workflow

Current Status

Branch: feature/vscode-extension

Architecture Document: docs/context/vscode-extension-architecture.md

Phase: Ready to start Phase 1 (Foundation)

We have a complete architecture document that defines:

  • How the extension will integrate with VSCode's Chat Participant API and Language Model Tools API
  • How it will reuse the existing worker service (shared with Claude Code plugin)
  • Complete event mapping from Claude Code hooks to VSCode equivalents
  • Design decisions with rationale
  • 15-phase implementation plan

What We're Building

The extension will have two main components:

1. Language Model Tools (Explicit Capabilities)

Tools that Copilot can invoke to search memory:

  • mem_search - Semantic search across past work
  • mem_get_recent - Get recent session summaries
  • mem_timeline - Chronological timeline of observations
  • mem_find_file - Find observations related to specific files

2. Chat Participant (Automatic Lifecycle)

Invisible to Copilot, handles:

  • Creating sessions on conversation start
  • Logging user prompts automatically
  • Capturing Copilot's tool invocations as observations
  • Injecting relevant context at conversation start
  • Generating summaries on conversation end

Architecture Highlights

VSCode Extension (lightweight HTTP client)
          ↓
Worker Service (existing, shared with Claude Code)
          ↓
SQLite + ChromaDB (persistent memory store)

The extension is just VSCode API bindings + HTTP client. All the heavy lifting (AI processing, vector search, storage) is handled by the existing worker service.

How to Contribute

Getting Started

  1. Checkout the branch:

    git checkout feature/vscode-extension
  2. Read the cheat sheet:
    Developer Cheat Sheet

  3. Read the architecture doc:
    docs/context/vscode-extension-architecture.md

  4. Understand the existing codebase:

    • src/hooks/ - Claude Code lifecycle hooks (we're mirroring this behavior)
    • src/services/worker-service.ts - Worker service (we'll reuse this via HTTP)
    • plugin/skills/mem-search/SKILL.md - Search functionality reference

What Help We Need

Phase 1: Foundation Work (First Milestone)

  • Create src/shared/worker-client.ts - Shared TypeScript HTTP client for worker service
  • Add unit tests for worker client
  • Create VSCode extension scaffold in src/vscode/
  • Set up build pipeline for extension
  • Verify worker client can communicate with existing worker service

Phase 2-3: Language Model Tools

  • Implement mem_search tool
  • Implement mem_get_recent tool
  • Implement mem_timeline tool
  • Implement mem_find_file tool
  • Test tools with GitHub Copilot

Phase 4-6: Chat Participant

  • Implement session lifecycle management
  • Implement observation capture
  • Implement context injection
  • Test end-to-end with real Copilot conversations

Skills Needed

  • TypeScript - Extension is written in TypeScript
  • VSCode Extension API - Specifically Chat Participant API and Language Model Tools API
  • HTTP/REST - Worker client communicates via HTTP
  • Testing - Unit and integration tests

Resources

Why This Matters

For VSCode/Copilot Users:

  • Copilot will remember your past work, decisions, and context
  • No more repeating yourself across sessions
  • Copilot can search your project history to give better answers

For Claude-Mem:

  • Expands reach beyond Claude Code
  • Demonstrates architecture flexibility
  • Brings persistent memory to millions of Copilot users

Questions?

Comment below or check the Developer Cheat Sheet!

Looking forward to building this together! 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions