dsh-dock 0.20.0 → 0.21.1
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 +14 -10
- package/client.js +1164 -666
- package/features/animation/view.jsx +81 -4
- package/features/balance/view.js +9 -6
- package/features/notify/host.js +50 -15
- package/features/notify/view.jsx +713 -367
- package/features/tokenlog/view.jsx +9 -3
- package/package.json +1 -1
- package/screenshots/dock-notify.png +0 -0
- package/src/client.jsx +182 -106
- package/src/host-core.js +6 -0
|
@@ -1010,6 +1010,79 @@ export function AnimationOverlay(props) {
|
|
|
1010
1010
|
setTimeout(() => { botClickBlockRef.current = false; }, 0);
|
|
1011
1011
|
}
|
|
1012
1012
|
};
|
|
1013
|
+
// ===== 右下角状态徽标自由拖拽:整条可拖动(localStorage 持久化),避免压住任务清单/输入卡 =====
|
|
1014
|
+
// 与桌面伙伴互不干扰(两者在不同 mode 下出现)。双击复位回右下默认位。
|
|
1015
|
+
const [badgePos, setBadgePos] = useState(null); // null = 默认位(右下、输入卡上方)
|
|
1016
|
+
const badgePosRef = useRef(null);
|
|
1017
|
+
const badgeDragRef = useRef(null); // { sx, sy, ox, oy, moved }
|
|
1018
|
+
const badgeClickBlockRef = useRef(false);
|
|
1019
|
+
useEffect(() => {
|
|
1020
|
+
try {
|
|
1021
|
+
if (typeof localStorage === "undefined") return;
|
|
1022
|
+
const raw = localStorage.getItem("dsh-dock/anim/badge-pos/v1");
|
|
1023
|
+
const p2 = raw ? JSON.parse(raw) : null;
|
|
1024
|
+
if (p2 && typeof p2.x === "number" && typeof p2.y === "number" && typeof window !== "undefined") {
|
|
1025
|
+
// 恢复时钳制回视口内(窗口可能变小了)
|
|
1026
|
+
const card = document.querySelector(".dkan-badge");
|
|
1027
|
+
const w = card ? card.offsetWidth : 180, h = card ? card.offsetHeight : 34;
|
|
1028
|
+
const x = Math.min(Math.max(8, p2.x), Math.max(8, window.innerWidth - w - 8));
|
|
1029
|
+
const y = Math.min(Math.max(8, p2.y), Math.max(8, window.innerHeight - h - 8));
|
|
1030
|
+
badgePosRef.current = { x, y };
|
|
1031
|
+
setBadgePos({ x, y });
|
|
1032
|
+
}
|
|
1033
|
+
} catch { /* localStorage 不可用时用默认位 */ }
|
|
1034
|
+
}, []);
|
|
1035
|
+
const onBadgePointerDown = (e) => {
|
|
1036
|
+
if (e.button !== 0) return;
|
|
1037
|
+
const r = e.currentTarget.getBoundingClientRect();
|
|
1038
|
+
badgeDragRef.current = { sx: e.clientX, sy: e.clientY, ox: r.left, oy: r.top, moved: false };
|
|
1039
|
+
try { e.currentTarget.setPointerCapture(e.pointerId); } catch { /* 无指针捕获也能拖 */ }
|
|
1040
|
+
};
|
|
1041
|
+
const onBadgePointerMove = (e) => {
|
|
1042
|
+
const d = badgeDragRef.current;
|
|
1043
|
+
if (!d || typeof window === "undefined") return;
|
|
1044
|
+
const dx = e.clientX - d.sx, dy = e.clientY - d.sy;
|
|
1045
|
+
if (!d.moved && Math.hypot(dx, dy) < 4) return; // 小抖动不当作拖动,保证点击可进面板
|
|
1046
|
+
d.moved = true;
|
|
1047
|
+
const el = e.currentTarget;
|
|
1048
|
+
const w = el.offsetWidth || 180, h = el.offsetHeight || 34;
|
|
1049
|
+
const x = Math.min(Math.max(8, d.ox + dx), window.innerWidth - w - 8);
|
|
1050
|
+
const y = Math.min(Math.max(8, d.oy + dy), window.innerHeight - h - 8);
|
|
1051
|
+
badgePosRef.current = { x, y };
|
|
1052
|
+
setBadgePos({ x, y });
|
|
1053
|
+
};
|
|
1054
|
+
const onBadgePointerUp = () => {
|
|
1055
|
+
const d = badgeDragRef.current;
|
|
1056
|
+
badgeDragRef.current = null;
|
|
1057
|
+
if (d && d.moved) {
|
|
1058
|
+
try { if (typeof localStorage !== "undefined") localStorage.setItem("dsh-dock/anim/badge-pos/v1", JSON.stringify(badgePosRef.current)); } catch { /* 持久化失败静默 */ }
|
|
1059
|
+
badgeClickBlockRef.current = true; // 拖动结束的那次 click 不跳面板
|
|
1060
|
+
setTimeout(() => { badgeClickBlockRef.current = false; }, 0);
|
|
1061
|
+
}
|
|
1062
|
+
};
|
|
1063
|
+
const resetBadgePos = () => {
|
|
1064
|
+
try { if (typeof localStorage !== "undefined") localStorage.removeItem("dsh-dock/anim/badge-pos/v1"); } catch { /* 忽略 */ }
|
|
1065
|
+
badgePosRef.current = null;
|
|
1066
|
+
setBadgePos(null);
|
|
1067
|
+
};
|
|
1068
|
+
// 单击进面板、双击复位:单击延后 240ms 执行,等第二次点击到来就改成复位(否则双击会先开面板)。
|
|
1069
|
+
const badgeClickTimer = useRef(null);
|
|
1070
|
+
const onBadgeClick = () => {
|
|
1071
|
+
if (badgeClickBlockRef.current) return;
|
|
1072
|
+
if (badgeClickTimer.current) {
|
|
1073
|
+
clearTimeout(badgeClickTimer.current);
|
|
1074
|
+
badgeClickTimer.current = null;
|
|
1075
|
+
resetBadgePos();
|
|
1076
|
+
return;
|
|
1077
|
+
}
|
|
1078
|
+
badgeClickTimer.current = setTimeout(() => {
|
|
1079
|
+
badgeClickTimer.current = null;
|
|
1080
|
+
openPanel("animation");
|
|
1081
|
+
}, 240);
|
|
1082
|
+
};
|
|
1083
|
+
const badgeStyle = badgePos
|
|
1084
|
+
? Object.assign({}, speedStyle, { "--dkan-phase": phaseColor(waitingTask ? "code" : phase), left: badgePos.x, top: badgePos.y, right: "auto", bottom: "auto" })
|
|
1085
|
+
: Object.assign({}, speedStyle, { "--dkan-phase": phaseColor(waitingTask ? "code" : phase) });
|
|
1013
1086
|
const onBotResizePointerDown = (e) => {
|
|
1014
1087
|
if (e.button !== 0) return;
|
|
1015
1088
|
e.preventDefault();
|
|
@@ -1102,9 +1175,13 @@ export function AnimationOverlay(props) {
|
|
|
1102
1175
|
{/* 右下角状态徽标:dot 随模式变化(breathe/ring 装饰),颜色随任务阶段、呼吸随吞吐;点击进功能坞动画页 */}
|
|
1103
1176
|
{ambientOn && mode !== "robot" ? (
|
|
1104
1177
|
<button type="button" className={"dkan-badge" + (mode === "breathe" ? " dkan-badge-breathe" : "")}
|
|
1105
|
-
style={
|
|
1106
|
-
title={active.length + " 个任务进行中 · " + (waitingTask ? waitWord : phaseLabel(phase)) + " · 点击查看任务动画页"}
|
|
1107
|
-
|
|
1178
|
+
style={badgeStyle}
|
|
1179
|
+
title={active.length + " 个任务进行中 · " + (waitingTask ? waitWord : phaseLabel(phase)) + " · 点击查看任务动画页 · 可拖动到任意位置,双击复位"}
|
|
1180
|
+
onPointerDown={onBadgePointerDown}
|
|
1181
|
+
onPointerMove={onBadgePointerMove}
|
|
1182
|
+
onPointerUp={onBadgePointerUp}
|
|
1183
|
+
onPointerCancel={onBadgePointerUp}
|
|
1184
|
+
onClick={onBadgeClick}>
|
|
1108
1185
|
<span className="dkan-dotwrap">
|
|
1109
1186
|
<span className="dkan-dot" />
|
|
1110
1187
|
{mode === "breathe" ? <span className="dkan-halo" /> : null}
|
|
@@ -1411,7 +1488,7 @@ const css = [
|
|
|
1411
1488
|
".dkan-fx-confetti i{position:absolute;top:-14px;width:8px;height:13px;border-radius:2px;box-shadow:0 0 4px currentColor;animation:dkan-confetti 2s var(--ds-ease-in-out) forwards;}",
|
|
1412
1489
|
"@keyframes dkan-confetti{0%{opacity:1;transform:translateY(0) rotate(0)}100%{opacity:0;transform:translateY(75vh) translateX(var(--dx)) rotate(var(--r))}}",
|
|
1413
1490
|
// 右下角状态徽标(玻璃拟态,可点击);抬到 dsh 输入卡上方避免重叠错位
|
|
1414
|
-
".dkan-badge{position:fixed;right:20px;bottom:calc(var(--dsh-composer-height,152px) + 20px);z-index:2;display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:999px;cursor:
|
|
1491
|
+
".dkan-badge{position:fixed;right:20px;bottom:calc(var(--dsh-composer-height,152px) + 20px);z-index:2;display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:999px;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;border:1px solid var(--dsw-alias-border-l1);background:color-mix(in srgb,var(--dsw-alias-bg-layer-2) 78%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 6px 24px rgb(0 0 0 / .16);color:var(--dsw-alias-label-secondary);font-family:inherit;font-size:12px;line-height:18px;pointer-events:auto;animation:dkan-rise .3s var(--ds-ease-in-out);transition:color .15s var(--ds-ease-in-out);}",
|
|
1415
1492
|
".dkan-badge:hover{color:var(--dsw-alias-label-primary);}",
|
|
1416
1493
|
".dkan-badge .n{color:var(--dsw-alias-label-primary);font-weight:600;}",
|
|
1417
1494
|
"@keyframes dkan-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}",
|
package/features/balance/view.js
CHANGED
|
@@ -260,10 +260,10 @@ function chipBalanceText(p) {
|
|
|
260
260
|
const b = p && p.balance;
|
|
261
261
|
if (!b) return "余额 …";
|
|
262
262
|
if (b.status !== "ok") {
|
|
263
|
-
if (b.status === "login-required") return "
|
|
264
|
-
if (b.status === "no-credential") return "
|
|
265
|
-
if (b.status === "unsupported") return "
|
|
266
|
-
return "
|
|
263
|
+
if (b.status === "login-required") return "余额 需登录";
|
|
264
|
+
if (b.status === "no-credential") return "余额 无密钥";
|
|
265
|
+
if (b.status === "unsupported") return "余额 不支持";
|
|
266
|
+
return "余额 查询失败";
|
|
267
267
|
}
|
|
268
268
|
if (b.kind === "quota") {
|
|
269
269
|
const v = Number(b.remaining);
|
|
@@ -289,11 +289,12 @@ function BalanceChip(props) {
|
|
|
289
289
|
const def = selProvider || (data && data.default ? data.default.provider : null);
|
|
290
290
|
const cur = def ? providers.find((p) => p.id === def) : null;
|
|
291
291
|
const accent = cur ? accentOf(cur.id) : "#64748b";
|
|
292
|
-
const text = snap.error ? "
|
|
292
|
+
const text = snap.error ? "余额 失败" : (!data ? (snap.loading ? "余额 …" : "余额 —") : (cur ? chipBalanceText(cur) : "余额 —"));
|
|
293
293
|
const selModel = sel && (sel.model || (sel.selected && sel.selected.model)) || null;
|
|
294
294
|
const title = cur
|
|
295
295
|
? (cur.displayName || cur.id) + (selModel ? " · 当前模型 " + selModel : "") + " · 点击在功能坞查看余额详情"
|
|
296
296
|
: "点击打开功能坞 · 模型余额";
|
|
297
|
+
const mm = /^(余额 )([\s\S]*)$/.exec(text);
|
|
297
298
|
return react.createElement("button", {
|
|
298
299
|
type: "button",
|
|
299
300
|
className: "dockchip" + (snap.error || (cur && cur.balance && cur.balance.status === "error") ? " err" : ""),
|
|
@@ -302,7 +303,9 @@ function BalanceChip(props) {
|
|
|
302
303
|
onClick: () => openPanel("balance", def ? { provider: def } : null),
|
|
303
304
|
},
|
|
304
305
|
react.createElement("span", { className: "dockchip-dot", style: { background: accent } }),
|
|
305
|
-
react.createElement("span",
|
|
306
|
+
mm ? react.createElement("span", { className: "dockchip-pre" }, mm[1]) : null,
|
|
307
|
+
mm ? react.createElement("span", { className: "dockchip-pre-s" }, "余额 ") : null,
|
|
308
|
+
react.createElement("span", null, mm ? mm[2] : text));
|
|
306
309
|
}
|
|
307
310
|
|
|
308
311
|
export const feature = {
|
package/features/notify/host.js
CHANGED
|
@@ -50,6 +50,11 @@ function defaultConfig() {
|
|
|
50
50
|
voiceLang: '',
|
|
51
51
|
// 指定音色(speechSynthesis voiceURI,设备相关;空 = 按语言自动挑,本机没有时客户端回落)
|
|
52
52
|
voiceURI: '',
|
|
53
|
+
// 事件 × 渠道矩阵(扁平键 card:complete / sound:error / system:confirm / ...;
|
|
54
|
+
// 未设置的键回退旧字段,升级不改变既有行为)
|
|
55
|
+
eventMatrix: {},
|
|
56
|
+
// 群机器人消息口径三挡:brief / medium / detailed
|
|
57
|
+
pushMode: 'detailed',
|
|
53
58
|
// 迁移标记(schema 默认 false):settings 不可用时的兜底取 true——迁移由
|
|
54
59
|
// src/host-core.js migrateNotifyConfig 统一负责,这里只是原样带回,不影响通知行为。
|
|
55
60
|
migratedFromAnimation: true,
|
|
@@ -69,11 +74,21 @@ function readConfig(ctx) {
|
|
|
69
74
|
if (!SOUND_EFFECTS.includes(cfg.soundEffect)) cfg.soundEffect = 'chime'
|
|
70
75
|
if (cfg.voiceMode !== 'brief' && cfg.voiceMode !== 'medium' && cfg.voiceMode !== 'detailed') cfg.voiceMode = 'brief'
|
|
71
76
|
if (cfg.cardMode !== 'brief' && cfg.cardMode !== 'medium' && cfg.cardMode !== 'detailed') cfg.cardMode = 'detailed'
|
|
77
|
+
if (cfg.pushMode !== 'brief' && cfg.pushMode !== 'medium' && cfg.pushMode !== 'detailed') cfg.pushMode = 'detailed'
|
|
78
|
+
if (!cfg.eventMatrix || typeof cfg.eventMatrix !== 'object' || Array.isArray(cfg.eventMatrix)) cfg.eventMatrix = {}
|
|
72
79
|
}
|
|
73
80
|
} catch { /* settings 未挂载,用默认 */ }
|
|
74
81
|
return cfg
|
|
75
82
|
}
|
|
76
83
|
|
|
84
|
+
/** 事件 × 渠道开关:矩阵里显式设置过就用它,否则回退到旧字段(fallback)。 */
|
|
85
|
+
function matrixEnabled(cfg, channel, event, fallback) {
|
|
86
|
+
const key = channel + ':' + event
|
|
87
|
+
const matrix = cfg && cfg.eventMatrix
|
|
88
|
+
if (matrix && typeof matrix === 'object' && typeof matrix[key] === 'boolean') return matrix[key]
|
|
89
|
+
return fallback !== false
|
|
90
|
+
}
|
|
91
|
+
|
|
77
92
|
function truncate(str, max = 160) {
|
|
78
93
|
if (!str) return ''
|
|
79
94
|
return String(str).length > max ? String(str).slice(0, max) + '…' : str
|
|
@@ -106,19 +121,23 @@ const END_REASON_LABELS = {
|
|
|
106
121
|
}
|
|
107
122
|
|
|
108
123
|
// 钉钉与飞书共用的消息正文(各端再按各自 markdown 方言拼接)
|
|
109
|
-
|
|
124
|
+
// mode: brief = 任务与结果;medium = 加模型/耗时;detailed = 再加回合、Token 与摘要。
|
|
125
|
+
function buildMessageLines(t, mode) {
|
|
110
126
|
const success = !t.endReason || t.endReason === 'completed'
|
|
111
127
|
const reasonLabel = END_REASON_LABELS[t.endReason] || '✅ 完成'
|
|
112
128
|
const models = t.models.length > 0 ? t.models.join(', ') : '未知'
|
|
129
|
+
const tone = mode === 'brief' || mode === 'medium' ? mode : 'detailed'
|
|
113
130
|
const lines = []
|
|
114
131
|
lines.push(`### ${success ? '✅' : '📢'} dsh 任务${success ? '完成' : '结束'}`)
|
|
115
132
|
lines.push(`**任务**: ${t.title}`)
|
|
116
|
-
lines.push(`**模型**: ${models}${t.provider ? `(${t.provider})` : ''}`)
|
|
117
|
-
lines.push(`**耗时**: ${fmtDurCn(t.duration)}
|
|
118
|
-
|
|
119
|
-
|
|
133
|
+
if (tone !== 'brief') lines.push(`**模型**: ${models}${t.provider ? `(${t.provider})` : ''}`)
|
|
134
|
+
lines.push(`**耗时**: ${fmtDurCn(t.duration)}${tone === 'brief' ? '' : `(${fmtClockOf(t.startTime)} → ${fmtClockOf(t.endTime)})`}`)
|
|
135
|
+
if (tone === 'detailed') {
|
|
136
|
+
lines.push(`**回合**: ${t.turns} · 步骤 ${t.steps}${t.toolCalls ? ` · 工具 ${t.toolCalls} 次` : ''}`)
|
|
137
|
+
lines.push(`**Token**: 输入 ${t.inputTokens.toLocaleString()} / 输出 ${t.outputTokens.toLocaleString()} / 总计 ${t.totalTokens.toLocaleString()}`)
|
|
138
|
+
}
|
|
120
139
|
lines.push(`**结果**: ${reasonLabel}${t.errorMessage ? `:${truncate(t.errorMessage, 120)}` : ''}`)
|
|
121
|
-
if (t.lastText) {
|
|
140
|
+
if (tone !== 'brief' && t.lastText) {
|
|
122
141
|
lines.push(`> ${truncate(t.lastText, 200)}`)
|
|
123
142
|
}
|
|
124
143
|
lines.push('---')
|
|
@@ -130,8 +149,8 @@ function buildMessageLines(t) {
|
|
|
130
149
|
}
|
|
131
150
|
}
|
|
132
151
|
|
|
133
|
-
function buildDingtalkMessage(t) {
|
|
134
|
-
const { title, lines } = buildMessageLines(t)
|
|
152
|
+
function buildDingtalkMessage(t, mode) {
|
|
153
|
+
const { title, lines } = buildMessageLines(t, mode)
|
|
135
154
|
return {
|
|
136
155
|
title,
|
|
137
156
|
// 钉钉 markdown 不渲染单个 \n,行之间必须用空行分隔才能换行
|
|
@@ -140,8 +159,8 @@ function buildDingtalkMessage(t) {
|
|
|
140
159
|
}
|
|
141
160
|
|
|
142
161
|
// 飞书 interactive 卡片:标题进 header,正文走 lark_md(支持 **加粗** 与 \n 换行,不支持 ### 标题)
|
|
143
|
-
function buildFeishuMessage(t) {
|
|
144
|
-
const { title, success, lines } = buildMessageLines(t)
|
|
162
|
+
function buildFeishuMessage(t, mode) {
|
|
163
|
+
const { title, success, lines } = buildMessageLines(t, mode)
|
|
145
164
|
const body = lines.filter((l) => !l.startsWith('### ')).join('\n')
|
|
146
165
|
return {
|
|
147
166
|
title,
|
|
@@ -223,14 +242,15 @@ export const feature = {
|
|
|
223
242
|
disposers.push(() => lease.release())
|
|
224
243
|
const tracker = lease.tracker
|
|
225
244
|
|
|
226
|
-
// =====
|
|
245
|
+
// ===== 群机器人推送(宿主侧直发,异步不阻塞;事件筛选走 eventMatrix,缺省回退 notifyOn*) =====
|
|
227
246
|
async function pushDingtalkIfNeeded(record) {
|
|
228
247
|
try {
|
|
229
248
|
const cfg = readConfig(ctx)
|
|
230
249
|
if (!cfg.dingtalkEnabled || !cfg.dingtalkWebhook) return
|
|
231
250
|
const success = !record.endReason || record.endReason === 'completed'
|
|
232
|
-
|
|
233
|
-
|
|
251
|
+
const event = success ? 'complete' : 'error'
|
|
252
|
+
if (!matrixEnabled(cfg, 'dingtalk', event, success ? cfg.notifyOnComplete : cfg.notifyOnError)) return
|
|
253
|
+
const { title, text } = buildDingtalkMessage(record, cfg.pushMode)
|
|
234
254
|
const r = await sendDingtalk(cfg.dingtalkWebhook, title, text)
|
|
235
255
|
if (r.ok) console.log('[dsh-dock] notify dingtalk pushed:', title)
|
|
236
256
|
else console.error('[dsh-dock] notify dingtalk push failed:', r.error)
|
|
@@ -244,8 +264,9 @@ export const feature = {
|
|
|
244
264
|
const cfg = readConfig(ctx)
|
|
245
265
|
if (!cfg.feishuEnabled || !cfg.feishuWebhook) return
|
|
246
266
|
const success = !record.endReason || record.endReason === 'completed'
|
|
247
|
-
|
|
248
|
-
|
|
267
|
+
const event = success ? 'complete' : 'error'
|
|
268
|
+
if (!matrixEnabled(cfg, 'feishu', event, success ? cfg.notifyOnComplete : cfg.notifyOnError)) return
|
|
269
|
+
const { title, card } = buildFeishuMessage(record, cfg.pushMode)
|
|
249
270
|
const r = await sendFeishu(cfg.feishuWebhook, title, card)
|
|
250
271
|
if (r.ok) console.log('[dsh-dock] notify feishu pushed:', title)
|
|
251
272
|
else console.error('[dsh-dock] notify feishu push failed:', r.error)
|
|
@@ -298,6 +319,20 @@ export const feature = {
|
|
|
298
319
|
if (typeof p.systemNotify === 'boolean') cfg.systemNotify = p.systemNotify
|
|
299
320
|
if (typeof p.soundNotify === 'boolean') cfg.soundNotify = p.soundNotify
|
|
300
321
|
if (typeof p.soundEffect === 'string' && SOUND_EFFECTS.includes(p.soundEffect)) cfg.soundEffect = p.soundEffect
|
|
322
|
+
// 群机器人消息口径三挡
|
|
323
|
+
if (typeof p.pushMode === 'string' && (p.pushMode === 'brief' || p.pushMode === 'medium' || p.pushMode === 'detailed')) {
|
|
324
|
+
cfg.pushMode = p.pushMode
|
|
325
|
+
}
|
|
326
|
+
// 事件 × 渠道矩阵:只接受白名单键 + 布尔值,合并写回
|
|
327
|
+
if (p.eventMatrix && typeof p.eventMatrix === 'object' && !Array.isArray(p.eventMatrix)) {
|
|
328
|
+
const matrix = Object.assign({}, cfg.eventMatrix || {})
|
|
329
|
+
for (const [key, value] of Object.entries(p.eventMatrix)) {
|
|
330
|
+
if (typeof value === 'boolean' && /^(card|sound|system|voice|dingtalk|feishu):(complete|error|confirm|stuck)$/.test(key)) {
|
|
331
|
+
matrix[key] = value
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
cfg.eventMatrix = matrix
|
|
335
|
+
}
|
|
301
336
|
if (typeof p.dingtalkEnabled === 'boolean') cfg.dingtalkEnabled = p.dingtalkEnabled
|
|
302
337
|
if (typeof p.dingtalkWebhook === 'string') {
|
|
303
338
|
const hook = p.dingtalkWebhook.trim()
|