DDDPG/dsh-plugins--plugins-dsh-tui-command-ext ↗★ 0
dsh-tui-command-ext
DSH web plugin: the TUI-inspired slash-command set for the web harness — /clear /rewind /fork /resume /archive /status /rename /unarchive /compact-fast /theme /lang.
AI 分析
核心用于为DSH网页端引入丰富的快捷斜杠命令。适合习惯TUI操作风格、需要通过可视化弹窗或面板快速管理对话和系统设置的网页端用户。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:DDDPG/dsh-plugins#543d4b046af0c67602be6d16cba7f6ed94239247&path:plugins/dsh-tui-command-extドキュメント
README 全文を読む ↗dsh-tui-command-ext
A DeepSeek Harness web plugin that adds the minimal slash-command set a
normal harness needs, modeled after the command set of
dsh-tui. It merges the former
dsh-clear-command (/clear) and dsh-command-kit (the TUI command set)
into one package, built on the shared pattern (host registers in the
commands registry; client registers commandUi popupSelect
contributions).
Every command is a visual interaction — pickers, an info panel, and a navigation action — nothing echoes text into the conversation.
Part of the dsh-plugins collection.
Commands
Client popup commands (picker/panel opens on /name + Enter or a menu pick)
| Command | Description |
|---|---|
/rewind | Pick one of your recent messages — the session forks at that turn and the child session opens (Claude Code style rewind, backed by sessions.fork). |
/fork | Pick a name for the fork of the current session — the default is fork, numbered when taken ( fork 2, fork 3, …). The child is created, renamed and opened. |
/resume | Pick a session of the current workspace (most recent first) and open it. Archived sessions are marked 🗄 and listed last; picking one first restores it through the host /unarchive command channel, then opens it — the same session comes back with its title and history. |
/archive | Archive the current session (hidden from the workspace; its log stays in storage) and jump to a fresh session entry of the current workspace — a single picker, no second confirmation dialog (the pick itself confirms; restorable via /resume). |
/status | Read-only info panel: session id, title, workspace, agent preset, running state, and live context pressure (from the client-side token projections). Picking any row closes it. |
/theme | Switch the color theme (built-in or custom), applied immediately. |
/lang | Switch the UI language (en / zh), applied immediately. |
Host commands (free-text input / direct execution)
| Command | Description |
|---|---|
/clear | Start a new session — the client half listens for the local command/executed acknowledgment and runs workspaces.startSession(), the same action as the sidebar "New session" button. |
/rename | Pin a new title for the current session — the composer shows a ghost-text hint after /rename , and the sidebar/header title updates live (the session/title domain event owns the payload). |
/unarchive [sessionId] | Restore an archived session to the workspace list (no argument = current session). This is the command channel the /resume picker drives. |
/compact-fast | Fast, rule-based context compression without an LLM call: older tool results become placeholders and thinking blocks are stripped. Complements the LLM-summary /compact (untouched). |
Why
/unarchiveis a visible command. dsh's command catalog has no hidden-command support, andsession.command(...)is the only client→host RPC a plugin can use — so the/resumerestore path needs a registered host command. It doubles as a manual restore (/unarchivewith no argument restores the current session), but the primary entry point is the/resumepicker.
What is deliberately NOT included
Already provided by the harness or other plugins: /goal, /feedback,
/export, /model, /plan and /compact (the latter two mount per-agent
from the standard agent preset).
How it works
- Host half (
lib/index.js) registers/clear(its navigation runs on the client),/rename(free-text input needs the host command claim machinery),/unarchive(the restore command channel the/resumepicker drives) and/compact-fast(the non-LLM compaction pass needs the live session and the host-plane token meter). - Client half (
lib/client.js) registers therewind/fork/resume/archive/status/theme/langpopupSelect contributions throughctx.commandUi— the same mechanism the product's/modelcommand uses — and listens forcommand/executedto perform the/clearnavigation.options()failures andonSelect()failures surface as in-popup error text./statusreads the session list snapshot and thecontextPressureprojection entirely on the client;/archiveis a single picker (no second dialog);/forkforks viasessions.forkand renames the child through its session face.
Install
# from the collection root
./scripts/install.sh web plugins/dsh-tui-command-ext
Manual equivalent: pnpm --dir ~/.dsh/profiles/web add /plugins/dsh-tui-command-ext
and append {id: tui-command-ext, name: 'dsh-tui-command-ext'} to
~/.dsh/profiles/web/cordis.patch.yml (the running server hot-applies it).
Replacing the old plugins: remove the clear-command and command-kit
inserts from ~/.dsh/profiles/web/cordis.patch.yml and run
pnpm --dir ~/.dsh/profiles/web remove dsh-clear-command dsh-command-kit.
Then refresh the browser page once so the client bundle loads. The commands survive server restarts because the patch file is part of the profile's boot composition.
Uninstall
Remove the tui-command-ext insert from ~/.dsh/profiles/web/cordis.patch.yml
and run pnpm --dir ~/.dsh/profiles/web remove dsh-tui-command-ext.