Skip to content

Commit 62510a4

Browse files
dmartinochoaclaude
andcommitted
feat(client): wire restart/showLog commands + sample-workflow F5 profile
Bring the extension up from "just a scaffold" to "F5 reaches the upstream pygls server and surfaces real diagnostics." Three pieces: 1. src/extension.ts. The `activate` path now goes through a buildClient -> startClient -> error-handler flow. When `client.start()` fails (Python missing, [lsp] extra not installed, server crash on import), the user sees a notification carrying the underlying error message and the install hint `pip install "pipeline-check[lsp]"`, plus an "Open server log" button that focuses the `Pipeline-Check` output channel. The broken client is discarded so the next restart starts fresh. 2. Two commands. `pipelineCheck.restart` stops the running client and re-spawns; `pipelineCheck.showLog` focuses the output channel where the server's `window/logMessage` traffic lands. Registered in package.json under the `Pipeline-Check` category so the command palette groups them together. 3. A second launch profile: `Run Extension (sample workflow)` opens `test-fixtures/sample-workflow/` as the workspace. The fixture ships a deliberately-vulnerable GHA workflow that should fire GHA-001 / GHA-004 / GHA-015 / GHA-016 the moment the file opens — quickest way to confirm the client -> server -> diagnostic-publish round-trip works end-to-end. The fixture is .vscodeignore'd so it does not ship in the vsix. Also lands package-lock.json (npm install pinned the dep tree) and an expanded README "Development" section covering the two F5 profiles plus the new commands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6999f85 commit 62510a4

8 files changed

Lines changed: 2008 additions & 20 deletions

File tree

.vscode/launch.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
"${workspaceFolder}/out/**/*.js"
1313
],
1414
"preLaunchTask": "npm: compile"
15+
},
16+
{
17+
"name": "Run Extension (sample workflow)",
18+
"type": "extensionHost",
19+
"request": "launch",
20+
"args": [
21+
"--extensionDevelopmentPath=${workspaceFolder}",
22+
"${workspaceFolder}/test-fixtures/sample-workflow"
23+
],
24+
"outFiles": [
25+
"${workspaceFolder}/out/**/*.js"
26+
],
27+
"preLaunchTask": "npm: compile"
1528
}
1629
]
1730
}

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.vscode/**
22
.vscode-test/**
33
src/**
4+
test-fixtures/**
45
.gitignore
56
.eslintrc.json
67
tsconfig.json

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@ npm run compile # one-shot compile
4040
npm run watch # rebuild on change
4141
```
4242

43-
Press <kbd>F5</kbd> in VS Code with this folder open to launch an extension-host instance with the extension loaded. The `Run Extension` launch profile is committed in `.vscode/launch.json`.
43+
Press <kbd>F5</kbd> in VS Code with this folder open to launch an extension-host instance with the extension loaded. Two debug profiles ship in `.vscode/launch.json`:
44+
45+
- **Run Extension** — opens a fresh window with no workspace. Use this when iterating on the client wiring against a checkout of your own code.
46+
- **Run Extension (sample workflow)** — opens `test-fixtures/sample-workflow/` as the workspace. The fixture is a deliberately-vulnerable GitHub Actions workflow and should produce four diagnostics (GHA-001, GHA-004, GHA-015, GHA-016) the moment you open the file. Quickest way to confirm the client → server round-trip works end-to-end.
47+
48+
Two commands are registered in the running extension:
49+
50+
- **Pipeline-Check: Restart server** — kills and respawns the LSP process. Useful after editing the Python server in a sibling checkout.
51+
- **Pipeline-Check: Show server log** — focuses the `Pipeline-Check` output channel where the server's `window/logMessage` traffic lands.
4452

4553
## Packaging
4654

0 commit comments

Comments
 (0)