NelsonLongxiang/dsh-prompt-templates 预览 preview

NelsonLongxiang/dsh-prompt-templates

资源Resource 原生Native ⭐ 3 浏览器BrowserWeb 界面Web UI

Quick prompt templates for DeepSeek Harness: global and per-session templates, a right-side panel, and Python-backed SQLite persistence

项目介绍Project Overview

该 DSH 插件为 DeepSeek Harness 提供快速提示词模板管理,类型为资源类。核心能力:支持全局与按会话模板,浏览器右侧面板一键插入或立即发送,并采用纯 TS 通过 node:sqlite 持久化存储。使用场景:频繁复用提示词并区分跨会话与单次使用。注意:插入仅追加至草稿末尾,不支持光标位插入;无当前会话时仅可见全局模板。

A DSH resource plugin that adds prompt template management to DeepSeek Harness. It offers global and per-session templates, a right-side browser panel for insert or send-now actions, and pure-TS persistence through node:sqlite in the host process. Use it when reusing prompts across or within conversations. Caveat: insert appends to the draft (no caret insertion), and session templates are unavailable without an active session.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin --profile web add @nelsonlongxiang/dsh-prompt-templates

NelsonLongxiang/dsh-prompt-templates 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

@nelsonlongxiang/dsh-prompt-templates

English | 中文

npm

Quick prompt templates for DeepSeek Harness: global and per-session templates, a right-side browser panel, and pure-TS SQLite persistence via node:sqlite — one self-contained plugin, installable with dsh plugin.

The templates panel

Install

dsh plugin --profile web add @nelsonlongxiang/dsh-prompt-templates

Restart dsh web, then look for the templates button in the composer tool row.

No Python toolchain required — since 0.3.0 the host half persists templates through node:sqlite (Node ≥ 24) directly inside the host process, reading and writing the same $DSH_HOME/ext/prompt-templates/db.sqlite3 the former Python child owned (zero data migration).

What you get

  • Global + per-session templates — globals apply everywhere; session templates stay private to one conversation and can be promoted to global in one click
  • Insert or send — one click appends the template into the draft; send-now dispatches immediately; edit, delete, and make-global all live in the row
  • Search & scroll — filter the list as you type, reliable scrolling for long collections
  • Drag to reposition, double-click to reset — the panel remembers where you put it
  • Durable by design — templates persist in SQLite through a pure-TS store (node:sqlite) owned by the host plugin and closed with its lifecycle

How it works

src/                  TypeScript plugin (host half + browser half)
  index.ts            Host: owns the TS store, exposes the HTTP routes
  store.ts            Pure-TS template store over node:sqlite
  client/             Browser: panel UI registered into shell.overlay and
                      conversation.input.right
cordis.patch.yml      Bundle patch: mounts the plugin row

The store is pure TS inside the host half; no child process is spawned.

Security

  • Template content reaches a model request only as ordinary user text the user chose to insert — no automatic injection into any prompt
  • The panel talks to the host store over the Host's plugin routes only; no extra listener, no outbound network

Development

pnpm install
pnpm verify            # typecheck
pnpm build             # tsc host + tsc client + tsdown browser bundle

Known limitations

  • Insert appends to the draft — caret-position insert is deferred
  • Session templates need a current session — with no session open, only global templates are reachable

License

MIT

上一个 Prev dsh-subagent-profile 下一个 Next dsh-data-quality