-
Notifications
You must be signed in to change notification settings - Fork 1
ci: add VS Code extension publish workflow #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8e131fe
ba6ec2b
933fa0a
311f1c4
f94ea7b
96cb5e2
692886b
0d24d51
a7e99c0
02ee086
fd40ef2
cd70600
41f5237
e9e4a58
42524fc
d5d6552
7c05077
97a3edb
d695d62
8b8d40b
51905e0
1909566
60ad017
fa8b4c6
0508d52
37eca94
2bbbfb7
496dede
1436936
8208b22
201ebaa
600373c
e62ea1f
19c25c4
db217f2
14fe37c
cbbefd6
5c612a4
cda6d75
0af6bca
6f1acb0
4560b3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Publish VS Code Extension | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'vscode-v*' | ||
|
|
||
| jobs: | ||
| publish-vscode: | ||
| name: Publish to Marketplaces | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Install gitleaks | ||
| run: | | ||
| GITLEAKS_VERSION="8.18.4" | ||
| curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \ | ||
| | tar -xz -C /usr/local/bin gitleaks | ||
|
|
||
| - name: Scan for secrets | ||
| run: gitleaks detect --config .gitleaks.toml --log-opts="HEAD~1..HEAD" --verbose --redact | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: '9' | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'pnpm' | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build helixir | ||
| run: pnpm run build | ||
|
|
||
| - name: Bundle extension | ||
| run: pnpm --filter helixir-vscode run vscode:prepublish | ||
|
|
||
| - name: Publish to VS Code Marketplace | ||
| run: npx @vscode/vsce publish --no-dependencies | ||
| env: | ||
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | ||
|
|
||
| - name: Publish to Open VSX | ||
| run: npx ovsx publish --no-dependencies -p ${{ secrets.OVSX_PAT }} | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Source files — not needed in the packaged extension | ||
| src/ | ||
| tsconfig.json | ||
| esbuild.config.mjs | ||
|
|
||
| # Development dependencies and lock files | ||
| node_modules/ | ||
| .pnpm-store/ | ||
| pnpm-lock.yaml | ||
| package-lock.json | ||
|
|
||
| # Test artefacts | ||
| coverage/ | ||
| *.test.ts | ||
| *.spec.ts | ||
|
|
||
| # Build intermediates (keep dist/) | ||
| *.map | ||
|
|
||
| # Editor and OS artefacts | ||
| .vscode/ | ||
| .DS_Store | ||
| *.log | ||
|
|
||
| # Root-level workspace files that should not be bundled | ||
| ../../node_modules/ | ||
| ../../src/ | ||
| ../../build/ | ||
| ../../packages/ | ||
| ../../.github/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| # Helixir — VS Code Extension | ||
|
|
||
| **AI-powered web component intelligence for VS Code.** | ||
|
|
||
| Helixir gives AI assistants full situational awareness of any web component library by wiring the [helixir MCP server](https://github.com/bookedsolidtech/helixir) directly into VS Code's MCP layer. | ||
|
|
||
| ## Features | ||
|
|
||
| - **MCP server auto-registration** — the helixir MCP server starts automatically with VS Code, no manual configuration required | ||
| - **30+ MCP tools** — component discovery, health scoring, breaking-change detection, TypeScript diagnostics, design token lookup, and more | ||
|
himerus marked this conversation as resolved.
|
||
| - **Zero hallucinations** — every AI component suggestion is grounded in your actual `custom-elements.json` | ||
| - **Framework-agnostic** — works with Lit, Stencil, FAST, Spectrum, Shoelace, or any library that produces a Custom Elements Manifest | ||
|
|
||
| ## Requirements | ||
|
|
||
| - VS Code **≥ 1.99.0** | ||
| - A component library with a `custom-elements.json` (Custom Elements Manifest) | ||
| - Node.js **≥ 20** on `PATH` | ||
|
|
||
| ## Getting Started | ||
|
|
||
| 1. Install the extension from the VS Code Marketplace | ||
| 2. Open your component library folder in VS Code | ||
| 3. The Helixir MCP server will register automatically with AI assistants that support MCP (e.g., GitHub Copilot, Claude) | ||
|
|
||
| ### Optional: Configure the Config Path | ||
|
|
||
| If your `mcpwc.config.json` is not at the workspace root, set the path via VS Code settings: | ||
|
|
||
| ```json | ||
| // .vscode/settings.json | ||
| { | ||
| "helixir.configPath": "packages/web-components/mcpwc.config.json" | ||
| } | ||
|
Comment on lines
+26
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use
📝 Proposed fix-If your `mcpwc.config.json` is not at the workspace root, set the path via VS Code settings:
+If your `helixir.mcp.json` is not at the workspace root, set the path via VS Code settings:
{
- "helixir.configPath": "packages/web-components/mcpwc.config.json"
+ "helixir.configPath": "packages/web-components/helixir.mcp.json"
}
-| `helixir.configPath` | `string` | `""` | Path to `mcpwc.config.json`. Empty = workspace root. |
+| `helixir.configPath` | `string` | `""` | Path to `helixir.mcp.json`. Empty = workspace root. |
-Additional configuration (token path, component prefix, health history dir) belongs in `mcpwc.config.json`.
+Additional configuration (token path, component prefix, health history dir) belongs in `helixir.mcp.json`.Also applies to: 47-49, 66-66 🤖 Prompt for AI Agents |
||
| ``` | ||
|
|
||
| The path can be relative to the workspace root or absolute. | ||
|
|
||
| ## Commands | ||
|
|
||
| | Command | Description | | ||
| | --------------------------- | ------------------------------------------------------ | | ||
| | `Helixir: Run Health Check` | Guides you to run a health check via your AI assistant | | ||
|
|
||
| ## Extension Settings | ||
|
|
||
| | Setting | Type | Default | Description | | ||
| | -------------------- | -------- | ------- | ---------------------------------------------------- | | ||
| | `helixir.configPath` | `string` | `""` | Path to `mcpwc.config.json`. Empty = workspace root. | | ||
|
|
||
| ## How It Works | ||
|
|
||
| When the extension activates, it registers a **MCP server definition provider** (`helixir`) with VS Code's language model API (`vscode.lm`). VS Code spawns the bundled helixir MCP server (`dist/mcp-server.js`) as a child process over stdio. | ||
|
|
||
| The server reads your `custom-elements.json` and exposes 30+ tools that AI models can call to look up component APIs, run health scans, generate type declarations, and more. | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| ## Configuration Reference | ||
|
|
||
| The helixir server is configured via environment variables passed by the extension: | ||
|
|
||
| | Variable | Description | | ||
| | --------------------- | ------------------------------------------- | | ||
| | `MCP_WC_PROJECT_ROOT` | Set to your workspace folder automatically | | ||
| | `MCP_WC_CONFIG_PATH` | Set when `helixir.configPath` is configured | | ||
|
|
||
| Additional configuration (token path, component prefix, health history dir) belongs in `mcpwc.config.json`. See the [helixir documentation](https://github.com/bookedsolidtech/helixir) for the full config reference. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| **MCP server not appearing in AI assistant tools** | ||
|
|
||
| - Verify VS Code ≥ 1.99.0 is installed | ||
| - Confirm your workspace contains a `custom-elements.json` | ||
| - Check the Output panel → Helixir for error messages | ||
|
|
||
| **"No workspace folder" error from Run Health Check** | ||
|
|
||
| - Open a folder (not just a file) in VS Code — the extension uses the workspace folder as the project root | ||
|
|
||
| **Server starts but returns no components** | ||
|
|
||
| - Ensure `custom-elements.json` exists at the workspace root or configure `helixir.configPath` | ||
| - Regenerate the manifest: `npm run analyze:cem` (or your CEM generation script) | ||
|
|
||
| ## License | ||
|
|
||
| MIT — see [LICENSE](../../LICENSE) | ||
Uh oh!
There was an error while loading. Please reload this page.