WASD258-jpg/dsh-prompt-inject0

@wasd258/dsh-prompt-inject

DSH 会话级系统提示词注入器,支持模板库、按会话选择及新会话默认模板

AI 分析

提供会话级别的系统提示词管理与注入功能。用户可通过斜杠命令快速应用、保存或删除提示词模板,适合需要频繁切换不同角色或任务引导词的用户。

包名
@wasd258/dsh-prompt-inject
版本
0.1.2
许可证
NOASSERTION
最近更新
2026年8月15日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

Usage

Commands

CommandDescription
/prompt (or status/list/?)Show current prompt, default template, and library
/prompt use Apply / detach a template for the current session
/prompt save Save a template (name = single whitespace-free token; rest of the line = text)
/prompt delete Delete a template (also clears it as default if it was)
/prompt default Set / clear the default template for new sessions

Example session (output as emitted by the plugin; ids are auto-generated as slugified-name + 4-char base36 timestamp, e.g. code-reviewer-9k2m):

/prompt
当前会话提示词:「Code Reviewer」(code-reviewer-9k2m)
默认模板:(无)
模板库:
  code-reviewer-9k2m「Code Reviewer」(120 字) ← 当前会话
  safety-auditor-1b7e「安全审查员」(85 字)

用法:
  /prompt use        —— 当前会话应用 / 移除模板
  /prompt save        —— 保存新模板
  /prompt delete          —— 删除模板
  /prompt default    —— 设置新会话默认模板

/prompt use code-reviewer-9k2m
当前会话已应用「Code Reviewer」(下一轮生效)。
/prompt use none
当前会话已移除提示词(下一轮生效)。
/prompt save 安全审查员 You are a strict safety auditor.
模板已保存:安全审查员-abc1「安全审查员」
使用:/prompt use 安全审查员-abc1
/prompt delete safety-auditor-1b7e
模板已删除:safety-auditor-1b7e
/prompt default code-reviewer-9k2m
默认模板已设置:code-reviewer-9k2m(此后新会话自动应用)。
/prompt default none
已清除默认模板。
/prompt use missing-id
模板不存在:missing-id(/prompt list 查看)

UI

  • Composer tool row → "会话提示词" dropdown: pick the current session's template ("提示词:无" = none). Applied immediately; effective on the next request; refreshes from the server every 5 seconds.
  • Settings → "会话提示词模板": create / edit / delete templates (delete asks for confirmation) and set the new-session default template.
  • Settings → "系统提示词": pick a live session, view its assembled prompt grouped by layer (global / preset / session / injected); an amber warning appears when the preset's complete persona blocks injection.

prompt_inject tool

The model can manage prompts itself via the prompt_inject tool ("Per-session system prompt injection… Changes take effect on the NEXT model request of that session"):

actionRequired paramsEffect
getCurrent template, default template, full library
applytemplateId ("none" detaches)Set / detach the current session's template
savename, text; optional templateId, orderCreate a template, or update if templateId matches an existing one
deletetemplateIdRemove a template
defaulttemplateId ("none"/"" clears)Set the new-session default