Docs Chat Participant
A VS Code extension that adds the @docs command to GitHub Copilot Chat, allowing you to search your locally embedded documentation.
Features
@docs <name> <query> - Search within a documentation set
@docs /list - List all registered documentation sets
@docs /register <url> <name> - Register new documentation from a URL
Usage
Search Documentation
@docs react how do I use hooks?
@docs fastapi create a POST endpoint
List Available Docs
@docs /list
Register New Documentation
@docs /register https://fastapi.tiangolo.com/ fastapi
@docs /register https://react.dev/ react
Requirements
- GitHub Copilot Chat extension installed
- Python 3.10+ with the doc_embedding modules installed
- The doc_embedding backend (this repo's
app/ folder)
Configuration
Add to your VS Code settings:
{
"docsEmbedding.pythonPath": "path/to/python",
"docsEmbedding.modulePath": "path/to/doc_embedding",
"docsEmbedding.chromaDataPath": "path/to/chroma_data"
}
Development
cd vscode-extension
npm install
npm run compile
Press F5 to launch the extension in a new VS Code window.
How It Works
- The extension registers a chat participant named
@docs
- When invoked, it calls your Python doc_embedding backend
- Your VectorStore searches ChromaDB for relevant chunks
- Results are streamed back to the chat interface
Architecture
┌─────────────────────────────────────────────────────┐
│ VS Code Chat │
│ │ │
│ ▼ │
│ ┌─────────────────────────┐ │
│ │ @docs Participant │ │
│ │ (TypeScript) │ │
│ └─────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────┐ │
│ │ DocEmbeddingService │ │
│ │ (Python Bridge) │ │
│ └─────────────────────────┘ │
│ │ │
└──────────────────────┼──────────────────────────────┘
│
▼
┌─────────────────────────┐
│ Python Backend │
│ ├── VectorStore │
│ ├── TextChunker │
│ └── DocumentCrawler │
└─────────────────────────┘
│
▼
┌─────────────────────────┐
│ ChromaDB │
│ (Vector Database) │
└─────────────────────────┘