@lijian-ui/dsh-im-gateway 0.2.0 → 0.2.2
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/client.js +128 -124
- package/lib/{index-DcKTwqN6.d.ts → index-CM3Kp_qE.d.ts} +2 -0
- package/lib/index.js +42 -10
- package/package.json +108 -108
package/lib/client.js
CHANGED
|
@@ -5,6 +5,7 @@ window.__ModuleLoader__.load({
|
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
7
|
let react = require("react");
|
|
8
|
+
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
8
9
|
//#region src/client/ImChannelModal.ts
|
|
9
10
|
/**
|
|
10
11
|
* Add / edit IM channel modal (browser half).
|
|
@@ -74,7 +75,7 @@ window.__ModuleLoader__.load({
|
|
|
74
75
|
display: "flex",
|
|
75
76
|
alignItems: "center",
|
|
76
77
|
justifyContent: "center",
|
|
77
|
-
background: "
|
|
78
|
+
background: "var(--dsw-alias-bg-mask-1)",
|
|
78
79
|
padding: 24
|
|
79
80
|
};
|
|
80
81
|
const modal = {
|
|
@@ -83,25 +84,25 @@ window.__ModuleLoader__.load({
|
|
|
83
84
|
width: 520,
|
|
84
85
|
maxWidth: "100%",
|
|
85
86
|
maxHeight: "90vh",
|
|
86
|
-
background: "var(--dsw-alias-bg-layer-
|
|
87
|
-
border: "1px solid var(--dsw-alias-border-
|
|
88
|
-
borderRadius:
|
|
87
|
+
background: "var(--dsw-alias-bg-layer-3)",
|
|
88
|
+
border: "1px solid var(--dsw-alias-border-l1)",
|
|
89
|
+
borderRadius: 12,
|
|
89
90
|
overflow: "hidden",
|
|
90
|
-
boxShadow: "
|
|
91
|
+
boxShadow: "var(--dsw-shadow-lv2)"
|
|
91
92
|
};
|
|
92
93
|
const modalHeader = {
|
|
93
94
|
display: "flex",
|
|
94
95
|
alignItems: "center",
|
|
95
96
|
gap: 8,
|
|
96
97
|
padding: "14px 18px",
|
|
97
|
-
borderBottom: "1px solid var(--dsw-alias-border-
|
|
98
|
+
borderBottom: "1px solid var(--dsw-alias-border-l3)",
|
|
98
99
|
flexShrink: 0
|
|
99
100
|
};
|
|
100
101
|
const modalTitle = {
|
|
101
102
|
flex: 1,
|
|
102
103
|
fontSize: 16,
|
|
103
104
|
fontWeight: 500,
|
|
104
|
-
color: "var(--dsw-alias-label-primary
|
|
105
|
+
color: "var(--dsw-alias-label-primary)",
|
|
105
106
|
margin: 0
|
|
106
107
|
};
|
|
107
108
|
const closeBtn = {
|
|
@@ -112,7 +113,7 @@ window.__ModuleLoader__.load({
|
|
|
112
113
|
height: 28,
|
|
113
114
|
border: "none",
|
|
114
115
|
background: "transparent",
|
|
115
|
-
color: "var(--dsw-alias-label-tertiary
|
|
116
|
+
color: "var(--dsw-alias-label-tertiary)",
|
|
116
117
|
cursor: "pointer",
|
|
117
118
|
borderRadius: 6,
|
|
118
119
|
fontSize: 16,
|
|
@@ -133,20 +134,20 @@ window.__ModuleLoader__.load({
|
|
|
133
134
|
};
|
|
134
135
|
const fieldLabel = {
|
|
135
136
|
fontSize: 12,
|
|
136
|
-
color: "var(--dsw-alias-label-secondary
|
|
137
|
+
color: "var(--dsw-alias-label-secondary)",
|
|
137
138
|
fontWeight: 500
|
|
138
139
|
};
|
|
139
140
|
const required = {
|
|
140
|
-
color: "var(--dsw-alias-state-error-primary
|
|
141
|
+
color: "var(--dsw-alias-state-error-primary)",
|
|
141
142
|
marginLeft: 2
|
|
142
143
|
};
|
|
143
144
|
const input = {
|
|
144
145
|
height: 40,
|
|
145
146
|
padding: "0 12px",
|
|
146
|
-
background: "var(--dsw-alias-bg-layer-1
|
|
147
|
-
border: "1px solid var(--dsw-alias-border-l2
|
|
147
|
+
background: "var(--dsw-alias-bg-layer-1)",
|
|
148
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
148
149
|
borderRadius: 8,
|
|
149
|
-
color: "var(--dsw-alias-label-primary
|
|
150
|
+
color: "var(--dsw-alias-label-primary)",
|
|
150
151
|
fontSize: 13,
|
|
151
152
|
outline: "none",
|
|
152
153
|
boxSizing: "border-box"
|
|
@@ -157,9 +158,9 @@ window.__ModuleLoader__.load({
|
|
|
157
158
|
};
|
|
158
159
|
const errorStyle$1 = {
|
|
159
160
|
fontSize: 12,
|
|
160
|
-
color: "var(--dsw-alias-state-error-primary
|
|
161
|
+
color: "var(--dsw-alias-state-error-primary)",
|
|
161
162
|
padding: "8px 12px",
|
|
162
|
-
background: "
|
|
163
|
+
background: "color-mix(in srgb, var(--dsw-alias-state-error-primary) 8%, transparent)",
|
|
163
164
|
borderRadius: 6
|
|
164
165
|
};
|
|
165
166
|
const footer = {
|
|
@@ -168,41 +169,17 @@ window.__ModuleLoader__.load({
|
|
|
168
169
|
justifyContent: "flex-end",
|
|
169
170
|
gap: 8,
|
|
170
171
|
padding: "14px 18px",
|
|
171
|
-
borderTop: "1px solid var(--dsw-alias-border-
|
|
172
|
+
borderTop: "1px solid var(--dsw-alias-border-l3)",
|
|
172
173
|
flexShrink: 0
|
|
173
174
|
};
|
|
174
|
-
const btnGhost = {
|
|
175
|
-
height: 36,
|
|
176
|
-
padding: "0 16px",
|
|
177
|
-
background: "transparent",
|
|
178
|
-
color: "var(--dsw-alias-label-secondary, #555)",
|
|
179
|
-
border: "1px solid var(--dsw-alias-border-l2, #ccc)",
|
|
180
|
-
borderRadius: 8,
|
|
181
|
-
cursor: "pointer",
|
|
182
|
-
fontSize: 13
|
|
183
|
-
};
|
|
184
|
-
const btnPrimary = {
|
|
185
|
-
display: "inline-flex",
|
|
186
|
-
alignItems: "center",
|
|
187
|
-
gap: 6,
|
|
188
|
-
height: 36,
|
|
189
|
-
padding: "0 18px",
|
|
190
|
-
background: "var(--dsw-alias-state-business-primary, #185FA5)",
|
|
191
|
-
color: "#fff",
|
|
192
|
-
border: "none",
|
|
193
|
-
borderRadius: 8,
|
|
194
|
-
cursor: "pointer",
|
|
195
|
-
fontSize: 13,
|
|
196
|
-
fontWeight: 500
|
|
197
|
-
};
|
|
198
175
|
const qrBox = {
|
|
199
176
|
display: "flex",
|
|
200
177
|
flexDirection: "column",
|
|
201
178
|
alignItems: "center",
|
|
202
179
|
gap: 10,
|
|
203
180
|
padding: "16px",
|
|
204
|
-
background: "var(--dsw-alias-bg-layer-1
|
|
205
|
-
border: "1px dashed var(--dsw-alias-border-l3
|
|
181
|
+
background: "var(--dsw-alias-bg-layer-1)",
|
|
182
|
+
border: "1px dashed var(--dsw-alias-border-l3)",
|
|
206
183
|
borderRadius: 10
|
|
207
184
|
};
|
|
208
185
|
const qrImg = {
|
|
@@ -215,7 +192,7 @@ window.__ModuleLoader__.load({
|
|
|
215
192
|
const qrHint = {
|
|
216
193
|
margin: 0,
|
|
217
194
|
fontSize: 12,
|
|
218
|
-
color: "var(--dsw-alias-label-secondary
|
|
195
|
+
color: "var(--dsw-alias-label-secondary)",
|
|
219
196
|
textAlign: "center",
|
|
220
197
|
lineHeight: 1.5,
|
|
221
198
|
wordBreak: "break-all"
|
|
@@ -229,7 +206,7 @@ window.__ModuleLoader__.load({
|
|
|
229
206
|
};
|
|
230
207
|
const qrLink = {
|
|
231
208
|
fontSize: 12,
|
|
232
|
-
color: "var(--dsw-alias-state-business-primary
|
|
209
|
+
color: "var(--dsw-alias-state-business-primary)",
|
|
233
210
|
textDecoration: "none",
|
|
234
211
|
cursor: "pointer",
|
|
235
212
|
maxWidth: "100%",
|
|
@@ -474,8 +451,9 @@ window.__ModuleLoader__.load({
|
|
|
474
451
|
href: qr.qrcode,
|
|
475
452
|
target: "_blank",
|
|
476
453
|
rel: "noreferrer"
|
|
477
|
-
}, qr.qrcode.slice(0, 60)) : null, (0, react.createElement)(
|
|
478
|
-
|
|
454
|
+
}, qr.qrcode.slice(0, 60)) : null, (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
455
|
+
variant: "ghost",
|
|
456
|
+
size: "sm",
|
|
479
457
|
onClick: () => void handleCancelQrLogin()
|
|
480
458
|
}, t("btn.cancel"))),
|
|
481
459
|
qr.verifyCodeNeeded || qr.status === "need_verifycode" ? (0, react.createElement)("div", {
|
|
@@ -494,24 +472,26 @@ window.__ModuleLoader__.load({
|
|
|
494
472
|
value: verifyCode,
|
|
495
473
|
placeholder: t("qr.verifyPlaceholder"),
|
|
496
474
|
onChange: (e) => setVerifyCode(e.target.value)
|
|
497
|
-
}), (0, react.createElement)(
|
|
498
|
-
|
|
475
|
+
}), (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
476
|
+
variant: "primary",
|
|
477
|
+
size: "sm",
|
|
499
478
|
onClick: () => void handleSubmitVerifyCode(),
|
|
500
479
|
disabled: !verifyCode.trim()
|
|
501
480
|
}, t("btn.confirm"))) : null
|
|
502
481
|
] : [(0, react.createElement)("p", {
|
|
503
482
|
key: "hint",
|
|
504
483
|
style: qrHint
|
|
505
|
-
}, qr?.message || (hasCredentials ? type === "qq" ? t("qr.bound.qq") : t("qr.bound.weixin") : type === "qq" ? t("qr.unbound.qq") : t("qr.unbound.weixin"))), (0, react.createElement)(
|
|
484
|
+
}, qr?.message || (hasCredentials ? type === "qq" ? t("qr.bound.qq") : t("qr.bound.weixin") : type === "qq" ? t("qr.unbound.qq") : t("qr.unbound.weixin"))), (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
506
485
|
key: "start",
|
|
507
|
-
|
|
486
|
+
variant: "ghost",
|
|
487
|
+
size: "sm",
|
|
508
488
|
onClick: () => void handleStartQrLogin(),
|
|
509
489
|
disabled: qrPolling
|
|
510
|
-
}, qrPolling ? t("qr.fetching") : t("qr.scanLogin", { 0: typeLabel(type) }))]) : null, error ? (0, react.createElement)("div", { style: errorStyle$1 }, error) : null), (0, react.createElement)("div", { style: footer }, (0, react.createElement)(
|
|
511
|
-
|
|
490
|
+
}, qrPolling ? t("qr.fetching") : t("qr.scanLogin", { 0: typeLabel(type) }))]) : null, error ? (0, react.createElement)("div", { style: errorStyle$1 }, error) : null), (0, react.createElement)("div", { style: footer }, (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
491
|
+
variant: "ghost",
|
|
512
492
|
onClick: onClose
|
|
513
|
-
}, t("btn.cancel")), (0, react.createElement)(
|
|
514
|
-
|
|
493
|
+
}, t("btn.cancel")), (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
494
|
+
variant: "primary",
|
|
515
495
|
onClick: () => void handleSave(),
|
|
516
496
|
disabled: saving || !canSave
|
|
517
497
|
}, saving ? t("btn.saving") : t("btn.save")))));
|
|
@@ -543,7 +523,7 @@ window.__ModuleLoader__.load({
|
|
|
543
523
|
justifyContent: "space-between",
|
|
544
524
|
padding: "14px 0",
|
|
545
525
|
flexShrink: 0,
|
|
546
|
-
borderBottom: "1px solid var(--dsw-alias-border-l2
|
|
526
|
+
borderBottom: "1px solid var(--dsw-alias-border-l2)"
|
|
547
527
|
};
|
|
548
528
|
const titleRow = {
|
|
549
529
|
display: "flex",
|
|
@@ -554,7 +534,7 @@ window.__ModuleLoader__.load({
|
|
|
554
534
|
const title = {
|
|
555
535
|
fontSize: 17,
|
|
556
536
|
fontWeight: 500,
|
|
557
|
-
color: "var(--dsw-alias-label-primary
|
|
537
|
+
color: "var(--dsw-alias-label-primary)",
|
|
558
538
|
margin: 0,
|
|
559
539
|
whiteSpace: "nowrap"
|
|
560
540
|
};
|
|
@@ -566,8 +546,8 @@ window.__ModuleLoader__.load({
|
|
|
566
546
|
height: 22,
|
|
567
547
|
padding: "0 7px",
|
|
568
548
|
borderRadius: 999,
|
|
569
|
-
background: "var(--dsw-alias-bg-layer-3
|
|
570
|
-
color: "var(--dsw-alias-label-secondary
|
|
549
|
+
background: "var(--dsw-alias-bg-layer-3)",
|
|
550
|
+
color: "var(--dsw-alias-label-secondary)",
|
|
571
551
|
fontSize: 11,
|
|
572
552
|
fontWeight: 500
|
|
573
553
|
};
|
|
@@ -576,20 +556,6 @@ window.__ModuleLoader__.load({
|
|
|
576
556
|
alignItems: "center",
|
|
577
557
|
gap: 8
|
|
578
558
|
};
|
|
579
|
-
const addBtn = {
|
|
580
|
-
display: "inline-flex",
|
|
581
|
-
alignItems: "center",
|
|
582
|
-
gap: 6,
|
|
583
|
-
height: 32,
|
|
584
|
-
padding: "0 14px",
|
|
585
|
-
border: "none",
|
|
586
|
-
borderRadius: 8,
|
|
587
|
-
background: "var(--dsw-alias-state-business-primary, #185FA5)",
|
|
588
|
-
color: "#fff",
|
|
589
|
-
fontSize: 13,
|
|
590
|
-
fontWeight: 500,
|
|
591
|
-
cursor: "pointer"
|
|
592
|
-
};
|
|
593
559
|
const body = {
|
|
594
560
|
flex: 1,
|
|
595
561
|
overflowY: "auto",
|
|
@@ -603,10 +569,10 @@ window.__ModuleLoader__.load({
|
|
|
603
569
|
const errorStyle = {
|
|
604
570
|
fontSize: 12,
|
|
605
571
|
lineHeight: 1.5,
|
|
606
|
-
color: "var(--dsw-alias-state-error-primary
|
|
572
|
+
color: "var(--dsw-alias-state-error-primary)",
|
|
607
573
|
padding: "10px 14px",
|
|
608
|
-
background: "
|
|
609
|
-
border: "1px solid
|
|
574
|
+
background: "color-mix(in srgb, var(--dsw-alias-state-error-primary) 8%, transparent)",
|
|
575
|
+
border: "1px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 40%, transparent)",
|
|
610
576
|
borderRadius: 8,
|
|
611
577
|
whiteSpace: "pre-wrap"
|
|
612
578
|
};
|
|
@@ -617,15 +583,15 @@ window.__ModuleLoader__.load({
|
|
|
617
583
|
justifyContent: "center",
|
|
618
584
|
gap: 6,
|
|
619
585
|
padding: "32px 24px",
|
|
620
|
-
border: "1px dashed var(--dsw-alias-border-l3
|
|
586
|
+
border: "1px dashed var(--dsw-alias-border-l3)",
|
|
621
587
|
borderRadius: 10,
|
|
622
|
-
background: "var(--dsw-alias-bg-layer-1
|
|
588
|
+
background: "var(--dsw-alias-bg-layer-1)",
|
|
623
589
|
textAlign: "center"
|
|
624
590
|
};
|
|
625
591
|
const emptyText = {
|
|
626
592
|
margin: 0,
|
|
627
593
|
fontSize: 13,
|
|
628
|
-
color: "var(--dsw-alias-label-secondary
|
|
594
|
+
color: "var(--dsw-alias-label-secondary)"
|
|
629
595
|
};
|
|
630
596
|
const groupHead = {
|
|
631
597
|
display: "flex",
|
|
@@ -635,7 +601,7 @@ window.__ModuleLoader__.load({
|
|
|
635
601
|
const groupTitle = {
|
|
636
602
|
fontSize: 13,
|
|
637
603
|
fontWeight: 600,
|
|
638
|
-
color: "var(--dsw-alias-label-primary
|
|
604
|
+
color: "var(--dsw-alias-label-primary)",
|
|
639
605
|
margin: 0
|
|
640
606
|
};
|
|
641
607
|
const groupCount = {
|
|
@@ -646,8 +612,8 @@ window.__ModuleLoader__.load({
|
|
|
646
612
|
height: 18,
|
|
647
613
|
padding: "0 6px",
|
|
648
614
|
borderRadius: 999,
|
|
649
|
-
background: "var(--dsw-alias-bg-layer-3
|
|
650
|
-
color: "var(--dsw-alias-label-tertiary
|
|
615
|
+
background: "var(--dsw-alias-bg-layer-3)",
|
|
616
|
+
color: "var(--dsw-alias-label-tertiary)",
|
|
651
617
|
fontSize: 10,
|
|
652
618
|
fontWeight: 500
|
|
653
619
|
};
|
|
@@ -661,8 +627,8 @@ window.__ModuleLoader__.load({
|
|
|
661
627
|
alignItems: "center",
|
|
662
628
|
gap: 14,
|
|
663
629
|
padding: "14px 16px",
|
|
664
|
-
background: "var(--dsw-alias-bg-layer-2
|
|
665
|
-
border: "1px solid var(--dsw-alias-border-l2
|
|
630
|
+
background: "var(--dsw-alias-bg-layer-2)",
|
|
631
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
666
632
|
borderRadius: 10
|
|
667
633
|
};
|
|
668
634
|
const channelIcon = {
|
|
@@ -672,8 +638,8 @@ window.__ModuleLoader__.load({
|
|
|
672
638
|
width: 32,
|
|
673
639
|
height: 32,
|
|
674
640
|
borderRadius: 8,
|
|
675
|
-
background: "var(--dsw-alias-bg-layer-3
|
|
676
|
-
color: "var(--dsw-alias-label-secondary
|
|
641
|
+
background: "var(--dsw-alias-bg-layer-3)",
|
|
642
|
+
color: "var(--dsw-alias-label-secondary)",
|
|
677
643
|
flexShrink: 0
|
|
678
644
|
};
|
|
679
645
|
const channelInfo = {
|
|
@@ -692,7 +658,7 @@ window.__ModuleLoader__.load({
|
|
|
692
658
|
const channelName = {
|
|
693
659
|
fontSize: 13,
|
|
694
660
|
fontWeight: 500,
|
|
695
|
-
color: "var(--dsw-alias-label-primary
|
|
661
|
+
color: "var(--dsw-alias-label-primary)",
|
|
696
662
|
overflow: "hidden",
|
|
697
663
|
textOverflow: "ellipsis",
|
|
698
664
|
whiteSpace: "nowrap"
|
|
@@ -705,9 +671,9 @@ window.__ModuleLoader__.load({
|
|
|
705
671
|
};
|
|
706
672
|
/** Color for a channel runtime status dot. */
|
|
707
673
|
function statusColor(s) {
|
|
708
|
-
if (s?.status === "online") return "var(--dsw-alias-state-success-primary
|
|
709
|
-
if (s?.status === "error") return "var(--dsw-alias-state-error-primary
|
|
710
|
-
return "var(--dsw-alias-label-tertiary
|
|
674
|
+
if (s?.status === "online") return "var(--dsw-alias-state-success-primary)";
|
|
675
|
+
if (s?.status === "error") return "var(--dsw-alias-state-error-primary)";
|
|
676
|
+
return "var(--dsw-alias-label-tertiary)";
|
|
711
677
|
}
|
|
712
678
|
const badge = {
|
|
713
679
|
display: "inline-flex",
|
|
@@ -722,19 +688,19 @@ window.__ModuleLoader__.load({
|
|
|
722
688
|
};
|
|
723
689
|
const badgeOff = {
|
|
724
690
|
...badge,
|
|
725
|
-
color: "var(--dsw-alias-state-error-primary
|
|
726
|
-
borderColor: "
|
|
727
|
-
background: "
|
|
691
|
+
color: "var(--dsw-alias-state-error-primary)",
|
|
692
|
+
borderColor: "color-mix(in srgb, var(--dsw-alias-state-error-primary) 40%, transparent)",
|
|
693
|
+
background: "color-mix(in srgb, var(--dsw-alias-state-error-primary) 8%, transparent)"
|
|
728
694
|
};
|
|
729
695
|
const badgeOn = {
|
|
730
696
|
...badge,
|
|
731
|
-
color: "var(--dsw-alias-state-success-primary
|
|
732
|
-
borderColor: "
|
|
733
|
-
background: "
|
|
697
|
+
color: "var(--dsw-alias-state-success-primary)",
|
|
698
|
+
borderColor: "color-mix(in srgb, var(--dsw-alias-state-success-primary) 40%, transparent)",
|
|
699
|
+
background: "color-mix(in srgb, var(--dsw-alias-state-success-primary) 8%, transparent)"
|
|
734
700
|
};
|
|
735
701
|
const channelSub = {
|
|
736
702
|
fontSize: 11,
|
|
737
|
-
color: "var(--dsw-alias-label-tertiary
|
|
703
|
+
color: "var(--dsw-alias-label-tertiary)",
|
|
738
704
|
overflow: "hidden",
|
|
739
705
|
textOverflow: "ellipsis",
|
|
740
706
|
whiteSpace: "nowrap"
|
|
@@ -756,9 +722,9 @@ window.__ModuleLoader__.load({
|
|
|
756
722
|
fontSize: 12,
|
|
757
723
|
lineHeight: "18px",
|
|
758
724
|
borderRadius: 14,
|
|
759
|
-
border: "1px solid var(--dsw-alias-border-l2
|
|
725
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
760
726
|
background: "transparent",
|
|
761
|
-
color: "var(--dsw-alias-label-primary
|
|
727
|
+
color: "var(--dsw-alias-label-primary)",
|
|
762
728
|
cursor: "pointer"
|
|
763
729
|
};
|
|
764
730
|
/** Delete button — text style matching the official models settings page (dangerButton). */
|
|
@@ -774,7 +740,7 @@ window.__ModuleLoader__.load({
|
|
|
774
740
|
borderRadius: 14,
|
|
775
741
|
border: "none",
|
|
776
742
|
background: "transparent",
|
|
777
|
-
color: "var(--dsw-alias-state-error-primary
|
|
743
|
+
color: "var(--dsw-alias-state-error-primary)",
|
|
778
744
|
cursor: "pointer"
|
|
779
745
|
};
|
|
780
746
|
const toggleBtn = {
|
|
@@ -783,14 +749,14 @@ window.__ModuleLoader__.load({
|
|
|
783
749
|
height: 21,
|
|
784
750
|
border: "none",
|
|
785
751
|
borderRadius: 999,
|
|
786
|
-
background: "var(--dsw-alias-border-l2
|
|
752
|
+
background: "var(--dsw-alias-border-l2)",
|
|
787
753
|
cursor: "pointer",
|
|
788
754
|
padding: 0,
|
|
789
755
|
flexShrink: 0
|
|
790
756
|
};
|
|
791
757
|
const toggleOn = {
|
|
792
758
|
...toggleBtn,
|
|
793
|
-
background: "var(--dsw-alias-state-business-primary
|
|
759
|
+
background: "var(--dsw-alias-state-business-primary)"
|
|
794
760
|
};
|
|
795
761
|
const toggleKnob = {
|
|
796
762
|
position: "absolute",
|
|
@@ -799,7 +765,7 @@ window.__ModuleLoader__.load({
|
|
|
799
765
|
width: 17,
|
|
800
766
|
height: 17,
|
|
801
767
|
borderRadius: "50%",
|
|
802
|
-
background: "
|
|
768
|
+
background: "var(--dsw-alias-label-primary-foreground)",
|
|
803
769
|
boxShadow: "0 1px 2px rgba(0,0,0,0.25)",
|
|
804
770
|
transition: "left 0.15s ease"
|
|
805
771
|
};
|
|
@@ -924,21 +890,23 @@ window.__ModuleLoader__.load({
|
|
|
924
890
|
label: type === "dingtalk" ? t("type.dingtalk") : type === "qq" ? t("type.qq") : type === "weixin" ? t("type.weixin") : type,
|
|
925
891
|
items: channels.filter((inst) => inst.type === type)
|
|
926
892
|
}));
|
|
927
|
-
return (0, react.createElement)("div", { style: page }, (0, react.createElement)("div", { style: header }, (0, react.createElement)("div", { style: titleRow }, (0, react.createElement)("h2", { style: title }, t("page.title")), channels.length > 0 ? (0, react.createElement)("span", { style: countBadge }, String(channels.length)) : null), (0, react.createElement)("div", { style: headerRight }, (0, react.createElement)(
|
|
928
|
-
|
|
893
|
+
return (0, react.createElement)("div", { style: page }, (0, react.createElement)("div", { style: header }, (0, react.createElement)("div", { style: titleRow }, (0, react.createElement)("h2", { style: title }, t("page.title")), channels.length > 0 ? (0, react.createElement)("span", { style: countBadge }, String(channels.length)) : null), (0, react.createElement)("div", { style: headerRight }, (0, react.createElement)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
894
|
+
variant: "primary",
|
|
895
|
+
size: "sm",
|
|
896
|
+
icon: (0, react.createElement)("svg", {
|
|
897
|
+
width: 16,
|
|
898
|
+
height: 16,
|
|
899
|
+
viewBox: "0 0 16 16",
|
|
900
|
+
fill: "none",
|
|
901
|
+
stroke: "currentColor",
|
|
902
|
+
strokeWidth: 1.5,
|
|
903
|
+
strokeLinecap: "round"
|
|
904
|
+
}, (0, react.createElement)("path", { d: "M8 3v10M3 8h10" })),
|
|
929
905
|
onClick: () => {
|
|
930
906
|
setEditId(void 0);
|
|
931
907
|
setModalOpen(true);
|
|
932
908
|
}
|
|
933
|
-
}, (0, react.createElement)("
|
|
934
|
-
width: 16,
|
|
935
|
-
height: 16,
|
|
936
|
-
viewBox: "0 0 16 16",
|
|
937
|
-
fill: "none",
|
|
938
|
-
stroke: "currentColor",
|
|
939
|
-
strokeWidth: 1.5,
|
|
940
|
-
strokeLinecap: "round"
|
|
941
|
-
}, (0, react.createElement)("path", { d: "M8 3v10M3 8h10" })), (0, react.createElement)("span", null, t("btn.add"))))), (0, react.createElement)("div", { style: body }, error ? (0, react.createElement)("div", { style: errorStyle }, error) : null, loading ? (0, react.createElement)("div", { style: empty }, (0, react.createElement)("p", { style: emptyText }, t("state.loading"))) : channels.length === 0 ? (0, react.createElement)("div", { style: empty }, (0, react.createElement)("p", { style: emptyText }, t("state.empty"))) : (0, react.createElement)("div", { style: {
|
|
909
|
+
}, t("btn.add")))), (0, react.createElement)("div", { style: body }, error ? (0, react.createElement)("div", { style: errorStyle }, error) : null, loading ? (0, react.createElement)("div", { style: empty }, (0, react.createElement)("p", { style: emptyText }, t("state.loading"))) : channels.length === 0 ? (0, react.createElement)("div", { style: empty }, (0, react.createElement)("p", { style: emptyText }, t("state.empty"))) : (0, react.createElement)("div", { style: {
|
|
942
910
|
display: "flex",
|
|
943
911
|
flexDirection: "column",
|
|
944
912
|
gap: 16
|
|
@@ -988,7 +956,7 @@ window.__ModuleLoader__.load({
|
|
|
988
956
|
display: "flex",
|
|
989
957
|
alignItems: "center",
|
|
990
958
|
justifyContent: "center",
|
|
991
|
-
background: "
|
|
959
|
+
background: "var(--dsw-alias-bg-mask-1)",
|
|
992
960
|
padding: 24
|
|
993
961
|
},
|
|
994
962
|
onMouseDown: (e) => {
|
|
@@ -1001,19 +969,20 @@ window.__ModuleLoader__.load({
|
|
|
1001
969
|
gap: 12,
|
|
1002
970
|
width: 380,
|
|
1003
971
|
maxWidth: "100%",
|
|
1004
|
-
background: "var(--dsw-alias-bg-layer-
|
|
1005
|
-
border: "1px solid var(--dsw-alias-border-
|
|
1006
|
-
borderRadius:
|
|
972
|
+
background: "var(--dsw-alias-bg-layer-3)",
|
|
973
|
+
border: "1px solid var(--dsw-alias-border-l1)",
|
|
974
|
+
borderRadius: 12,
|
|
1007
975
|
padding: "18px",
|
|
1008
|
-
boxShadow: "
|
|
976
|
+
boxShadow: "var(--dsw-shadow-lv2)"
|
|
1009
977
|
},
|
|
1010
978
|
onClick: (e) => e.stopPropagation()
|
|
1011
979
|
}, (0, react.createElement)("div", { style: {
|
|
1012
980
|
fontSize: 15,
|
|
1013
|
-
fontWeight: 500
|
|
981
|
+
fontWeight: 500,
|
|
982
|
+
color: "var(--dsw-alias-label-primary)"
|
|
1014
983
|
} }, t("delete.title")), (0, react.createElement)("p", { style: {
|
|
1015
984
|
fontSize: 13,
|
|
1016
|
-
color: "var(--dsw-alias-label-secondary
|
|
985
|
+
color: "var(--dsw-alias-label-secondary)",
|
|
1017
986
|
margin: 0
|
|
1018
987
|
} }, t("delete.confirm")), (0, react.createElement)("div", { style: {
|
|
1019
988
|
display: "flex",
|
|
@@ -1024,8 +993,8 @@ window.__ModuleLoader__.load({
|
|
|
1024
993
|
height: 32,
|
|
1025
994
|
padding: "0 14px",
|
|
1026
995
|
background: "transparent",
|
|
1027
|
-
color: "
|
|
1028
|
-
border: "1px solid var(--dsw-alias-border-l2
|
|
996
|
+
color: "var(--dsw-alias-label-primary)",
|
|
997
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
1029
998
|
borderRadius: 8,
|
|
1030
999
|
cursor: "pointer",
|
|
1031
1000
|
fontSize: 13
|
|
@@ -1035,8 +1004,8 @@ window.__ModuleLoader__.load({
|
|
|
1035
1004
|
style: {
|
|
1036
1005
|
height: 32,
|
|
1037
1006
|
padding: "0 14px",
|
|
1038
|
-
background: "var(--dsw-alias-state-error-primary
|
|
1039
|
-
color: "
|
|
1007
|
+
background: "var(--dsw-alias-state-error-primary)",
|
|
1008
|
+
color: "var(--dsw-alias-label-primary-foreground)",
|
|
1040
1009
|
border: "none",
|
|
1041
1010
|
borderRadius: 8,
|
|
1042
1011
|
cursor: "pointer",
|
|
@@ -1335,6 +1304,41 @@ window.__ModuleLoader__.load({
|
|
|
1335
1304
|
t
|
|
1336
1305
|
})
|
|
1337
1306
|
}, ImChannelsSection));
|
|
1307
|
+
const navLabels = /* @__PURE__ */ new Set([zh["section.label"], en["section.label"]]);
|
|
1308
|
+
const imNavSvg = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" data-imgw-nav=\"1\"><path d=\"M8.3125 0.981587C8.66767 1.0545 8.97902 1.20558 9.2627 1.43374C9.48724 1.61438 9.73029 1.85933 9.97949 2.10854L14.707 6.83608L13.293 8.25014L9 3.95717V15.0431H7V3.95717L2.70703 8.25014L1.29297 6.83608L6.02051 2.10854C6.26971 1.85933 6.51277 1.61438 6.7373 1.43374C6.97662 1.24126 7.28445 1.04542 7.6875 0.981587C7.8973 0.94841 8.1031 0.956564 8.3125 0.981587Z\" fill=\"currentColor\"/></svg>";
|
|
1309
|
+
const patchNavIcon = () => {
|
|
1310
|
+
if (typeof document === "undefined") return;
|
|
1311
|
+
for (const span of Array.from(document.querySelectorAll("button > span"))) {
|
|
1312
|
+
if (!navLabels.has(span.textContent ?? "")) continue;
|
|
1313
|
+
const button = span.parentElement;
|
|
1314
|
+
if (button === null) continue;
|
|
1315
|
+
const stale = button.querySelector("svg:not([data-imgw-nav])");
|
|
1316
|
+
if (stale === null) continue;
|
|
1317
|
+
const template = document.createElement("template");
|
|
1318
|
+
template.innerHTML = imNavSvg;
|
|
1319
|
+
const next = template.content.firstElementChild;
|
|
1320
|
+
if (next === null) continue;
|
|
1321
|
+
const cls = stale.getAttribute("class");
|
|
1322
|
+
if (cls !== null) next.setAttribute("class", cls);
|
|
1323
|
+
stale.replaceWith(next);
|
|
1324
|
+
}
|
|
1325
|
+
};
|
|
1326
|
+
if (typeof document !== "undefined" && typeof MutationObserver !== "undefined" && document.body !== null) {
|
|
1327
|
+
let scheduled = false;
|
|
1328
|
+
const schedule = () => {
|
|
1329
|
+
if (scheduled) return;
|
|
1330
|
+
scheduled = true;
|
|
1331
|
+
queueMicrotask(() => {
|
|
1332
|
+
scheduled = false;
|
|
1333
|
+
patchNavIcon();
|
|
1334
|
+
});
|
|
1335
|
+
};
|
|
1336
|
+
patchNavIcon();
|
|
1337
|
+
new MutationObserver(schedule).observe(document.body, {
|
|
1338
|
+
childList: true,
|
|
1339
|
+
subtree: true
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1338
1342
|
}
|
|
1339
1343
|
//#endregion
|
|
1340
1344
|
exports.apply = apply;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Context, Context as Context$1, Service } from "@deepseek-ai/cordis";
|
|
2
2
|
import Schema from "@deepseek-ai/schemastery";
|
|
3
|
+
import { SessionId } from "@deepseek-ai/dsh-session";
|
|
4
|
+
import "@deepseek-ai/dsh-agent";
|
|
3
5
|
import * as _deepseek_ai_cosmokit0 from "@deepseek-ai/cosmokit";
|
|
4
6
|
import { AskUserQuestionAnswer, AskUserQuestionItem } from "@deepseek-ai/dsh-user-questions";
|
|
5
7
|
|
package/lib/index.js
CHANGED
|
@@ -722,8 +722,11 @@ var CommandHandler = class {
|
|
|
722
722
|
this.gw.modelOverrides.delete(currentSessionId);
|
|
723
723
|
this.gw.sessionToConv.delete(currentSessionId);
|
|
724
724
|
}
|
|
725
|
-
const handle = await this.gw.ctx.agents.resume({
|
|
726
|
-
|
|
725
|
+
const handle = await this.gw.ctx.agents.resume({
|
|
726
|
+
resumeSessionId: targetSessionId,
|
|
727
|
+
agentOptions: this.gw.currentModelFor(targetSessionId),
|
|
728
|
+
setup: this.gw.presetSetup(targetSessionId)
|
|
729
|
+
});
|
|
727
730
|
this.gw.agentHandles.set(targetSessionId, handle);
|
|
728
731
|
this.gw.convToSession.set(convKey, targetSessionId);
|
|
729
732
|
this.gw.sessionToConv.set(targetSessionId, convKey);
|
|
@@ -1276,7 +1279,7 @@ const Config = Schema.object({
|
|
|
1276
1279
|
*/
|
|
1277
1280
|
var ImGatewayService = class extends Service {
|
|
1278
1281
|
config;
|
|
1279
|
-
static inject = ["agents"];
|
|
1282
|
+
static inject = ["agents", "agentPresets"];
|
|
1280
1283
|
channels = /* @__PURE__ */ new Map();
|
|
1281
1284
|
convToSession = /* @__PURE__ */ new Map();
|
|
1282
1285
|
sessionToConv = /* @__PURE__ */ new Map();
|
|
@@ -1581,8 +1584,11 @@ var ImGatewayService = class extends Service {
|
|
|
1581
1584
|
if (persistence) {
|
|
1582
1585
|
if ((await persistence.list()).find((header) => header.id === sessionId)) {
|
|
1583
1586
|
console.log(`[im-gateway] ensureSession: branch 2 (resume from persistence)`);
|
|
1584
|
-
const handle = await this.ctx.agents.resume({
|
|
1585
|
-
|
|
1587
|
+
const handle = await this.ctx.agents.resume({
|
|
1588
|
+
resumeSessionId: sessionId,
|
|
1589
|
+
agentOptions: this.currentModelFor(sessionId),
|
|
1590
|
+
setup: this.presetSetup(sessionId)
|
|
1591
|
+
});
|
|
1586
1592
|
this.agentHandles.set(sessionId, handle);
|
|
1587
1593
|
this.convToSession.set(convKey, sessionId);
|
|
1588
1594
|
this.sessionToConv.set(sessionId, convKey);
|
|
@@ -1598,15 +1604,20 @@ var ImGatewayService = class extends Service {
|
|
|
1598
1604
|
try {
|
|
1599
1605
|
handle = await this.ctx.agents.create({
|
|
1600
1606
|
sessionId,
|
|
1601
|
-
meta: { cwd: effectiveCwd }
|
|
1607
|
+
meta: { cwd: effectiveCwd },
|
|
1608
|
+
agentOptions: this.currentModelFor(sessionId),
|
|
1609
|
+
setup: this.presetSetup(sessionId)
|
|
1602
1610
|
});
|
|
1603
1611
|
} catch (err) {
|
|
1604
1612
|
if (isIdCollision(err)) {
|
|
1605
1613
|
console.log(`[im-gateway] ensureSession: id collision, falling back to resume`);
|
|
1606
|
-
handle = await this.ctx.agents.resume({
|
|
1614
|
+
handle = await this.ctx.agents.resume({
|
|
1615
|
+
resumeSessionId: sessionId,
|
|
1616
|
+
agentOptions: this.currentModelFor(sessionId),
|
|
1617
|
+
setup: this.presetSetup(sessionId)
|
|
1618
|
+
});
|
|
1607
1619
|
} else throw err;
|
|
1608
1620
|
}
|
|
1609
|
-
this.installModelSelection(handle.agent, sessionId);
|
|
1610
1621
|
this.agentHandles.set(sessionId, handle);
|
|
1611
1622
|
this.convToSession.set(convKey, sessionId);
|
|
1612
1623
|
this.sessionToConv.set(sessionId, convKey);
|
|
@@ -1712,6 +1723,27 @@ var ImGatewayService = class extends Service {
|
|
|
1712
1723
|
}
|
|
1713
1724
|
} catch {}
|
|
1714
1725
|
}
|
|
1726
|
+
/** Compute the initial model selection for a session (override → global → deployment default). */
|
|
1727
|
+
currentModelFor(sessionId) {
|
|
1728
|
+
const override = this.modelOverrides.get(sessionId) ?? this.globalModelOverride;
|
|
1729
|
+
if (override) return override;
|
|
1730
|
+
return this.ctx.get("agentDefaultModel")?.currentSelection();
|
|
1731
|
+
}
|
|
1732
|
+
/**
|
|
1733
|
+
* Agent setup callback: mount the 'standard' preset (tools, prompt sections,
|
|
1734
|
+
* skills) and install model selection into the agent's prompt assembly.
|
|
1735
|
+
* Called by agents.create/agents.resume BEFORE the agent is published, so
|
|
1736
|
+
* the first prompt assembly has all tools and {{provider}}/{{model}} variables.
|
|
1737
|
+
*/
|
|
1738
|
+
presetSetup(sessionId) {
|
|
1739
|
+
const gateway = this;
|
|
1740
|
+
return async (agentCtx) => {
|
|
1741
|
+
const presets = gateway.ctx.get("agentPresets");
|
|
1742
|
+
if (presets) await presets.mount(agentCtx, "standard");
|
|
1743
|
+
else console.warn("[im-gateway] agentPresets not available, agent will have no tools");
|
|
1744
|
+
gateway.installModelSelection(agentCtx, sessionId);
|
|
1745
|
+
};
|
|
1746
|
+
}
|
|
1715
1747
|
/**
|
|
1716
1748
|
* Wire the agent-default-model selection into one agent's prompt assembly
|
|
1717
1749
|
* (mirrors dsh-host-apiproxy selectionFor). Listeners live on the agent's
|
|
@@ -1724,7 +1756,7 @@ var ImGatewayService = class extends Service {
|
|
|
1724
1756
|
* `modelRefs` so `/model` can mutate `current` on the same object the prompt
|
|
1725
1757
|
* assembly reads.
|
|
1726
1758
|
*/
|
|
1727
|
-
installModelSelection(
|
|
1759
|
+
installModelSelection(agentCtx, sessionId) {
|
|
1728
1760
|
const gateway = this;
|
|
1729
1761
|
const defaults = this.ctx.get("agentDefaultModel");
|
|
1730
1762
|
const ref = {
|
|
@@ -1743,7 +1775,7 @@ var ImGatewayService = class extends Service {
|
|
|
1743
1775
|
},
|
|
1744
1776
|
assembled: void 0
|
|
1745
1777
|
};
|
|
1746
|
-
installModelSelection(
|
|
1778
|
+
installModelSelection(agentCtx, ref);
|
|
1747
1779
|
this.modelRefs.set(sessionId, ref);
|
|
1748
1780
|
}
|
|
1749
1781
|
async runTurn(sessionId, convKey, channel, parts) {
|
package/package.json
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@lijian-ui/dsh-im-gateway",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Multi-channel IM gateway plugin for DeepSeek Harness (dsh): DingTalk / QQ / WeChat(iLink) with QR-scan binding, streaming replies, and a unified ctx.imGateway service. 为 DeepSeek Harness 提供钉钉/QQ/个人微信多 IM 通道接入。",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "lib/index.js",
|
|
8
|
-
"types": "lib/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./lib/index.d.ts",
|
|
12
|
-
"default": "./lib/index.js"
|
|
13
|
-
},
|
|
14
|
-
"./client": {
|
|
15
|
-
"default": "./lib/client.js"
|
|
16
|
-
},
|
|
17
|
-
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
18
|
-
"./package.json": "./package.json"
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"lib/**/*.js",
|
|
22
|
-
"lib/**/*.d.ts",
|
|
23
|
-
"cordis.patch.yml",
|
|
24
|
-
"README.md",
|
|
25
|
-
"README.en.md",
|
|
26
|
-
"LICENSE"
|
|
27
|
-
],
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build": "tsdown",
|
|
30
|
-
"watch": "tsdown --watch",
|
|
31
|
-
"typecheck": "tsc --noEmit",
|
|
32
|
-
"test": "node --test tests/*.test.mjs",
|
|
33
|
-
"prepare": "npm run build"
|
|
34
|
-
},
|
|
35
|
-
"keywords": [
|
|
36
|
-
"deepseek-harness",
|
|
37
|
-
"dsh",
|
|
38
|
-
"dsh-plugin",
|
|
39
|
-
"im-gateway",
|
|
40
|
-
"dingtalk",
|
|
41
|
-
"qq",
|
|
42
|
-
"wechat",
|
|
43
|
-
"weixin",
|
|
44
|
-
"cordis"
|
|
45
|
-
],
|
|
46
|
-
"repository": {
|
|
47
|
-
"type": "git",
|
|
48
|
-
"url": "git+https://github.com/lijian-ui/dsh-im-gateway.git"
|
|
49
|
-
},
|
|
50
|
-
"dsh": {
|
|
51
|
-
"bundle": {
|
|
52
|
-
"patch": "./cordis.patch.yml"
|
|
53
|
-
},
|
|
54
|
-
"client": {
|
|
55
|
-
"inject": [
|
|
56
|
-
"@deepseek-ai/dsh-client-runtime",
|
|
57
|
-
"@deepseek-ai/dsh-client-locale",
|
|
58
|
-
"@deepseek-ai/dsh-api-gateway"
|
|
59
|
-
],
|
|
60
|
-
"platform": "web",
|
|
61
|
-
"immediately": true
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"peerDependencies": {
|
|
65
|
-
"@deepseek-ai/cordis": "*",
|
|
66
|
-
"@deepseek-ai/schemastery": "*",
|
|
67
|
-
"@deepseek-ai/dsh-agent": "0.1.0-rc.6",
|
|
68
|
-
"@deepseek-ai/dsh-llm": "0.1.0-rc.6",
|
|
69
|
-
"@deepseek-ai/dsh-session": "0.1.0-rc.6",
|
|
70
|
-
"@deepseek-ai/dsh-settings": "*",
|
|
71
|
-
"@deepseek-ai/dsh-typert-protocol": "*",
|
|
72
|
-
"@deepseek-ai/dsh-user-approval": "0.1.0-rc.6",
|
|
73
|
-
"@deepseek-ai/dsh-user-questions": "0.1.0-rc.6"
|
|
74
|
-
},
|
|
75
|
-
"dependencies": {
|
|
76
|
-
"@tencent-connect/qqbot-connector": "^1.2.0",
|
|
77
|
-
"@tencent-connect/qqbot-nodejs": "^1.0.4",
|
|
78
|
-
"dingtalk-stream": "^2.1.5",
|
|
79
|
-
"qrcode": "^1.5.4",
|
|
80
|
-
"ws": "^8.18.0"
|
|
81
|
-
},
|
|
82
|
-
"devDependencies": {
|
|
83
|
-
"@deepseek-ai/cordis": "4.0.1",
|
|
84
|
-
"@deepseek-ai/schemastery": "3.18.1",
|
|
85
|
-
"@deepseek-ai/dsh-agent": "0.1.0-rc.6",
|
|
86
|
-
"@deepseek-ai/dsh-llm": "0.1.0-rc.6",
|
|
87
|
-
"@deepseek-ai/dsh-session": "0.1.0-rc.6",
|
|
88
|
-
"@deepseek-ai/dsh-settings": "0.1.0-rc.6",
|
|
89
|
-
"@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.6",
|
|
90
|
-
"@deepseek-ai/dsh-user-approval": "0.1.0-rc.6",
|
|
91
|
-
"@deepseek-ai/dsh-user-questions": "0.1.0-rc.6",
|
|
92
|
-
"@deepseek-ai/dsh-client-connection": "0.1.0-rc.6",
|
|
93
|
-
"@deepseek-ai/dsh-client-locale": "0.1.0-rc.6",
|
|
94
|
-
"@deepseek-ai/dsh-client-runtime": "0.1.0-rc.6",
|
|
95
|
-
"@deepseek-ai/dsh-client-schema-form": "0.1.0-rc.6",
|
|
96
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.6",
|
|
97
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.6",
|
|
98
|
-
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.0-rc.6",
|
|
99
|
-
"@deepseek-ai/dsh-api-gateway": "0.1.0-rc.6",
|
|
100
|
-
"@types/node": "^22.0.0",
|
|
101
|
-
"@types/qrcode": "^1.5.5",
|
|
102
|
-
"@types/react": "^18.3.0",
|
|
103
|
-
"@types/ws": "^8.5.0",
|
|
104
|
-
"react": "^18.2.0",
|
|
105
|
-
"tsdown": "^0.12.0",
|
|
106
|
-
"typescript": "^5.6.0"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@lijian-ui/dsh-im-gateway",
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "Multi-channel IM gateway plugin for DeepSeek Harness (dsh): DingTalk / QQ / WeChat(iLink) with QR-scan binding, streaming replies, and a unified ctx.imGateway service. 为 DeepSeek Harness 提供钉钉/QQ/个人微信多 IM 通道接入。",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "lib/index.js",
|
|
8
|
+
"types": "lib/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./lib/index.d.ts",
|
|
12
|
+
"default": "./lib/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./client": {
|
|
15
|
+
"default": "./lib/client.js"
|
|
16
|
+
},
|
|
17
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"lib/**/*.js",
|
|
22
|
+
"lib/**/*.d.ts",
|
|
23
|
+
"cordis.patch.yml",
|
|
24
|
+
"README.md",
|
|
25
|
+
"README.en.md",
|
|
26
|
+
"LICENSE"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "tsdown",
|
|
30
|
+
"watch": "tsdown --watch",
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
32
|
+
"test": "node --test tests/*.test.mjs",
|
|
33
|
+
"prepare": "npm run build"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"deepseek-harness",
|
|
37
|
+
"dsh",
|
|
38
|
+
"dsh-plugin",
|
|
39
|
+
"im-gateway",
|
|
40
|
+
"dingtalk",
|
|
41
|
+
"qq",
|
|
42
|
+
"wechat",
|
|
43
|
+
"weixin",
|
|
44
|
+
"cordis"
|
|
45
|
+
],
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/lijian-ui/dsh-im-gateway.git"
|
|
49
|
+
},
|
|
50
|
+
"dsh": {
|
|
51
|
+
"bundle": {
|
|
52
|
+
"patch": "./cordis.patch.yml"
|
|
53
|
+
},
|
|
54
|
+
"client": {
|
|
55
|
+
"inject": [
|
|
56
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
57
|
+
"@deepseek-ai/dsh-client-locale",
|
|
58
|
+
"@deepseek-ai/dsh-api-gateway"
|
|
59
|
+
],
|
|
60
|
+
"platform": "web",
|
|
61
|
+
"immediately": true
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"@deepseek-ai/cordis": "*",
|
|
66
|
+
"@deepseek-ai/schemastery": "*",
|
|
67
|
+
"@deepseek-ai/dsh-agent": "0.1.0-rc.6",
|
|
68
|
+
"@deepseek-ai/dsh-llm": "0.1.0-rc.6",
|
|
69
|
+
"@deepseek-ai/dsh-session": "0.1.0-rc.6",
|
|
70
|
+
"@deepseek-ai/dsh-settings": "*",
|
|
71
|
+
"@deepseek-ai/dsh-typert-protocol": "*",
|
|
72
|
+
"@deepseek-ai/dsh-user-approval": "0.1.0-rc.6",
|
|
73
|
+
"@deepseek-ai/dsh-user-questions": "0.1.0-rc.6"
|
|
74
|
+
},
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"@tencent-connect/qqbot-connector": "^1.2.0",
|
|
77
|
+
"@tencent-connect/qqbot-nodejs": "^1.0.4",
|
|
78
|
+
"dingtalk-stream": "^2.1.5",
|
|
79
|
+
"qrcode": "^1.5.4",
|
|
80
|
+
"ws": "^8.18.0"
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@deepseek-ai/cordis": "4.0.1",
|
|
84
|
+
"@deepseek-ai/schemastery": "3.18.1",
|
|
85
|
+
"@deepseek-ai/dsh-agent": "0.1.0-rc.6",
|
|
86
|
+
"@deepseek-ai/dsh-llm": "0.1.0-rc.6",
|
|
87
|
+
"@deepseek-ai/dsh-session": "0.1.0-rc.6",
|
|
88
|
+
"@deepseek-ai/dsh-settings": "0.1.0-rc.6",
|
|
89
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.6",
|
|
90
|
+
"@deepseek-ai/dsh-user-approval": "0.1.0-rc.6",
|
|
91
|
+
"@deepseek-ai/dsh-user-questions": "0.1.0-rc.6",
|
|
92
|
+
"@deepseek-ai/dsh-client-connection": "0.1.0-rc.6",
|
|
93
|
+
"@deepseek-ai/dsh-client-locale": "0.1.0-rc.6",
|
|
94
|
+
"@deepseek-ai/dsh-client-runtime": "0.1.0-rc.6",
|
|
95
|
+
"@deepseek-ai/dsh-client-schema-form": "0.1.0-rc.6",
|
|
96
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.6",
|
|
97
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.6",
|
|
98
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.0-rc.6",
|
|
99
|
+
"@deepseek-ai/dsh-api-gateway": "0.1.0-rc.6",
|
|
100
|
+
"@types/node": "^22.0.0",
|
|
101
|
+
"@types/qrcode": "^1.5.5",
|
|
102
|
+
"@types/react": "^18.3.0",
|
|
103
|
+
"@types/ws": "^8.5.0",
|
|
104
|
+
"react": "^18.2.0",
|
|
105
|
+
"tsdown": "^0.12.0",
|
|
106
|
+
"typescript": "^5.6.0"
|
|
107
|
+
}
|
|
108
|
+
}
|