Weave VS Code Extension
This component provides a VS Code extension version of Weave: an xterm.js terminal emulator and shell list together in one bottom Panel view next to Problems, Output, Debug Console, and Terminal.
Marketplace extension id:
ShineTribe.tweave
The development workflow assumes a multi-root VS Code workspace. Keep the main Weave repo as one root and add this component as a second root named vscode.
Workspace Setup
From VS Code:
- Open the Weave repository root.
- Run
File: Add Folder to Workspace....
- Add
comps/vscode.
- Save the workspace if desired.
- Make sure the
comps/vscode workspace folder is named vscode.
The checked-in launch and task files use ${workspaceFolder:vscode}, so they continue to work when the full repo and other related homes are open in the same window.
Develop
Install dependencies:
cd comps/vscode
yarn install
Compile once:
yarn compile
Run from VS Code:
- Open the multi-root workspace described above.
- Run
yarn install in comps/vscode.
- Press
F5 and choose Run Weave Extension.
- In the Extension Development Host window, open the Weave panel item or run
Weave: Open.
During development, use:
yarn watch
After changing TypeScript, reload the Extension Development Host window with Developer: Reload Window. Webview-only changes in media/ also reload cleanly with the same command.
Install Locally
Package a VSIX:
cd comps/vscode
yarn package
Install it into your normal VS Code:
yarn install:local
Reload VS Code with Developer: Reload Window.
Update Local Install
After making changes:
cd comps/vscode
yarn install
yarn install:local
Then reload VS Code with Developer: Reload Window. No uninstall step should be needed for ordinary extension changes.
Current Behavior
Weave: Open opens the bottom Panel view with the terminal on the left and shell list on the right.
Weave: Focus Shells Panel focuses the same bottom Panel view.
Weave: New Shell creates a shell in the shared Weave workspace daemon.
- In a multi-root window, new shells prompt for the target root and preselect the active editor's root when possible.
- The right-side shell list can switch the active shell, double-click rename shells, and resize by dragging the splitter.
- Shell I/O attaches to the same Weave daemon used by the TUI and renders in the webview with xterm.js.