dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
VS Code–style PTY terminal panel for the DeepSeek Harness Web UI, with tabs, reconnectable sessions, and xterm.js.
A VS Code-style bottom terminal panel for the DeepSeek Harness (DSH) Web GUI.
vim, python, and top work as expected.Ctrl/Cmd + click.This is an interactive terminal for the person using the web page. It is separate from DSH agent persistent terminals exposed as
ctx.terminals.
@deepseek-ai/dsh with the Web profile, installed or runnable through npxws is installed as a package dependency. Building also requires linking peer dependencies from the DSH profile.
Run the following from the repository root:
npm run link-deps # once: link dependencies from the DSH profile
npm run vendor # once: download and copy xterm.js assets
npm run build # build the host, client, and static assets
npm test # run the test suite
This repository contains only the plugin; it does not provide the dsh command. First confirm that the DSH CLI is available:
npx @deepseek-ai/dsh --help
Use the DSH CLI to add the package to the Web profile and mount the bundled cordis.patch.yml:
npx @deepseek-ai/dsh plugin --profile web add /path/to/dsh-terminal-plugin
npx @deepseek-ai/dsh plugin --profile web add git+https://github.com/zjuatri/dsh-terminal-plugin.git
If @deepseek-ai/dsh is installed globally, replace npx @deepseek-ai/dsh at the start of each command with dsh.
For a local checkout that needs to be mounted manually, add the following entry to the Web profile's cordis.patch.yml:
- insert:
- id: dsh-terminal-plugin
name: "file:///absolute/path/to/dsh-terminal-plugin/lib/index.js"
Restart dsh web after installing or changing the host-side plugin. A browser refresh is sufficient for client-only UI changes.
+ button in the panel toolbar to add tabs.Terminal sessions run in the DSH host process. Refreshing the browser, a brief network interruption, or hiding and reopening the panel does not stop running commands.
Links in the output are underlined and show a pointer cursor. Hold Ctrl (Cmd on macOS)
and click to open one, matching the VS Code integrated terminal:
| Detected | Example | Opens as |
|---|---|---|
| URL with a scheme | http://localhost:3000, https://example.com/a?b=1 | a new tab |
Bare localhost address | localhost:5173/app (how dev servers usually print it) | http:// is added, then a new tab |
| Absolute file path | D:\repo\src\index.ts:12:3, /home/u/app/main.js:7 | a file:// address (the line and column are left for the editor) |
For safety only http, https, and ftp are opened; javascript:, data:, and file: are
never opened, because terminal output is untrusted content and must not become a code-execution
entry point. Relative paths such as ./a.ts are not treated as links either, since there is no
base directory to resolve them against.
Hovering a link shows the underline, a pointer cursor, and a “Ctrl+click to open …” hint. A plain click without the modifier opens nothing and never leaks through to the terminal selection. Link hit areas are computed in terminal columns, so wide characters (CJK) that occupy two cells do not shift the link sideways.
Right-clicks inside the terminal are handled by the plugin, matching the VS Code integrated terminal (the browser's own context menu does not appear):
| State when right-clicked | Behavior |
|---|---|
| Something is selected | Copy it to the system clipboard and clear the selection |
| Nothing is selected | Read the clipboard and paste it into the terminal (newlines converted per terminal semantics) |
Pasting goes through xterm's paste path, so bracketed paste and friends behave exactly as with
Ctrl+V. If the browser denies clipboard access (for example outside a secure context) it fails
silently: no error, no damaged terminal.
The following options are commonly useful:
| Option | Default | Description |
|---|---|---|
mountPrefix | /dsh-terminal | HTTP and WebSocket path prefix for the plugin |
shellPath | auto-detected | Absolute path to the interactive shell |
shellArgs | auto-selected | Shell start-up arguments |
cwd | current workspace | Working directory for new terminals; supports the {cwd} placeholder |
env | {} | Additional environment variables |
rows / cols | 24 / 80 | Initial terminal dimensions |
scrollbackBytes | 262144 | Output bytes retained for reconnect replay |
idleCloseAfterMs | 0 | Time without attachments before closing; 0 disables automatic closing |
maxTerminals | 20 | Maximum simultaneous terminal sessions |
See src/config.ts for the complete configuration definition.
A terminal is equivalent to a shell opened by the user on the host machine, so only trusted users should have access. Its HTTP and WebSocket requests reuse DSH Web's Host/Origin checks and Cookie authentication. In the uncommon environments where that capability is unavailable, only loopback requests are accepted.
Do not expose the plugin endpoint to untrusted networks or bypass DSH authentication.
scrollbackBytes of output is replayed; older output cannot be restored.Source files are in src/; build artifacts are in lib/. Before committing, run:
npm run build
npm test
The project is licensed under MIT. Bundled xterm.js and its add-on are also MIT licensed; see vendor/README.md.