dsh-fish-buddy 0.8.2 → 0.8.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/lib/host.js +19 -1
- package/package.json +48 -48
package/lib/host.js
CHANGED
|
@@ -831,11 +831,17 @@ export function apply(ctx, inlineConfig) {
|
|
|
831
831
|
* ⚠ 只在 **截图送法 = 攒着** 时生效:每张都说那一档,截图本来就会叫醒她,
|
|
832
832
|
* 再叠加搭话等于一轮变两轮、白花钱。
|
|
833
833
|
*/
|
|
834
|
+
// ⭐ 2026-11-04:最近一次往会话里塞图的时间 —— 给「游戏里自己搭话」让路(声明放前面,免得 TDZ)
|
|
835
|
+
let 上次塞图 = 0
|
|
834
836
|
const 游戏搭话 = () => {
|
|
835
837
|
try {
|
|
836
838
|
if (!游戏模式.开) return false
|
|
837
839
|
const 配置 = 读配置()
|
|
838
|
-
|
|
840
|
+
// ⚠⚠ 2026-11-04 修:这里原来判的是 配置.截图送法 —— 可全项目根本没有这个字段
|
|
841
|
+
// (「每张 / 攒着」是**挂件的设置**,插件这边只有每帧带的 存档/立即 标志)。
|
|
842
|
+
// 于是这一行永远为真 → 游戏搭话 永远 return false,攒着的图只能等她先开口。
|
|
843
|
+
// 现在改成「最近刚塞过图就让路」:每张都说那一档每隔几十秒就有图出去,
|
|
844
|
+
// 自然被挡掉;攒着那一档不塞图,所以能正常搭话。
|
|
839
845
|
// ⭐ 1.7.1:优先用**挂件报上来的**那个数,拿不到才用自己配置里的默认值
|
|
840
846
|
const 间隔 = 节奏('游戏搭话秒', Math.max(0, Number(配置.游戏搭话秒) || 0))
|
|
841
847
|
if (间隔 <= 0) return false
|
|
@@ -843,6 +849,8 @@ export function apply(ctx, inlineConfig) {
|
|
|
843
849
|
if (!键) return false
|
|
844
850
|
// 刚进游戏模式先安静一会儿,别一进去就开口
|
|
845
851
|
if (现在() - (游戏模式.时 || 0) < Math.min(间隔, 60) * 1000) return false
|
|
852
|
+
// 「每张都说」那档每隔几十秒刚发过图 → 让路,别一轮变两轮
|
|
853
|
+
if (上次塞图 && 现在() - 上次塞图 < 90000) return false
|
|
846
854
|
if (!要搭话({
|
|
847
855
|
间隔秒: 间隔,
|
|
848
856
|
最多秒: 0,
|
|
@@ -920,7 +928,13 @@ export function apply(ctx, inlineConfig) {
|
|
|
920
928
|
const 可能搭话 = () => {
|
|
921
929
|
try {
|
|
922
930
|
// ⭐ 0.7.7:在打游戏就别走「一起看片子」那条搭话 —— 两套提示词会打架
|
|
931
|
+
// ⚠⚠ 2026-11-04 修(用户反馈:游戏模式「攒着」永远不主动搭话):
|
|
932
|
+
// 这里以前是 **直接 return**,可游戏模式的主动搭话(游戏搭话)只有离看那条路
|
|
933
|
+
// 才会调 —— 于是「在打游戏」一旦命中,游戏搭话() 就永远走不到,
|
|
934
|
+
// 攒着的截图只能等她先开口才被带过去,跟"主动搭话"根本不是一回事。
|
|
935
|
+
// 现在改成:在打游戏 → 走游戏搭话;不在打游戏也没陪看 → 还是走游戏搭话(它自己会判条件)。
|
|
923
936
|
if (游戏模式.开 && 现在() - (游戏模式.时 || 0) < 6 * 3600 * 1000) {
|
|
937
|
+
try { 游戏搭话() } catch (error) {}
|
|
924
938
|
return
|
|
925
939
|
}
|
|
926
940
|
if (!陪看开着) {
|
|
@@ -1036,6 +1050,7 @@ export function apply(ctx, inlineConfig) {
|
|
|
1036
1050
|
// ⭐ 0.6.1:挂件会告诉我们「现在在不在游戏模式」—— 游戏模式也要能主动搭话
|
|
1037
1051
|
const 游戏模式 = { 开: false, 时: 0 }
|
|
1038
1052
|
const 攒图 = new Map()
|
|
1053
|
+
// ⭐ 2026-11-04:最近一次往会话里塞图的时间 —— 用来给「游戏里自己搭话」让路
|
|
1039
1054
|
// ⭐ 0.7.2:**不限制张数**(以前的「最多 3 张、新的挤掉最旧的」是错的 ——
|
|
1040
1055
|
// 挤掉的图等于白截了)。攒着就一直留着,等她说话 / 她自己看一眼时**全部**带过去。
|
|
1041
1056
|
// ⚠ 只有个上限 60 张防跑飞(一小时 30 秒一张也就 120 张,实际轮不到)。
|
|
@@ -1614,6 +1629,7 @@ export function apply(ctx, inlineConfig) {
|
|
|
1614
1629
|
source: { kind: 源 === '热键' ? 'user' : 'fishbuddy' },
|
|
1615
1630
|
})
|
|
1616
1631
|
状态.送出条数 += 1
|
|
1632
|
+
上次塞图 = 现在() // ⭐ 2026-11-04:给「游戏里自己搭话」让路用
|
|
1617
1633
|
return '发过去了'
|
|
1618
1634
|
} catch (error) {
|
|
1619
1635
|
return '发失败了:' + 说(error)
|
|
@@ -1679,6 +1695,8 @@ export function apply(ctx, inlineConfig) {
|
|
|
1679
1695
|
source: { kind: 来源类别 },
|
|
1680
1696
|
})
|
|
1681
1697
|
状态.送出条数 += 1
|
|
1698
|
+
上次塞图 = 现在() // 带图说话也算刚塞过
|
|
1699
|
+
|
|
1682
1700
|
return '发过去了'
|
|
1683
1701
|
} catch (error) {
|
|
1684
1702
|
return '发失败了:' + 说(error)
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-fish-buddy",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "鱼搭子 · DSH 这半边:桌面小挂件说的话送进你绑定的会话,她的回话再递回挂件。挂件是独立程序,这里只负责接线。",
|
|
5
|
-
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"deepseek-harness",
|
|
9
|
-
"dsh-plugin",
|
|
10
|
-
"companion",
|
|
11
|
-
"voice",
|
|
12
|
-
"call"
|
|
13
|
-
],
|
|
14
|
-
"main": "lib/host.js",
|
|
15
|
-
"exports": {
|
|
16
|
-
".": "./lib/host.js",
|
|
17
|
-
"./client": "./lib/client.js",
|
|
18
|
-
"./package.json": "./package.json",
|
|
19
|
-
"./locale/*.json": "./locale/*.json",
|
|
20
|
-
"./icon": "./icon.png"
|
|
21
|
-
},
|
|
22
|
-
"icon": "./icon.png",
|
|
23
|
-
"files": [
|
|
24
|
-
"lib",
|
|
25
|
-
"locale",
|
|
26
|
-
"icon.png",
|
|
27
|
-
"cordis.patch.yml",
|
|
28
|
-
"README.md"
|
|
29
|
-
],
|
|
30
|
-
"dsh": {
|
|
31
|
-
"bundle": {
|
|
32
|
-
"patch": "./cordis.patch.yml"
|
|
33
|
-
},
|
|
34
|
-
"client": {
|
|
35
|
-
"platform": "web",
|
|
36
|
-
"inject": [
|
|
37
|
-
"slots"
|
|
38
|
-
],
|
|
39
|
-
"external": [
|
|
40
|
-
"react"
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"engines": {
|
|
45
|
-
"node": ">=22",
|
|
46
|
-
"dsh": ">=0.2.1-rc.2"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-fish-buddy",
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"description": "鱼搭子 · DSH 这半边:桌面小挂件说的话送进你绑定的会话,她的回话再递回挂件。挂件是独立程序,这里只负责接线。",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"deepseek-harness",
|
|
9
|
+
"dsh-plugin",
|
|
10
|
+
"companion",
|
|
11
|
+
"voice",
|
|
12
|
+
"call"
|
|
13
|
+
],
|
|
14
|
+
"main": "lib/host.js",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": "./lib/host.js",
|
|
17
|
+
"./client": "./lib/client.js",
|
|
18
|
+
"./package.json": "./package.json",
|
|
19
|
+
"./locale/*.json": "./locale/*.json",
|
|
20
|
+
"./icon": "./icon.png"
|
|
21
|
+
},
|
|
22
|
+
"icon": "./icon.png",
|
|
23
|
+
"files": [
|
|
24
|
+
"lib",
|
|
25
|
+
"locale",
|
|
26
|
+
"icon.png",
|
|
27
|
+
"cordis.patch.yml",
|
|
28
|
+
"README.md"
|
|
29
|
+
],
|
|
30
|
+
"dsh": {
|
|
31
|
+
"bundle": {
|
|
32
|
+
"patch": "./cordis.patch.yml"
|
|
33
|
+
},
|
|
34
|
+
"client": {
|
|
35
|
+
"platform": "web",
|
|
36
|
+
"inject": [
|
|
37
|
+
"slots"
|
|
38
|
+
],
|
|
39
|
+
"external": [
|
|
40
|
+
"react"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=22",
|
|
46
|
+
"dsh": ">=0.2.1-rc.2"
|
|
47
|
+
}
|
|
48
|
+
}
|