前言¶
在 DSH 的插件擴展方式裏,終端交互經常要同時處理模型、上下文、工具活動、子代理、會話和主題。dsh-tui-pi 把這些終端側能力集中到一個插件包裏:它給 dsh 提供一套 pi-style terminal UI,包含 pi-tui look & feel、dsh slash commands、GitHub light/dark themes 和 powerline footer。
下面介紹它的定位、安裝方式、典型用法和需要注意的地方。需要說明的是,社區目錄是獨立站點,不等同於官方應用商店。
這是什麼¶
dsh-tui-pi 是一個面向 DeepSeek Harness(dsh)的插件。安裝使用的包名是:
@aiwayds/dsh-tui-pi
已覈實的版本與環境信息如下:
- 要求 dsh 版本不低於
0.1.2-rc.1 - alpha line 不再支持
package.json聲明engines爲node >=22.19.0- 許可證爲
MIT
啓動時會有一個 host 版本檢查:如果當前 dsh 低於要求版本,插件會執行 startup guard 並乾淨退出。如果確實需要跳過這個檢查,可以設置:
DSH_TUI_SKIP_HOST_CHECK=1
核心功能¶
下面列出已覈實的功能點:
- Footer:底部顯示 live session overview,包括
provider/model、context pressure和session cache-hit rate。 - Think & tool panels:提供 Think 面板和 tool 面板。
- Subagents:爲運行中的 subagent 提供 status line,並支持 live steering。
- Ask User Question:模型可以暫停並提出結構化問題,回答過程不離開 TUI。
- Feishu integration:提供 Feishu 集成;可選插件爲
@aiwayds/dsh-feishu。 - Dynamic context pruning (DCP):提供動態上下文裁剪。
- Persistent context:提供持久化上下文。
- Model profiles & favorites:提供模型配置與收藏。
- Agent preset switching:提供 agent preset 切換。
- Sessions & resume:提供會話與恢復能力。
- Themes:提供 GitHub light/dark palettes,支持 hot-switchable;
auto會跟隨 terminal。 - Search, selection & images:提供搜索、選擇和圖片相關能力。
- Slash commands:提供 slash commands。
- Startup plugin tree:啓動時展示 plugin tree。
安裝與啓用¶
先確認環境滿足要求:
dsh >= 0.1.2-rc.1
node >=22.19.0
alpha line 不支持
安裝插件:
dsh plugin --profile tui add @aiwayds/dsh-tui-pi
啓動對應的 TUI profile:
dsh --profile tui
如果已經安裝過,並且插件升級後需要處理已有 profile,可以執行:
node scripts/dev-upgrade.mjs
也可以先預覽升級計劃:
node scripts/dev-upgrade.mjs 1.0.5 --dry-run
默認 companion plugins 會隨包提供,但是否啓用仍按 profile 的 bundles list 處理。
如果要額外安裝 topics memory 插件,可以使用:
dsh plugin --profile tui add @aiwayds/dsh-topics-memory
典型用法¶
常用按鍵如下:
Tab:切換 agent presetsCtrl+Shift+F:transcript searchCtrl+G:打開 subagent pickerEsc:雙擊停止
按鍵映射可以通過配置文件調整:
~/.dsh/keybindings.json
也可以使用交互式 slash command:
/hotkeys
會話相關配置放在:
~/.dsh/settings.yaml
其中與 dsh-tui 命名空間相關的兩個配置項是:
dsh-tui.retention:作爲 startup janitor 處理~/.dsh/sessions,會刪除舊日誌。dsh-tui.resume:只隱藏 picker rows,不會刪除。
適用場景與注意¶
適合以下場景:
- 已經在用 dsh,希望把終端交互集中到一個 TUI 裏。
- 需要 footer、subagents、sessions、themes、slash commands 這些終端側能力。
- 需要 Feishu integration,並願意評估可選插件
@aiwayds/dsh-feishu。
使用前注意:
- 插件會以當前 dsh 進程權限運行。安裝前建議檢查源碼與許可證。
- 該插件聲明的許可證是
MIT。 - 它面向 dsh
0.1.2-rc.1及以上線,不支持 alpha line。 dsh-tui.retention有刪除行爲,啓用前應確認~/.dsh/sessions中的內容。- 社區目錄不是官方應用商店,與 DeepSeek / 幻方無官方從屬關係。
相關鏈接¶
- 社區目錄:
https://www.skillhub.cn/plugins/fan56/dsh-tui-pi - GitHub:
https://github.com/fan56/dsh-tui-pi