Skip to content

Commit 8575e3a

Browse files
author
unraid
committed
docs: document VS Code extension source layout
The PR already includes the extension host and webview source under packages/vscode-extension, but reviewers need an entry point that explains which directories are source, which files are generated output, and why source is excluded from the VSIX package. Constraint: Source should remain reviewable in the repository while the VSIX continues to ship compiled assets only. Rejected: Rely on root feature docs only | they describe architecture but are not colocated with the extension source tree. Confidence: high Scope-risk: narrow Directive: Keep this README aligned with .vscodeignore whenever the packaging boundary changes. Tested: git diff --check Not-tested: Re-running VS Code extension smoke tests for this docs-only change
1 parent 98ceee2 commit 8575e3a

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# CCB VS Code Extension
2+
3+
This directory contains the full source for the VS Code extension.
4+
5+
The extension is committed to the repository for review and development, while the packaged VSIX intentionally ships only compiled assets and required metadata.
6+
7+
## Source Layout
8+
9+
| Path | Purpose |
10+
| --- | --- |
11+
| `src/` | VS Code extension host code. It starts and manages the ACP agent process, registers commands, bridges editor state, and owns extension lifecycle. |
12+
| `webview/` | React webview source. It renders chat, slash commands, permissions, model/mode selectors, plans, and tool call cards. |
13+
| `webview/lib/` | Shared webview protocol, ACP-facing types, slash-command parsing, and thread reducer logic. |
14+
| `scripts/` | Local install and smoke-test scripts. |
15+
| `resources/` | VS Code extension resources, including the activity bar icon. |
16+
| `dist/` | Build output generated by `bun run build`; this is what the VSIX loads at runtime. |
17+
18+
## Development Install
19+
20+
From the repository root:
21+
22+
```powershell
23+
bun run build
24+
cd packages\vscode-extension
25+
bun run install-local:win
26+
```
27+
28+
On macOS/Linux:
29+
30+
```bash
31+
bun run build
32+
cd packages/vscode-extension
33+
bun run install-local
34+
```
35+
36+
Fully quit VS Code and reopen it after installation.
37+
38+
## Build and Smoke Test
39+
40+
```powershell
41+
cd packages\vscode-extension
42+
bun run test:all
43+
```
44+
45+
The smoke test covers extension manifest loading, ACP startup, slash-command metadata, and `/mcp tools claude-in-chrome`.
46+
47+
## Packaging Boundary
48+
49+
`packages/vscode-extension/.vscodeignore` excludes source and test files from the VSIX:
50+
51+
```text
52+
src/
53+
webview/
54+
scripts/
55+
node_modules/
56+
tsconfig.json
57+
esbuild.config.mjs
58+
*.map
59+
```
60+
61+
Before publishing, verify package contents:
62+
63+
```powershell
64+
npx @vscode/vsce ls --no-dependencies
65+
```
66+
67+
Expected packaged files:
68+
69+
```text
70+
package.json
71+
resources/icon.svg
72+
dist/webview.js
73+
dist/extension.js
74+
```
75+
76+
Do not remove the source exclusions unless the release policy changes and the VSIX contents are reviewed again.

0 commit comments

Comments
 (0)