Architecture
Neural Inverse OSS is built on VS Code. All Neural Inverse features live under src/vs/workbench/contrib/.
Modules
| Module | What it is | Window |
|---|---|---|
void/ | Core LLM integration — chat, inline edit, autocomplete, settings, threads | Sidebar (Ctrl+L, Ctrl+K) |
powerMode/ | Autonomous coding agent with tool calling | Cmd+Alt+P |
neuralInverse/ | Agent manager, model management, deployments | Cmd+Alt+A |
neuralInverseFirmware/ | Embedded development — MCU database, SVD, serial, debug | Cmd+Alt+F |
neuralInverseModernisation/ | Legacy migration — 5-stage pipeline with KB | Cmd+Alt+M |
Process Model
| Process | Folder pattern | Has access to |
|---|---|---|
| Browser (renderer) | browser/ | DOM, window, React components |
| Main (Node.js) | electron-main/ | node_modules, filesystem, network |
| Common (shared) | common/ | Types and utilities — no process-specific APIs |
LLM requests route from browser to main process via IPC. This avoids CSP restrictions and lets us use provider SDKs (Anthropic, OpenAI, Ollama, etc.) that require Node.js.
Service Registration
Every module has a .contribution.ts file that imports services as side-effects:
// void.contribution.ts
import './editCodeService.js'
import './sidebarPane.js'
import './autocompleteService.js'
// ...Each imported file calls registerSingleton() which registers the service with VS Code's DI container.
Services inject dependencies via decorators:
constructor(
@ILLMMessageService private readonly llm: ILLMMessageService,
@IVoidSettingsService private readonly settings: IVoidSettingsService,
) {}How Features Connect
User types in Sidebar Chat (Ctrl+L)
-> ChatThreadService stores message
-> LLMMessageService routes to main process
-> Main process calls provider SDK (streaming)
-> Response streams back via IPC events
-> If tool calls: IToolsService dispatches to registered tools
-> If code edits: EditCodeService creates DiffZones
-> Inline diffs render in the editor (red/green)
-> Checkpoints created for undo
User opens firmware workspace
-> ProjectDetector scans for firmware markers
-> MCUDatabase loads matching MCU profile
-> SVDParser loads register maps
-> HardwareContextProvider injects MCU context into LLM prompts
-> fw_* tools become available in chat + Power Mode
User starts modernisation session
-> ModernisationSessionService tracks state
-> Discovery/Planning/Translation engines run per stage
-> KnowledgeBase persists all decisions
-> Tools auto-register for Power Mode accessShared Infrastructure
| Service | What it does | Used by |
|---|---|---|
ILLMMessageService | Routes LLM requests to providers | Everything |
IVoidSettingsService | Provider configs, model selections, preferences | Everything |
IVoidInternalToolService | Tool registry for agent tool calling | Power Mode, Sidebar, Modernisation |
IEditCodeService | Code modification (fast/slow apply, diffs) | Chat, Ctrl+K, Power Mode |
IChatThreadService | Conversation threads + checkpoints | Chat, Power Mode |
Key Rules for Contributors
- ASCII only in TS/JS string literals — non-ASCII breaks the esbuild release build
- No
anycasts — find the correct type - No changes outside
contrib/without discussion — upstream VS Code code is maintained separately - BYOLLM attribution — AI-assisted commits need dual
Co-authored-bytrailers (see CONTRIBUTING.md) - Semicolons — follow existing convention per file
- Service registration — always through
.contribution.tsside-effect imports, never direct instantiation
Was this page helpful?