@mcviseron/dsh-qq-bridge 0.3.1 → 0.3.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/README.md +22 -0
- package/cordis.patch.yml +3 -1
- package/lib/client.js +15 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# dsh-qq-bridge
|
|
2
2
|
|
|
3
|
+
## 安装
|
|
4
|
+
|
|
5
|
+
从 npm 装(**包名带 scope**,profile 里的 `name` 必须写同一个名字,否则
|
|
6
|
+
`Cannot find package 'dsh-qq-bridge'`):
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm i @mcviseron/dsh-qq-bridge
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
# profile 的 cordis.patch.yml
|
|
14
|
+
- insert:
|
|
15
|
+
- id: qq-bridge
|
|
16
|
+
name: '@mcviseron/dsh-qq-bridge'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
本地开发用 link 时保留裸名:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm i dsh-qq-bridge@link:/path/to/plugin
|
|
23
|
+
```
|
|
24
|
+
|
|
3
25
|
DeepSeek Harness Host 插件:把 QQ 会话映射成 DSH Session。
|
|
4
26
|
|
|
5
27
|
- 每条 QQ 消息 → `ctx.sessionController.prompt()`(每个会话一个 Session,首次自动 `create()`)
|
package/cordis.patch.yml
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
# assistant reply plus every pending tool approval back to the bot.
|
|
5
5
|
- insert:
|
|
6
6
|
- id: qq-bridge
|
|
7
|
-
|
|
7
|
+
# 必须和 npm 上发布的包名一致(发布时 CI 会改成 scoped 名)。
|
|
8
|
+
# 本地开发用 link 时,改成你自己的 "dsh-qq-bridge": "link:<path>" 条目名即可。
|
|
9
|
+
name: '@mcviseron/dsh-qq-bridge'
|
|
8
10
|
config:
|
|
9
11
|
enabled: true
|
|
10
12
|
host: '127.0.0.1'
|
package/lib/client.js
CHANGED
|
@@ -23,7 +23,8 @@ window.__ModuleLoader__.load({
|
|
|
23
23
|
padding: "20px 22px", borderRadius: 16,
|
|
24
24
|
border: "1px solid var(--dsw-alias-border-l2, rgba(255,255,255,0.14))",
|
|
25
25
|
backgroundColor: "rgba(22, 24, 30, 0.62)",
|
|
26
|
-
|
|
26
|
+
// 94% 而不是 72%:卡片半透明太强时,滚动内容会从悬浮栏上下的内边距里透出来
|
|
27
|
+
background: "color-mix(in srgb, var(--dsw-alias-bg-base, #14161c) 94%, transparent)",
|
|
27
28
|
backdropFilter: "blur(18px) saturate(130%)",
|
|
28
29
|
WebkitBackdropFilter: "blur(18px) saturate(130%)",
|
|
29
30
|
boxShadow: "0 10px 30px rgba(0,0,0,0.24)",
|
|
@@ -70,9 +71,15 @@ window.__ModuleLoader__.load({
|
|
|
70
71
|
cardKey: { color: "var(--dsw-alias-label-tertiary)" },
|
|
71
72
|
cardValue: { color: "var(--dsw-alias-label-secondary)", fontVariantNumeric: "tabular-nums" },
|
|
72
73
|
sectionTitle: { fontSize: 12, letterSpacing: "0.04em", color: "var(--dsw-alias-label-tertiary)", margin: "10px 0 2px" },
|
|
73
|
-
//
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
// 顶/底悬浮栏:跟随主题的表面色(写死深色在浅色主题里就是一块黑板),圆角+描边看着像工具条
|
|
75
|
+
stickyBar: { position: "sticky", zIndex: 6, display: "grid", gap: 10, padding: "10px 12px", borderRadius: 12,
|
|
76
|
+
background: "color-mix(in srgb, var(--dsw-alias-bg-base, #ffffff) 96%, transparent)",
|
|
77
|
+
backdropFilter: "blur(14px) saturate(140%)", WebkitBackdropFilter: "blur(14px) saturate(140%)",
|
|
78
|
+
border: "1px solid var(--dsw-alias-border-l2, rgba(0,0,0,0.12))", boxShadow: "0 6px 18px rgba(0,0,0,0.10)" },
|
|
79
|
+
stickyTop: { top: 0 },
|
|
80
|
+
stickyBottom: { bottom: 0, display: "flex", gap: 8, flexWrap: "wrap", alignItems: "center" },
|
|
81
|
+
// 设置页去掉外层上下内边距,悬浮栏才能贴到视口边缘,不留一条会透出内容的缝
|
|
82
|
+
pageTight: { paddingTop: 0, paddingBottom: 0 },
|
|
76
83
|
input: { width: 132, padding: "5px 8px", border: "1px solid var(--dsw-alias-border-l2)", borderRadius: 6, background: "var(--dsw-alias-bg-layer-3)", color: "var(--dsw-alias-label-primary)", font: "inherit", textAlign: "right" },
|
|
77
84
|
inputWide: { width: 260, textAlign: "left" },
|
|
78
85
|
textarea: { width: "100%", minHeight: 120, padding: "8px 10px", border: "1px solid var(--dsw-alias-border-l2)", borderRadius: 6, background: "var(--dsw-alias-bg-layer-3)", color: "var(--dsw-alias-label-primary)", font: "inherit", lineHeight: 1.6, resize: "vertical", boxSizing: "border-box", textAlign: "left" },
|
|
@@ -816,11 +823,11 @@ window.__ModuleLoader__.load({
|
|
|
816
823
|
return h("div", { style: T.page }, h("style", { key: "qq-scroll-css" }, SCROLLBAR_CSS), h("div", { style: T.inner }, tabBar, stickersView()))
|
|
817
824
|
}
|
|
818
825
|
|
|
819
|
-
return h("div", { style: T.page },
|
|
826
|
+
return h("div", { style: Object.assign({}, T.page, T.pageTight) },
|
|
820
827
|
h("style", { key: "qq-scroll-css" }, SCROLLBAR_CSS),
|
|
821
828
|
h("div", { style: T.inner },
|
|
822
|
-
tabBar,
|
|
823
|
-
h("div", { style: T.stickyTop },
|
|
829
|
+
h("div", { style: { paddingTop: 24 } }, tabBar),
|
|
830
|
+
h("div", { style: Object.assign({}, T.stickyBar, T.stickyTop) },
|
|
824
831
|
h("div", { style: T.actions },
|
|
825
832
|
h("span", { style: T.badge }, dot(!!bot.running), "进程 · " + (bot.running ? "运行中" : "已停止")),
|
|
826
833
|
h("span", { style: T.badge }, dot(!!bot.online), "在线 · " + (bot.online ? "是" : "否")),
|
|
@@ -921,7 +928,7 @@ window.__ModuleLoader__.load({
|
|
|
921
928
|
onChange: function (event) { setValue(item[0], event.target.value) },
|
|
922
929
|
}))
|
|
923
930
|
}),
|
|
924
|
-
h("div", { style: T.stickyBottom },
|
|
931
|
+
h("div", { style: Object.assign({}, T.stickyBar, T.stickyBottom, { marginBottom: 24 }) },
|
|
925
932
|
h("button", { style: Object.assign({}, T.btn, T.btnPrimary), disabled: busy, onClick: save }, "保存设置"),
|
|
926
933
|
h("button", { style: T.btn, disabled: busy, onClick: function () { setDraft({}); load() } }, "重新读取"),
|
|
927
934
|
h("span", { style: T.hint }, Object.keys(draft).length === 0 ? "(没有改动)" : "(有 " + Object.keys(draft).length + " 项未保存)")),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcviseron/dsh-qq-bridge",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "DeepSeek Harness plugin: bridge QQ conversations (driven by an external viseron-botpy bot) to DSH sessions — injects user messages, captures assistant replies, streams C2C answers, and relays tool approvals to the bot owner.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|