WASD258-jpg/dsh-prompt-inject ↗★ 0
@wasd258/dsh-prompt-inject
Per-session system prompt injection for DSH: template library, per-session picker, default template for new sessions. 会话级系统提示词注入器:模板库、按会话选择、新会话默认模板。
AI 분석
提供会话级别的系统提示词管理与注入功能。用户可通过斜杠命令快速应用、保存或删除提示词模板,适合需要频繁切换不同角色或任务引导词的用户。
설치
검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗
Usage
Commands
| Command | Description |
|---|---|
/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"):
| action | Required params | Effect |
|---|---|---|
get | — | Current template, default template, full library |
apply | templateId ("none" detaches) | Set / detach the current session's template |
save | name, text; optional templateId, order | Create a template, or update if templateId matches an existing one |
delete | templateId | Remove a template |
default | templateId ("none"/"" clears) | Set the new-session default |