dsh-prompt-shelf:在 DSH 输入框工具行里管理常用提示词

Introduction

In DeepSeek Harness (DSH), repeatedly writing similar prompts—code review templates, requirement breakdown sentences, descriptions with placeholders—usually involves copying snippets from old conversations or relying on browser bookmarks and external notes. This content doesn’t go into the input box context, and changes require syncing in multiple places. dsh-prompt-shelf collects common prompts into the bottom toolbar of the input box: search within the list, insert at the cursor or replace the entire box, supports {{variable}} and a trash can, and data is stored locally in the host directory, not relying on localStorage isolated by origin.

What is This

dsh-prompt-shelf is a community-maintained DSH plugin (maintainer: taoziliyouchong, MIT license, current package version 0.1.4). It adds an “Common Prompts” entry (with a count) to the bottom of the session input box card and to the right of “Full Permissions” on the blank page of a new session. Categorically, it belongs to the “Memory” category in the DSH community directory, solving the problem of quickly storing and reusing prompt templates in local sessions, connecting with the DSH input box draft API, without modifying the editor DOM.

Entry and Interface

The interface is mounted on the conversation.input.left slot (session scope, rendered after permission/plan). After opening the list, it is an overlay window (createPortal to document.body to avoid input box container clipping); it can be closed via the top-right ×, clicking the dark area outside the window, or Esc (during editing, Esc exits editing first).

Core Features

Save, Write, Find, Use, Edit, Delete

  • Save: “Save current input” saves the existing content in the input box as an entry; the button is disabled when the box is empty or identical to existing body text.
  • Write: “New” writes title and body within the window; after saving, it is listed at the front of the card.
  • Find: The top search box filters by title and body.
  • Use: “Insert” on the right side of the card header appends content at the cursor; “Replace” replaces the whole box with that entry’s body. Insert doesn’t close the window, allowing multiple selections.
  • Edit: Expand card to edit title and body; when title is empty, it automatically takes the first line of the body.
  • Delete: Entry goes to trash can, retained by default for 3 days; “Trash” on the right side of the toolbar can view remaining days and restore with one click. Retention days can be modified between 1-365, and after modification, expired items are cleaned based on the new rules.

Variable Templates

Use {{name}} or {{name=default}} in the body. When using the card, that position becomes an input box: filled value is used on insertion, default value if not filled; variables with the same name share the same value. Enter @ in the variable box to reference workspace files (see @ Selection below).

What you see when editing is the original text with {{...}}. “Variable +” appears below the body box when creating or editing; after moving the cursor to the target position and clicking, it inserts {{variable}} and selects the word “variable” for renaming. Alt+V (or Ctrl+Alt+V) inside the body box has the same effect, only active in that box.

@ References

  • @ in Task Input Box: Only “Common Prompts” appears initially; after selection, the entry list expands, and selecting an entry places the body at the cursor. After expanding, filtering by keywords is possible; after closing with Esc, drafts may leave residual @Common Prompts, which can be deleted.
  • @ in New/Edit Card Title/Body: Candidates are divided into “Common Prompts / Files and Folders / Conversations / Plugins”; Title box inserts entry name, Body box inserts the full paragraph; Files and Folders inserts @path (directories end with a slash, use @"path" if the path contains spaces).
  • @ in Card Variable Box: Same classification; selecting “Common Prompts” fills the full paragraph, selecting a file fills @path; after insertion or replacement into the task input box, the model reads the content according to the @ reference.

Data Storage

The real source is on the host side $DSH_HOME/data/dsh-prompt-shelf/state.json (write to .tmp first then rename, old files left with .bak). It is read/written via the plugin’s local router; the browser side also saves localStorage cache (key dsh.prompt-shelf.v1) for the first screen. Stored separately from the plugin package, reinstalling or upgrading the plugin doesn’t affect entries. The plugin doesn’t go online or upload content.

The host registers three local routers that only accept loopback addresses: GET/POST /dsh-prompt-shelf/api/state (read/write entries), GET /dsh-prompt-shelf/api/files (list workspace files by query word, recursive 3 levels, max 400 items), GET /dsh-prompt-shelf/api/plugins (third-party plugins in the plugin loader’s real-time table).

Installation and Enablement

Requires DSH >= 0.2.1-alpha.1; README notes verified on 0.2.1-alpha.3, 0.2.2-rc.1, higher versions unverified. Suitable for desktop or dsh web.

Install from GitHub Desktop profile:

dsh plugin --profile desktop add github:taoziliyouchong/dsh-prompt-shelf

Can also add after publishing to npm:

dsh plugin --profile desktop add dsh-prompt-shelf

Restart DSH after installation. If using other profiles, replace desktop in the command with your profile name.

The plugin runs with the current dsh process permissions; it is recommended to check source code and MIT license on the GitHub repository before installing, and confirm environment meets engines.dsh and Node requirements (package.json: node is ^22.19.0 || >=24.0.0, dsh is >=0.2.1-alpha.1).

Typical Usage

  1. Write a common prompt in the input box, open “Common Prompts”, and click “Save current input” to archive.
  2. When needed, open the list, search by title or body, click “Insert” on the target card to splice into the current draft, or click “Replace” to use the whole box.
  3. For fragments that need frequent changes, write {{ProjectName=DefaultName}} in the card body, fill in the value in the variable box before insertion.
  4. Use @ in the variable or body to select a workspace file path, allowing the model to read the file content via DSH’s @ mechanism.

Applicable Scenarios and Limitations

Suitable for DSH users who need to frequently reuse prompt templates in local sessions and wish to integrate with input box drafts and @ references.

Known limitations (from README):

  • Max 5000 entries, single write limit 1MB, exceeding this will be rejected with a prompt.
  • Only available on local loopback addresses; when accessing DSH remotely, relevant routes return 403.
  • “Replace” overwrites all existing content in the input box; “Insert” does not.

The community directory site (e.g., skillhub.cn) has no official affiliation with DeepSeek or Hongfang, it is an independent listing within the community “Everything is a Plugin” ecosystem.

Feedback and Links

For issues, follow README suggestions: first open an Issue at https://github.com/taoziliyouchong/dsh-prompt-shelf/issues; or QQ 2171960697 (please specify the installed plugin). When providing feedback, it is recommended to include DSH version, plugin version, error message, and screenshots.

  • Community directory page: https://www.skillhub.cn/plugins/taoziliyouchong/dsh-prompt-shelf
  • Source code and docs: https://github.com/taoziliyouchong/dsh-prompt-shelf

dsh-prompt-shelf collects prompts to the side of the input box toolbar: local persistence, search and variable templates, insertion/replacement and @ linkage, suitable for moving repetitive work from the clipboard back to inside DSH sessions.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye