VS Code extension with support for Visual Studio Code web (github.dev, vscode.dev) #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements a complete VS Code extension that brings Deep Assistant AI capabilities directly into Visual Studio Code, with full support for web-based editors like github.dev and vscode.dev.
Key Features
✅ Web Extension Support - Works seamlessly on github.dev and vscode.dev in the browser
✅ Integrated Chat Interface - Beautiful chat panel in VS Code sidebar with VS Code theming
✅ Multiple AI Models - Support for GPT-4o, Claude, DeepSeek, o1-preview, and more
✅ API Integration - Connects to Deep Assistant API Gateway with token-based auth
✅ Energy Tracking - Shows token usage and energy consumption
✅ Dual Build - Separate bundles for desktop (Node.js) and web (WebWorker)
Implementation Details
Architecture
The extension follows VS Code's web extension guidelines:
src/extension.ts→dist/extension.js(Node.js target)src/web/extension.ts→dist/web/extension.js(WebWorker target)apiClient.tsandchatViewProvider.tswork in both environmentsAPI Integration
Integrates with the api-gateway:
/v1/chat/completionsendpoint (OpenAI-compatible)File Structure
Commands
deepAssistant.chat- Open chat paneldeepAssistant.clearChat- Clear conversation historydeepAssistant.selectModel- Choose AI modeldeepAssistant.showSettings- Open extension settingsConfiguration
Users can configure:
deepAssistant.apiBaseUrl- API Gateway URLdeepAssistant.apiToken- Authentication tokendeepAssistant.defaultModel- Preferred AI modeldeepAssistant.systemMessage- Custom system promptdeepAssistant.showTokenUsage- Display energy usageTechnical Highlights
Testing Instructions
Local Testing (Desktop)
Web Testing (github.dev simulation)
Real github.dev Testing
npm run package-webnpx serve --cors -l 5000 --ssl-cert cert.pem --ssl-key key.pemhttps://localhost:5000Future Enhancements
Documentation
Fixes
Closes #26
🤖 This PR was created with Claude Code