How andrepimenta/claude-code-chat works
Claude Code Chat is a VS Code extension that provides a chat interface to the Claude Code CLI, with an optional OpenAI-compatible routing path for model providers. The principal workflow is: a user sends a message in the webview, the extension host runs Claude and relays events and permission requests, and the webview displays the response. The extension also manages model selection, installation, and marketplace features. Edges reflect excerpts, the source index, or README statements; unsampled subsystems are represented only where documented.
Main entry points: extension.ts Extension host · ui.ts Chat webview · server.ts API router · script.ts Chat interactions
Components 20
Editor integration
- Extension host
src/extension.ts
Chat experience
- Chat webview
src/ui.ts - Chat interactions
src/script.ts - Chat styling
src/ui-styles.ts
Claude runtime
- Claude Code CLI
- Auth detection
src/auth-detect.ts - CLI installer
src/claudeDownloader.ts
Models and routing
- Model updater
src/model-updater.ts - API router
src/router/server.ts - Request conversion
src/router/formatRequest.ts - Response conversion
src/router/formatResponse.ts - Stream conversion
src/router/streamResponse.ts
Extensions marketplace
- Skills interface
src/skills-ui.ts - Plugins interface
src/plugins-ui.ts - Skills interactions
src/skills-script.ts - Plugin interactions
src/plugins-script.ts
Other components
- User
- VS Code
- OpenAI-compatible API
- Marketplace services
Connections 19
- User → VS Code: opens chat
README.md - VS Code → Extension host: activates
- Extension host → Chat webview: creates view
src/extension.ts - Chat webview → Chat interactions: embeds interactions
src/ui.ts - Chat webview → Chat styling: embeds styles
src/ui.ts - Chat webview → Skills interface: embeds interface
src/ui.ts - Chat webview → Plugins interface: embeds interface
src/ui.ts - Chat webview → Skills interactions: embeds interactions
- Chat webview → Plugin interactions: embeds interactions
- Extension host → Claude Code CLI: runs process
src/extension.ts - Extension host → Auth detection: checks auth events
src/extension.ts - Extension host → CLI installer: installs CLI
src/extension.ts - Extension host → Model updater: resolves models
src/extension.ts - Extension host → API router: starts router
src/extension.ts - API router → Request conversion: converts requests
src/router/server.ts - API router → OpenAI-compatible API: forwards requests
src/router/server.ts - API router → Stream conversion: converts stream
src/router/server.ts - API router → Response conversion: converts response
src/router/server.ts - Extension host → Marketplace services: searches and installs
README.md