dsh-tui-pi
September 1, 2026 · View on GitHub
dsh-tui-pi
pi-style terminal UI for DeepSeek Harness (dsh) — a plugin suite that turns dsh into a pi-like coding-agent experience: pi-tui look & feel, dsh slash commands, GitHub light/dark themes and a powerline footer.
Requires dsh >= 0.1.2-alpha.4 — the plugin targets the 0.1.2-alpha host line only (the rc line is no longer supported; see ADR 0002).
https://github.com/user-attachments/assets/6a7e00bb-1fd0-4bc5-9070-457f1e9fa54d
A live recording of a session (MP4, 1.5× speed) — todos, running subagents, think/tool panels and the powerline footer in action.
✨ Features
Each item links to its own doc under
docs/features/— one line here, the details (and demo videos) there.
- Footer — live session overview — provider/model, context pressure and the session cache-hit rate at a glance, always in view.
- Think & tool panels — reasoning and tool activity stay out of the transcript, so the conversation reads clean.
- Subagents — every running subagent gets a status line; watch and steer it live.
- Ask User Question — the model can pause and ask you structured questions, answered without leaving the TUI.
- Feishu integration — dsh-tui-pi on the desktop and Feishu/Lark on the phone driving (and answering for) the same dsh session.
- Dynamic context pruning (DCP) — context stays within limits automatically, with zero LLM calls.
- Persistent context — your ground rules ride along on every request, hot-applied with no restart.
- Model profiles & favorites — switch a whole model setup per project and keep the picker small.
- Agent preset switching —
Tab//presetbetween the shipped agent compositions (standard,minimal, …); what a preset really gates, and exactly when a switch takes effect. - Sessions & resume — sessions stay tidy automatically and resume in a few keystrokes; a cross-process writer guard keeps the log single-writer.
- Themes — GitHub light/dark palettes, hot-switchable;
autofollows your terminal. - Search, selection & images —
Ctrl+Shift+Fover the whole transcript, drag-select copies to the OS clipboard, attachments from web/Feishu render inline, LaTeX replies draw as Unicode math. - Slash commands —
/model,/resume,/btw,/profile-switch, … plus everything dsh-native. - Startup plugin tree — every profile plugin with its installed npm version, printed at launch.
Install and launch
dsh plugin --profile tui add @aiwayds/dsh-tui-pi
dsh plugin --profile tui add @aiwayds/dsh-subagent-registry # optional
dsh plugin --profile tui add @aiwayds/dsh-dcp # optional
dsh --profile tui # launch (or: dsh-tui-pi)
Everything that used to need manual patching — the canvas background, the @deepseek-ai module closure, the compaction backend — now happens automatically. Upgrade an existing profile after a release:
node scripts/dev-upgrade.mjs # latest
node scripts/dev-upgrade.mjs 1.0.5 --dry-run # preview the plan first
Companion plugins
- @aiwayds/dsh-ask-router — ships as a default dependency; fans every
ask_user_questionout to all answering surfaces (TUI panel, Feishu card) and the first answer wins. List it in the profile'sbundlesbefore the UI bundles to activate. - @aiwayds/dsh-feishu — optional; drives the same dsh session from Feishu/Lark on your phone (demo).
- @aiwayds/dsh-mcp-adapter — optional; folds MCP tool schemas out of every prompt and adds the
/mcpcommand (demo).
Keyboard shortcuts
| Key | Action |
|---|---|
Enter | Send the prompt |
Esc | Double-press to stop (single press arms; a popup open closes it instead) |
Ctrl+C | Mid-turn: first press cancels, second quits; idle: clears editor / quits. Held-key auto-repeat never quits. |
Ctrl+D | Quit (only when the editor is empty) |
Ctrl+L | Open the model/think picker |
Ctrl+G | Open the subagent picker (viewer Enter opens steer) |
Ctrl+O | Pending-message queue (s steer now · d remove) |
Ctrl+Shift+F | Transcript search (Enter/Ctrl+G next · Shift+Enter/Ctrl+Shift+G previous · Esc close) |
Tab | Cycle agent presets |
↑ / ↓ | Browse submitted-message history |
Remap any app key through ~/.dsh/keybindings.json (a partial JSON map, live-applied) or interactively with /hotkeys.
Configuration
Session-store knobs under the dsh-tui settings namespace in ~/.dsh/settings.yaml (each also has an env override, DSH_TUI_RETENTION_* / DSH_TUI_RESUME_*; precedence: settings.yaml > env > default):
dsh-tui:
retention: # startup janitor for ~/.dsh/sessions — DELETES old logs. Once per startup.
maxCount: 100 # <= 0 disables the janitor
maxAgeDays: 7
minIdleHours: 24
resume: # /resume display filter — only HIDES picker rows, never deletes.
maxAgeDays: 7
minBytes: 20480
Other knobs: dsh-tui.panelHeight (think/tool panel height), dsh-tui.iconSet (auto/nerdfont/plain — powerline glyphs adapt to your font; install a Nerd Font with node scripts/install-font.mjs), dsh-tui.footerHints (toggle each footer hint segment, incl. search), DSH_TUI_COPY_ON_SELECT=0 (keep drag-selection visual-only), ~/.dsh/keybindings.json (key remaps).
Development
pnpm check # tsc --noEmit
pnpm build # emit lib/
pnpm test # unit tests, node --test against lib/ (pretest builds; 1020 tests across 55 files)
pi-tui runs pristine from npm — no patches, no fork. See AGENTS.md for the iron rules and quality gates.
Documentation
- docs/features/ — one doc per feature, with demo videos.
- ARCHITECTURE.md — full design: process model, layers, data flow.
- HANDOFF.md — session history and current state (Chinese).
- CHANGELOG.md — release history.
- AGENTS.md — working conventions and quality gates for contributors.
- docs/ — design notes (steer/follow-up flow, showcase drafts, …).
Credits
The Ask User Question interaction is inspired by juicesharp/rpiv-ask-user-question (adapted to this TUI's docked-panel and dsh userQuestions provider architecture; all code here is original).