跳到正文

tomowang/dsh-tui

40最近提交 2026年8月15日

dsh-tui DSH 插件

dsh-tui 是 DeepSeek Harness 的开源终端前端。它渲染持久化会话日志,行输入映射到代理收件箱,并提供状态栏、统计行和多种检查器。它作为 Cordis 插件包运行,叠加在 dsh-base 之上。

如何安装 dsh-tui DSH 插件

dsh plugin --profile tui add @tomowang/dsh-tui

复制不会执行命令。安装 dsh-tui DSH 插件前请核对仓库和版本。

dsh-tui DSH 插件数据来源

dsh-tui DSH 插件快照日期:2026年8月16日

discovered

dsh-tui DSH 插件能做什么

  • 状态栏显示会话 ID、当前模型、代理预设、运行状态和队列消息数。
  • 统计行显示轮次/步骤计数、LLM/工具耗时、TTFT、解码 tok/s、缓存命中率、计费 token 和上下文使用摘要。
  • /model 命令管理 LLM 提供商:切换模型、添加、编辑或删除自定义提供商(路由、基础 URL、API 密钥、模型发现)。
  • /presets 命令浏览和切换代理预设(会话第一轮运行后固定)。
  • 会话检查器:/trajectory(轮次/步骤事件账本,带详情视图和过滤)、/context(上下文窗口使用分解)、/plugins(已加载的 Cordis 插件树和纤程状态)。
  • 通过 Shift+Tab 循环权限预设(read-only、workspace-write、danger-full-access、custom)。
  • 手动压缩会话历史(/compact 命令)。
  • 跨进程持久化提示历史,通过上下箭头键回忆。
  • 类 Readline 输入:单词/行移动、删除/粘贴、多行草稿、双击 Ctrl+C/Ctrl+D 退出。

dsh-tui DSH 插件适合哪些场景

  • 在终端环境中与 AI 代理交互,无需浏览器。
  • 通过检查轨迹、上下文和插件状态调试代理会话。
  • 管理多个 LLM 提供商并即时切换模型。
  • 使用单个快捷键控制会话权限级别。
  • 使用 --resume 标志恢复之前的会话,查看完整历史。

dsh-tui DSH 插件适合谁

  • 使用 DeepSeek Harness 的开发者与研究人员。
  • 偏好终端而非浏览器进行代理交互的高级用户。
  • 需要通过终端自动化或脚本化代理交互的用户。

dsh-tui DSH 插件的限制

  • 需要 Node.js ^22.19 || >=24 和 DEEPSEEK_API_KEY。
  • stdin 和 stdout 必须为真实 TTY;管道会回退到 headless 配置。
  • 部分功能(如 /presets、/model)依赖底层服务在配置中加载。

dsh-tui DSH 插件的仓库 README 摘录

以下文字摘自 dsh-tui DSH 插件的上游仓库 tomowang/dsh-tui 的 README,版权归原作者,仅作引用。

An open-source terminal front door for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`). `@tomowang/dsh-tui` is an **out-of-tree mode bundle**: it stacks on `@deepseek-ai/dsh-base` exactly like the shipped `dsh-web-app` and `dsh-headless` bundles do, but drives the agent from your terminal instead of a browser. The package is both a Cordis plugin (terminal input and presentation) and a dsh bundle (`dsh.bundle.patch` in `package.json` points at [`cordis.patch.yml`](cordis.patch.yml)); everything else — model adapters, tools, session persistence, sandbox and approval policy — stays in `dsh-base` and remains patchable underneath. ![dsh-tui session in a terminal, showing the startup banner, injected context, and tool calls](assets/screenshot.png) <details> <summary>Screencast</summary> <video src="assets/screencast.mp4" controls width="100%"></video> If the player above doesn't render, watch/download it directly: [assets/screencast.mp4](assets/screencast.mp4) </details> ## How it works - The TUI renders **only from the durable session log**: it replays `agent.session.events` on startup and follows `session/event` live, so `--resume` shows the exact hi

阅读完整 README仓库许可: MIT

dsh-tui DSH 插件常见问题

如何安装 dsh-tui?

首先全局安装 dsh 启动器:npm install -g @deepseek-ai/dsh。然后创建配置文件并添加该包:dsh plugin --profile tui add @tomowang/dsh-tui。最后在配置清单中声明包栈,运行 dsh --profile tui 即可。

如何在 dsh-tui 中切换模型?

在 TUI 中输入 /model 命令。它会打开一个提供商管理界面,你可以切换当前激活的模型,或添加、编辑、删除自定义 LLM 提供商(包括路由、基础 URL、API 密钥和模型发现)。

能否恢复之前的会话?

可以,运行 dsh --profile tui --resume <sessionId>。TUI 启动时会重放持久化的会话日志,因此之前会话的所有历史会完整显示。

退出 dsh-tui 的快捷键是什么?

在空闲空行上,两秒内连续按两次 Ctrl+C 即可退出。同样,在空闲空行上两秒内连续按两次 Ctrl+D 也可退出。或者输入 /exit 或 /quit。

dsh-tui 是否支持 SSH 或管道?

stdin 和 stdout 必须是真实 TTY。如果使用管道输入或重定向输出,插件会直接报错,此时应使用 headless 配置(dsh --profile headless)。通过 SSH 使用时,只要保持 TTY 即可正常工作。