How techsyndicate/vscode-dms works
Main Components
a. VS Code Extension Layer:
• Main extension components:
• Authentication Handler (from authenticate.ts)
• Sidebar Provider (from DMSidebarProvider.ts)
• DM Panels (ViewDMPanel.ts and ViewGroupDMPanel.ts)
• DM Creation (createGroupDM.ts)
b. Frontend/UI Layer:
• Sidebar Component
• DM Panel Component
• DM Panel Component
• Create Group DM Component
c. External Services:
• GitHub (Authentication)
• Backend API (referenced in README as vscode-dms-api)
• WebSocket Server (implied by receiveSocket.js)
Component Relationships
• VS Code Extension → GitHub (Authentication flow)
• Extension → Backend API (Data fetching/sending)
• Extension ↔ WebSocket Server (Real-time messaging)
• UI Components ↔ Extension Host (Event handling)
Specific Implementation Details
Key architectural elements:
• WebSocket connection for real-time messaging
• GitHub OAuth flow
• VS Code WebView panels for chat interfaces
• Event handling between WebViews and extension
[VS Code IDE]
• ↓
[Extension Host]
• ↓
[UI Components (WebViews)]
• ↓
[External Services]
Important Notes
• Separation between extension context and WebView context
• Message flow from user input to WebSocket communication
• Where GitHub authentication integrates
• Notification handling paths
• Image/code snippet sharing functionality
Technical Details
• TypeScript as the primary language
• Svelte for UI components
• WebSocket for real-time communication
• VS Code Extension API integration points
• GitHub OAuth implementation