Commit 0e9131b
feat(setup): offer VS Code extension install during gx setup (#416)
After the existing global companion-install prompt, `gx setup` now
probes for the `code` CLI and, when present, offers to install the
GitGuardex Active Agents VS Code extension from the Marketplace
(publisher `Recodee`, id `Recodee.gitguardex-active-agents`).
Behavior rules:
- If `code --version` fails (no VS Code, or editor is Cursor / VSCodium
/ WebStorm), silently skip — Guardex does not assume an editor.
- If the extension is already present in `code --list-extensions`,
surface a one-line `already installed` confirmation and move on.
- Interactive TTY: use the existing `promptYesNoStrict` helper for an
explicit Y/N question before doing anything.
- Non-interactive: respect `--yes-global-install` / `--no-global-install`.
With neither flag, print a one-line install hint and skip.
- Dry-run: report the offer without calling `code --install-extension`.
- `GUARDEX_SKIP_VSCODE_EXT_PROMPT=1` silences the prompt entirely for
users who never want it (matches the existing `GUARDEX_SKIP_*`
opt-out family).
- Install failure is non-fatal; we keep the rest of setup running and
print the exact `code --install-extension Recodee.gitguardex-active-agents`
retry command.
Unrelated pre-existing setup.test.js failures (canonical-bundle hash
drift, missing `git worktree add --orphan`, harness slug-prefix regex)
are not addressed here; the 39 pass / 3 fail ratio is unchanged by this
commit.
Co-authored-by: NagyVikt <nagy.viktordp@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1027a0d commit 0e9131b
1 file changed
Lines changed: 81 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1234 | 1234 | | |
1235 | 1235 | | |
1236 | 1236 | | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
1237 | 1315 | | |
1238 | 1316 | | |
1239 | 1317 | | |
| |||
2835 | 2913 | | |
2836 | 2914 | | |
2837 | 2915 | | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
2838 | 2919 | | |
2839 | 2920 | | |
2840 | 2921 | | |
| |||
0 commit comments