-
Notifications
You must be signed in to change notification settings - Fork 0
vscode
Jacob Sampson edited this page Mar 23, 2026
·
1 revision
Generated by Cicadas Bootstrap on 2026-03-22.
The VS Code extension (@aprovan/patchwork-vscode) integrates the entire Patchwork platform into Visual Studio Code. It provides a project file explorer (tree view), a widget preview panel (webview), an embedded Stitchery server for service dispatch, and AI-driven editing via Copilot proxy integration.
Exports:
-
activate(context)— Extension activation: registers providers, commands, and starts embedded Stitchery - VS Code contribution points: views, commands, file system provider, webview
Providers:
-
PatchworkTreeProvider—TreeDataProviderfor project file listing in the sidebar -
PatchworkFileSystemProvider—FileSystemProviderfor virtual file system integration -
PreviewPanelProvider—WebviewViewProviderfor the widget preview panel
Dependencies:
-
vscode— VS Code Extension API -
@aprovan/patchwork-compiler— Compilation and VFS -
@aprovan/stitchery— Embedded server for services
-
providers/PatchworkTreeProvider.ts— Reads project structure, presents as explorable tree in sidebar with file icons and grouping -
providers/PatchworkFileSystemProvider.ts— Bridges VFS to VS Code's file system API, enabling standard file operations (open, save, rename, delete) on virtual project files -
providers/PreviewPanelProvider.ts— Manages a webview panel that compiles and renders widgets live; handles hot-reload on file changes
-
services/EditService.ts— Handles AI-driven edit requests: receives edit instructions, sends to LLM via Copilot proxy, applies resulting code changes -
services/EmbeddedStitchery.ts— Starts a Stitchery server instance in-process within the extension, providing MCP/UTCP service access without a separate terminal
-
extension.ts— Activation logic: registers all providers, sets up commands, initializes embedded Stitchery, configures Copilot proxy URL from settings
- Embedded Stitchery over external server: Running Stitchery in-process eliminates the need for developers to manually start a backend server, providing a zero-config experience.
- FileSystemProvider for VFS bridging: Using VS Code's native file system API means standard editor features (file tabs, save, diff) work with virtual project files seamlessly.
- Copilot proxy for AI edits: Rather than integrating an LLM directly, the extension proxies edit requests through a configurable Copilot proxy endpoint, keeping AI provider choice flexible.