dsh-wdx-relief 0.1.0 → 0.2.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/CHANGELOG.md +5 -0
- package/README.md +2 -1
- package/client/client.js +11 -0
- package/docs/bundle-config.webp +0 -0
- package/docs/guide.md +5 -0
- package/index.js +4 -0
- package/package.json +1 -1
- package/src/style.js +14 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
## 功能
|
|
9
9
|
|
|
10
10
|
- **输入框下一句预测**:对话结束后用灰字猜你接下来要发的话,<kbd>Tab</kbd> 填入;打字隐藏,<kbd>Esc</kbd> 忽略。
|
|
11
|
-
-
|
|
11
|
+
- **回复风格**:默认简短且便于行动;可调输出详细程度、便于行动、参考当前对话的写作风格、基础语气/格式,以及最多 2000 字的自定义指令。
|
|
12
|
+
- **便于行动**(默认开启):先给结果和下一步;能一句说清的不写一段,术语先用白话说明;保留风险、失败条件和已授权该做的工作。
|
|
12
13
|
|
|
13
14
|
## 安装
|
|
14
15
|
|
package/client/client.js
CHANGED
|
@@ -87,6 +87,8 @@ window.__ModuleLoader__.load({
|
|
|
87
87
|
'reply.verbosity.low': '低',
|
|
88
88
|
'reply.verbosity.medium': '中',
|
|
89
89
|
'reply.verbosity.high': '高',
|
|
90
|
+
'reply.actionable.title': '便于行动',
|
|
91
|
+
'reply.actionable.description': '先给结果和下一步,少铺垫;能一句话说清就不展开,术语先用白话说明',
|
|
90
92
|
'reply.writing.title': '参考我的写作风格',
|
|
91
93
|
'reply.writing.description': '参考你在这段对话里的句式、用词和表达方式;只模仿风格,不复制内容',
|
|
92
94
|
'reply.base.title': '整体预设',
|
|
@@ -154,6 +156,8 @@ window.__ModuleLoader__.load({
|
|
|
154
156
|
'reply.verbosity.low': 'Low',
|
|
155
157
|
'reply.verbosity.medium': 'Medium',
|
|
156
158
|
'reply.verbosity.high': 'High',
|
|
159
|
+
'reply.actionable.title': 'Actionable replies',
|
|
160
|
+
'reply.actionable.description': 'Lead with the result and next step; explain jargon in plain language; keep risks and failure conditions',
|
|
157
161
|
'reply.writing.title': 'Reference my writing style',
|
|
158
162
|
'reply.writing.description': 'Mirror your sentence structure, vocabulary, and way of explaining terms in this conversation; style only, not content',
|
|
159
163
|
'reply.base.title': 'Style preset',
|
|
@@ -686,6 +690,13 @@ window.__ModuleLoader__.load({
|
|
|
686
690
|
|
|
687
691
|
h('div', { key: 'writing', className: 'wdxs-group' }, [
|
|
688
692
|
h('div', { key: 'head', className: 'wdxs-groupHead' }, tr(t, 'reply.group.writing', '写作')),
|
|
693
|
+
h(ToggleRow, {
|
|
694
|
+
key: 'actionable',
|
|
695
|
+
title: tr(t, 'reply.actionable.title', '便于行动'),
|
|
696
|
+
description: tr(t, 'reply.actionable.description', ''),
|
|
697
|
+
value: value.actionable !== false,
|
|
698
|
+
onChange: function (next) { update('actionable', next) },
|
|
699
|
+
}),
|
|
689
700
|
h(ToggleRow, {
|
|
690
701
|
key: 'toggle',
|
|
691
702
|
title: tr(t, 'reply.writing.title', '参考我的写作风格'),
|
package/docs/bundle-config.webp
CHANGED
|
Binary file
|
package/docs/guide.md
CHANGED
|
@@ -26,6 +26,7 @@ dsh plugin --profile web add link:/path/to/dsh-wdx-relief
|
|
|
26
26
|
|---|---|---|
|
|
27
27
|
| `enabled` | `true` | 输入框预测开关 |
|
|
28
28
|
| `verbosity` | `low` | `model` / `low` / `medium` / `high` |
|
|
29
|
+
| `actionable` | `true` | 便于行动:先结果/下一步、白话解释术语、保留风险 |
|
|
29
30
|
| `writingStyle` | `false` | 参考当前对话的写作风格 |
|
|
30
31
|
| `baseStyle` | `default` | 7 个基础风格预设之一 |
|
|
31
32
|
| `friendliness` | `default` | `default` / `enhanced` / `reduced` |
|
|
@@ -70,6 +71,10 @@ Host 在 `ctx.systemPrompt` 注册:
|
|
|
70
71
|
`buildStylePrompt` 只输出非默认项,并加一段“只影响表达方式”的前缀。自定义指令最多 2000 字;
|
|
71
72
|
`interpolate: false` 让其中的 `{{...}}` 保持字面量,避免 prompt 装配报错。
|
|
72
73
|
|
|
74
|
+
「便于行动」规则改编自 `agent-configs-skills/skills/i-have-adhd`(MIT):开头给结果/下一步、
|
|
75
|
+
按内容比例组织(句 > 段 > 清单)、术语先用白话说明、保留风险与失败条件、不复述、
|
|
76
|
+
不把已获授权的工作交回用户。
|
|
77
|
+
|
|
73
78
|
## 实机验证记录(DSH 0.2.2-rc.1)
|
|
74
79
|
|
|
75
80
|
- 侧边栏「插件」→ **WDX Relief** bundle 页出现配置区:输入开关、回复长度、写作风格、基础风格、五个语气轴、自定义指令;
|
package/index.js
CHANGED
|
@@ -28,6 +28,10 @@ export const Config = Schema.object({
|
|
|
28
28
|
.default('low')
|
|
29
29
|
.volatile()
|
|
30
30
|
.description('回复详细程度:model 表示不干预,low/medium/high 为固定偏好'),
|
|
31
|
+
actionable: Schema.boolean()
|
|
32
|
+
.default(true)
|
|
33
|
+
.volatile()
|
|
34
|
+
.description('便于行动:先给结果和下一步,少铺垫,保留风险与失败条件'),
|
|
31
35
|
writingStyle: Schema.boolean()
|
|
32
36
|
.default(false)
|
|
33
37
|
.volatile()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-wdx-relief",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Take the friction out of daily DSH work: predicted next messages in the composer, plus reply length, tone, and writing style controls.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
package/src/style.js
CHANGED
|
@@ -67,6 +67,15 @@ const AXIS_LABELS = {
|
|
|
67
67
|
headingsLists: '标题和列表',
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
const ACTIONABLE_LINES = [
|
|
71
|
+
'- 便于行动:开头直接给结果或最相关的下一步,不写「好的」「我来看看」之类铺垫;需要用户操作时,把命令、路径或决定放在显眼位置。',
|
|
72
|
+
'- 能一句话说清的,不写成一段;能一段说清的,不列成清单;多步操作用短编号列表,一步对应一个可完成动作;次要信息放后面。',
|
|
73
|
+
'- 不用复杂名词堆砌代替解释:必须使用术语时,先用一句白话说明它是什么、为什么重要。',
|
|
74
|
+
'- 重要细节、风险和失败条件不因精简而省略;出错时直接说症状、已知原因和下一步。',
|
|
75
|
+
'- 不复述用户已说过或上一轮结论;长任务或中断后,用一句话说明已完成什么、当前卡在哪里。',
|
|
76
|
+
'- 已获授权且工具可执行时直接完成,不把本可代办的工作交回用户;全部完成后自然结束。',
|
|
77
|
+
]
|
|
78
|
+
|
|
70
79
|
const MAX_CUSTOM_CHARS = 2000
|
|
71
80
|
|
|
72
81
|
function read(config, field, fallback) {
|
|
@@ -95,6 +104,10 @@ export function buildStylePrompt(config) {
|
|
|
95
104
|
lines.push(`- ${VERBOSITY_LINES[verbosity]}`)
|
|
96
105
|
}
|
|
97
106
|
|
|
107
|
+
if (read(config, 'actionable', true) === true) {
|
|
108
|
+
lines.push(...ACTIONABLE_LINES)
|
|
109
|
+
}
|
|
110
|
+
|
|
98
111
|
const base = oneOf(read(config, 'baseStyle', 'default'), BASE_STYLE_VALUES)
|
|
99
112
|
if (base !== undefined && base !== 'default') {
|
|
100
113
|
lines.push(`- 基础风格:${BASE_STYLE_LINES[base]}`)
|
|
@@ -127,6 +140,7 @@ export function buildStylePrompt(config) {
|
|
|
127
140
|
/** 供测试与前端读取的选项常量。 */
|
|
128
141
|
export const STYLE_DEFAULTS = {
|
|
129
142
|
verbosity: 'low',
|
|
143
|
+
actionable: true,
|
|
130
144
|
writingStyle: false,
|
|
131
145
|
baseStyle: 'default',
|
|
132
146
|
friendliness: 'default',
|