Skip to content

feat: add VS Code and Copilot CLI as editor targets#57

Closed
rhuanbarreto wants to merge 9 commits into
mainfrom
feat/vscode-copilot-cli-support
Closed

feat: add VS Code and Copilot CLI as editor targets#57
rhuanbarreto wants to merge 9 commits into
mainfrom
feat/vscode-copilot-cli-support

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Add VS Code and GitHub Copilot CLI as supported editor targets for Archgate plugin installation
  • Add ARCH-007 ADR for cross-platform subprocess execution (prefer Bun.spawn over Bun.$)
  • Add documentation guides for VS Code and Copilot CLI plugin setup (en + pt-br)
  • Add helpers for managing VS Code settings (vscode-settings.ts) and Copilot settings (copilot-settings.ts)
  • Fix cross-platform compatibility issues in subprocess execution and settings file parsing

Test plan

  • Unit tests for vscode-settings helper
  • Unit tests for copilot-settings helper
  • Cross-platform CI compatibility verified
  • Manual: run archgate init and verify VS Code/Copilot targets work
  • Manual: verify documentation renders correctly in Starlight

🤖 Generated with Claude Code

rhuanbarreto and others added 9 commits March 14, 2026 16:00
Add support for two new editors in `archgate init`:
- VS Code (`--editor vscode`): configures .vscode/settings.json with
  the git marketplace URL and MCP server
- Copilot CLI (`--editor copilot`): auto-installs via `copilot plugin
  install` or prints manual commands, configures .github/copilot/mcp.json

Both use the same git-based plugin format already served by the plugins
service — no backend changes needed.

Includes documentation guides for both editors and sidebar entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add test suites for vscode-settings and copilot-settings helpers
(ARCH-005 compliance). Add full Portuguese translations for the
VS Code and Copilot CLI plugin guide pages (GEN-002 compliance).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
VS Code uses a dedicated .vscode/mcp.json file for MCP servers (with
"servers" key), not .vscode/settings.json. The chat.plugins.marketplaces
setting is application-scoped and must be set in user-level settings.

Changes:
- Rewrite vscode-settings.ts to write .vscode/mcp.json (workspace)
  and user settings.json (marketplace URL) separately
- Auto-detect user settings path per platform (Win/Mac/Linux)
- Remove installVscodePlugin from plugin-install.ts (no longer needed)
- Update docs (en + pt-br) to reflect the two-file approach
- Update tests for new merge functions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agent plugins require VS Code February 2026 release (1.99) or later.
Added caution callout to both English and pt-br guide pages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
VS Code settings.json and mcp.json use JSONC (JSON with Comments) which
includes single-line comments, block comments, and trailing commas.
JSON.parse() fails on these files. Use Bun's built-in JSONC parser instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use Bun.JSONC.parse to read existing user settings.json (supports
comments and trailing commas), merge the marketplace URL additively,
and write back. All existing settings data is preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
VS Code has built-in defaults for chat.plugins.marketplaces (github/copilot-plugins,
github/awesome-copilot) that are implicit — not written to settings.json. When we
explicitly set the key, VS Code stops using its defaults. Now we seed the array with
these defaults when the key is absent from the file, preventing silent override.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Override both APPDATA (Windows) and HOME (macOS/Linux) in tests so
getVscodeUserSettingsPath() resolves into the temp directory on all
platforms. Use the real path resolver in tests instead of hardcoding
Windows-specific paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rhuanbarreto rhuanbarreto force-pushed the feat/vscode-copilot-cli-support branch from 11e003a to 93f79b7 Compare March 14, 2026 15:02
@rhuanbarreto rhuanbarreto deleted the feat/vscode-copilot-cli-support branch March 14, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant