dsh-prompt 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 王辰浩
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # ⚡ dsh-prompt
2
+
3
+ **🌐 [中文](README.md) · [English](docs/README.en.md)**
4
+
5
+ **DeepSeek Harness 的 Prompt 调色板:24 条深度模板、自定义管理、/prompt 触发源、智能推荐悬浮卡——点一下,插入当前对话。**
6
+
7
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
8
+ [![npm](https://img.shields.io/npm/v/dsh-prompt)](https://www.npmjs.com/package/dsh-prompt)
9
+ [![dsh-plugin](https://img.shields.io/badge/dsh-plugin-orange.svg)](https://github.com/FeatherHunter/dsh-prompt)
10
+ [![platform](https://img.shields.io/badge/platform-DeepSeek%20Harness-1f6feb.svg)](https://github.com/deepseek-ai/DeepSeek-Harness)
11
+
12
+ ![hero](assets/hero-zh.svg)
13
+
14
+ ## 痛点
15
+
16
+ 写对话时最烦的三件事:**想不起来用什么 Prompt**、**满屏找历史记录里那条好用的**、**复制粘贴改来改去**。
17
+
18
+ dsh-prompt 解决它:**点一下,模板正文就进输入框**——不用记忆、不用搜索、不用复制粘贴。
19
+
20
+ ## 一条命令安装
21
+
22
+ 需要 **DSH CLI**(DeepSeek Harness 命令行工具)。还没有就先装:
23
+
24
+ ```bash
25
+ npm install -g @deepseek-ai/dsh
26
+ ```
27
+
28
+ 安装进你的 profile:
29
+
30
+ ```bash
31
+ dsh plugin --profile web add dsh-prompt
32
+ ```
33
+
34
+ **零配置**:DSH 官方 bundle 机制,包内自带 `cordis.patch.yml`,`dsh plugin add` 自动加入 `dsh.profile.bundles` 装配层;`dsh plugin remove` 干净卸载。重启 DSH(或刷新页面)即生效。
35
+
36
+ ## 它是什么
37
+
38
+ - **预制 24 条深度 Prompt**(思考框架 10 / 学习 3 / 工程 4 / 执行 7):第一性原理拆解、苏格拉底式追问、对抗式审查、决策博弈分析、费曼技巧、MECE 拆解、代码审查、测试用例设计、零丢失快照、过程复盘……全部**冒号表单式**:正文 = 指令段 + 字段段,字段是一行「标签:」,你在冒号后直接输入,零删除。
39
+ - **自定义模板**:+新增、编辑、删除(仅限自建 + 二次确认)、预制一键「复制为自定义」。
40
+ - **/prompt 触发源**:输入框直接输 `/prompt`,继续输入即按 名称/正文/领域/阶段/动作/标签 过滤,回车或点选即插入。
41
+ - **智能悬浮卡**:全局一个低调圆点(可拖动、位置记忆);输入命中模板时从圆点向右上展开推荐卡,点整行即填入;**不捕获键盘**,Enter 发送不受影响。
42
+ - **场景标签**:每模板带 领域×阶段×动作 三维标签,面板按阶段分组 + 领域筛选 + 搜索。
43
+ - **跟随 DSH**:字体、字号、颜色跟随主题;界面双语(中文/English);数据本地持久化。
44
+
45
+ ## /prompt——输入即达
46
+
47
+ ![prompt trigger](assets/prompt-trigger-zh.svg)
48
+
49
+ ## 智能悬浮卡——匹配即出
50
+
51
+ ![smart card](assets/smart-card-zh.svg)
52
+
53
+ 评分 = 专属词×2 + 通用词×1,**≥2 分才出卡**(宁缺毋滥);≤3 候选(top-2 匹配 + 最近使用);插入后**光标定位到第一个字段的冒号后**,直接开写。
54
+
55
+ ## 30 秒上手
56
+
57
+ **输入框左侧 ⚡Prompt 按钮** → 面板展开 → 点任意模板 → 插入(光标处优先、不覆盖),面板自动关闭:
58
+
59
+ - tabs:全部 / 执行前 / 执行中 / 执行后 / 自定义
60
+ - 领域行:全领域 / 思考框架 / 学习 / 工程 / 执行
61
+ - 搜索:按名称 / 正文 / 标签
62
+ - 📌 置顶(≤5)、+新增、编辑/删除(仅自定义)、复制为自定义
63
+
64
+ **输入框直接输 `/prompt`** → 斜杠菜单列出(含自定义)→ 回车 / 点选插入。
65
+
66
+ **智能模式(默认开)**:匹配出卡 → 点整行填入 → × 收起回圆点;设置里可关。
67
+
68
+ ## 设置
69
+
70
+ **设置 → 提示词模板**(设置面板直属页):
71
+
72
+ - 顶部:**GitHub 仓库** / **反馈故障**(一键跳转)
73
+ - **智能模式悬浮卡**开关
74
+ - **模板管理**:完整 CRUD
75
+
76
+ ## 开发
77
+
78
+ ```bash
79
+ npm run build:client # tsdown → lib/client.js
80
+ npm run build # 完整构建
81
+ ```
82
+
83
+ 源码 `src/client/*`(面板/触发源/智能匹配/词表/设置页);匹配引擎与 /prompt 共用数据与排序基础;决策记录见 [issue #1(wayfinding map)](https://github.com/FeatherHunter/dsh-prompt/issues/1)。
84
+
85
+ ## 参与贡献
86
+
87
+ 新预制模板(冒号表单式)、词表打磨、UI 细节、文档翻译——Issue / PR 都欢迎。
88
+
89
+ ## 许可
90
+
91
+ MIT © FeatherHunter。
@@ -0,0 +1,7 @@
1
+ # dsh-prompt bundle 层:插入宿主加载器插件条目。
2
+ # 由 dsh plugin --profile <name> add 自动装配(包声明 dsh.bundle.patch),
3
+ # 无需手动编辑任何文件;dsh plugin remove 时自动移除。
4
+ - insert:
5
+ - id: dsh-prompt
6
+ name: 'dsh-prompt'
7
+ config: {}