dsh-plugin-tui
Interactive terminal UI for DeepSeek Harness: a Claude Code-style REPL over a resumable coding-agent session
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ghbhiee/dsh-plugin-tui说明文档
阅读完整 README ↗Usage
dsh --profile tui # start at the prompt
dsh --profile tui "explain this file" # send a first message, then stay interactive
dsh --profile tui -r # resume the latest tui session here
dsh --profile tui -s # resume a specific session
dsh --profile tui -w ./scratch # new session in another directory
dsh --profile tui -l # list this profile's sessions here
dsh --profile tui -p danger-full-access # full access from launch (no sandbox, no prompts)
dsh --profile tui -p workspace-write -y # sandboxed, but approvals auto-allowed
Inside the REPL:
| Input | Meaning |
|---|---|
/exit, /quit, Ctrl-D | leave (flushes the session first) |
/session | print the session id |
/sessions | pick a session interactively (↑/↓ move, Enter switches, Esc cancels); /sessions list prints the static list |
/resume | switch to another session in place (index from /sessions list, or an id prefix) |
/history [n] | reveal n earlier exchanges of the current session (switching in shows only the most recent ones) |
/new | start a fresh session, releasing the current one |
/title [text] | show the session title, or rename it (a rename pins the title) |
/model [id] | pick a model interactively (↑/↓, Enter, Esc) or hot-switch by name (id or provider/id) — takes effect from the next step |
/effort [id] | pick reasoning effort interactively, or set by name (/effort default restores the provider default) |
/help | built-ins plus every harness-registered command |
| Ctrl-C while a turn runs | cancel the turn, stay in the REPL |
| Ctrl-C twice while idle | leave |
y / N at an approval prompt | allow / reject one gated tool call |
/approvals [ask|auto] | auto allows every request with a dim audit line (the sandbox still applies); ask restores prompts. dsh --profile tui -y starts in auto |
a number (or free text) at a ⁇ question | pick an option / answer in your own words; multi-select takes comma-separated numbers |
A status bar pinned to the terminal's bottom row shows the live model and
effort, the approvals mode, the session title, and the working directory —
it refreshes as those change and survives resizes; the transcript scrolls
above it. Thinking is collapsed by default — the spinner area shows a live
three-line window over the reasoning stream, and ctrl+o toggles the full
dim stream.
/model and /effort choices are remembered per profile (tui-model.json
beside the profile; the machine-wide default is never touched) — /model default clears the preference.
Tool calls always render as one task-summary line (⏺ Group counts (+14 lines)); the full command or script goes to the same per-turn detail stream
ctrl+o reveals. The toggle only ever covers the current (or just-finished)
exchange — starting a new one clears it.
Resuming or switching to a session replays its recent exchanges statically
(never re-running anything); /history pages further back, and your
terminal's own scrollback covers the rest. The prompt appears in well under a
second — MCP servers connect in the background and their tools join late.
While a turn runs, a braille spinner covers quiet stretches; token deltas are
micro-batched (~16ms) so heavy streams stay smooth. Answer text renders as
markdown, a line at a time — bold headings, colored bullets and inline code,
green fenced code blocks. Tool calls render through each tool's own presenter —
⏺ $ ls -la — List files, ⏺ Write foo.txt — with the ⏺ colored by the
call's category (read, edit, execute, …), falling back to a compact
raw-arguments line for tools without one. Todo snapshots draw as a ☑/◐/☐
checklist, each exchange ends with a dim ↳ 1.2k in · 89 out accounting line,
and prompt history persists across runs (up-arrow recalls earlier inputs).
Ctrl-C works as a keystroke because raw-mode readline owns the terminal; the
launcher's own SIGINT handler still answers an external kill -INT with a full
teardown, which is the behavior you want from outside the TUI.