You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -114,7 +115,7 @@ The devcontainer allows you to confidently let AI assistants:
114
115
-**Zero Configuration:** AI can start working immediately without environment setup
115
116
-**Pre-installed Tools:** All required dependencies are ready to go
116
117
-**Known State:** AI agents can make more accurate suggestions knowing the exact environment
117
-
-**Automatic Setup:** The `postCreateCommand` ensures dependencies are always up-to-date
118
+
-**Automatic Setup:** The `updateContentCommand` ensures dependencies are installed after content updates
118
119
119
120
### 💡 Real-World Scenario
120
121
@@ -133,6 +134,16 @@ Without a devcontainer, you'd need to:
133
134
- Risk system-level changes
134
135
- Potentially need to uninstall packages or revert changes
135
136
137
+
### DevContainer Configuration Notes
138
+
139
+
The `.devcontainer/devcontainer.json` uses `updateContentCommand` instead of `postCreateCommand` for dependency installation:
140
+
141
+
-**Why `updateContentCommand`?** This lifecycle hook runs after workspace content is updated (including initial clone), making it more reliable for dependency installation in GitHub Codespaces and similar environments.
142
+
-**Benefits:** More reliable timing, better suited for `npm ci` operations, and follows devcontainer best practices.
143
+
-**Lifecycle Order:** The devcontainer executes hooks in this order: `onCreateCommand` → `updateContentCommand` → `postCreateCommand` → `postStartCommand`.
144
+
145
+
Using `updateContentCommand` prevents timeout issues that can occur with `postCreateCommand` during initial codespace creation, especially for projects with many dependencies.
146
+
136
147
## Manual Local Setup
137
148
138
149
If you prefer not to use the devcontainer, you can set up the extension locally:
0 commit comments