44
55Run OpenCodeIDE as a ** branded Code-OSS** with the embedded AI extension loaded.
66
7- ## Architecture (current)
7+ ## Architecture
88
99```
1010CodeForge/
@@ -13,69 +13,98 @@ CodeForge/
1313├── extensions/opencodeide-ai/ # AI sidebar + VS Code bridge
1414├── src/ai/ # Embedded AI Platform (shared logic)
1515└── scripts/
16- ├── setup-vscode.mjs # clone + brand + npm install
16+ ├── setup-vscode.mjs # clone + brand + patches + npm install
1717 ├── apply-branding.mjs # product.json branding
18+ ├── apply-vscode-patches.mjs # VS 2026 toolchain recognition, etc.
1819 └── dev-vscode.mjs # launch Code-OSS + extension
1920```
2021
22+ ## Prerequisites (Windows)
23+
24+ | Requirement | Details |
25+ | -------------| ---------|
26+ | ** Node.js** | Exact major from ` vscode/.nvmrc ` (currently ** 24.x ≥ 24.18.0** ). Use [ Node.js LTS] ( https://nodejs.org/ ) / ` winget install OpenJS.NodeJS.LTS ` |
27+ | ** npm** | < ; 13 (comes with Node 24 LTS) |
28+ | ** Python 3** | For node-gyp |
29+ | ** Visual Studio** | C++ desktop workload + ** MSVC Spectre-mitigated libs** (x64/x86) |
30+
31+ ### Install Spectre libs (required)
32+
33+ Visual Studio Installer → Modify → Individual components → search ** Spectre** :
34+
35+ - MSVC v14x - VS 202x C++ x64/x86 Spectre-mitigated libs
36+ - C++ ATL / MFC Spectre-mitigated libs (if prompted)
37+
38+ Or via elevated installer:
39+
40+ ``` powershell
41+ $setup = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
42+ $vs = "C:\Program Files\Microsoft Visual Studio\18\Community" # adjust path
43+ Start-Process $setup -Verb RunAs -Wait -ArgumentList @(
44+ "modify","--installPath",$vs,
45+ "--add","Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre",
46+ "--add","Microsoft.VisualStudio.Component.VC.ATL.Spectre",
47+ "--add","Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre",
48+ "--passive","--norestart"
49+ )
50+ ```
51+
52+ > OpenCodeIDE patches Code-OSS ` preinstall.ts ` to accept ** Visual Studio 2026** (` 18 ` ), which upstream does not list yet.
53+
2154## One-time setup
2255
2356``` bash
2457npm run vscode:setup
2558```
2659
2760This will:
61+
28621 . Clone ` microsoft/vscode ` into ` vscode/ ` (shallow)
29- 2 . Apply OpenCodeIDE branding to ` product.json `
30- 3 . Run ` npm install ` inside ` vscode/ ` (10–20+ minutes)
63+ 2 . Apply OpenCodeIDE branding
64+ 3 . Apply toolchain patches (VS 2026)
65+ 4 . Run full ` npm install ` (native modules included)
3166
3267If Code-OSS is already cloned:
3368
3469``` bash
3570npm run vscode:brand
71+ node scripts/apply-vscode-patches.mjs
3672npm run vscode:install
3773```
3874
3975## Develop / launch
4076
4177``` bash
42- # Compile AI extension
43- npm run build:extensions
44-
45- # Compile Code-OSS (first time is slow)
46- npm run vscode:compile
47-
48- # Launch branded IDE with AI extension in development mode
49- npm run vscode:dev
78+ npm run build:extensions # compile AI extension
79+ npm run vscode:compile # compile editor (first time is slow)
80+ npm run vscode:dev # launch OpenCodeIDE with AI sidebar
5081```
5182
5283What you should see:
53- - Window title / product name: ** OpenCodeIDE**
54- - Activity bar: ** AI Agent** icon
55- - Chat sidebar can run:
56- - ` list files `
57- - ` read README.md `
58- - ` search TODO `
59- - Configure LLM: Command Palette → ** OpenCodeIDE AI: Configure AI Provider**
60-
61- ## Branding fields applied
62-
63- | Field | Value |
64- | -------| --------|
65- | nameShort | OpenCodeIDE |
66- | applicationName | opencodeide |
67- | dataFolderName | .opencodeide |
68- | urlProtocol | opencodeide |
69- | darwinBundleIdentifier | com.kortexio.opencodeide |
84+
85+ - Product name: ** OpenCodeIDE**
86+ - Activity bar: ** AI Agent**
87+ - Chat: ` list files ` · ` read README.md ` · ` search TODO `
88+ - Command Palette → ** OpenCodeIDE AI: Configure AI Provider**
89+
90+ ## Scripts
91+
92+ | Script | Purpose |
93+ | --------| ---------|
94+ | ` npm run vscode:setup ` | Clone + brand + patch + install |
95+ | ` npm run vscode:brand ` | Re-apply product.json branding |
96+ | ` npm run vscode:install ` | ` npm install ` inside ` vscode/ ` |
97+ | ` npm run vscode:compile ` | ` compile-client ` |
98+ | ` npm run vscode:dev ` | Launch with ` --extensionDevelopmentPath ` |
7099
71100## Next hardening steps
72101
73- 1 . Register ` opencodeide-ai ` as a ** built-in ** extension (add to ` gulpfile.extensions.ts ` compilations)
74- 2 . Replace Electron placeholder packaging with Code-OSS gulp packaging
75- 3 . Wire full Agent Runtime ( ` src/ai ` ) into the extension host (not only chat/LLM shortcuts)
76- 4 . Continuous rebase workflow against upstream ` microsoft/vscode `
102+ 1 . Register ` opencodeide-ai ` in ` gulpfile.extensions.ts ` as built-in
103+ 2 . Package via Code-OSS gulp (replace Electron placeholder)
104+ 3 . Wire full ` src/ai ` Agent Runtime into the extension host
105+ 4 . Continuous rebase against upstream ` microsoft/vscode `
77106
78107## Notes
79108
80109- ` vscode/ ` is ** not committed** (too large). Use ` npm run vscode:setup ` on each machine.
81- - Upstream Code-OSS uses its own Node/npm toolchain; prefer Node 20 LTS if install fails on newer Node .
110+ - Do ** not ** use ` --ignore-scripts ` for vscode install — native modules must build .
0 commit comments