npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-tui-command-ext

v0.1.0

Published

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.

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 <title> fork, numbered when taken (<title> 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 <title> | 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 (session.command('/unarchive <id>')) — the only client→host RPC available to plugins, and the user-verified restore path. The dsh-workspace registry has no public unarchive API, so the handler runs its internal enqueueOperation → setState transaction (the shape archiveSession itself uses) to drop the id from archivedSessionIds; the browser's archived-sessions mirror refreshes automatically. | | /compact-fast | Fast, rule-based context compression without any LLM call (mirrors Qwen Code's /compress-fast): tool results older than the 5 most recent become short placeholders (tool-call pairing intact), and reasoning/thinking blocks are stripped from assistant messages. Replacement events drop the provider usage sample so the context-pressure meter (which re-samples on assistant/message usage) keeps seeing the compressed surface — the UI context percentage drops immediately. No compression needed → "No compression needed."; agent running → busy error. Uses the official model-free prune protocol (compaction/prune + surface replace), so shadow pricing and replay stay correct. Complements the LLM-summary /compact (which stays 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 <path>/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.