
mervyn-teo/dsh-plugin-terminal
31最近提交 2026年8月15日
dsh-plugin-terminal DSH 插件
dsh-plugin-terminal 为 DSH Web 界面添加了一个完整的基于 PTY 的终端。它通过 node-pty 运行真实的 shell(Windows 上为 PowerShell,其他平台为 $SHELL 或 /bin/bash),并使用 xterm.js 在可折叠的底部面板中渲染。插件支持实时调整大小、键盘快捷键,以及主题、字体和 shell 的运行时设置。
如何安装 dsh-plugin-terminal DSH 插件
dsh plugin --profile web add github:mervyn-teo/dsh-plugin-terminal复制不会执行命令。安装 dsh-plugin-terminal DSH 插件前请核对仓库和版本。
dsh-plugin-terminal DSH 插件数据来源
dsh-plugin-terminal DSH 插件快照日期:2026年8月16日
discovered
dsh-plugin-terminal DSH 插件能做什么
- 运行真实的交互式 shell(Windows 上为 PowerShell,其他平台为 $SHELL 或 /bin/bash),通过 PTY 实现。
- 通过 xterm.js 渲染 ANSI 颜色、光标移动和全屏应用(vim、htop、top 等)。
- 提供 VS Code 风格的可折叠底部面板,带有可拖拽调整大小的顶部边缘、重启按钮和折叠开关。
- 支持键盘快捷键 Ctrl+` 切换面板。
- 在设置 → 插件中提供终端设置卡片,可运行时配置主题、字体大小、面板高度、透明度、启动时折叠、shell 和工作目录。
- 具有优雅降级:如果 xterm.js 无法加载(离线),纯文本流视图仍能暴露真实的 shell。
dsh-plugin-terminal DSH 插件适合哪些场景
- 开发者在 DSH Web 界面中需要快速访问 shell 时使用。
- 直接在 harness UI 中运行命令行工具、脚本或监控工具(如 htop)。
- 测试 shell 命令或调试服务器端进程,无需离开浏览器。
- 将终端用作持久环境以执行长时间运行的任务(但重启 harness 后会话会重置)。
- 自定义终端外观和行为以匹配个人工作流程偏好。
dsh-plugin-terminal DSH 插件适合谁
- 偏好集成终端而非切换到独立终端模拟器的 DSH 用户。
- 在 harness 环境中频繁使用命令行操作的开发者和系统管理员。
dsh-plugin-terminal DSH 插件的限制
- 终端首次渲染需要从 jsDelivr CDN 加载 xterm.js;首次展开需要网络连接(纯文本回退在离线时可用)。
- 会话是进程级别的,重启 harness 后不会持久保存。
- 在 Windows 上,默认 shell 是 powershell.exe;要使用命令提示符,必须将 shell 设置为 cmd.exe 并传入 shellArgs: []。
- WebSocket 路由是回环绑定的,与 Web GUI 的其他部分一样。
dsh-plugin-terminal DSH 插件的仓库 README 摘录
以下文字摘自 dsh-plugin-terminal DSH 插件的上游仓库 mervyn-teo/dsh-plugin-terminal 的 README,版权归原作者,仅作引用。
English | [中文](README.zh.md) A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) Web plugin that adds a **real** interactive terminal — a VS Code-style collapsible panel docked to the footer. This plugin runs an actual shell in a PTY and streams the raw terminal bytes to the browser. It is a persistent bundle plugin (a host half plus a browser half) that loads on every boot. ## Demo <p align="center"> <img src="assets/demo.gif" alt="dsh-plugin-terminal demo — a real terminal in the footer" width="640"> </p> ## What it does - **Actual terminal** — a real interactive shell (PowerShell on Windows, `$SHELL`/`/bin/bash` elsewhere, by default) running in a PTY via the harness's `subprocess.spawnTerminal` primitive (node-pty). - **Full terminal rendering** — xterm.js renders ANSI colors, cursor movement, full-screen apps (`vim`, `htop`, `top`, …), and 256-color output. - **VS Code-style footer panel** — a collapsible bottom panel with a header, drag-to-resize top edge, restart button, and collapse toggle. - **Keyboard shortcut** — `Ctrl+`` `` toggles the panel (the VS Code default). - **Live resize** — the PTY reflows when you resize the panel. - **A
阅读完整 README仓库许可: MIT
dsh-plugin-terminal DSH 插件常见问题
如何安装终端插件?
在 DSH 环境中运行 `dsh plugin --profile web add github:mervyn-teo/dsh-plugin-terminal`,然后重启 `dsh web`。该插件是一个捆绑包,会在启动时加载。你也可以查看 `cordis.patch.yml` 文件了解默认设置。
没有网络时能用终端吗?
可以,但有限制。首次展开终端面板时,它会尝试从 jsDelivr CDN 加载 xterm.js。如果网络不可用,纯文本流视图仍然会暴露真实的 shell,但缺少完整的 ANSI 渲染。你也可以提前下载 xterm.js 资源来避免在线需求。
在 Windows 上如何将 shell 从 PowerShell 改为命令提示符?
在设置 → 插件 → 终端卡片中,将 'Shell' 选项设置为 `cmd.exe`,并将 'Shell Args' 设置为空数组 `[]`。或者,你也可以在启动 DSH 之前修改 `cordis.patch.yml` 中的默认值。该插件在 Windows 上默认使用 `powershell.exe`。
终端会话在重启 DSH 后能持久保存吗?
不能。终端会话是进程级别的,绑定当前 harness 实例。重启后会话会丢失,你需要重新打开终端。这是该插件的已知限制。
打开终端的快捷键是什么?
默认快捷键是 `Ctrl+`(反引号),与 VS Code 的切换终端快捷键一致。如果有多个插件使用相同的组合键,你可能需要在 DSH 配置中调整快捷键。