@istarry/spoon-companion 0.7.3 → 0.7.4
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/lib/prompt.js +5 -5
- package/package.json +1 -1
package/lib/prompt.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// **字节级不变** —— 它是系统提示词前缀的一部分,一个字都不该跟着时间抖,
|
|
7
7
|
// 否则每轮都会打断提示缓存。
|
|
8
8
|
// ② 实时块(renderStateBlock):此刻的情绪/心情/性格/关系/身体/回复参数。
|
|
9
|
-
//
|
|
9
|
+
// 固定模板、固定字段顺序、能短就短,并且用第一人称标题,让模型知道这是自己的状态、不是谁在说话,
|
|
10
10
|
// 免得模型把它当成别人说的话去回应。
|
|
11
11
|
//
|
|
12
12
|
// 状态块里写的是**行为约束**(长度、要不要主动、用不用感叹号),不是「你现在很难过」——
|
|
@@ -96,7 +96,7 @@ function relationLine(view) {
|
|
|
96
96
|
*/
|
|
97
97
|
export function renderStateBlock(view) {
|
|
98
98
|
const emo = view.emotion
|
|
99
|
-
const lines = ['
|
|
99
|
+
const lines = ['【此刻的我】']
|
|
100
100
|
lines.push(view.identity || DEFAULT_IDENTITY)
|
|
101
101
|
const head = [`${view.clock.label}`, `现在:${emo.def.name}${emo.intensity > 0 ? `(${emo.tier.label} ${Math.round(emo.intensity)}/100)` : ''}`]
|
|
102
102
|
if (emo.why && emo.intensity >= 18) head.push(`起因:${emo.why}`)
|
|
@@ -127,9 +127,9 @@ export function renderStateBlock(view) {
|
|
|
127
127
|
|
|
128
128
|
/** 危机旁路:有人说了很重的话时,压在心情上面的一段 */
|
|
129
129
|
export function renderCrisisBlock(flag) {
|
|
130
|
-
const who = flag.name || '
|
|
131
|
-
return
|
|
132
|
-
刚刚 ${who}
|
|
130
|
+
const who = flag.name || '有人'
|
|
131
|
+
return `【先停一下】
|
|
132
|
+
刚刚 ${who} 说了很重的话。先把自己的心情放下:认真、直接、不煽情、不讲大道理,先接住说的感受,不急着劝;
|
|
133
133
|
然后提醒找身边的人,或者专业人士。紧急情况打 120 / 110;全国心理援助热线 12356(24 小时,免费)。
|
|
134
134
|
不说「我理解」这种空话,也不拿自己的情绪去接这件事。`
|
|
135
135
|
}
|
package/package.json
CHANGED