@xmoon76/dsh-pi-tui
Third-party TUI mode for DeepSeek Harness (dsh --profile pi-tui), built on a vendored pi-tui fork: covers the main session loop plus approvals, commands, session switching and full-text search, as well as presets, skills, model/settings menus and slash commands.
Install
dsh plugin --profile web add @xmoon76/dsh-pi-tui
Sandbox test results
| Stage | Result |
|---|---|
| 1 install | ✓ |
| 2 list | ✓ |
| 3 mount | ✓ |
| 4 boot | — |
Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).
README
dsh-pi-tui
[English](README.en.md) | 简体中文


基于 Pi TUI 的 DeepSeek Harness 终端前端。
dsh-pi-tui 作为独立的 dsh bundle 安装到 profile 中,提供流式对话、工具调用、会话管理、Subagent、历史搜索、Shell、审批与设置等终端交互。模型、工具、Session、权限、Skills、Plan、Goal、Subagent 等运行时能力仍由 DeepSeek Harness 提供。
安装到 DSH Profile
Stable / latest
稳定版是普通用户的推荐渠道。请先安装 DSH,再将 TUI 添加到 pi-tui profile:
npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty @deepseek-ai/dsh@latest dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest dsh --profile pi-tui
Next / npm 线(验证)
预览安装使用 DSH 的 alpha channel 与 TUI 的 next channel;安装 DSH
时需要显式允许其原生安装脚本:
npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty @deepseek-ai/dsh@alpha dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@next dsh --profile pi-tui
这两个 channel 今天不构成可安装的兼容 pair。 它们只是通道指针:当前
@deepseek-ai/dsh@alpha指向0.2.1-alpha.5,而@xmoon76/dsh-pi-tui@next
仍指向0.5.2-rc.1(peer floor>=0.2.0-rc.2,npm semver 不接受不同
major.minor.patch tuple 的 prerelease)。请以下方版本对应表和
[兼容性指南](docs/guides/dsh-compatibility.md) 的通用匹配原则为准;稳定版 0.5.5 发布在
@latest而不是@next,因此这两个移动 channel 上没有可安装的兼容组合。
本 checkout 的精确验证请使用 pnpm compat:dsh:npm。
隔离的 npm 驱动仍按本 checkout 声明的精确 DSH 版本运行,并执行完整的
build/test/package 路径:
pnpm compat:dsh:npm
具体的稳定版最低版本、next 兼容范围和回退路径见[兼容性指南](docs/guides/dsh-compatibility.md)。
环境要求
- DeepSeek Harness
- Node.js
^22.19.0 || >=24
DSH 与 TUI 版本对应(重要)
TUI 包版本 · 对应的官方 DSH tags · 说明
0.5.5(stable / @latest) · dsh-v0.2.1-rc.2、dsh-v0.2.1-rc.3、dsh-v0.2.1-rc.4、dsh-v0.2.1-rc.5 · 当前稳定版;最低 DSH 版本为 0.2.1-rc.2,本仓库当前 checkout 的精确验证目标为 0.2.1-rc.5
0.5.4(stable,历史) · dsh-v0.2.1-rc.2、dsh-v0.2.1-rc.3、dsh-v0.2.1-rc.4 · 上一稳定版;最低 DSH 版本为 0.2.1-rc.2,已在该三个 DSH 版本通过官方 preset assembly
0.5.3(stable,历史) · dsh-v0.2.1-rc.2、dsh-v0.2.1-rc.3、dsh-v0.2.1-rc.4 · 上一稳定版;最低 DSH 版本为 0.2.1-rc.2,已在该三个 DSH 版本通过官方 preset assembly
0.5.1(stable,历史) · dsh-v0.2.0-rc.2 · 上一稳定版;最低与精确验证目标均为 0.2.0-rc.2 family
0.5.2-rc.1(next 通道预览,已发布) · dsh-v0.2.0-rc.2 · 上一轮 next 预览:已发布到 npm next 通道(2026-10-17);整套 peer floor 仍是 >=0.2.0-rc.2,不覆盖 0.2.1-rc.2
dsh-v0.2.1-rc.1(无配对 TUI) · 无 · 该中间版本没有本矩阵宣称兼容的已发布 TUI;不要为它复用 0.5.5
0.5.0(stable,历史) · dsh-v0.1.7-rc.2、dsh-v0.2.0-rc.1 · 上一稳定版;最低 0.1.7-rc.2,精确验证目标 0.2.0-rc.1
0.4.9(stable,历史) · dsh-v0.1.7-rc.2 · 上一稳定版;0.1.7-rc.2 runtime 的兼容 TUI
0.4.8(stable,历史) · dsh-v0.1.7-rc.1 · 上一稳定版;0.1.7-rc.1 runtime 的兼容 TUI
0.4.6(stable,历史) · dsh-v0.1.5-rc.1、dsh-v0.1.5-rc.2 · 上一稳定版;0.1.5 runtime 的兼容 TUI
0.4.7-alpha.2(next,历史) · dsh-v0.1.6-alpha.2 · 上一条 next 线;0.1.6-alpha.2 runtime 的兼容 TUI
不要把稳定线与 @next 预发布线混装。0.5.5 是当前稳定版:它的最低 DSH
版本(peer floor)仍是 0.2.1-rc.2 family,本仓库当前 checkout 的精确验证目标
是 0.2.1-rc.5。已发布的 0.5.4、0.5.3 是上一稳定版,同样可与
0.2.1-rc.2、0.2.1-rc.3、0.2.1-rc.4 配对使用。从旧的稳定版升级到 0.5.5
的安全顺序:先让进行中的对话回合与后台任务正常结束,再正常退出旧的
TUI/DSH 进程,然后用官方 plugin 命令安装 0.5.5 并重新启动;不要在旧版本
进程仍活跃运行时直接安装新包并期待零中断热替换,本版不承诺对运行中的旧
Host 做原地无损升级。中间的
dsh-v0.2.1-rc.1 没有配对 TUI,0.5.2-rc.1 是上一轮已发布到 npm next 通道的
预览身份(配对 0.2.0-rc.2;它不覆盖 0.2.1-rc.2)。上一稳定版 0.5.1 继续配对
0.2.0-rc.2:它把整个 DSH peer floor 提升到 >=0.2.0-rc.2(Question 生命周期消费
rc.2 才发布的公开契约)。更早的 0.5.0
保持 >=0.1.7-rc.2 floor 不变(精确验证目标 0.2.0-rc.1);旧 runtime 会在正常的
不兼容边界以非零状态失败,请按上表安装配对的 TUI 线。上方的版本对应表是已发布
线的摘要;通用版本匹配原则与回退/诊断流程见[兼容性指南](docs/guides/dsh-compatibility.md);要查看 @next 的最新集成
状态,请看 next 分支 README。
新的 Agent preset 使用当前 roster 中选定的 id。DSH 允许合法的自定义
code preset;只要当前 roster 存在它,显式输入和持久化状态都会保留 code。
DSH V3 migration 负责历史 session header/selection 的 code -> ptc 转换;
当前 projection 会原样保留合法的自定义 code。省略请求的 legacy settings
default 不再做任何别名映射:当前 roster 没有声明就是无效偏好。
Profile management
更新已安装的 TUI:
dsh plugin --profile pi-tui -- update @xmoon76/dsh-pi-tui
查看已安装插件:
dsh plugin --profile pi-tui -- list
卸载:
dsh plugin --profile pi-tui -- remove @xmoon76/dsh-pi-tui
恢复已有 Session:
dsh --profile pi-tui --session <session-id>
功能
对话与工具
- 流式 Markdown 输出
- Thinking 折叠与展开
- Tool Call 卡片及运行状态
- Tool / System 详情折叠
- Transcript 全文搜索
- 长会话历史折叠
- Context、Token、模型和运行状态显示
- 全屏 Settings 工作区:About 状态、Models / Account、Agent 与动态 Extensions
- Approval 与
ask_user_question交互 - 图片:终端能力准入、JPEG/WebP 预览、草稿图片与只读查看器
- 图表/SVG 工具、
present_visual发布与最终回答内联显示 - 交付文件尾部与
/deliverables浏览器 - 实验性 TSP renderer:原生工具卡、Work Hub、图片与已发布图
- Plan Review
- Todo / Goal 状态展示
- 可读的终端窗口标题
- 长会话按有界窗口浏览,并保留翻页与实时跟随位置
- 超长用户 Prompt 默认折叠为 head + marker + tail;普通与全屏非 Focus 下
Ctrl+O展开、收回 - Compaction / prune 后不会出现重复的幽灵 Tool Card
Ctrl+O 控制工具和系统详情,并在普通模式与全屏非 Focus 下展开/收起超长用户 Prompt;全屏 Focus 下它整体展开最近几个 Thought root 或全部收起,超长用户 Prompt 改用点击提示行(或搜索命中)展开、Ctrl+O 收回。Alt+T 单独控制 Thinking。
工具审批显示在编辑器座位:完整 Reason/Arguments 在可滚动正文中阅读(不再只显示前六行),y 允许一次、n 拒绝、Esc/Ctrl+C 取消、c 复制原始参数、e 展开;全屏可点击实际绘制的 Allow once / Reject / Cancel 并滚轮滚动正文,普通模式保持键盘。窄窗口显示真实精简内容或 Resize to inspect more,不会画出被裁掉的决定。
Conversation display
/display 在三种展示预设间切换:full(默认)是普通 Transcript 展示;focus 将当前回合的 Thinking、Tool Call 和中间回复聚合为一个实时更新的 Thought 区块;compact 把连续的过程折叠为带 Header + Think: / Action: 预览的 Activity 段,会话与 assistant 的中间输出仍按时间顺序可见,注入的 notice / relay / recall 改为独立呈现(相邻的环境类注入合并为可展开的 Context 簇),展开用鼠标点击或 Ctrl+O。/settings 的 Display 行提供同一组取值并持久化;/focus 仍作为兼容命令保留。
需要查看过程时可以展开,关闭 Focus 后恢复普通 Transcript 展示。全屏 Focus 中可以按 Thought root 批量展开/收起,也可以单独点击卡片;切换或缩放时会保留 viewport。展示预设只影响界面投影,不修改 Session 中保存的事件。
沟通策略
/settings 提供两个独立的沟通设置。Progress updates 控制 Agent 工作时的中途更新节奏:milestones(默认)只在完整的阶段结束、方向实质变化或需要用户输入时简短汇报
…(truncated)
Rendered from the README published on npm. Formatted only, not edited.
Versions
Published on npm::35,最后更新 2026-11-03