Doc Embedding VS Code Extension
Enable semantic search of your documentation directly in Copilot Chat using the @docs participant. Register web or local docs, embed them with a Python backend, and query them with natural language—all from within VS Code.
What is This?
This extension lets you:
- Register web or local documentation (PDF, Markdown, code, etc.)
- Embed docs into a vector database (ChromaDB) using a Python backend
- Search your docs semantically in Copilot Chat using
@docs or @docname
- Manage doc sets, add/remove sources, and view results inline
Purpose:
Make your own docs, codebases, and web resources instantly searchable in Copilot Chat, with fast, accurate, context-aware answers.
How It Works
- Register Docs: Use
/register <url> <name> for web docs or /register-local <path> <name> for local files/folders.
- Embed & Index: The Python backend crawls, chunks, and embeds the docs into ChromaDB.
- Query: Use
@docs <name> <question> or @docs <question> to search your docs in Copilot Chat.
- Manage: List, delete, or update doc sets with simple commands.
Usage & Commands
Search Documentation
@docs fastapi how do I use dependency injection?
@docs mydocs what is the API for X?
Register Documentation
@docs /register https://fastapi.tiangolo.com/ fastapi
@docs /register-local ./docs mydocs
List & Manage
@docs /list
@docs /delete fastapi
@docs /settings
Requirements
- GitHub Copilot Chat extension
- Python 3.10+ (3.13+ supported)
- All Python dependencies in
requirements.txt installed (auto-installed by extension)
Configuration
Set these in your VS Code settings (optional):
{
"docsEmbedding.pythonPath": "path/to/python",
"docsEmbedding.apiUrl": "http://localhost:8000",
"docsEmbedding.serverPort": 8000
}
Architecture
┌─────────────┐ VS Code Extension ┌──────────────┐
│ Copilot │ ────────────────▶ │ @docs Chat │
│ Chat │ │ Participant │
└─────────────┘ └─────┬────────┘
│
▼
┌────────────────────┐
│ DocEmbeddingService│
│ (TypeScript) │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ Python Backend │
│ (MCP server) │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ ChromaDB (Vectors) │
└────────────────────┘
Development
cd vscode-extension
npm install
npm run compile
# Press F5 to launch extension dev window
Learn More
- See
.github/copilot-instructions.md for architecture and dev notes
- See
backend/app/ for Python backend logic
- See
requirements.txt for dependencies
Bring your docs to Copilot Chat—search anything, instantly.