@lanbaolu/dsh-wechat-bridge 0.7.1 → 0.9.0

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 CHANGED
@@ -76,6 +76,30 @@ window.__ModuleLoader__.load({
76
76
  fontSize: 12,
77
77
  opacity: .7
78
78
  };
79
+ /** 折叠分组:把面板拆成可收起的区块,降低设置页复杂度。 */
80
+ function Section({ title, defaultOpen = false, children }) {
81
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
82
+ open: defaultOpen,
83
+ style: {
84
+ marginBottom: 10,
85
+ border: "1px solid var(--border-color, rgba(127,127,127,.18))",
86
+ borderRadius: 8,
87
+ padding: "8px 10px"
88
+ },
89
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
90
+ style: {
91
+ fontWeight: 600,
92
+ fontSize: 13,
93
+ cursor: "pointer",
94
+ userSelect: "none"
95
+ },
96
+ children: title
97
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
98
+ style: { marginTop: 8 },
99
+ children
100
+ })]
101
+ });
102
+ }
79
103
  const TRUST_MODE_LABELS = {
80
104
  "owner-only": "仅本机主人(默认)",
81
105
  bootstrap: "首位陌生人自动入集(一次性)",
@@ -138,7 +162,9 @@ window.__ModuleLoader__.load({
138
162
  const [projectMessage, setProjectMessage] = (0, react.useState)("");
139
163
  const [projectError, setProjectError] = (0, react.useState)("");
140
164
  const [notifyStatus, setNotifyStatus] = (0, react.useState)(null);
165
+ const [pendingStatus, setPendingStatus] = (0, react.useState)(null);
141
166
  const [calm, setCalm] = (0, react.useState)(CALM_DEFAULTS);
167
+ const [preventSleep, setPreventSleep] = (0, react.useState)(false);
142
168
  const [calmBusy, setCalmBusy] = (0, react.useState)(false);
143
169
  const [calmMessage, setCalmMessage] = (0, react.useState)("");
144
170
  const [calmError, setCalmError] = (0, react.useState)("");
@@ -170,6 +196,13 @@ window.__ModuleLoader__.load({
170
196
  } catch (err) {
171
197
  setError(err instanceof Error ? err.message : String(err));
172
198
  }
199
+ try {
200
+ const pendingRes = await fetch(`${API_BASE}/pending/status`, { cache: "no-store" });
201
+ if (pendingRes.ok) {
202
+ const pendingData = await pendingRes.json();
203
+ if (pendingData && typeof pendingData === "object" && pendingData.ok) setPendingStatus(pendingData.data ?? null);
204
+ }
205
+ } catch {}
173
206
  try {
174
207
  const trustRes = await fetch(`${API_BASE}/trust`, { cache: "no-store" });
175
208
  if (trustRes.ok) {
@@ -181,10 +214,34 @@ window.__ModuleLoader__.load({
181
214
  const cfgRes = await fetch(`${API_BASE}/config`, { cache: "no-store" });
182
215
  if (cfgRes.ok) {
183
216
  const cfgData = await cfgRes.json();
184
- if (cfgData && typeof cfgData === "object" && cfgData.ok) setCalm(calmFromConfig(cfgData.calm));
217
+ if (cfgData && typeof cfgData === "object" && cfgData.ok) {
218
+ setCalm(calmFromConfig(cfgData.calm));
219
+ setPreventSleep(cfgData.preventSleep === true);
220
+ }
185
221
  }
186
222
  } catch {}
187
223
  }, []);
224
+ async function changePreventSleep(enabled) {
225
+ setCalmBusy(true);
226
+ setCalmError("");
227
+ setCalmMessage("");
228
+ try {
229
+ const res = await fetch(`${API_BASE}/config`, {
230
+ method: "POST",
231
+ headers: { "Content-Type": "application/json" },
232
+ body: JSON.stringify({ preventSleep: enabled })
233
+ });
234
+ const data = await res.json().catch(() => null);
235
+ if (!res.ok || !data?.ok) throw new Error(data?.error || `HTTP ${res.status}`);
236
+ setPreventSleep(enabled);
237
+ setCalmMessage(enabled ? "已开启防休眠:守护进程运行期间抑制系统休眠,重启 daemon 后生效。" : "已关闭防休眠。");
238
+ } catch (err) {
239
+ setCalmError(err instanceof Error ? err.message : String(err));
240
+ setPreventSleep(!enabled);
241
+ } finally {
242
+ setCalmBusy(false);
243
+ }
244
+ }
188
245
  async function saveCalm() {
189
246
  setCalmBusy(true);
190
247
  setCalmError("");
@@ -392,37 +449,6 @@ window.__ModuleLoader__.load({
392
449
  setSetupError("");
393
450
  setDaemonMessage("");
394
451
  }
395
- const actions = [
396
- {
397
- label: "刷新状态",
398
- run: () => void refresh()
399
- },
400
- {
401
- label: "扫码绑定",
402
- run: () => void startSetup(),
403
- disabled: setupPhase === "starting" || setupPhase === "qr"
404
- },
405
- {
406
- label: "启动",
407
- run: () => void run("start"),
408
- disabled: busy !== null
409
- },
410
- {
411
- label: "停止",
412
- run: () => void run("stop"),
413
- disabled: busy !== null
414
- },
415
- {
416
- label: "重启",
417
- run: () => void run("restart"),
418
- disabled: busy !== null
419
- },
420
- {
421
- label: "查看日志",
422
- run: () => void showLogs(),
423
- disabled: busy !== null
424
- }
425
- ];
426
452
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
427
453
  style: panelStyle,
428
454
  role: "region",
@@ -440,505 +466,642 @@ window.__ModuleLoader__.load({
440
466
  },
441
467
  children: error
442
468
  }),
443
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
444
- style: {
445
- display: "block",
446
- marginBottom: 8,
447
- fontSize: 12
448
- },
449
- children: ["DSH 工作目录", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
450
- type: "text",
451
- value: workingDir,
452
- onChange: (e) => setWorkingDir(e.target.value),
453
- placeholder: "例如 ~/Documents/DSH",
454
- style: {
455
- ...inputStyle,
456
- marginLeft: 8
457
- }
458
- })]
459
- }),
460
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
461
- style: { marginBottom: 12 },
462
- children: [
463
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
464
- style: {
465
- ...titleStyle,
466
- marginBottom: 4
469
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Section, {
470
+ title: "⚙️ 状态与操作",
471
+ defaultOpen: true,
472
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
473
+ style: buttonRowStyle,
474
+ children: [
475
+ {
476
+ label: "刷新状态",
477
+ run: () => void refresh()
467
478
  },
468
- children: "项目对话绑定"
469
- }),
470
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
471
- style: {
472
- fontSize: 12,
473
- opacity: .8
479
+ {
480
+ label: "扫码绑定",
481
+ run: () => void startSetup(),
482
+ disabled: setupPhase === "starting" || setupPhase === "qr"
474
483
  },
475
- children: boundProject ? `当前绑定:${boundProject.workspaceTitle} · ${boundProject.path} · ${boundProject.sessionId.slice(-8)}` : "当前未绑定:微信消息使用独立桥接会话(也可选择项目对话以共享记忆)。"
476
- }),
477
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
478
- style: {
479
- display: "flex",
480
- gap: 8,
481
- flexWrap: "wrap",
482
- alignItems: "center",
483
- marginTop: 6
484
+ {
485
+ label: "启动",
486
+ run: () => void run("start"),
487
+ disabled: busy !== null
484
488
  },
485
- children: [
486
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
487
- value: projectChoice,
488
- onChange: (e) => setProjectChoice(e.target.value),
489
- style: selectStyle,
490
- "aria-label": "选择要绑定的项目会话",
491
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
492
- value: "",
493
- children: "— 选择要绑定的项目会话 —"
494
- }), projects.map((project) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("option", {
495
- value: project.sessionId,
496
- children: [
497
- project.workspaceTitle,
498
- " · ",
499
- project.path,
500
- " · ",
501
- project.sessionId.slice(-8)
502
- ]
503
- }, project.sessionId))]
504
- }),
505
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
506
- type: "button",
507
- style: buttonStyle,
508
- disabled: !projectChoice || projectBusy,
509
- onClick: () => void bindProject(),
510
- children: "绑定"
511
- }),
512
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
513
- type: "button",
514
- style: buttonStyle,
515
- disabled: projectBusy || !boundProject,
516
- onClick: () => void detachProject(),
517
- children: "解除绑定"
518
- })
519
- ]
520
- }),
521
- projectMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
522
- role: "status",
489
+ {
490
+ label: "停止",
491
+ run: () => void run("stop"),
492
+ disabled: busy !== null
493
+ },
494
+ {
495
+ label: "重启",
496
+ run: () => void run("restart"),
497
+ disabled: busy !== null
498
+ },
499
+ {
500
+ label: "查看日志",
501
+ run: () => void showLogs(),
502
+ disabled: busy !== null
503
+ }
504
+ ].map((action) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
505
+ type: "button",
506
+ style: buttonStyle,
507
+ disabled: action.disabled ?? false,
508
+ onClick: action.run,
509
+ children: action.label
510
+ }, action.label))
511
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
512
+ style: { marginTop: 8 },
513
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
523
514
  style: {
524
- color: "#2f9e44",
525
- marginTop: 6,
526
- fontSize: 12
515
+ fontSize: 12,
516
+ opacity: .7,
517
+ cursor: "pointer"
527
518
  },
528
- children: projectMessage
529
- }),
530
- projectError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
531
- role: "alert",
519
+ children: "状态 / 日志输出"
520
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
532
521
  style: {
533
- color: "#e5484d",
534
- marginTop: 6,
535
- fontSize: 12
522
+ ...outputStyle,
523
+ marginTop: 6
536
524
  },
537
- children: projectError
538
- })
539
- ]
525
+ "aria-live": "polite",
526
+ children: output
527
+ })]
528
+ })]
540
529
  }),
541
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
542
- style: { marginBottom: 12 },
543
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
530
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Section, {
531
+ title: "🔗 连接与账号",
532
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
544
533
  style: {
545
- ...titleStyle,
546
- marginBottom: 4
547
- },
548
- children: "主动通知节流"
549
- }), notifyStatus ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
550
- style: {
551
- fontSize: 12,
552
- opacity: .85
534
+ display: "block",
535
+ marginBottom: 8,
536
+ fontSize: 12
553
537
  },
538
+ children: ["DSH 工作目录", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
539
+ type: "text",
540
+ value: workingDir,
541
+ onChange: (e) => setWorkingDir(e.target.value),
542
+ placeholder: "例如 ~/Documents/DSH",
543
+ style: {
544
+ ...inputStyle,
545
+ marginLeft: 8
546
+ }
547
+ })]
548
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
549
+ style: { marginBottom: 12 },
554
550
  children: [
555
- "今日已发 ",
556
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: notifyStatus.dailySent }),
557
- " / ",
558
- notifyStatus.dailyLimit,
559
- " 条 · 近一小时",
560
- " ",
561
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: notifyStatus.hourlySent }),
562
- " / ",
563
- notifyStatus.hourlyLimit,
564
- " 条 · 排队中",
565
- " ",
566
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: notifyStatus.pendingCount }),
567
- " 条",
568
551
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
569
552
  style: {
570
- marginTop: 4,
553
+ ...titleStyle,
554
+ marginBottom: 4
555
+ },
556
+ children: "项目对话绑定"
557
+ }),
558
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
559
+ style: {
571
560
  fontSize: 12,
572
- opacity: .7
561
+ opacity: .8
562
+ },
563
+ children: boundProject ? `当前绑定:${boundProject.workspaceTitle} · ${boundProject.path} · ${boundProject.sessionId.slice(-8)}` : "当前未绑定:微信消息使用独立桥接会话(也可选择项目对话以共享记忆)。"
564
+ }),
565
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
566
+ style: {
567
+ display: "flex",
568
+ gap: 8,
569
+ flexWrap: "wrap",
570
+ alignItems: "center",
571
+ marginTop: 6
572
+ },
573
+ children: [
574
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
575
+ value: projectChoice,
576
+ onChange: (e) => setProjectChoice(e.target.value),
577
+ style: selectStyle,
578
+ "aria-label": "选择要绑定的项目会话",
579
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
580
+ value: "",
581
+ children: "— 选择要绑定的项目会话 —"
582
+ }), projects.map((project) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("option", {
583
+ value: project.sessionId,
584
+ children: [
585
+ project.workspaceTitle,
586
+ " · ",
587
+ project.path,
588
+ " · ",
589
+ project.sessionId.slice(-8)
590
+ ]
591
+ }, project.sessionId))]
592
+ }),
593
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
594
+ type: "button",
595
+ style: buttonStyle,
596
+ disabled: !projectChoice || projectBusy,
597
+ onClick: () => void bindProject(),
598
+ children: "绑定"
599
+ }),
600
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
601
+ type: "button",
602
+ style: buttonStyle,
603
+ disabled: projectBusy || !boundProject,
604
+ onClick: () => void detachProject(),
605
+ children: "解除绑定"
606
+ })
607
+ ]
608
+ }),
609
+ projectMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
610
+ role: "status",
611
+ style: {
612
+ color: "#2f9e44",
613
+ marginTop: 6,
614
+ fontSize: 12
615
+ },
616
+ children: projectMessage
617
+ }),
618
+ projectError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
619
+ role: "alert",
620
+ style: {
621
+ color: "#e5484d",
622
+ marginTop: 6,
623
+ fontSize: 12
573
624
  },
574
- children: "agent 通过 wechat_notify 主动推送的通知,超限自动排队延迟发送,避免触发微信风控。"
625
+ children: projectError
575
626
  })
576
627
  ]
577
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
578
- style: {
579
- fontSize: 12,
580
- opacity: .7
581
- },
582
- children: "守护进程未运行,暂无数据。"
583
628
  })]
584
629
  }),
585
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
586
- style: { marginBottom: 12 },
630
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Section, {
631
+ title: "💬 消息与通知",
587
632
  children: [
588
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
589
- style: {
590
- ...titleStyle,
591
- marginBottom: 4
592
- },
593
- children: "⏳ 超时安抚"
594
- }),
595
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
596
- style: {
597
- fontSize: 12,
598
- opacity: .7,
599
- marginBottom: 8
600
- },
601
- children: "DSH 长时间没有产出消息时,主动发一条\"还在处理\"的安抚消息。改配置后即时生效(最长延迟数秒)。"
633
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
634
+ style: { marginBottom: 12 },
635
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
636
+ style: {
637
+ ...titleStyle,
638
+ marginBottom: 4
639
+ },
640
+ children: "主动通知节流"
641
+ }), notifyStatus ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
642
+ style: {
643
+ fontSize: 12,
644
+ opacity: .85
645
+ },
646
+ children: [
647
+ "今日已发 ",
648
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: notifyStatus.dailySent }),
649
+ " / ",
650
+ notifyStatus.dailyLimit,
651
+ " 条 · 近一小时",
652
+ " ",
653
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: notifyStatus.hourlySent }),
654
+ " / ",
655
+ notifyStatus.hourlyLimit,
656
+ " 条 · 排队中",
657
+ " ",
658
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: notifyStatus.pendingCount }),
659
+ " 条",
660
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
661
+ style: {
662
+ marginTop: 4,
663
+ fontSize: 12,
664
+ opacity: .7
665
+ },
666
+ children: "agent 通过 wechat_notify 主动推送的通知,超限自动排队延迟发送,避免触发微信风控。"
667
+ })
668
+ ]
669
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
670
+ style: {
671
+ fontSize: 12,
672
+ opacity: .7
673
+ },
674
+ children: "守护进程未运行,暂无数据。"
675
+ })]
602
676
  }),
603
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
604
- style: {
605
- display: "flex",
606
- alignItems: "center",
607
- gap: 6,
608
- fontSize: 12,
609
- marginBottom: 8
610
- },
611
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
612
- type: "checkbox",
613
- checked: calm.enabled,
614
- onChange: (e) => setCalm((c) => ({
615
- ...c,
616
- enabled: e.target.checked
617
- }))
618
- }), "启用安抚消息"]
677
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
678
+ style: { marginBottom: 12 },
679
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
680
+ style: {
681
+ ...titleStyle,
682
+ marginBottom: 4
683
+ },
684
+ children: "📮 待补发队列"
685
+ }), pendingStatus && pendingStatus.count > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
686
+ style: { fontSize: 12 },
687
+ children: [
688
+ "有 ",
689
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
690
+ style: { color: "#b7791f" },
691
+ children: pendingStatus.count
692
+ }),
693
+ " 条消息发送失败待补发(共 ",
694
+ pendingStatus.chars,
695
+ " 字),daemon 会启动/定时自动重试。",
696
+ pendingStatus.oldestQueuedAt ? ` 最早入队 ${new Date(pendingStatus.oldestQueuedAt).toLocaleString("zh-CN")}` : ""
697
+ ]
698
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
699
+ style: {
700
+ fontSize: 12,
701
+ opacity: .7
702
+ },
703
+ children: pendingStatus ? "无待补发消息(发送失败会自动暂存并在 daemon 重启/定时时补发)。" : "守护进程未运行,暂无数据。"
704
+ })]
619
705
  }),
620
706
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
621
- style: {
622
- display: "flex",
623
- gap: 12,
624
- flexWrap: "wrap",
625
- alignItems: "center",
626
- marginBottom: 8
627
- },
707
+ style: { marginBottom: 12 },
628
708
  children: [
629
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
630
- style: { fontSize: 12 },
631
- children: ["首次静默(分钟)", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
632
- type: "number",
633
- min: 1,
634
- value: calm.silenceMin,
635
- onChange: (e) => setCalm((c) => ({
636
- ...c,
637
- silenceMin: e.target.value
638
- })),
639
- style: {
640
- ...inputStyle,
641
- marginLeft: 6,
642
- minWidth: 70
643
- }
644
- })]
709
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
710
+ style: {
711
+ ...titleStyle,
712
+ marginBottom: 4
713
+ },
714
+ children: "⏳ 超时安抚"
715
+ }),
716
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
717
+ style: {
718
+ fontSize: 12,
719
+ opacity: .7,
720
+ marginBottom: 8
721
+ },
722
+ children: "DSH 长时间没有产出消息时,主动发一条\"还在处理\"的安抚消息。改配置后即时生效(最长延迟数秒)。"
645
723
  }),
646
724
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
647
- style: { fontSize: 12 },
648
- children: ["重复间隔(分钟)", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
649
- type: "number",
650
- min: 1,
651
- value: calm.intervalMin,
725
+ style: {
726
+ display: "flex",
727
+ alignItems: "center",
728
+ gap: 6,
729
+ fontSize: 12,
730
+ marginBottom: 8
731
+ },
732
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
733
+ type: "checkbox",
734
+ checked: calm.enabled,
652
735
  onChange: (e) => setCalm((c) => ({
653
736
  ...c,
654
- intervalMin: e.target.value
655
- })),
656
- style: {
657
- ...inputStyle,
658
- marginLeft: 6,
659
- minWidth: 70
660
- }
661
- })]
737
+ enabled: e.target.checked
738
+ }))
739
+ }), "启用安抚消息"]
740
+ }),
741
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
742
+ style: {
743
+ display: "flex",
744
+ gap: 12,
745
+ flexWrap: "wrap",
746
+ alignItems: "center",
747
+ marginBottom: 8
748
+ },
749
+ children: [
750
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
751
+ style: { fontSize: 12 },
752
+ children: ["首次静默(分钟)", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
753
+ type: "number",
754
+ min: 1,
755
+ value: calm.silenceMin,
756
+ onChange: (e) => setCalm((c) => ({
757
+ ...c,
758
+ silenceMin: e.target.value
759
+ })),
760
+ style: {
761
+ ...inputStyle,
762
+ marginLeft: 6,
763
+ minWidth: 70
764
+ }
765
+ })]
766
+ }),
767
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
768
+ style: { fontSize: 12 },
769
+ children: ["重复间隔(分钟)", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
770
+ type: "number",
771
+ min: 1,
772
+ value: calm.intervalMin,
773
+ onChange: (e) => setCalm((c) => ({
774
+ ...c,
775
+ intervalMin: e.target.value
776
+ })),
777
+ style: {
778
+ ...inputStyle,
779
+ marginLeft: 6,
780
+ minWidth: 70
781
+ }
782
+ })]
783
+ }),
784
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
785
+ style: { fontSize: 12 },
786
+ children: ["每轮上限(次,0=不限)", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
787
+ type: "number",
788
+ min: 0,
789
+ value: calm.maxCount,
790
+ onChange: (e) => setCalm((c) => ({
791
+ ...c,
792
+ maxCount: e.target.value
793
+ })),
794
+ style: {
795
+ ...inputStyle,
796
+ marginLeft: 6,
797
+ minWidth: 70
798
+ }
799
+ })]
800
+ })
801
+ ]
662
802
  }),
663
803
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
664
- style: { fontSize: 12 },
665
- children: ["每轮上限(次,0=不限)", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
666
- type: "number",
667
- min: 0,
668
- value: calm.maxCount,
804
+ style: {
805
+ fontSize: 12,
806
+ display: "block",
807
+ marginBottom: 6
808
+ },
809
+ children: ["自定义文案(每行一条,留空用内置默认;每次随机取一条)", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
810
+ value: calm.messages,
669
811
  onChange: (e) => setCalm((c) => ({
670
812
  ...c,
671
- maxCount: e.target.value
813
+ messages: e.target.value
672
814
  })),
815
+ rows: 3,
673
816
  style: {
674
817
  ...inputStyle,
675
- marginLeft: 6,
676
- minWidth: 70
818
+ display: "block",
819
+ marginTop: 4,
820
+ minWidth: "100%",
821
+ boxSizing: "border-box",
822
+ resize: "vertical",
823
+ fontFamily: "inherit"
677
824
  }
678
825
  })]
679
- })
680
- ]
681
- }),
682
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
683
- style: {
684
- fontSize: 12,
685
- display: "block",
686
- marginBottom: 6
687
- },
688
- children: ["自定义文案(每行一条,留空用内置默认;每次随机取一条)", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
689
- value: calm.messages,
690
- onChange: (e) => setCalm((c) => ({
691
- ...c,
692
- messages: e.target.value
693
- })),
694
- rows: 3,
695
- style: {
696
- ...inputStyle,
697
- display: "block",
698
- marginTop: 4,
699
- minWidth: "100%",
700
- boxSizing: "border-box",
701
- resize: "vertical",
702
- fontFamily: "inherit"
703
- }
704
- })]
705
- }),
706
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
707
- style: {
708
- display: "flex",
709
- gap: 8,
710
- alignItems: "center"
711
- },
712
- children: [
713
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
714
- type: "button",
715
- style: buttonStyle,
716
- disabled: calmBusy,
717
- onClick: () => void saveCalm(),
718
- children: "保存安抚设置"
719
826
  }),
720
- calmMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
721
- role: "status",
827
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
722
828
  style: {
723
- color: "#2f9e44",
724
- fontSize: 12
829
+ display: "flex",
830
+ gap: 8,
831
+ alignItems: "center"
725
832
  },
726
- children: calmMessage
727
- }),
728
- calmError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
729
- role: "alert",
730
- style: {
731
- color: "#e5484d",
732
- fontSize: 12
733
- },
734
- children: calmError
833
+ children: [
834
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
835
+ type: "button",
836
+ style: buttonStyle,
837
+ disabled: calmBusy,
838
+ onClick: () => void saveCalm(),
839
+ children: "保存安抚设置"
840
+ }),
841
+ calmMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
842
+ role: "status",
843
+ style: {
844
+ color: "#2f9e44",
845
+ fontSize: 12
846
+ },
847
+ children: calmMessage
848
+ }),
849
+ calmError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
850
+ role: "alert",
851
+ style: {
852
+ color: "#e5484d",
853
+ fontSize: 12
854
+ },
855
+ children: calmError
856
+ })
857
+ ]
735
858
  })
736
859
  ]
737
860
  })
738
861
  ]
739
862
  }),
740
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
741
- style: { marginBottom: 12 },
742
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
743
- style: {
744
- ...titleStyle,
745
- marginBottom: 4
746
- },
747
- children: "🔐 信任用户(多用户)"
748
- }), !trust ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
749
- style: {
750
- fontSize: 12,
751
- opacity: .7
752
- },
753
- children: "加载中…"
754
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
755
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
756
- style: {
757
- fontSize: 12,
758
- opacity: .85,
759
- marginBottom: 6
760
- },
761
- children: ["信任模式", /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
762
- value: trust.mode,
763
- onChange: (e) => changeTrustMode(e.target.value),
764
- disabled: trustBusy,
863
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Section, {
864
+ title: "⚡ 系统行为",
865
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
866
+ style: { marginBottom: 12 },
867
+ children: [
868
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
765
869
  style: {
766
- ...inputStyle,
767
- marginLeft: 8,
768
- minWidth: 240
870
+ ...titleStyle,
871
+ marginBottom: 4
769
872
  },
770
- "aria-label": "选择信任模式",
771
- children: [
772
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
773
- value: "owner-only",
774
- children: TRUST_MODE_LABELS["owner-only"]
775
- }),
776
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
777
- value: "bootstrap",
778
- children: TRUST_MODE_LABELS.bootstrap
779
- }),
780
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
781
- value: "manual",
782
- children: TRUST_MODE_LABELS.manual
783
- })
784
- ]
785
- })]
786
- }),
787
- trust.mode === "bootstrap" && trust.bootstrapConsumed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
788
- style: {
789
- fontSize: 12,
790
- color: "#b7791f",
791
- marginBottom: 6
792
- },
793
- children: "⚠️ bootstrap 首次名额已用完,后续陌生人不会再自动入集,请用下方表单手动添加或切到 manual。"
794
- }),
795
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
873
+ children: "💤 防休眠"
874
+ }),
875
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
876
+ style: {
877
+ fontSize: 12,
878
+ opacity: .7,
879
+ marginBottom: 8
880
+ },
881
+ children: "守护进程运行期间抑制系统休眠(锁屏/合盖不挂起,微信消息持续响应)。macOS 用 caffeinate、Linux 用 systemd-inhibit、Windows 尽力而为。"
882
+ }),
883
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
884
+ style: {
885
+ display: "flex",
886
+ alignItems: "center",
887
+ gap: 6,
888
+ fontSize: 12
889
+ },
890
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
891
+ type: "checkbox",
892
+ checked: preventSleep,
893
+ disabled: calmBusy,
894
+ onChange: (e) => void changePreventSleep(e.target.checked)
895
+ }), "启用防休眠(重启守护进程后生效)"]
896
+ })
897
+ ]
898
+ })
899
+ }),
900
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Section, {
901
+ title: "🔐 多用户与安全",
902
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
903
+ style: { marginBottom: 12 },
904
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
796
905
  style: {
797
- display: "flex",
798
- alignItems: "center",
799
- gap: 6,
800
- fontSize: 12,
801
- marginBottom: 8
906
+ ...titleStyle,
907
+ marginBottom: 4
802
908
  },
803
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
804
- type: "checkbox",
805
- checked: trust.notifyRejected,
806
- disabled: trustBusy,
807
- onChange: (e) => toggleNotifyRejected(e.target.checked)
808
- }), "陌生人尝试联系时向 owner 推送提醒"]
809
- }),
810
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
909
+ children: "🔐 信任用户(多用户)"
910
+ }), !trust ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
811
911
  style: {
812
912
  fontSize: 12,
813
- opacity: .7,
814
- marginBottom: 8
913
+ opacity: .7
815
914
  },
816
- children: [
817
- "owner:",
818
- trust.owner || "(未绑定)",
819
- " · 信任用户:",
820
- trust.trusted.length,
821
- " 个"
822
- ]
823
- }),
824
- trust.trusted.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
825
- style: {
826
- marginBottom: 8,
827
- display: "flex",
828
- flexDirection: "column",
829
- gap: 6
830
- },
831
- children: trust.trusted.map((u) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
915
+ children: "加载中…"
916
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
917
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
918
+ style: {
919
+ fontSize: 12,
920
+ opacity: .85,
921
+ marginBottom: 6
922
+ },
923
+ children: ["信任模式", /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
924
+ value: trust.mode,
925
+ onChange: (e) => changeTrustMode(e.target.value),
926
+ disabled: trustBusy,
927
+ style: {
928
+ ...inputStyle,
929
+ marginLeft: 8,
930
+ minWidth: 240
931
+ },
932
+ "aria-label": "选择信任模式",
933
+ children: [
934
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
935
+ value: "owner-only",
936
+ children: TRUST_MODE_LABELS["owner-only"]
937
+ }),
938
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
939
+ value: "bootstrap",
940
+ children: TRUST_MODE_LABELS.bootstrap
941
+ }),
942
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
943
+ value: "manual",
944
+ children: TRUST_MODE_LABELS.manual
945
+ })
946
+ ]
947
+ })]
948
+ }),
949
+ trust.mode === "bootstrap" && trust.bootstrapConsumed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
950
+ style: {
951
+ fontSize: 12,
952
+ color: "#b7791f",
953
+ marginBottom: 6
954
+ },
955
+ children: "⚠️ bootstrap 首次名额已用完,后续陌生人不会再自动入集,请用下方表单手动添加或切到 manual。"
956
+ }),
957
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
832
958
  style: {
833
959
  display: "flex",
834
960
  alignItems: "center",
961
+ gap: 6,
962
+ fontSize: 12,
963
+ marginBottom: 8
964
+ },
965
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
966
+ type: "checkbox",
967
+ checked: trust.notifyRejected,
968
+ disabled: trustBusy,
969
+ onChange: (e) => toggleNotifyRejected(e.target.checked)
970
+ }), "陌生人尝试联系时向 owner 推送提醒"]
971
+ }),
972
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
973
+ style: {
974
+ fontSize: 12,
975
+ opacity: .7,
976
+ marginBottom: 8
977
+ },
978
+ children: [
979
+ "owner:",
980
+ trust.owner || "(未绑定)",
981
+ " · 信任用户:",
982
+ trust.trusted.length,
983
+ " 个"
984
+ ]
985
+ }),
986
+ trust.trusted.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
987
+ style: {
988
+ marginBottom: 8,
989
+ display: "flex",
990
+ flexDirection: "column",
991
+ gap: 6
992
+ },
993
+ children: trust.trusted.map((u) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
994
+ style: {
995
+ display: "flex",
996
+ alignItems: "center",
997
+ gap: 8,
998
+ padding: "6px 8px",
999
+ background: "var(--surface-3, rgba(127,127,127,.05))",
1000
+ border: "1px solid var(--border-color, rgba(127,127,127,.12))",
1001
+ borderRadius: 6
1002
+ },
1003
+ children: [
1004
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1005
+ style: { fontWeight: 600 },
1006
+ children: u.userId
1007
+ }),
1008
+ u.note && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1009
+ style: {
1010
+ opacity: .7,
1011
+ fontSize: 12
1012
+ },
1013
+ children: u.note
1014
+ }),
1015
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1016
+ style: {
1017
+ marginLeft: "auto",
1018
+ fontSize: 11,
1019
+ opacity: .6
1020
+ },
1021
+ children: [
1022
+ u.by === "bootstrap" ? "自动入集" : u.by === "restore" ? "迁移导入" : "手动添加",
1023
+ " · ",
1024
+ formatTime(u.lastSeenAt)
1025
+ ]
1026
+ }),
1027
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1028
+ type: "button",
1029
+ style: {
1030
+ ...buttonStyle,
1031
+ color: "#e5484d"
1032
+ },
1033
+ disabled: trustBusy,
1034
+ onClick: () => removeTrustedUser(u.userId),
1035
+ children: "吊销"
1036
+ })
1037
+ ]
1038
+ }, u.userId))
1039
+ }),
1040
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1041
+ style: {
1042
+ display: "flex",
835
1043
  gap: 8,
836
- padding: "6px 8px",
837
- background: "var(--surface-3, rgba(127,127,127,.05))",
838
- border: "1px solid var(--border-color, rgba(127,127,127,.12))",
839
- borderRadius: 6
1044
+ flexWrap: "wrap",
1045
+ alignItems: "center"
840
1046
  },
841
1047
  children: [
842
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
843
- style: { fontWeight: 600 },
844
- children: u.userId
845
- }),
846
- u.note && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1048
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1049
+ type: "text",
1050
+ value: newTrustId,
1051
+ onChange: (e) => setNewTrustId(e.target.value),
1052
+ placeholder: "要添加的微信 userId",
847
1053
  style: {
848
- opacity: .7,
849
- fontSize: 12
850
- },
851
- children: u.note
1054
+ ...inputStyle,
1055
+ minWidth: 180
1056
+ }
852
1057
  }),
853
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1058
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1059
+ type: "text",
1060
+ value: newTrustNote,
1061
+ onChange: (e) => setNewTrustNote(e.target.value),
1062
+ placeholder: "备注(可选)",
854
1063
  style: {
855
- marginLeft: "auto",
856
- fontSize: 11,
857
- opacity: .6
858
- },
859
- children: [
860
- u.by === "bootstrap" ? "自动入集" : u.by === "restore" ? "迁移导入" : "手动添加",
861
- " · ",
862
- formatTime(u.lastSeenAt)
863
- ]
1064
+ ...inputStyle,
1065
+ minWidth: 120
1066
+ }
864
1067
  }),
865
1068
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
866
1069
  type: "button",
867
- style: {
868
- ...buttonStyle,
869
- color: "#e5484d"
870
- },
871
- disabled: trustBusy,
872
- onClick: () => removeTrustedUser(u.userId),
873
- children: "吊销"
1070
+ style: buttonStyle,
1071
+ disabled: trustBusy || !newTrustId.trim(),
1072
+ onClick: () => void addTrustedUser(),
1073
+ children: "添加信任"
874
1074
  })
875
1075
  ]
876
- }, u.userId))
877
- }),
878
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
879
- style: {
880
- display: "flex",
881
- gap: 8,
882
- flexWrap: "wrap",
883
- alignItems: "center"
884
- },
885
- children: [
886
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
887
- type: "text",
888
- value: newTrustId,
889
- onChange: (e) => setNewTrustId(e.target.value),
890
- placeholder: "要添加的微信 userId",
891
- style: {
892
- ...inputStyle,
893
- minWidth: 180
894
- }
895
- }),
896
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
897
- type: "text",
898
- value: newTrustNote,
899
- onChange: (e) => setNewTrustNote(e.target.value),
900
- placeholder: "备注(可选)",
901
- style: {
902
- ...inputStyle,
903
- minWidth: 120
904
- }
905
- }),
906
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
907
- type: "button",
908
- style: buttonStyle,
909
- disabled: trustBusy || !newTrustId.trim(),
910
- onClick: () => void addTrustedUser(),
911
- children: "添加信任"
912
- })
913
- ]
914
- }),
915
- trustMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
916
- role: "status",
917
- style: {
918
- color: "#2f9e44",
919
- marginTop: 6,
920
- fontSize: 12
921
- },
922
- children: trustMessage
923
- }),
924
- trustError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
925
- role: "alert",
926
- style: {
927
- color: "#e5484d",
928
- marginTop: 6,
929
- fontSize: 12
930
- },
931
- children: trustError
932
- }),
933
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
934
- style: {
935
- fontSize: 12,
936
- opacity: .7,
937
- marginTop: 8
938
- },
939
- children: "信任用户与 owner 各自拥有独立会话、独立上下文,互不可见。撤销信任后其新消息将被拒绝,但已有历史保留。 修改信任模式后,新入站消息立即生效,无需重启。"
940
- })
941
- ] })]
1076
+ }),
1077
+ trustMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1078
+ role: "status",
1079
+ style: {
1080
+ color: "#2f9e44",
1081
+ marginTop: 6,
1082
+ fontSize: 12
1083
+ },
1084
+ children: trustMessage
1085
+ }),
1086
+ trustError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1087
+ role: "alert",
1088
+ style: {
1089
+ color: "#e5484d",
1090
+ marginTop: 6,
1091
+ fontSize: 12
1092
+ },
1093
+ children: trustError
1094
+ }),
1095
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1096
+ style: {
1097
+ fontSize: 12,
1098
+ opacity: .7,
1099
+ marginTop: 8
1100
+ },
1101
+ children: "信任用户与 owner 各自拥有独立会话、独立上下文,互不可见。撤销信任后其新消息将被拒绝,但已有历史保留。 修改信任模式后,新入站消息立即生效,无需重启。"
1102
+ })
1103
+ ] })]
1104
+ })
942
1105
  }),
943
1106
  setupPhase === "starting" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
944
1107
  role: "status",
@@ -1024,21 +1187,6 @@ window.__ModuleLoader__.load({
1024
1187
  })
1025
1188
  ]
1026
1189
  }),
1027
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
1028
- style: outputStyle,
1029
- "aria-live": "polite",
1030
- children: output
1031
- }),
1032
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1033
- style: buttonRowStyle,
1034
- children: actions.map((action) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1035
- type: "button",
1036
- style: buttonStyle,
1037
- disabled: action.disabled ?? false,
1038
- onClick: action.run,
1039
- children: action.label
1040
- }, action.label))
1041
- }),
1042
1190
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1043
1191
  style: hintStyle,
1044
1192
  children: "也可在 DSH 对话中直接使用 wechat_bridge_setup / wechat_bridge_status / wechat_bridge_start / wechat_bridge_stop / wechat_bridge_logs 等工具。"