DDDPG/dsh-plugins--plugins-dsh-tui-command-ext0

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 Analysis

核心用于为DSH网页端引入丰富的快捷斜杠命令。适合习惯TUI操作风格、需要通过可视化弹窗或面板快速管理对话和系统设置的网页端用户。

Package
dsh-tui-command-ext
Version
0.1.0
License
MIT
Last updated
Aug 15, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:DDDPG/dsh-plugins#543d4b046af0c67602be6d16cba7f6ed94239247&path:plugins/dsh-tui-command-ext

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)

CommandDescription
/rewindPick one of your recent messages — the session forks at that turn and the child session opens (Claude Code style rewind, backed by sessions.fork).
/forkPick 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.
/resumePick 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.
/archiveArchive 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).
/statusRead-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.
/themeSwitch the color theme (built-in or custom), applied immediately.
/langSwitch the UI language (en / zh), applied immediately.

Host commands (free-text input / direct execution)

CommandDescription
/clearStart 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-fastFast, 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 /unarchive is a visible command. dsh's command catalog has no hidden-command support, and session.command(...) is the only client→host RPC a plugin can use — so the /resume restore path needs a registered host command. It doubles as a manual restore (/unarchive with no argument restores the current session), but the primary entry point is the /resume picker.

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 /resume picker 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 the rewind / fork / resume / archive / status / theme / lang popupSelect contributions through ctx.commandUi — the same mechanism the product's /model command uses — and listens for command/executed to perform the /clear navigation. options() failures and onSelect() failures surface as in-popup error text. /status reads the session list snapshot and the contextPressure projection entirely on the client; /archive is a single picker (no second dialog); /fork forks via sessions.fork and 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.