dsh-plain-talk 0.1.8 → 0.1.9
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.en.md +3 -3
- package/README.md +4 -4
- package/dsh/index.js +3 -4
- package/dsh/rules.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.en.md
CHANGED
|
@@ -70,9 +70,9 @@ Restart DSH after installing.
|
|
|
70
70
|
## Use
|
|
71
71
|
|
|
72
72
|
1. Open any session; a smiley speech-bubble icon appears to the right of the permission selector in the composer.
|
|
73
|
-
2.
|
|
73
|
+
2. Off by default (plain smile); one click turns it into the open smile with three sound waves, meaning this session is on. Affects only the current session.
|
|
74
74
|
3. State is written to `$DSH_HOME/plain-talk.json` and survives a restart.
|
|
75
|
-
4. To make new sessions start
|
|
75
|
+
4. To make new sessions start on: set `PLAIN_TALK_DEFAULT=on` in the launch environment.
|
|
76
76
|
|
|
77
77
|
## Vocabulary
|
|
78
78
|
|
|
@@ -113,7 +113,7 @@ Only `$DSH_HOME/plain-talk.json` and `$DSH_HOME/plain-talk-vocab.json` are writt
|
|
|
113
113
|
|
|
114
114
|
## Configuration
|
|
115
115
|
|
|
116
|
-
Only the environment variable `PLAIN_TALK_DEFAULT` (`on` / `off`, default `
|
|
116
|
+
Only the environment variable `PLAIN_TALK_DEFAULT` (`on` / `off`, default `off`).
|
|
117
117
|
|
|
118
118
|
## Notes
|
|
119
119
|
|
package/README.md
CHANGED
|
@@ -70,9 +70,9 @@ dsh plugin --profile desktop add ./dsh-plain-talk
|
|
|
70
70
|
## 使用
|
|
71
71
|
|
|
72
72
|
1. 打开任意会话,输入框权限选择器右侧会多一个笑脸气泡图标。
|
|
73
|
-
2.
|
|
73
|
+
2. 默认关闭(微笑版);点一下变成带三道声波的张嘴笑脸,表示当前会话已开启。只影响当前会话。
|
|
74
74
|
3. 状态写在 `$DSH_HOME/plain-talk.json`,重启后保持。
|
|
75
|
-
4.
|
|
75
|
+
4. 想让新会话默认开启:启动环境里设 `PLAIN_TALK_DEFAULT=on`。
|
|
76
76
|
|
|
77
77
|
## 词汇清单
|
|
78
78
|
|
|
@@ -113,14 +113,14 @@ dsh plugin --profile desktop add ./dsh-plain-talk
|
|
|
113
113
|
|
|
114
114
|
## 配置
|
|
115
115
|
|
|
116
|
-
只有环境变量 `PLAIN_TALK_DEFAULT`(`on` / `off`,默认 `
|
|
116
|
+
只有环境变量 `PLAIN_TALK_DEFAULT`(`on` / `off`,默认 `off`)。
|
|
117
117
|
|
|
118
118
|
## 注意
|
|
119
119
|
|
|
120
120
|
* 按钮位置依赖 `conversation.input.left`,宿主改版后可能移到其它左侧控件旁。
|
|
121
121
|
* 规则是提示词约束,`plain_talk_check` 只提醒、不拦截发送。
|
|
122
122
|
* 词表按用户共享,不按项目隔离。
|
|
123
|
-
*
|
|
123
|
+
* 开启时每个请求多约 590 input token。
|
|
124
124
|
|
|
125
125
|
## 许可
|
|
126
126
|
|
package/dsh/index.js
CHANGED
|
@@ -52,10 +52,9 @@ const ROUTE_STATE = '/plain-talk/state'
|
|
|
52
52
|
const MAX_BODY = 8 * 1024
|
|
53
53
|
const MAX_SESSIONS = 256
|
|
54
54
|
|
|
55
|
-
/** New Sessions start
|
|
56
|
-
* PLAIN_TALK_DEFAULT=
|
|
57
|
-
|
|
58
|
-
const DEFAULT_ON = String(process.env.PLAIN_TALK_DEFAULT ?? 'on').toLowerCase() !== 'off'
|
|
55
|
+
/** New Sessions start off; one click turns the mode on and records that choice.
|
|
56
|
+
* PLAIN_TALK_DEFAULT=on makes unseen Sessions start on. */
|
|
57
|
+
const DEFAULT_ON = String(process.env.PLAIN_TALK_DEFAULT ?? 'off').toLowerCase() === 'on'
|
|
59
58
|
|
|
60
59
|
function dshHome() {
|
|
61
60
|
return process.env.DSH_HOME && process.env.DSH_HOME.length > 0
|
package/dsh/rules.js
CHANGED
|
@@ -16,6 +16,7 @@ export const RULES = `# 说人话(回复优化)
|
|
|
16
16
|
- 能一句说清就一句;默认不超过 12 行、300 字。用户明确要细节时放开深度,但结论仍在第一行。
|
|
17
17
|
- 不写"好的/我来看看/让我先…/希望这有帮助";不复述问题;不汇报你准备怎么做。
|
|
18
18
|
- 不写过程日记("我先…然后…")。只写结果、判断和可验证的事实。
|
|
19
|
+
- 工具调用之间的进度说明同样适用:用用户的语言,一句话(≤2 行);不需要说明就直接调工具。
|
|
19
20
|
- 列表最多 5 条;只给一个下一步。结尾不要问"还需要我做什么"。
|
|
20
21
|
|
|
21
22
|
## 自包含
|