dsh-kaomoji 0.1.2 → 0.1.3
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 +8 -0
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/lib/index.js +20 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/zh-CN/
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.3] - 2026-09-13
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- `maxPerTurn` 之前对输出没有实际约束力:提示词写死「一个」,调到 2/3 也不会变。
|
|
15
|
+
现在 `frequent` 会按该上限在回复里分散放置多个颜文字,`auto` 在存在多个
|
|
16
|
+
情绪点时也会用到上限;回复很短时自动少放。
|
|
17
|
+
|
|
10
18
|
## [0.1.2] - 2026-09-10
|
|
11
19
|
|
|
12
20
|
### Changed
|
package/README.en.md
CHANGED
|
@@ -104,7 +104,7 @@ Example `cordis.patch.yml`:
|
|
|
104
104
|
| --- | --- | --- | --- |
|
|
105
105
|
| `mode` | `'off' \| 'auto' \| 'frequent'` | `'auto'` | `off` disables; `auto` adds one to greetings, casual chat, recommendations and empathetic replies; `frequent` adds one to every conversational reply (code-only/formal replies excluded) |
|
|
106
106
|
| `placement` | `'inline' \| 'end'` | `'inline'` | Put the kaomoji after the best-matching sentence, or at the reply end |
|
|
107
|
-
| `maxPerTurn` | `number` (1–5) | `1` | Max kaomoji per reply |
|
|
107
|
+
| `maxPerTurn` | `number` (1–5) | `1` | Max kaomoji per reply; `frequent` distributes that many across different sentences (fewer in very short replies) |
|
|
108
108
|
| `customPrompt` | `string` | `''` | Extra style/scene guidance; cannot change mode, whitelist or limits |
|
|
109
109
|
| `settingsFile` | `string` | `~/.dsh/dsh-kaomoji.json` | (advanced) user-settings file path |
|
|
110
110
|
| `settingsAuthority` | `'trusted-host' \| 'loopback'` | `'trusted-host'` | Settings RPC trust scope: by default the local Host plus declared trusted hosts (Tailscale/LAN) may write; set `loopback` to restrict to the local machine |
|
package/README.md
CHANGED
|
@@ -120,7 +120,7 @@ pnpm add file:C:\path\to\dsh-kaomoji
|
|
|
120
120
|
| --- | --- | --- | --- |
|
|
121
121
|
| `mode` | `'off' \| 'auto' \| 'frequent'` | `'auto'` | `off` 关闭;`auto` 寒暄/闲聊/推荐建议/共情回复都会带一个;`frequent` 每条对话回复都带一个(两者都跳过纯代码 / 正式技术交付) |
|
|
122
122
|
| `placement` | `'inline' \| 'end'` | `'inline'` | 放在情绪最贴切的句子/短段后,或固定在回复末尾 |
|
|
123
|
-
| `maxPerTurn` | `number`(1–5) | `1` |
|
|
123
|
+
| `maxPerTurn` | `number`(1–5) | `1` | 每条回复的颜文字数量上限;`frequent` 会按这个数量分散放在不同句子后,回复太短时自动减少 |
|
|
124
124
|
| `customPrompt` | `string` | `''` | 附加风格/场景说明;不能改变模式、白名单或数量上限 |
|
|
125
125
|
| `settingsFile` | `string` | `~/.dsh/dsh-kaomoji.json` | (进阶)用户设置持久化文件路径 |
|
|
126
126
|
| `settingsAuthority` | `'trusted-host' \| 'loopback'` | `'trusted-host'` | 设置 RPC 信任范围:默认允许本机与 Host 声明的受信主机(Tailscale/局域网)保存设置;改成 `loopback` 则仅本机可改 |
|
package/lib/index.js
CHANGED
|
@@ -144,20 +144,32 @@ export function buildGuidance(config) {
|
|
|
144
144
|
const settings = normalizeConfig(config);
|
|
145
145
|
if (settings.mode === "off") return "";
|
|
146
146
|
|
|
147
|
+
const cap = settings.maxPerTurn;
|
|
147
148
|
const modeLines = {
|
|
148
149
|
auto: [
|
|
149
|
-
"Most conversational replies should include
|
|
150
|
+
"Most conversational replies should include a fitting kaomoji — greetings, casual chat, empathy, everyday recommendations or shopping advice, and practical how-to answers.",
|
|
151
|
+
cap === 1
|
|
152
|
+
? "Use one kaomoji in those replies."
|
|
153
|
+
: `Use one kaomoji when the mood fits, and up to ${String(cap)} when the reply has several distinct emotional beats.`,
|
|
150
154
|
"Skip it only when the reply is purely code, a formal/technical deliverable, or serious/high-stakes content.",
|
|
151
|
-
"One per reply is usually enough; never replace real content with it.",
|
|
152
155
|
],
|
|
153
156
|
frequent: [
|
|
154
|
-
"In every conversational reply — except code-only output, formal/technical deliverables, or tool calls — include
|
|
157
|
+
"In every conversational reply — except code-only output, formal/technical deliverables, or tool calls — include fitting kaomoji.",
|
|
158
|
+
cap === 1
|
|
159
|
+
? "Use exactly one kaomoji."
|
|
160
|
+
: `Use ${String(cap)} kaomoji, one after each of ${String(cap)} different emotion-carrying sentences; use fewer only when the reply is very short.`,
|
|
155
161
|
],
|
|
156
162
|
};
|
|
157
|
-
const placementLine =
|
|
158
|
-
|
|
163
|
+
const placementLine = settings.placement === "end"
|
|
164
|
+
? cap === 1
|
|
159
165
|
? "Put the kaomoji at the very end of the reply (same line after a space, or on its own line)."
|
|
160
|
-
: "Put
|
|
166
|
+
: "Put each kaomoji at the end of a different paragraph (after the sentence it matches), not all on the final line."
|
|
167
|
+
: cap === 1
|
|
168
|
+
? "Put it right after the sentence or short paragraph whose mood it matches best."
|
|
169
|
+
: "Put each kaomoji right after a different sentence or short paragraph whose mood it matches best.";
|
|
170
|
+
const spreadLine = cap > 1
|
|
171
|
+
? "Distribute the kaomoji across the reply; never put two in the same sentence, and do not stack them all at the very end."
|
|
172
|
+
: "Never replace real content with a kaomoji.";
|
|
161
173
|
|
|
162
174
|
const poolLines = CATALOG.map(
|
|
163
175
|
(group) => `${group.label}: ${group.examples.join(" | ")}`,
|
|
@@ -168,7 +180,8 @@ export function buildGuidance(config) {
|
|
|
168
180
|
"[dsh-kaomoji] Kaomoji guidance for this reply:",
|
|
169
181
|
...modeLines[settings.mode],
|
|
170
182
|
placementLine,
|
|
171
|
-
|
|
183
|
+
spreadLine,
|
|
184
|
+
`Never exceed ${String(cap)} kaomoji in one reply.`,
|
|
172
185
|
"Never place a kaomoji inside code blocks, inline code, links, tables, or tool output.",
|
|
173
186
|
"Use only the literal kaomoji listed below, copied character-for-character; do not invent, mutate, or re-combine them.",
|
|
174
187
|
...poolLines,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-kaomoji",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Add mood-aware Japanese kaomoji to DeepSeek Harness (dsh) replies; prompt-injection plugin with a curated library from kaomojiya.org.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|