Preface¶
Running commands and viewing Agent output in DeepSeek Harness (DSH) often relies on the terminal in the right sidebar. The built-in terminal utilizes a shared gateway with frame acknowledgment; during cold starts, high-volume output, or when the main thread is busy, key echo and scrolling can slow down. If you want a terminal that feels more like a local shell and maintains the session after switching tabs or refreshing the page, you need a dedicated PTY channel. This article introduces the community plugin dsh-fast-term (maintained by cyberElar). It occupies the same right-sidebar tab slot as the built-in terminal, uses a dedicated WebSocket to connect directly to a PTY, and can optionally completely replace the built-in terminal UI.
What is this¶
dsh-fast-term is a client-side plugin for DSH: it provides a real PTY terminal in the right sidebar. Output is transmitted via a dedicated WebSocket, bypassing the shared gateway and frame acknowledgment. The plugin supports session persistence (automatic reconnection and replay after switching tabs or refreshing, without the PTY exiting), an independent PTY for each tab, selectable and memorized shells, theme-aware colors and fonts, and a bilingual (Chinese/English) interface. Currently, it is categorized as “Client” in the SkillHub Plugin Directory; the source code and documentation are available on the GitHub Repository, licensed under MIT.
Core Features¶
Transport and Session¶
- Dedicated PTY WebSocket: Key echo does not queue up or wait for frame acknowledgment.
- Right-sidebar tab occupying the same slot as the built-in terminal;
Ctrl + `creates a new terminal. - Session persistence: Automatic reconnection and replay after switching tabs or refreshing the page; the PTY process does not exit.
- Independent PTY for each tab; shell can be selected via a dropdown, and the selection is memorized.
Interface and Operations¶
- Copy/paste, right-click context menu, and native paste fallback (
Ctrl+Shift+V). - Desktop version (Windows/macOS): When the terminal is focused, single
Ctrlcombinations (e.g., tmux-styleCtrl+B) are prioritized for the terminal; clicking elsewhere on the page restores DSH shortcuts. - New terminals re-read the system
Pathfrom the registry; no need to restart DSH after installing new command-line tools.
Input Permissions and External Interfaces¶
- Read-only by default: Only the terminal interface itself can accept input; clicking the “Read-only” pill in the top right corner unlocks input, allowing other WebSocket clients (including Agents) to write.
- Configurable command whitelist: Matches by full-line prefix (case-insensitive); inputs outside the whitelist are discarded; configuration is saved in
~/.dsh/fast-term.json. - Read-only HTTP API (Loopback address only with Origin verification): Lists terminals, reads buffers, replays the screen by rows and columns, and reads/writes input permission configuration.
- Host registers the Agent tool
dsh_fast_term_read: Allows reading sidebar terminals under any sandbox permission level; the tool itself does not write to the PTY.
Optional Replacement for Built-in Terminal¶
By disabling @deepseek-ai/dsh-client-ui-sidebar-terminal via a profile patch layer, the “New Terminal” entry and terminal UI are taken over by this plugin; the terminal service remains active, so other plugins dependent on the terminal are unaffected.
Performance (README Benchmarks)¶
The maintainer compared the built-in terminal and dsh-fast-term on Windows in an isolated profile. Excerpts are as follows (see the repository README for the full table):
| Scenario | Built-in Terminal | dsh-fast-term |
|---|---|---|
| Cold start to prompt (reusing existing PTY) | 3.1–3.2 s | ~0.12 s |
| 2.99 MB output flood | 12.8 s | 2.9 s |
For other scenarios (idle key echo, high main thread load), refer to the official documentation. Values vary by environment and should not be extrapolated as a universal conclusion.
Installation and Activation¶
Requires DSH 0.2.1-rc.2+ (Desktop or Web). A DSH host restart is required after installation or update.
Desktop profile installation:
dsh plugin --profile desktop add dsh-fast-term
You can also search for dsh-fast-term in DSH “Settings → Plugin Market”. For local development, you can add the plugin directory via file::
dsh plugin --profile desktop add "file:<path>"
file: installation is a copy, not a symbolic link; after modifying lib/, you need to re-run add or manually overwrite node_modules/dsh-fast-term/lib/ in the profile.
Typical Usage¶
- Open the right sidebar, click “New Terminal” or press
Ctrl + `. - Click the arrow next to the title to select a shell; double-click the tab name to rename.
- Closing a tab terminates the corresponding PTY.
- Click the “Read-only” pill in the top right corner to toggle input permissions.
- Select text to copy; right-click to open the operation menu.
Shell Defaults¶
The default shell fallback order is PowerShell (pwsh → Windows PowerShell → ComSpec). You can override this using the environment variable DSH_FAST_TERM_SHELL or select via the dropdown menu when creating a new terminal.
Shortcuts (Excerpt)¶
| Action | Shortcut |
|---|---|
| New Terminal | Ctrl + ` |
| Copy Selection | Ctrl+C / Ctrl+Shift+C |
| Paste | Ctrl+V |
| Send SIGINT | Ctrl+C (when no selection) |
Fully Replacing Built-in Terminal UI¶
Add the following to the profile patch file (e.g., ~/.dsh/profiles/desktop/cordis.patch.yml):
- id: ui-sidebar-terminal
name: "@deepseek-ai/dsh-client-ui-sidebar-terminal"
disabled: true
After restart, this plugin takes over the terminal entry; deleting this entry restores co-existence.
Reading Terminal Output via Scripts¶
The host port should be based on the actual instance. Example:
curl "http://127.0.0.1:PORT/api/dsh-fast-term/list"
curl "http://127.0.0.1:PORT/api/dsh-fast-term/screen?id=<id>&cols=120&rows=40"
The buffer interface is suitable for viewing tail logs; the screen interface is recommended for full-screen TUIs. Once the buffer exceeds 4 MiB, the oldest output is discarded, and truncated will be marked in the response.
Scenarios and Notes¶
Who it is for: Developers who frequently run shells in the DSH right sidebar, require low-latency echo, want the terminal to persist after page refreshes, or need Agents/scripts to capture the terminal screen in read-only mode.
Permissions and Security: The PTY runs as the user associated with the current DSH process without additional sandboxing, equivalent to opening a system terminal locally. Please review the source code and the MIT license before installation. The HTTP API only accepts loopback addresses and verifies the Origin; do not expose the host port in an untrusted page environment with the same origin. To allow Agents to input to the terminal, you must first unlock “Writable” in the interface.
Compatibility: Verified on DSH 0.2.1-rc.2, relying on sidebarRightTabs and the right-sidebar tab slot; Windows is prioritized, POSIX uses $SHELL -l. Tab names are saved in host memory and reset to shell names after DSH restarts. Replacing the built-in terminal relies on the bundle ID ui-sidebar-terminal; if DSH changes the name in an upgrade, the patch must be updated accordingly.
Ecosystem Note: DSH adopts an “everything is a plugin” extension approach; SkillHub is a community plugin directory and has no official affiliation with DeepSeek or High-Flyer.
Conclusion¶
dsh-fast-term moves the right-sidebar terminal from the shared gateway path to a dedicated PTY WebSocket, adding session persistence, input permissions, and a read-only API. It serves as a parallel or alternative solution to the built-in terminal. For issues and suggestions, please visit GitHub Issues; for versions and updates, see Releases.
- Directory Page: https://www.skillhub.cn/plugins/cyberElar/dsh-fast-term
- Repository: https://github.com/cyberElar/dsh-fast-term