A multi-agent AI chatbot for Visual Studio Code, inspired by thomasmixon2024/CopilotX and designed to feel closer to GitHub Copilot Chat.
It routes your requests to one of four specialized agents and can use a live Claude model (or fall back to a deterministic persona-based response).
| Feature | Description |
|---|---|
| Sidebar chat | Persistent chat panel in the activity bar (like Copilot Chat) |
| Multi-agent routing | Ask · Explore · Plan · Custom — keyword-driven intent router |
| Editor context | Automatically includes active file + selection (or nearby code) |
| Ask about Selection | Right-click selected code → “CopilotX: Ask about Selection” |
| Live or offline | Uses Anthropic Claude when an API key is set; otherwise a deterministic engine |
| Conversation history | Keeps recent turns for continuity (configurable) |
| Agent | Role | Typical triggers |
|---|---|---|
| Ask | Reasoning, explanation, debugging | explain, why, how, debug, error |
| Explore | Brainstorming, alternatives | brainstorm, ideas, suggest, options |
| Plan | Step-by-step plans & workflows | plan, steps, implement, architecture |
| Custom | Code gen, refactor, specialize | generate, write, refactor, code |
You can edit keywords in Config/router.json and personas in Agents/*.agent.md.
cd CopilotX-Chat
code .- Press F5 (or Run → Start Debugging).
- A new VS Code window opens with the extension loaded.
- Click the CopilotX icon in the activity bar (left side).
- Type a message and press Enter.
Set one of:
- VS Code setting:
copilotx.apiKey= your Anthropic key - Or environment variable:
ANTHROPIC_API_KEY
Without a key the extension still works in deterministic mode (persona-grounded template responses).
| Command | Description |
|---|---|
CopilotX: Open Chat |
Focus the chat sidebar |
CopilotX: Clear Chat History |
Reset conversation |
CopilotX: Ask about Selection |
Send selected code as context |
| Setting | Default | Description |
|---|---|---|
copilotx.apiKey |
"" |
Anthropic API key |
copilotx.model |
claude-sonnet-4-20250514 |
Model name |
copilotx.includeEditorContext |
true |
Auto-attach file/selection |
copilotx.maxHistory |
20 |
Max messages kept |
CopilotX-Chat/
├── package.json # Extension manifest
├── src/
│ ├── extension.js # Activation + commands
│ ├── chatViewProvider.js # Sidebar webview controller
│ ├── core/
│ │ ├── api.js # runCopilotX() entry point
│ │ ├── router.js # Keyword intent router
│ │ ├── agents.js # Persona load + Claude / deterministic
│ │ └── logger.js
│ ├── utils/paths.js
│ └── webview/html.js # Chat UI
├── Config/
│ ├── router.json
│ ├── tasks.json
│ └── agent.json
├── Agents/
│ ├── Ask.agent.md
│ ├── Explore.agent.md
│ ├── Plan.agent.md
│ └── Custom.agent.md
└── media/icon.svg
- User message is tokenized.
- Tokens are matched against
Config/router.jsonintent lists. - Best-matching agent wins (most keyword hits).
- That agent’s persona (
Agents/*.agent.md) is used as the system prompt (live mode) or to ground the deterministic template. - Optional editor context is appended to the user message.
| Original CopilotX | This project |
|---|---|
| Input box + output channel | Sidebar chat webview with history |
| One-shot requests | Multi-turn conversation |
| Minimal editor integration | Selection context + “Ask about Selection” |
| PowerShell + Node dual runtime | Focused VS Code extension (Node) |
| Basic deterministic replies | Same multi-agent design, improved UX |
MIT — inspired by the architecture of thomasmixon2024/CopilotX.
CopilotX Chat includes speech-to-text similar to GitHub Copilot Chat’s microphone:
| Action | How |
|---|---|
| Mic button | Click 🎤 in the chat composer |
| Keyboard | Ctrl+Shift+V (Windows/Linux) or ⌘⇧V (macOS) to start/stop |
| Commands | CopilotX: Start Voice Chat / Stop Voice Chat |
| Auto-submit | After you stop speaking, the transcript is sent automatically (configurable) |
- Uses the Web Speech API (
SpeechRecognition/webkitSpeechRecognition) inside the chat webview. - Recognition runs on-device in the Electron/Chromium engine (no audio sent to our servers).
- Interim text appears live in the input box; final phrases accumulate until silence or you stop the mic.
- With auto-submit on (default), after ~1.5s of silence the message is sent — same idea as Copilot’s “stop talking → submit”.
| Setting | Default | Description |
|---|---|---|
copilotx.voice.language |
en-US |
BCP-47 language (en-GB, ja-JP, es-ES, de-DE, fr-FR, zh-CN, …) |
copilotx.voice.autoSubmit |
true |
Send transcript when you finish speaking |
copilotx.voice.silenceTimeoutMs |
1500 |
Silence duration before auto-submit |
- Microphone permission for VS Code / Electron when prompted.
- A Chromium environment that supports the Web Speech API (standard VS Code desktop builds do).
- For languages other than English, the OS/browser speech pack for that locale may need to be installed.
Note: GitHub Copilot itself uses the separate VS Code Speech extension (Microsoft’s on-device model). Our mic uses the built-in Web Speech API so the feature works without installing extra extensions and stays self-contained in this project.