Terminal Manager
Open existing VS Code terminals together in an editable native editor grid, with their original scrollback and live progress. A separate gallery offers pinned tiles and drag-and-drop ordering.
Use
- Install
terminal-manager.vsix with Extensions: Install from VSIX. The package is built for the machine's operating system and CPU architecture.
- Choose Terminal Manager in the Activity Bar and Open Terminal Workspace, or run Terminal Manager: Open. Existing terminals open as native editor panes.
- For gallery tiles, run Terminal Manager: Open Gallery, click the New Terminal (+) icon, and choose a workspace folder. Click inside its tile and type directly into the real shell: Enter, arrow keys, Tab completion, Ctrl+C, and interactive prompts work there. There is no separate command field.
- Type independently in any Terminal Manager tile, whether pinned or unpinned. Pinning changes the layout only. Input is never broadcast to other terminals.
- Use Open native terminal for the same managed shell in VS Code's terminal panel. Close stops that managed shell and its processes.
Creating and interacting with shells requires a trusted workspace. With no workspace folders open, New Terminal asks you to choose a directory. Managed terminals start using VS Code's default shell (vscode.env.shell), with login-shell behavior on macOS/Linux. Custom profile arguments and extension-provided terminal profiles are not imported.
Existing VS Code terminals
Terminal Manager: Open moves existing sessions into native terminal editor panes arranged across rows and columns. Those are the original terminals: their retained scrollback, current prompt, running commands, ANSI rendering, interactive applications, and keyboard input remain available. No shell is restarted, no history is reconstructed, and no clipboard access is needed. The extension shows compact session controls in the first editor group. Click a session’s arrow icon to focus its editable native pane, or × to close that session and stop its processes. Other editor tabs stay open. Drag native terminal tabs or resize editor group dividers to rearrange the workspace.
Terminal Manager: Open Gallery opens the custom tile view directly. When there are no existing external terminals, Open also uses the gallery. Gallery tiles fill a responsive grid; pin a tile to enlarge it, or drag an unpinned tile by its handle to reposition it.
Existing sessions in the optional gallery show only commands observed through shell integration. Click their tile or arrow icon to focus the live terminal for typing; the preview itself does not accept invisible input. All sessions have a close (×) control. For full history, prompts, and commands already running before the extension started, use the native workspace. Managed terminals created with New Terminal support full live input/output in either view.
Output and lifecycle
- Requires VS Code 1.93 or newer. Uses stable APIs only, with no special launch flags.
- Managed terminals use Microsoft's node-pty backend and xterm.js for full shell input/output. They show shell activity and the initial directory; they do not parse shell input to infer command status or the current directory.
- Each terminal retains the latest 128 Ki UTF-16 characters in memory. Updates are batched at 75 ms and each tile has up to 1,500 scrollback lines. Older output is marked as trimmed.
- Observation continues while the gallery is hidden or closed. Reopening reconstructs each preview from its retained tail. Very long output can lose earlier formatting state if its retained tail begins mid-line or mid-escape sequence.
- Managed PTYs resize with their gallery tiles. Opening a native view lets that view control the PTY size until the gallery is focused/resized again. The two views may have different dimensions; full-screen applications can need a redraw after switching.
- Closing the gallery leaves shells running. Closing a terminal stops its shell and removes its card. Closing/reloading the VS Code window stops managed shells; output and pins do not persist across extension sessions.
- Terminal output stays in memory. The extension does not save it, transmit it, or write it to logs.
Develop and validate
npm ci
npm test
npm run test:host
npm run preview
npm run package
Run npm run preview or press F5 to open an Extension Development Host. The preview launcher removes inherited VS Code IPC/bootstrap environment variables so an extension-host shell cannot redirect the launch to an installed-extension window. The official real-host test runner uses installed VS Code on macOS; set VSCODE_EXECUTABLE_PATH for another executable, or it downloads VS Code on other platforms. Real-host fixtures use POSIX shells on macOS/Linux and PowerShell 7 on Windows. They run in disposable workspace folders with a test-only trusted profile.
The test suite covers discovery, terminal closure, isolated input, pinning, trust checks, unsupported shell integration, output streaming, bounded buffers, and protocol validation. Real-host checks cover ANSI command output, progress while the gallery is closed, reopening, and interactive managed input including Ctrl+C. They also click the padded tile container and dispatch keyboard events in the real webview, checking that commands reach only their intended pinned or unpinned PTY. This regression check runs in CI under Xvfb.
For visual QA, check multiple tiles, pin/unpin, window resizing, light/dark themes, interactive applications, and native/gallery switching. Click focus and command execution in pinned and unpinned tiles have also been verified manually in the VS Code desktop preview. Full theme and responsive-layout QA remains a manual check.
npm run package produces terminal-manager.vsix targeted to the current platform, bundling its native PTY runtime. CI tests and packages macOS ARM64/Intel, Linux x64, and Windows x64. Main-branch pushes also queue automatic patch releases, archive all packages in versions/<version>/, and publish them using Microsoft Entra ID after the identity has been configured. See release setup and recovery.
The packaging tool's transitive @azure/msal-node dependency is pinned to a patched release. Marketplace authentication/publication is not tested.