How hari27om/vs-code works
Spider-Man 3D Companion is a local VS Code extension paired with an Electron overlay. The main workflow is activation and environment checking, then companion startup and an IPC handshake; the extension also sends settings and window bounds so the overlay can stay aligned and non-disruptive. The companion side includes rendering, character, motion, web-constraint, animation, and autonomous-behavior subsystems. Sampled code confirms the process/window and IPC wiring, but not how the simulation modules are connected to the renderer; those links are therefore omitted.
Main entry points: extension.ts Extension Lifecycle · companionManager.ts Companion Manager · index.ts Commands · main.js Window Controller
Components 20
VS Code Extension
- Extension Lifecycle
src/extension.ts - Commands
src/commands/index.ts - Settings
src/config/settings.ts - Environment Check
src/platform/environment.ts - Window Bounds
src/window/bounds.ts - Activity Signals
src/events/activitySignals.ts - Companion Manager
src/companion/companionManager.ts - Process Transport
src/ipc/transport.ts - IPC Messages
src/ipc/messages.ts
Companion Process
- Electron Child
- IPC Protocol
companion/ipc/protocol.js
Overlay UI
- Window Controller
companion/window/main.js - Renderer Page
companion/renderer/index.html
3D Simulation
- Character Rig
companion/character/rig.js - Pendulum Physics
companion/physics/pendulum.js - Web Constraint
companion/web/webConstraint.js - Autonomous Behavior
companion/behavior/behaviorController.js - Animation Assets
companion/animation
Other components
- VS Code User
- VS Code API
Connections 20
- VS Code User → VS Code API: uses
- VS Code API → Extension Lifecycle: activates
- Extension Lifecycle → Environment Check: checks support
- Extension Lifecycle → Settings: reads settings
- Extension Lifecycle → Companion Manager: starts
- Extension Lifecycle → Commands: registers
- Extension Lifecycle → Window Bounds: normalizes bounds
- Extension Lifecycle → Activity Signals: initializes
- Commands → Companion Manager: controls
- Commands → Settings: reads
- Companion Manager → Electron Child: spawns
- Companion Manager → Process Transport: sends commands
- Companion Manager → IPC Messages: uses types
- Extension Lifecycle → Companion Manager: forwards bounds
- Extension Lifecycle → Companion Manager: forwards settings
- Process Transport → Electron Child: writes stdio
- Electron Child → Process Transport: returns stdout
- IPC Protocol → Window Controller: dispatches messages
- Window Controller → IPC Protocol: sends replies
- Window Controller → Renderer Page: loads page