dsh-xrxs-lingting 0.4.0-dev.52 → 0.4.0-dev.54

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-xrxs-lingting",
3
- "version": "0.4.0-dev.52",
3
+ "version": "0.4.0-dev.54",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite --host 127.0.0.1",
@@ -1579,20 +1579,16 @@ var XinLingtingService = class {
1579
1579
  }
1580
1580
  };
1581
1581
  remove = async (id) => {
1582
- await this.http.send(this.requests.remove(id));
1583
- if (this.snapshot.active?.id === id) {
1584
- this.stopTicking();
1585
- this.closeWs();
1586
- const capture = this.capture;
1587
- this.capture = null;
1588
- if (capture) {
1589
- capture.pause();
1590
- void capture.stop().catch(() => {
1591
- });
1592
- }
1593
- this.emit({ active: null, catalogVersion: this.snapshot.catalogVersion + 1 });
1594
- } else {
1582
+ if (this.snapshot.operation) throw new Error("\u6B63\u5728\u5904\u7406\u5176\u4ED6\u64CD\u4F5C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002");
1583
+ if (this.snapshot.active?.id === id) throw new Error("\u8BF7\u5148\u7ED3\u675F\u8FD9\u573A\u7075\u542C\uFF0C\u518D\u5220\u9664\u8BB0\u5F55\u3002");
1584
+ this.emit({ operation: "deleting" });
1585
+ try {
1586
+ const record = await this.loadDetail(id);
1587
+ if (record.id !== id || !isSessionEnded(record.status)) throw new Error("\u8FD9\u573A\u7075\u542C\u5C1A\u672A\u7ED3\u675F\uFF0C\u8BF7\u5148\u7ED3\u675F\u540E\u518D\u5220\u9664\u3002");
1588
+ await this.http.send(this.requests.remove(id));
1595
1589
  this.emit({ catalogVersion: this.snapshot.catalogVersion + 1 });
1590
+ } finally {
1591
+ this.emit({ operation: null });
1596
1592
  }
1597
1593
  };
1598
1594
  dispose = () => {
@@ -3536,6 +3532,8 @@ var import_react15 = require("react");
3536
3532
  var import_jsx_runtime13 = require("react/jsx-runtime");
3537
3533
  function reasonText(reason) {
3538
3534
  switch (reason) {
3535
+ case "macos-detection-unsupported":
3536
+ return "\u5F53\u524D\u81EA\u52A8\u4F1A\u8BAE\u68C0\u6D4B\u9700\u8981 macOS 14.4 \u6216\u4EE5\u4E0A\u7248\u672C";
3539
3537
  case "helper-not-found":
3540
3538
  return "\u672A\u6784\u5EFA\u539F\u751F\u68C0\u6D4B\u7EC4\u4EF6";
3541
3539
  case "lock-held-by-another-instance":
@@ -3601,9 +3599,9 @@ function MeetingSettings({ onClose }) {
3601
3599
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "meeting-setting-row", children: [
3602
3600
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
3603
3601
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: "\u4F1A\u8BAE\u81EA\u52A8\u63D0\u9192" }),
3604
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: config.enabled ? "\u5DF2\u5F00\u542F\uFF1A\u68C0\u6D4B\u5230\u4F1A\u8BAE\u6D3B\u52A8\u65F6\u63D0\u9192" : "\u5DF2\u5173\u95ED" })
3602
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: status2?.reason === "macos-detection-unsupported" ? "\u5F53\u524D\u7CFB\u7EDF\u4E0D\u652F\u6301\u81EA\u52A8\u68C0\u6D4B\uFF0C\u53EF\u624B\u52A8\u5F00\u59CB\u7075\u542C" : config.enabled ? "\u5DF2\u5F00\u542F\uFF1A\u901A\u8FC7\u7535\u8111\u53F3\u4E0A\u89D2\u63D0\u9192" : "\u5DF2\u5173\u95ED" })
3605
3603
  ] }),
3606
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { className: config.enabled ? "button" : "button primary", onClick: () => void update({ enabled: !config.enabled }), disabled: saving, children: saving ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Spinner, { size: 14 }) : config.enabled ? "\u5173\u95ED" : "\u5F00\u542F" })
3604
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { className: config.enabled ? "button" : "button primary", onClick: () => void update({ enabled: !config.enabled }), disabled: saving || !config.enabled && status2?.reason === "macos-detection-unsupported", children: saving ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Spinner, { size: 14 }) : config.enabled ? "\u5173\u95ED" : "\u5F00\u542F" })
3607
3605
  ] }),
3608
3606
  config.mutedApps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
3609
3607
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { className: "field-label", children: "\u4E0D\u518D\u63D0\u9192\u7684\u5E94\u7528" }),
@@ -4404,6 +4402,7 @@ function useMeetingPrompt(options) {
4404
4402
  } catch (cause) {
4405
4403
  console.warn("[lingting-meeting] start failed", cause instanceof Error ? cause.message : "unknown");
4406
4404
  setError(cause instanceof Error ? cause.message : "\u5F00\u59CB\u7075\u542C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
4405
+ await sendMeetingAction("start-failed", sessionId, appId);
4407
4406
  } finally {
4408
4407
  starting.current = false;
4409
4408
  setPending(false);
@@ -4457,26 +4456,9 @@ function useMeetingPrompt(options) {
4457
4456
  }
4458
4457
 
4459
4458
  // src/sidebar/MeetingPrompt.tsx
4460
- var import_jsx_runtime15 = require("react/jsx-runtime");
4461
4459
  function MeetingPrompt({ service }) {
4462
- const meeting = useMeetingPrompt({ service });
4463
- if (!meeting.prompt) return null;
4464
- const appName = meeting.prompt.appName;
4465
- const headline = meeting.pending ? "\u6B63\u5728\u5F00\u542F\u7075\u542C" : meeting.error ? "\u7075\u542C\u542F\u52A8\u672A\u5B8C\u6210" : meeting.confidence === "suspected" ? `\u68C0\u6D4B\u5230\u53EF\u80FD\u7684\u901A\u8BDD\u6D3B\u52A8\uFF08${appName}\uFF09` : `${appName}\u53EF\u80FD\u6B63\u5728\u901A\u8BDD`;
4466
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("aside", { className: "lingting-root lt-meeting", "aria-label": "\u4F1A\u8BAE\u63D0\u9192", children: [
4467
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "lt-meeting-head", children: [
4468
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Headphones, { size: 16 }),
4469
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { children: headline }),
4470
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "lt-icon", "aria-label": "\u5173\u95ED\u63D0\u9192", title: "\u672C\u6B21\u5FFD\u7565", onClick: () => void meeting.ignore(), disabled: meeting.pending, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(X, { size: 16 }) })
4471
- ] }),
4472
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: "\u8981\u5F00\u59CB\u7075\u542C\u8F6C\u5F55\u5417\uFF1F\u8BB0\u5F55\u4FDD\u5B58\u5728\u516C\u53F8\u670D\u52A1\u7AEF\uFF0C\u53EF\u968F\u65F6\u56DE\u770B\u3002" }),
4473
- meeting.error && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "lt-meeting-error", role: "alert", children: meeting.error }),
4474
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "lt-meeting-actions", children: [
4475
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "lt-primary", onClick: () => void meeting.accept(), disabled: meeting.pending, children: meeting.pending ? "\u6B63\u5728\u542F\u52A8\u2026" : meeting.error ? "\u91CD\u8BD5" : "\u5F00\u59CB\u7075\u542C" }),
4476
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "lt-text", onClick: () => void meeting.ignore(), disabled: meeting.pending, children: "\u672C\u6B21\u5FFD\u7565" }),
4477
- meeting.prompt.appId && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { className: "lt-text", title: `\u4E0D\u518D\u63D0\u9192 ${appName}`, onClick: () => void meeting.muteApp(), disabled: meeting.pending, children: "\u4E0D\u518D\u63D0\u9192\u8BE5\u5E94\u7528" })
4478
- ] })
4479
- ] });
4460
+ useMeetingPrompt({ service });
4461
+ return null;
4480
4462
  }
4481
4463
 
4482
4464
  // src/sidebar/XinHostNotice.tsx
@@ -4749,15 +4731,15 @@ function createXinHostStateStore(options = {}) {
4749
4731
  }
4750
4732
 
4751
4733
  // src/sidebar/XinHostNotice.tsx
4752
- var import_jsx_runtime16 = require("react/jsx-runtime");
4734
+ var import_jsx_runtime15 = require("react/jsx-runtime");
4753
4735
  function XinHostNotice({ store }) {
4754
4736
  const state = (0, import_react18.useSyncExternalStore)(store.subscribe, store.getSnapshot);
4755
4737
  const [dismissed, setDismissed] = (0, import_react18.useState)("");
4756
4738
  const message = explainXinState(state ?? null);
4757
4739
  if (!message || dismissed === message) return null;
4758
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "lingting-root lt-host-notice", role: "status", children: [
4759
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "lt-host-notice-text", children: message }),
4760
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", className: "lt-host-notice-close", "aria-label": "\u5173\u95ED\u63D0\u793A", onClick: () => setDismissed(message), children: "\xD7" })
4740
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "lingting-root lt-host-notice", role: "status", children: [
4741
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "lt-host-notice-text", children: message }),
4742
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", className: "lt-host-notice-close", "aria-label": "\u5173\u95ED\u63D0\u793A", onClick: () => setDismissed(message), children: "\xD7" })
4761
4743
  ] });
4762
4744
  }
4763
4745
 
@@ -4779,7 +4761,7 @@ function setPageScroll(top) {
4779
4761
 
4780
4762
  // src/pages/RecordList.tsx
4781
4763
  var import_react19 = require("react");
4782
- var import_jsx_runtime17 = require("react/jsx-runtime");
4764
+ var import_jsx_runtime16 = require("react/jsx-runtime");
4783
4765
  var PAGE_SIZE = 8;
4784
4766
  var TITLE_MAX_LENGTH = 200;
4785
4767
  var STATUS_FILTERS = [
@@ -4803,6 +4785,26 @@ function RecordList({ service, snapshot, state, onState, onOpen, onStart, onOpen
4803
4785
  const [renameError, setRenameError] = (0, import_react19.useState)("");
4804
4786
  const [shareLoadingId, setShareLoadingId] = (0, import_react19.useState)(null);
4805
4787
  const [shareTarget, setShareTarget] = (0, import_react19.useState)(null);
4788
+ const [deleting, setDeleting] = (0, import_react19.useState)(null);
4789
+ const [deleteBusy, setDeleteBusy] = (0, import_react19.useState)(false);
4790
+ const [deleteError, setDeleteError] = (0, import_react19.useState)("");
4791
+ const deleteLock = (0, import_react19.useRef)(false);
4792
+ const submitDelete = async () => {
4793
+ if (!deleting || deleteLock.current) return;
4794
+ deleteLock.current = true;
4795
+ setDeleteBusy(true);
4796
+ setDeleteError("");
4797
+ try {
4798
+ await service.remove(deleting.id);
4799
+ setDeleting(null);
4800
+ setToast("\u8BB0\u5F55\u5DF2\u5220\u9664");
4801
+ } catch (e) {
4802
+ setDeleteError(e instanceof Error ? e.message : "\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002");
4803
+ } finally {
4804
+ deleteLock.current = false;
4805
+ setDeleteBusy(false);
4806
+ }
4807
+ };
4806
4808
  const [toast, setToast] = (0, import_react19.useState)("");
4807
4809
  const queryKey = `${state.search}\0${state.status}\0${state.page}`;
4808
4810
  const retainContent = !!result && queryKey === resultQuery;
@@ -4820,6 +4822,11 @@ function RecordList({ service, snapshot, state, onState, onOpen, onStart, onOpen
4820
4822
  setError("");
4821
4823
  service.list({ search: state.search, status: state.status, page: state.page, pageSize: PAGE_SIZE }).then((data) => {
4822
4824
  if (!stale) {
4825
+ const lastPage = Math.max(1, Math.ceil(data.total / PAGE_SIZE));
4826
+ if (state.page > lastPage) {
4827
+ onState({ page: lastPage, scroll: 0 });
4828
+ return;
4829
+ }
4823
4830
  setResult(data);
4824
4831
  setResultQuery(queryKey);
4825
4832
  setLoading(false);
@@ -4912,141 +4919,145 @@ function RecordList({ service, snapshot, state, onState, onOpen, onStart, onOpen
4912
4919
  onState({ scroll: getPageScroll() });
4913
4920
  onOpen(id);
4914
4921
  };
4915
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
4916
- toast && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "toast", role: "status", children: [
4917
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Check, { size: 17 }),
4922
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
4923
+ toast && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "toast", role: "status", children: [
4924
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Check, { size: 17 }),
4918
4925
  toast
4919
4926
  ] }),
4920
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "list-heading", children: [
4921
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
4922
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "eyebrow", children: [
4923
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
4927
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { className: "list-heading", children: [
4928
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
4929
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "eyebrow", children: [
4930
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", {}),
4924
4931
  "YOUR LISTENING SPACE"
4925
4932
  ] }),
4926
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("h1", { children: [
4933
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("h1", { children: [
4927
4934
  "\u6BCF\u4E00\u6B21\u4EA4\u6D41\uFF0C\u90FD\u503C\u5F97\u7559\u5B58",
4928
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "heading-dot", children: "\u3002" })
4935
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "heading-dot", children: "\u3002" })
4929
4936
  ] }),
4930
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: "\u4E13\u6CE8\u5F53\u4E0B\u7684\u5BF9\u8BDD\uFF0C\u8BA9\u7075\u542C\u5E2E\u4F60\u8BB0\u4F4F\u6BCF\u4E00\u4E2A\u91CD\u8981\u65F6\u523B\u3002" })
4937
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: "\u4E13\u6CE8\u5F53\u4E0B\u7684\u5BF9\u8BDD\uFF0C\u8BA9\u7075\u542C\u5E2E\u4F60\u8BB0\u4F4F\u6BCF\u4E00\u4E2A\u91CD\u8981\u65F6\u523B\u3002" })
4931
4938
  ] }),
4932
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { className: "button primary start-button", onClick: snapshot.active ? onOpenLive : onStart, children: [
4933
- snapshot.active ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ArrowUpRight, { size: 19 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Plus, { size: 19 }),
4939
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "button primary start-button", onClick: snapshot.active ? onOpenLive : onStart, children: [
4940
+ snapshot.active ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowUpRight, { size: 19 }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Plus, { size: 19 }),
4934
4941
  snapshot.active ? "\u67E5\u770B\u5B9E\u65F6\u8F6C\u5199" : "\u5F00\u59CB\u7075\u542C"
4935
4942
  ] })
4936
4943
  ] }),
4937
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "overview", "aria-label": "\u8BB0\u5F55\u6982\u89C8", children: [
4938
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "overview-item", children: [
4939
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "stat-icon violet", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Files, { size: 20 }) }),
4940
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
4941
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "stat-label", children: "\u5168\u90E8\u8BB0\u5F55" }),
4942
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "stat-number", children: [
4944
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { className: "overview", "aria-label": "\u8BB0\u5F55\u6982\u89C8", children: [
4945
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "overview-item", children: [
4946
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "stat-icon violet", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Files, { size: 20 }) }),
4947
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
4948
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "stat-label", children: "\u5168\u90E8\u8BB0\u5F55" }),
4949
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "stat-number", children: [
4943
4950
  stat ? stat.count : "\u2014",
4944
- stat && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: "\u573A\u4EA4\u6D41" })
4951
+ stat && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("small", { children: "\u573A\u4EA4\u6D41" })
4945
4952
  ] })
4946
4953
  ] })
4947
4954
  ] }),
4948
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "overview-item", children: [
4949
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "stat-icon amber", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Clock3, { size: 20 }) }),
4950
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
4951
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "stat-label", children: "\u7D2F\u8BA1\u65F6\u957F" }),
4952
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "stat-number", children: [
4955
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "overview-item", children: [
4956
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "stat-icon amber", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Clock3, { size: 20 }) }),
4957
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
4958
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "stat-label", children: "\u7D2F\u8BA1\u65F6\u957F" }),
4959
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "stat-number", children: [
4953
4960
  stat ? (stat.totalDurationMs / 36e5).toFixed(1) : "\u2014",
4954
- stat && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("small", { children: "\u5C0F\u65F6" })
4961
+ stat && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("small", { children: "\u5C0F\u65F6" })
4955
4962
  ] })
4956
4963
  ] })
4957
4964
  ] }),
4958
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "overview-note", children: [
4959
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Headphones, { size: 32, strokeWidth: 1.3 }),
4960
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
4961
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: "\u628A\u6CE8\u610F\u529B\u7559\u7ED9\u4EA4\u6D41" }),
4962
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "\u60F3\u6CD5\u3001\u5171\u8BC6\u4E0E\u7075\u611F\uFF0C\u5728\u8FD9\u91CC\u968F\u65F6\u56DE\u987E\u3002" })
4965
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "overview-note", children: [
4966
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Headphones, { size: 32, strokeWidth: 1.3 }),
4967
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
4968
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("strong", { children: "\u628A\u6CE8\u610F\u529B\u7559\u7ED9\u4EA4\u6D41" }),
4969
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "\u60F3\u6CD5\u3001\u5171\u8BC6\u4E0E\u7075\u611F\uFF0C\u5728\u8FD9\u91CC\u968F\u65F6\u56DE\u987E\u3002" })
4963
4970
  ] })
4964
4971
  ] })
4965
4972
  ] }),
4966
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "records-section", "aria-labelledby": "records-title", children: [
4967
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "section-heading", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { id: "records-title", children: "\u7075\u542C\u8BB0\u5F55" }) }),
4968
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "list-tools", children: [
4969
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("form", { className: "search-box", onSubmit: (e) => {
4973
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("section", { className: "records-section", "aria-labelledby": "records-title", children: [
4974
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "section-heading", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { id: "records-title", children: "\u7075\u542C\u8BB0\u5F55" }) }),
4975
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "list-tools", children: [
4976
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("form", { className: "search-box", onSubmit: (e) => {
4970
4977
  e.preventDefault();
4971
4978
  onState({ search: input, page: 1, scroll: 0 });
4972
4979
  }, children: [
4973
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Search, { size: 18 }),
4974
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", { "aria-label": "\u641C\u7D22\u8BB0\u5F55\u540D\u79F0", placeholder: "\u641C\u7D22\u8BB0\u5F55\u540D\u79F0\u2026", value: input, onChange: (e) => setInput(e.target.value) }),
4975
- input && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "icon-button", "aria-label": "\u6E05\u7A7A\u641C\u7D22", onClick: () => {
4980
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Search, { size: 18 }),
4981
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("input", { "aria-label": "\u641C\u7D22\u8BB0\u5F55\u540D\u79F0", placeholder: "\u641C\u7D22\u8BB0\u5F55\u540D\u79F0\u2026", value: input, onChange: (e) => setInput(e.target.value) }),
4982
+ input && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", className: "icon-button", "aria-label": "\u6E05\u7A7A\u641C\u7D22", onClick: () => {
4976
4983
  setInput("");
4977
4984
  onState({ search: "", page: 1, scroll: 0 });
4978
- }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(X, { size: 15 }) })
4985
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(X, { size: 15 }) })
4979
4986
  ] }),
4980
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("select", { "aria-label": "\u7B5B\u9009\u8BB0\u5F55\u72B6\u6001", value: state.status, onChange: (e) => onState({ status: e.target.value, page: 1, scroll: 0 }), children: STATUS_FILTERS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: item.value, children: item.label }, item.value)) }),
4981
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { className: "button refresh-button", disabled: loading, onClick: () => setRefresh((v) => v + 1), children: [
4982
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RefreshCw, { size: 16, className: loading ? "spin" : "" }),
4987
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("select", { "aria-label": "\u7B5B\u9009\u8BB0\u5F55\u72B6\u6001", value: state.status, onChange: (e) => onState({ status: e.target.value, page: 1, scroll: 0 }), children: STATUS_FILTERS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: item.value, children: item.label }, item.value)) }),
4988
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "button refresh-button", disabled: loading, onClick: () => setRefresh((v) => v + 1), children: [
4989
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RefreshCw, { size: 16, className: loading ? "spin" : "" }),
4983
4990
  "\u5237\u65B0"
4984
4991
  ] })
4985
4992
  ] }),
4986
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "table-wrap", "aria-busy": loading, children: error ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "table-message", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ErrorNotice, { action: "\u91CD\u65B0\u52A0\u8F7D", onAction: () => setRefresh((v) => v + 1), children: error }) }) : loading && !retainContent ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "skeleton-list", role: "status", "aria-label": "\u6B63\u5728\u52A0\u8F7D\u8BB0\u5F55", children: Array.from({ length: 6 }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "skeleton-row", children: [
4987
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("i", {}),
4988
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {}),
4989
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", {})
4990
- ] }, i)) }) : result?.items.length ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("table", { children: [
4991
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("tr", { children: [
4992
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { children: "\u8BB0\u5F55\u540D\u79F0" }),
4993
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "date-cell", children: "\u5F00\u59CB\u65F6\u95F4" }),
4994
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { className: "duration-cell", children: "\u5F55\u97F3\u65F6\u957F" }),
4995
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { children: "\u72B6\u6001" }),
4996
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("th", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: "\u64CD\u4F5C" }) })
4993
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "table-wrap", "aria-busy": loading, children: error ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "table-message", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ErrorNotice, { action: "\u91CD\u65B0\u52A0\u8F7D", onAction: () => setRefresh((v) => v + 1), children: error }) }) : loading && !retainContent ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "skeleton-list", role: "status", "aria-label": "\u6B63\u5728\u52A0\u8F7D\u8BB0\u5F55", children: Array.from({ length: 6 }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "skeleton-row", children: [
4994
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", {}),
4995
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", {}),
4996
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", {})
4997
+ ] }, i)) }) : result?.items.length ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { children: [
4998
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tr", { children: [
4999
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { children: "\u8BB0\u5F55\u540D\u79F0" }),
5000
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "date-cell", children: "\u5F00\u59CB\u65F6\u95F4" }),
5001
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: "duration-cell", children: "\u5F55\u97F3\u65F6\u957F" }),
5002
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { children: "\u72B6\u6001" }),
5003
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "sr-only", children: "\u64CD\u4F5C" }) })
4997
5004
  ] }) }),
4998
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tbody", { children: result.items.map((item) => {
5005
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tbody", { children: result.items.map((item) => {
4999
5006
  const r = snapshot.active?.id === item.id ? snapshot.active : item;
5000
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("tr", { className: r.id === snapshot.active?.id ? "active-row" : "", children: [
5001
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "record-name-cell", children: [
5002
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: `file-icon ${r.id === snapshot.active?.id ? "live" : ""}`, children: r.id === snapshot.active?.id ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Mic, { size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FileHeadphone, { size: 18 }) }),
5003
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "record-link", disabled: detailsDisabled, title: detailsDisabled ? "\u5F55\u97F3\u4E2D\u6682\u4E0D\u53EF\u67E5\u770B\u8BE6\u60C5" : void 0, onClick: () => open(r.id), children: r.title }) })
5007
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tr", { className: r.id === snapshot.active?.id ? "active-row" : "", children: [
5008
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "record-name-cell", children: [
5009
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: `file-icon ${r.id === snapshot.active?.id ? "live" : ""}`, children: r.id === snapshot.active?.id ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Mic, { size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FileHeadphone, { size: 18 }) }),
5010
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "record-link", disabled: detailsDisabled, title: detailsDisabled ? "\u5F55\u97F3\u4E2D\u6682\u4E0D\u53EF\u67E5\u770B\u8BE6\u60C5" : void 0, onClick: () => open(r.id), children: r.title }) })
5004
5011
  ] }) }),
5005
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "date-cell", children: formatDate(r.startedAt) }),
5006
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: "duration-cell tabular", children: formatDuration(r.durationMs) }),
5007
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StatusBadge, { status: r.status }) }),
5008
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "row-actions", children: [
5009
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "row-open", disabled: detailsDisabled, "data-tip": detailsDisabled ? "\u5F55\u97F3\u4E2D\u6682\u4E0D\u53EF\u67E5\u770B\u8BE6\u60C5" : "\u53BB\u8BE6\u60C5", "aria-label": `\u67E5\u770B ${r.title}`, onClick: () => open(r.id), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ArrowUpRight, { size: 19 }) }),
5010
- isSessionEnded(r.status) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "row-open", "data-tip": "\u5206\u4EAB", "aria-label": `\u5206\u4EAB ${r.title}`, disabled: shareLoadingId === r.id, onClick: () => void openShare(r), children: shareLoadingId === r.id ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Share2, { size: 17 }) }),
5011
- isSessionEnded(r.status) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "row-open", "data-tip": "\u7F16\u8F91", "aria-label": `\u91CD\u547D\u540D ${r.title}`, onClick: () => openRename(r), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Pencil, { size: 17 }) })
5012
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "date-cell", children: formatDate(r.startedAt) }),
5013
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "duration-cell tabular", children: formatDuration(r.durationMs) }),
5014
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(StatusBadge, { status: r.status }) }),
5015
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "row-actions", children: [
5016
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "row-open", disabled: detailsDisabled, "data-tip": detailsDisabled ? "\u5F55\u97F3\u4E2D\u6682\u4E0D\u53EF\u67E5\u770B\u8BE6\u60C5" : "\u53BB\u8BE6\u60C5", "aria-label": `\u67E5\u770B ${r.title}`, onClick: () => open(r.id), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowUpRight, { size: 19 }) }),
5017
+ isSessionEnded(r.status) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "row-open", "data-tip": "\u5206\u4EAB", "aria-label": `\u5206\u4EAB ${r.title}`, disabled: shareLoadingId === r.id, onClick: () => void openShare(r), children: shareLoadingId === r.id ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Spinner, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Share2, { size: 17 }) }),
5018
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "row-open", "data-tip": isSessionEnded(r.status) ? "\u5220\u9664" : "\u8BF7\u5148\u7ED3\u675F\u7075\u542C\u540E\u518D\u5220\u9664", "aria-label": `\u5220\u9664 ${r.title}`, disabled: !isSessionEnded(r.status) || !!snapshot.operation, onClick: () => {
5019
+ setDeleting(r);
5020
+ setDeleteError("");
5021
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Trash2, { size: 17 }) }),
5022
+ isSessionEnded(r.status) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "row-open", "data-tip": "\u7F16\u8F91", "aria-label": `\u91CD\u547D\u540D ${r.title}`, onClick: () => openRename(r), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Pencil, { size: 17 }) })
5012
5023
  ] }) })
5013
5024
  ] }, r.id);
5014
5025
  }) })
5015
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "empty-state", children: [
5016
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "empty-icon", children: state.search || state.status !== "all" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Search, { size: 28 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Headphones, { size: 32 }) }),
5017
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { children: state.search || state.status !== "all" ? "\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u8BB0\u5F55" : "\u4ECE\u7B2C\u4E00\u6B21\u7075\u542C\u5F00\u59CB" }),
5018
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: state.search || state.status !== "all" ? "\u8BD5\u8BD5\u5176\u4ED6\u5173\u952E\u8BCD\uFF0C\u6216\u8C03\u6574\u7B5B\u9009\u6761\u4EF6\u3002" : "\u6BCF\u4E00\u6BB5\u503C\u5F97\u56DE\u987E\u7684\u4EA4\u6D41\uFF0C\u90FD\u53EF\u4EE5\u4ECE\u8FD9\u91CC\u5F00\u59CB\u3002" }),
5019
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { className: "button", onClick: state.search || state.status !== "all" ? () => {
5026
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "empty-state", children: [
5027
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "empty-icon", children: state.search || state.status !== "all" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Search, { size: 28 }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Headphones, { size: 32 }) }),
5028
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h3", { children: state.search || state.status !== "all" ? "\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u8BB0\u5F55" : "\u4ECE\u7B2C\u4E00\u6B21\u7075\u542C\u5F00\u59CB" }),
5029
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: state.search || state.status !== "all" ? "\u8BD5\u8BD5\u5176\u4ED6\u5173\u952E\u8BCD\uFF0C\u6216\u8C03\u6574\u7B5B\u9009\u6761\u4EF6\u3002" : "\u6BCF\u4E00\u6BB5\u503C\u5F97\u56DE\u987E\u7684\u4EA4\u6D41\uFF0C\u90FD\u53EF\u4EE5\u4ECE\u8FD9\u91CC\u5F00\u59CB\u3002" }),
5030
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "button", onClick: state.search || state.status !== "all" ? () => {
5020
5031
  setInput("");
5021
5032
  onState({ search: "", status: "all", page: 1 });
5022
5033
  } : onStart, children: [
5023
5034
  state.search || state.status !== "all" ? "\u6E05\u9664\u7B5B\u9009" : "\u5F00\u59CB\u7075\u542C",
5024
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ArrowRight, { size: 16 })
5035
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ArrowRight, { size: 16 })
5025
5036
  ] })
5026
5037
  ] }) }),
5027
- (!loading || retainContent) && !error && !!result?.total && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "pagination", children: [
5028
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
5038
+ (!loading || retainContent) && !error && !!result?.total && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "pagination", children: [
5039
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
5029
5040
  "\u5171 ",
5030
5041
  result.total,
5031
5042
  " \u6761\u8BB0\u5F55",
5032
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "page-size-note", children: [
5043
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "page-size-note", children: [
5033
5044
  " \xB7 \u6BCF\u9875 ",
5034
5045
  PAGE_SIZE,
5035
5046
  " \u6761"
5036
5047
  ] })
5037
5048
  ] }),
5038
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
5039
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "icon-button", "aria-label": "\u4E0A\u4E00\u9875", disabled: loading || result.page <= 1, onClick: () => onState({ page: result.page - 1, scroll: 0 }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronLeft, { size: 18 }) }),
5040
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "current-page", children: result.page }),
5041
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "page-total", children: [
5049
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
5050
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "icon-button", "aria-label": "\u4E0A\u4E00\u9875", disabled: loading || result.page <= 1, onClick: () => onState({ page: result.page - 1, scroll: 0 }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronLeft, { size: 18 }) }),
5051
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "current-page", children: result.page }),
5052
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "page-total", children: [
5042
5053
  "/ ",
5043
5054
  pages
5044
5055
  ] }),
5045
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "icon-button", "aria-label": "\u4E0B\u4E00\u9875", disabled: loading || result.page >= pages, onClick: () => onState({ page: result.page + 1, scroll: 0 }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChevronRight, { size: 18 }) })
5056
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "icon-button", "aria-label": "\u4E0B\u4E00\u9875", disabled: loading || result.page >= pages, onClick: () => onState({ page: result.page + 1, scroll: 0 }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronRight, { size: 18 }) })
5046
5057
  ] })
5047
5058
  ] })
5048
5059
  ] }),
5049
- shareTarget && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5060
+ shareTarget && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5050
5061
  ShareDialog,
5051
5062
  {
5052
5063
  service,
@@ -5056,20 +5067,37 @@ function RecordList({ service, snapshot, state, onState, onOpen, onStart, onOpen
5056
5067
  onCopied: setToast
5057
5068
  }
5058
5069
  ),
5059
- renaming && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Modal, { title: "\u91CD\u547D\u540D\u8BB0\u5F55", onClose: () => setRenaming(null), busy: renameBusy, children: [
5060
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { className: "field-label", htmlFor: "lt-rename-input", children: "\u8BB0\u5F55\u540D\u79F0" }),
5061
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", { id: "lt-rename-input", className: "text-input", value: renameInput, maxLength: TITLE_MAX_LENGTH, disabled: renameBusy, onChange: (e) => setRenameInput(e.target.value) }),
5062
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "field-hint", children: [
5070
+ deleting && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Modal, { title: "\u5220\u9664\u8FD9\u6761\u7075\u542C\u8BB0\u5F55\uFF1F", busy: deleteBusy, onClose: () => {
5071
+ if (!deleteLock.current) setDeleting(null);
5072
+ }, children: [
5073
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("p", { className: "modal-description", children: [
5074
+ "\u786E\u5B9A\u5220\u9664\u300C",
5075
+ deleting.title,
5076
+ "\u300D\uFF1F\u5220\u9664\u540E\u65E0\u6CD5\u5728\u7075\u542C\u5217\u8868\u4E2D\u6062\u590D\uFF0C\u8BF7\u786E\u8BA4\u4E0D\u518D\u9700\u8981\u8FD9\u6761\u8BB0\u5F55\u3002"
5077
+ ] }),
5078
+ deleteError && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ErrorNotice, { children: deleteError }),
5079
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "modal-actions", children: [
5080
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "button", disabled: deleteBusy, onClick: () => setDeleting(null), children: "\u53D6\u6D88" }),
5081
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "button danger", disabled: deleteBusy, onClick: () => void submitDelete(), children: [
5082
+ deleteBusy ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Spinner, {}) : null,
5083
+ deleteBusy ? "\u6B63\u5728\u5220\u9664\u2026" : "\u786E\u8BA4\u5220\u9664"
5084
+ ] })
5085
+ ] })
5086
+ ] }),
5087
+ renaming && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Modal, { title: "\u91CD\u547D\u540D\u8BB0\u5F55", onClose: () => setRenaming(null), busy: renameBusy, children: [
5088
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { className: "field-label", htmlFor: "lt-rename-input", children: "\u8BB0\u5F55\u540D\u79F0" }),
5089
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("input", { id: "lt-rename-input", className: "text-input", value: renameInput, maxLength: TITLE_MAX_LENGTH, disabled: renameBusy, onChange: (e) => setRenameInput(e.target.value) }),
5090
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "field-hint", children: [
5063
5091
  renameInput.length,
5064
5092
  "/",
5065
5093
  TITLE_MAX_LENGTH,
5066
5094
  " \u5B57"
5067
5095
  ] }),
5068
- renameError && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ErrorNotice, { children: renameError }),
5069
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "modal-actions", children: [
5070
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "button", disabled: renameBusy, onClick: () => setRenaming(null), children: "\u53D6\u6D88" }),
5071
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { className: "button primary", disabled: renameBusy || !renameInput.trim(), onClick: () => void submitRename(), children: [
5072
- renameBusy ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, {}) : null,
5096
+ renameError && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ErrorNotice, { children: renameError }),
5097
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "modal-actions", children: [
5098
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { className: "button", disabled: renameBusy, onClick: () => setRenaming(null), children: "\u53D6\u6D88" }),
5099
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("button", { className: "button primary", disabled: renameBusy || !renameInput.trim(), onClick: () => void submitRename(), children: [
5100
+ renameBusy ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Spinner, {}) : null,
5073
5101
  "\u4FDD\u5B58"
5074
5102
  ] })
5075
5103
  ] })
@@ -5079,7 +5107,7 @@ function RecordList({ service, snapshot, state, onState, onOpen, onStart, onOpen
5079
5107
 
5080
5108
  // src/pages/RecordDetail.tsx
5081
5109
  var import_react20 = require("react");
5082
- var import_jsx_runtime18 = require("react/jsx-runtime");
5110
+ var import_jsx_runtime17 = require("react/jsx-runtime");
5083
5111
  var SEGMENT_PAGE_SIZE3 = 30;
5084
5112
  function RecordDetail({ id, service, snapshot, onBack, onOpenLive }) {
5085
5113
  const [loaded, setLoaded] = (0, import_react20.useState)(null);
@@ -5181,102 +5209,102 @@ function RecordDetail({ id, service, snapshot, onBack, onOpenLive }) {
5181
5209
  const summaryFailed = record?.summaryStatus === 3;
5182
5210
  const notesAction = summaryFailed ? { label: regenerating ? "\u751F\u6210\u4E2D\u2026" : "\u91CD\u65B0\u751F\u6210", title: "\u91CD\u65B0\u751F\u6210 AI \u7EAA\u8981", busy: regenerating, run: regenerate } : null;
5183
5211
  const hasMoreSegments = !isActive && !!record && (segTotal === null ? record.segments.length >= SEGMENT_PAGE_SIZE3 : record.segments.length < segTotal);
5184
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "detail-page", children: [
5185
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { className: "back-link", onClick: onBack, children: [
5186
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ArrowLeft, { size: 17 }),
5212
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "detail-page", children: [
5213
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { className: "back-link", onClick: onBack, children: [
5214
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ArrowLeft, { size: 17 }),
5187
5215
  "\u8FD4\u56DE\u8BB0\u5F55\u5217\u8868"
5188
5216
  ] }),
5189
- error ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "detail-error", children: [
5190
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ErrorNotice, { action: "\u91CD\u65B0\u52A0\u8F7D", onAction: () => setRetry((v) => v + 1), children: error }),
5191
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "button", onClick: onBack, children: "\u8FD4\u56DE\u5217\u8868" })
5192
- ] }) : !record ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "detail-loading", role: "status", children: [
5193
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Spinner, {}),
5217
+ error ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "detail-error", children: [
5218
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ErrorNotice, { action: "\u91CD\u65B0\u52A0\u8F7D", onAction: () => setRetry((v) => v + 1), children: error }),
5219
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "button", onClick: onBack, children: "\u8FD4\u56DE\u5217\u8868" })
5220
+ ] }) : !record ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "detail-loading", role: "status", children: [
5221
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, {}),
5194
5222
  "\u6B63\u5728\u6253\u5F00\u8BB0\u5F55\u2026"
5195
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `lt-detail${isActive ? "" : " lt-detail-view"}`, children: [
5196
- notice && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lt-notice", role: "status", children: [
5197
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Check, { size: 15 }),
5223
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: `lt-detail${isActive ? "" : " lt-detail-view"}`, children: [
5224
+ notice && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lt-notice", role: "status", children: [
5225
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Check, { size: 15 }),
5198
5226
  notice
5199
5227
  ] }),
5200
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("header", { className: "lt-header", children: [
5201
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Waveform, { state: isActive && record.status === "recording" ? "recording" : record.status === "paused" ? "paused" : "idle" }),
5202
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { className: "lt-name", children: "\u7075\u542C" }),
5203
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("time", { className: "lt-timer", "aria-label": "\u5F55\u97F3\u65F6\u957F", children: formatDuration(record.durationMs) })
5228
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("header", { className: "lt-header", children: [
5229
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Waveform, { state: isActive && record.status === "recording" ? "recording" : record.status === "paused" ? "paused" : "idle" }),
5230
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { className: "lt-name", children: "\u7075\u542C" }),
5231
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("time", { className: "lt-timer", "aria-label": "\u5F55\u97F3\u65F6\u957F", children: formatDuration(record.durationMs) })
5204
5232
  ] }),
5205
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lt-session", children: [
5206
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
5207
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { title: record.title, children: record.title }),
5208
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
5209
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(StatusBadge, { status: record.status }),
5233
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lt-session", children: [
5234
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
5235
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { title: record.title, children: record.title }),
5236
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
5237
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StatusBadge, { status: record.status }),
5210
5238
  isSessionInProgress(record.status) && (isActive ? "\u5B9E\u65F6\u8F6C\u5199" : "\u8F6C\u5199\u5185\u5BB9")
5211
5239
  ] })
5212
5240
  ] }),
5213
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lt-session-meta", children: [
5214
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
5215
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Clock3, { size: 13 }),
5241
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lt-session-meta", children: [
5242
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
5243
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Clock3, { size: 13 }),
5216
5244
  formatDate(record.startedAt, true)
5217
5245
  ] }),
5218
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
5219
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Mic, { size: 13 }),
5246
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
5247
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Mic, { size: 13 }),
5220
5248
  record.source
5221
5249
  ] }),
5222
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
5223
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Users, { size: 13 }),
5250
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { children: [
5251
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Users, { size: 13 }),
5224
5252
  new Set(record.segments.map((s) => s.speaker)).size || "\u2014",
5225
5253
  " \u4F4D\u53D1\u8A00\u4EBA"
5226
5254
  ] }),
5227
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RecordActions, { record, notify: setNotice }),
5228
- isSessionEnded(record.status) && record.documentId ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { className: "lt-text", title: "\u5206\u4EAB\u8FD9\u573A\u4F1A\u8BAE\u8BB0\u5F55", onClick: () => setShareOpen(true), children: [
5229
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Share2, { size: 13 }),
5255
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RecordActions, { record, notify: setNotice }),
5256
+ isSessionEnded(record.status) && record.documentId ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { className: "lt-text", title: "\u5206\u4EAB\u8FD9\u573A\u4F1A\u8BAE\u8BB0\u5F55", onClick: () => setShareOpen(true), children: [
5257
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Share2, { size: 13 }),
5230
5258
  "\u5206\u4EAB"
5231
5259
  ] }) : null,
5232
- !isActive && (!isSessionEnded(record.status) || !summary || summaryPending || summaryFailed || !record.audioUrl) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { className: "lt-text lt-session-refresh", title: "\u5237\u65B0\u8BB0\u5F55\u72B6\u6001\u3001\u97F3\u9891\u548C AI \u7EAA\u8981", onClick: () => void refreshSummary(), disabled: refreshing, children: [
5233
- refreshing ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Spinner, { size: 13 }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RefreshCw, { size: 13 }),
5260
+ !isActive && (!isSessionEnded(record.status) || !summary || summaryPending || summaryFailed || !record.audioUrl) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { className: "lt-text lt-session-refresh", title: "\u5237\u65B0\u8BB0\u5F55\u72B6\u6001\u3001\u97F3\u9891\u548C AI \u7EAA\u8981", onClick: () => void refreshSummary(), disabled: refreshing, children: [
5261
+ refreshing ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, { size: 13 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RefreshCw, { size: 13 }),
5234
5262
  "\u5237\u65B0"
5235
5263
  ] })
5236
5264
  ] })
5237
5265
  ] }),
5238
- (record.status === "finishing" || record.status === "interrupted") && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lt-settling", children: [
5239
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Spinner, { size: 13 }),
5266
+ (record.status === "finishing" || record.status === "interrupted") && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lt-settling", children: [
5267
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, { size: 13 }),
5240
5268
  "\u670D\u52A1\u7AEF\u6B63\u5728\u6574\u7406\u8FD9\u573A\u8BB0\u5F55\uFF0C\u5B8C\u6210\u540E\u81EA\u52A8\u5237\u65B0"
5241
5269
  ] }),
5242
- record.audioUrl ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AudioPlayer, { url: record.audioUrl, durationMs: record.durationMs }) : !isSessionInProgress(record.status) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "lt-audio-missing", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "\u97F3\u9891\u6587\u4EF6\u751F\u6210\u4E2D" }) }),
5243
- isActive && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lt-live-tip", children: [
5244
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "archive-icon", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Mic, { size: 17 }) }),
5245
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
5246
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("strong", { children: "\u8FD9\u573A\u7075\u542C\u6B63\u5728\u8FDB\u884C" }),
5247
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "\u5207\u56DE\u804A\u5929\u540E\u5F55\u97F3\u7EE7\u7EED\uFF0C\u63A7\u5236\u6309\u94AE\u5728\u4FA7\u8FB9\u680F\u3002" })
5270
+ record.audioUrl ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AudioPlayer, { url: record.audioUrl, durationMs: record.durationMs }) : !isSessionInProgress(record.status) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "lt-audio-missing", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "\u97F3\u9891\u6587\u4EF6\u751F\u6210\u4E2D" }) }),
5271
+ isActive && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lt-live-tip", children: [
5272
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "archive-icon", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Mic, { size: 17 }) }),
5273
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
5274
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("strong", { children: "\u8FD9\u573A\u7075\u542C\u6B63\u5728\u8FDB\u884C" }),
5275
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "\u5207\u56DE\u804A\u5929\u540E\u5F55\u97F3\u7EE7\u7EED\uFF0C\u63A7\u5236\u6309\u94AE\u5728\u4FA7\u8FB9\u680F\u3002" })
5248
5276
  ] }),
5249
- onOpenLive && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { className: "button quiet return-recording", onClick: onOpenLive, children: [
5277
+ onOpenLive && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { className: "button quiet return-recording", onClick: onOpenLive, children: [
5250
5278
  "\u67E5\u770B\u5B9E\u65F6\u8F6C\u5199",
5251
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ArrowUpRight, { size: 14 })
5279
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ArrowUpRight, { size: 14 })
5252
5280
  ] })
5253
5281
  ] }),
5254
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RecordTabs, { enabled: !isSessionInProgress(record.status), summary: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("section", { className: "lt-notes", "aria-labelledby": "lt-notes-title", children: [
5255
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lt-notes-head", children: [
5256
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Sparkles, { size: 15 }),
5257
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { id: "lt-notes-title", children: "AI \u7EAA\u8981" }),
5258
- notesAction && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { className: "lt-text", title: notesAction.title, onClick: () => void notesAction.run(), disabled: notesAction.busy, children: [
5259
- notesAction.busy ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Spinner, { size: 13 }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RefreshCw, { size: 13 }),
5282
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RecordTabs, { enabled: !isSessionInProgress(record.status), summary: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "lt-notes", "aria-labelledby": "lt-notes-title", children: [
5283
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lt-notes-head", children: [
5284
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Sparkles, { size: 15 }),
5285
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { id: "lt-notes-title", children: "AI \u7EAA\u8981" }),
5286
+ notesAction && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("button", { className: "lt-text", title: notesAction.title, onClick: () => void notesAction.run(), disabled: notesAction.busy, children: [
5287
+ notesAction.busy ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, { size: 13 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RefreshCw, { size: 13 }),
5260
5288
  notesAction.label
5261
5289
  ] })
5262
5290
  ] }),
5263
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lt-notes-body", children: [
5264
- summaryError && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ErrorNotice, { action: "\u77E5\u9053\u4E86", onAction: () => setSummaryError(""), children: summaryError }),
5265
- summaryFailed && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "lt-notes-status failed", children: "\u7EAA\u8981\u751F\u6210\u5931\u8D25\uFF0C\u53EF\u70B9\u51FB\u300C\u91CD\u65B0\u751F\u6210\u300D\u91CD\u8BD5\u3002" }),
5266
- summaryPending ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "lt-notes-status", children: "AI \u7EAA\u8981\u6B63\u5728\u751F\u6210\u4E2D\u2026" }) : summary ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "lt-notes-content", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Markdown, { text: summary }) }) : !summaryFailed && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "lt-notes-status", children: "\u8FD9\u573A\u5F55\u97F3\u8FD8\u6CA1\u6709\u751F\u6210\u7EAA\u8981\u3002" })
5291
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lt-notes-body", children: [
5292
+ summaryError && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ErrorNotice, { action: "\u77E5\u9053\u4E86", onAction: () => setSummaryError(""), children: summaryError }),
5293
+ summaryFailed && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "lt-notes-status failed", children: "\u7EAA\u8981\u751F\u6210\u5931\u8D25\uFF0C\u53EF\u70B9\u51FB\u300C\u91CD\u65B0\u751F\u6210\u300D\u91CD\u8BD5\u3002" }),
5294
+ summaryPending ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "lt-notes-status", children: "AI \u7EAA\u8981\u6B63\u5728\u751F\u6210\u4E2D\u2026" }) : summary ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "lt-notes-content", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Markdown, { text: summary }) }) : !summaryFailed && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "lt-notes-status", children: "\u8FD9\u573A\u5F55\u97F3\u8FD8\u6CA1\u6709\u751F\u6210\u7EAA\u8981\u3002" })
5267
5295
  ] })
5268
- ] }), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5296
+ ] }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5269
5297
  Transcript,
5270
5298
  {
5271
5299
  record,
5272
5300
  live: isActive,
5273
5301
  service,
5274
5302
  onSegmentEdit: (segId, text) => setLoaded((cur) => cur ? { ...cur, segments: cur.segments.map((s) => s.id === segId ? { ...s, text } : s) } : cur),
5275
- loadMore: hasMoreSegments ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TranscriptLoadMore, { loading: moreLoading, error: moreError, count: record.segments.length, onLoad: loadMore }, id) : void 0
5303
+ loadMore: hasMoreSegments ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TranscriptLoadMore, { loading: moreLoading, error: moreError, count: record.segments.length, onLoad: loadMore }, id) : void 0
5276
5304
  }
5277
5305
  ) }, id)
5278
5306
  ] }),
5279
- shareOpen && record && isSessionEnded(record.status) && record.documentId ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5307
+ shareOpen && record && isSessionEnded(record.status) && record.documentId ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5280
5308
  ShareDialog,
5281
5309
  {
5282
5310
  service,
@@ -5294,30 +5322,30 @@ function mergeSegments2(current, incoming) {
5294
5322
  }
5295
5323
 
5296
5324
  // src/pages/XinUnavailable.tsx
5297
- var import_jsx_runtime19 = require("react/jsx-runtime");
5325
+ var import_jsx_runtime18 = require("react/jsx-runtime");
5298
5326
  function XinUnavailable({ gate, state, onRetry, retrying = false, onAuthorize, authorizingBusy = false, authorizeError = "" }) {
5299
5327
  if (gate === "loading") {
5300
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "empty-state", role: "status", children: [
5301
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "empty-icon", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Spinner, { size: 26 }) }),
5302
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { children: "\u6B63\u5728\u68C0\u67E5\u767B\u5F55\u72B6\u6001" }),
5303
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: "\u7075\u542C\u9700\u8981\u4E00\u4EFD\u53EF\u7528\u7684\u85AA\u4EBA\u85AA\u4E8B\u6388\u6743\u624D\u80FD\u8BFB\u53D6\u8BB0\u5F55\u3002" })
5328
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "empty-state", role: "status", children: [
5329
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "empty-icon", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Spinner, { size: 26 }) }),
5330
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: "\u6B63\u5728\u68C0\u67E5\u767B\u5F55\u72B6\u6001" }),
5331
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: "\u7075\u542C\u9700\u8981\u4E00\u4EFD\u53EF\u7528\u7684\u85AA\u4EBA\u85AA\u4E8B\u6388\u6743\u624D\u80FD\u8BFB\u53D6\u8BB0\u5F55\u3002" })
5304
5332
  ] });
5305
5333
  }
5306
5334
  const needsAuthorization = isAuthorizationReason(state ?? null);
5307
5335
  const pending = state?.authorizing === true || state?.reason === "authorizing";
5308
5336
  const canStart = !!state && state.providerAvailable && state.configured && state.canAuthorize === true && !!onAuthorize && (state.reason === "not-authorized" || !!state.authorizationError);
5309
5337
  const failure = authorizeError || (!pending ? state?.authorizationError?.message : "");
5310
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "empty-state", role: "status", children: [
5311
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "empty-icon", children: needsAuthorization ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ShieldAlert, { size: 30, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ShieldCheck, { size: 30, "aria-hidden": true }) }),
5312
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { children: pending ? "\u6B63\u5728\u7B49\u5F85\u6388\u6743\u786E\u8BA4" : needsAuthorization ? "\u8FD8\u6CA1\u6709\u5B8C\u6210\u6388\u6743" : "\u4E1A\u52A1\u6682\u65F6\u4E0D\u53EF\u7528" }),
5313
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { children: pending ? "\u8BF7\u5728\u6253\u5F00\u7684\u6D4F\u89C8\u5668\u9875\u9762\u786E\u8BA4\u9A8C\u8BC1\u7801\uFF0C\u786E\u8BA4\u540E\u4F1A\u81EA\u52A8\u7EE7\u7EED\u3002" : explainXinState(state ?? null) }),
5314
- failure && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { role: "alert", children: failure }),
5315
- (canStart || pending || authorizingBusy) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { className: "button primary", onClick: onAuthorize, disabled: pending || authorizingBusy, children: [
5316
- pending || authorizingBusy ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Spinner, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ShieldCheck, { size: 16, "aria-hidden": true }),
5338
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "empty-state", role: "status", children: [
5339
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "empty-icon", children: needsAuthorization ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ShieldAlert, { size: 30, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ShieldCheck, { size: 30, "aria-hidden": true }) }),
5340
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: pending ? "\u6B63\u5728\u7B49\u5F85\u6388\u6743\u786E\u8BA4" : needsAuthorization ? "\u8FD8\u6CA1\u6709\u5B8C\u6210\u6388\u6743" : "\u4E1A\u52A1\u6682\u65F6\u4E0D\u53EF\u7528" }),
5341
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: pending ? "\u8BF7\u5728\u6253\u5F00\u7684\u6D4F\u89C8\u5668\u9875\u9762\u786E\u8BA4\u9A8C\u8BC1\u7801\uFF0C\u786E\u8BA4\u540E\u4F1A\u81EA\u52A8\u7EE7\u7EED\u3002" : explainXinState(state ?? null) }),
5342
+ failure && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { role: "alert", children: failure }),
5343
+ (canStart || pending || authorizingBusy) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { className: "button primary", onClick: onAuthorize, disabled: pending || authorizingBusy, children: [
5344
+ pending || authorizingBusy ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Spinner, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ShieldCheck, { size: 16, "aria-hidden": true }),
5317
5345
  pending ? "\u7B49\u5F85\u6D4F\u89C8\u5668\u786E\u8BA4\u2026" : authorizingBusy ? "\u6B63\u5728\u53D1\u8D77\u6388\u6743\u2026" : "\u5F00\u59CB\u6388\u6743"
5318
5346
  ] }),
5319
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { className: "button", onClick: onRetry, disabled: retrying, children: [
5320
- retrying ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Spinner, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RefreshCw, { size: 16, "aria-hidden": true }),
5347
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { className: "button", onClick: onRetry, disabled: retrying, children: [
5348
+ retrying ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Spinner, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RefreshCw, { size: 16, "aria-hidden": true }),
5321
5349
  retrying ? "\u6B63\u5728\u68C0\u67E5\u2026" : "\u91CD\u65B0\u68C0\u67E5"
5322
5350
  ] })
5323
5351
  ] });
@@ -5360,7 +5388,7 @@ function createMemoryNavigation() {
5360
5388
  }
5361
5389
 
5362
5390
  // src/App.tsx
5363
- var import_jsx_runtime20 = require("react/jsx-runtime");
5391
+ var import_jsx_runtime19 = require("react/jsx-runtime");
5364
5392
  var noHostSubscribe = () => () => {
5365
5393
  };
5366
5394
  var noHostSnapshot = () => null;
@@ -5462,63 +5490,63 @@ function LingtingApp({ service, navigation = browserNavigation, onBackToHost, on
5462
5490
  setModal(null);
5463
5491
  void run(service.finish, "\u8FD9\u573A\u7075\u542C\u5DF2\u7ED3\u675F\uFF0C\u8F6C\u5199\u5DF2\u4FDD\u5B58");
5464
5492
  };
5465
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "lingting-root app", "data-embedded": embedded || void 0, children: [
5466
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("a", { className: "skip-link", href: "#lingting-main", onClick: (e) => {
5493
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "lingting-root app", "data-embedded": embedded || void 0, children: [
5494
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("a", { className: "skip-link", href: "#lingting-main", onClick: (e) => {
5467
5495
  e.preventDefault();
5468
5496
  document.getElementById("lingting-main")?.focus();
5469
5497
  }, children: "\u8DF3\u81F3\u4E3B\u8981\u5185\u5BB9" }),
5470
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("header", { className: "app-header", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "header-inner", children: [
5471
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { className: "brand-button", "aria-label": "\u8FD4\u56DE\u7075\u542C\u8BB0\u5F55", onClick: () => navigate(null), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Brand, {}) }),
5472
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "header-actions", children: [
5473
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { className: "header-link", onClick: () => setSettings(true), children: [
5474
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Bell, { size: 14 }),
5498
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("header", { className: "app-header", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "header-inner", children: [
5499
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { className: "brand-button", "aria-label": "\u8FD4\u56DE\u7075\u542C\u8BB0\u5F55", onClick: () => navigate(null), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Brand, {}) }),
5500
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "header-actions", children: [
5501
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { className: "header-link", onClick: () => setSettings(true), children: [
5502
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Bell, { size: 14 }),
5475
5503
  "\u4F1A\u8BAE\u63D0\u9192"
5476
5504
  ] }),
5477
- onBackToHost && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { className: "header-link", onClick: onBackToHost, children: "\u8FD4\u56DE\u804A\u5929" })
5505
+ onBackToHost && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { className: "header-link", onClick: onBackToHost, children: "\u8FD4\u56DE\u804A\u5929" })
5478
5506
  ] })
5479
5507
  ] }) }),
5480
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("main", { id: "lingting-main", className: "main-content", tabIndex: -1, children: [
5481
- error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorNotice, { action: "\u77E5\u9053\u4E86", onAction: () => setError(""), children: error }),
5482
- active?.connection === "disconnected" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorNotice, { children: "\u8FDE\u63A5\u4E2D\u65AD\uFF0C\u5F55\u97F3\u5DF2\u6682\u505C\uFF0C\u65F6\u957F\u548C\u8F6C\u5199\u505C\u6B62\u589E\u957F\u3002" }),
5483
- gate !== "pass" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(XinUnavailable, { gate, state: hostSnapshot, onRetry: retryHost, retrying: retryingHost, onAuthorize: () => void authorizeHost(), authorizingBusy: authorizingHost, authorizeError }) : recordId && (!previousContext.current || previousContext.current === businessContext) ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(RecordDetail, { id: recordId, service, snapshot, onBack: () => navigate(null), onOpenLive }, `${businessContext ?? ""}:${recordId}`) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(RecordList, { service, snapshot, state: listState, onState: updateList, onOpen: (id) => onOpenRecord ? onOpenRecord(id) : navigate(id), onStart: () => openModal("start"), onOpenLive }, businessContext),
5484
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("footer", { className: "page-footer", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { children: [
5508
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("main", { id: "lingting-main", className: "main-content", tabIndex: -1, children: [
5509
+ error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ErrorNotice, { action: "\u77E5\u9053\u4E86", onAction: () => setError(""), children: error }),
5510
+ active?.connection === "disconnected" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ErrorNotice, { children: "\u8FDE\u63A5\u4E2D\u65AD\uFF0C\u5F55\u97F3\u5DF2\u6682\u505C\uFF0C\u65F6\u957F\u548C\u8F6C\u5199\u505C\u6B62\u589E\u957F\u3002" }),
5511
+ gate !== "pass" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(XinUnavailable, { gate, state: hostSnapshot, onRetry: retryHost, retrying: retryingHost, onAuthorize: () => void authorizeHost(), authorizingBusy: authorizingHost, authorizeError }) : recordId && (!previousContext.current || previousContext.current === businessContext) ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RecordDetail, { id: recordId, service, snapshot, onBack: () => navigate(null), onOpenLive }, `${businessContext ?? ""}:${recordId}`) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RecordList, { service, snapshot, state: listState, onState: updateList, onOpen: (id) => onOpenRecord ? onOpenRecord(id) : navigate(id), onStart: () => openModal("start"), onOpenLive }, businessContext),
5512
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("footer", { className: "page-footer", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
5485
5513
  "\u7075\u542C",
5486
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "footer-separator", children: "/" }),
5514
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "footer-separator", children: "/" }),
5487
5515
  "\u8BA9\u60F3\u6CD5\u88AB\u542C\u89C1"
5488
5516
  ] }) })
5489
5517
  ] }),
5490
- toast && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "toast", role: "status", children: [
5491
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Check, { size: 17 }),
5518
+ toast && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "toast", role: "status", children: [
5519
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Check, { size: 17 }),
5492
5520
  toast
5493
5521
  ] }),
5494
- modal === "start" && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Modal, { title: "\u5F00\u59CB\u4E00\u573A\u7075\u542C", onClose: () => setModal(null), busy: snapshot.operation === "starting", children: [
5495
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "start-illustration", children: [
5496
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "illustration-ring", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Headphones, { size: 37, strokeWidth: 1.5 }) }),
5497
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "tiny-wave", children: "\u2582 \u2585 \u2583 \u2587 \u2585 \u2582" })
5522
+ modal === "start" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Modal, { title: "\u5F00\u59CB\u4E00\u573A\u7075\u542C", onClose: () => setModal(null), busy: snapshot.operation === "starting", children: [
5523
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "start-illustration", children: [
5524
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "illustration-ring", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Headphones, { size: 37, strokeWidth: 1.5 }) }),
5525
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "tiny-wave", children: "\u2582 \u2585 \u2583 \u2587 \u2585 \u2582" })
5498
5526
  ] }),
5499
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "modal-intro", children: "\u628A\u6CE8\u610F\u529B\u7559\u7ED9\u5BF9\u8BDD\uFF0C\u5269\u4E0B\u7684\u4EA4\u7ED9\u7075\u542C\u3002" }),
5500
- dialogError && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorNotice, { children: dialogError }),
5501
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "modal-actions", children: [
5502
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { className: "button", onClick: () => setModal(null), disabled: !!snapshot.operation, children: "\u53D6\u6D88" }),
5503
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { className: "button primary", onClick: () => void start(), disabled: !!snapshot.operation, children: [
5504
- snapshot.operation === "starting" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Spinner, {}) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Mic, { size: 16 }),
5527
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "modal-intro", children: "\u628A\u6CE8\u610F\u529B\u7559\u7ED9\u5BF9\u8BDD\uFF0C\u5269\u4E0B\u7684\u4EA4\u7ED9\u7075\u542C\u3002" }),
5528
+ dialogError && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ErrorNotice, { children: dialogError }),
5529
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "modal-actions", children: [
5530
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { className: "button", onClick: () => setModal(null), disabled: !!snapshot.operation, children: "\u53D6\u6D88" }),
5531
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("button", { className: "button primary", onClick: () => void start(), disabled: !!snapshot.operation, children: [
5532
+ snapshot.operation === "starting" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Spinner, {}) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Mic, { size: 16 }),
5505
5533
  snapshot.operation === "starting" ? "\u6B63\u5728\u542F\u52A8\u2026" : "\u5F00\u59CB\u7075\u542C"
5506
5534
  ] })
5507
5535
  ] })
5508
5536
  ] }),
5509
- settings && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MeetingSettings, { onClose: () => setSettings(false) }),
5510
- modal === "finish" && active && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Modal, { title: "\u7ED3\u675F\u8FD9\u573A\u7075\u542C\uFF1F", onClose: () => setModal(null), children: [
5511
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "finish-symbol", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Headphones, { size: 28 }) }),
5512
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "finish-title", children: active.title }),
5513
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { className: "modal-intro", children: [
5537
+ settings && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MeetingSettings, { onClose: () => setSettings(false) }),
5538
+ modal === "finish" && active && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Modal, { title: "\u7ED3\u675F\u8FD9\u573A\u7075\u542C\uFF1F", onClose: () => setModal(null), children: [
5539
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "finish-symbol", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Headphones, { size: 28 }) }),
5540
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "finish-title", children: active.title }),
5541
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "modal-intro", children: [
5514
5542
  "\u7ED3\u675F\u540E\u5C06\u505C\u6B62\u5F55\u97F3\uFF0C\u5E76\u6574\u7406\u672C\u6B21\u8F6C\u5199\u5185\u5BB9\u3002",
5515
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("br", {}),
5543
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("br", {}),
5516
5544
  "\u4F60\u53EF\u4EE5\u968F\u65F6\u5728\u6570\u636E\u5217\u8868\u4E2D\u56DE\u770B\u3002"
5517
5545
  ] }),
5518
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "finish-tip", children: "\u7ED3\u675F\u540E\u65E0\u6CD5\u7EE7\u7EED\u8FD9\u573A\u5F55\u97F3\uFF0C\u9700\u8981\u91CD\u65B0\u5F00\u59CB\u4E00\u573A\u7075\u542C\u3002" }),
5519
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "modal-actions", children: [
5520
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { className: "button", onClick: () => setModal(null), children: active.status === "paused" ? "\u6682\u4E0D\u7ED3\u675F" : "\u7EE7\u7EED\u5F55\u97F3" }),
5521
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { className: "button danger", onClick: finish, children: "\u7ED3\u675F\u7075\u542C" })
5546
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "finish-tip", children: "\u7ED3\u675F\u540E\u65E0\u6CD5\u7EE7\u7EED\u8FD9\u573A\u5F55\u97F3\uFF0C\u9700\u8981\u91CD\u65B0\u5F00\u59CB\u4E00\u573A\u7075\u542C\u3002" }),
5547
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "modal-actions", children: [
5548
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { className: "button", onClick: () => setModal(null), children: active.status === "paused" ? "\u6682\u4E0D\u7ED3\u675F" : "\u7EE7\u7EED\u5F55\u97F3" }),
5549
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { className: "button danger", onClick: finish, children: "\u7ED3\u675F\u7075\u542C" })
5522
5550
  ] })
5523
5551
  ] })
5524
5552
  ] });
@@ -5659,7 +5687,7 @@ document.querySelectorAll("style[data-plugin-css=" + JSON.stringify("dsh-xrxs-li
5659
5687
  document.head.appendChild(tag3);
5660
5688
 
5661
5689
  // src/plugin/client.tsx
5662
- var import_jsx_runtime21 = require("react/jsx-runtime");
5690
+ var import_jsx_runtime20 = require("react/jsx-runtime");
5663
5691
  var ID = "dsh-xrxs-lingting";
5664
5692
  var inject = ["slots", "layout"];
5665
5693
  var PanelBoundary = class extends import_react23.Component {
@@ -5668,7 +5696,7 @@ var PanelBoundary = class extends import_react23.Component {
5668
5696
  return { failed: true };
5669
5697
  }
5670
5698
  render() {
5671
- return this.state.failed ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("aside", { className: "lingting-root lt-floating", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "lt-dialog-note", children: "\u7075\u542C\u9762\u677F\u52A0\u8F7D\u5F02\u5E38\uFF0C\u8BF7\u91CD\u542F\u63D2\u4EF6\u540E\u91CD\u8BD5\u3002" }) }) : this.props.children;
5699
+ return this.state.failed ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("aside", { className: "lingting-root lt-floating", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "lt-dialog-note", children: "\u7075\u542C\u9762\u677F\u52A0\u8F7D\u5F02\u5E38\uFF0C\u8BF7\u91CD\u542F\u63D2\u4EF6\u540E\u91CD\u8BD5\u3002" }) }) : this.props.children;
5672
5700
  }
5673
5701
  };
5674
5702
  async function apply(ctx) {
@@ -5705,21 +5733,21 @@ async function apply(ctx) {
5705
5733
  function Entry({ wide }) {
5706
5734
  const panel = (0, import_react23.useSyncExternalStore)(controller.subscribe, controller.getSnapshot);
5707
5735
  const layout = (0, import_react23.useSyncExternalStore)(business.subscribe, business.getSnapshot);
5708
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { type: "button", className: "lingting-sidebar-entry", "data-active": layout.activeId === ID || panel.open || void 0, title: "\u7075\u542C", "aria-label": "\u7075\u542C", onClick: () => business.open(ID), children: [
5709
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Headphones, { size: 19 }),
5710
- wide && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "\u7075\u542C" })
5736
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { type: "button", className: "lingting-sidebar-entry", "data-active": layout.activeId === ID || panel.open || void 0, title: "\u7075\u542C", "aria-label": "\u7075\u542C", onClick: () => business.open(ID), children: [
5737
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Headphones, { size: 19 }),
5738
+ wide && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "\u7075\u542C" })
5711
5739
  ] });
5712
5740
  }
5713
5741
  function Page({ activeId }) {
5714
- return activeId === ID ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PanelBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LingtingApp, { service, navigation, visible: true, embedded: true, hostState, onBackToHost: () => business.close(), onOpenLive: () => controller.open(), onOpenRecord: (id) => controller.openRecord(id) }) }) : null;
5742
+ return activeId === ID ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PanelBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LingtingApp, { service, navigation, visible: true, embedded: true, hostState, onBackToHost: () => business.close(), onOpenLive: () => controller.open(), onOpenRecord: (id) => controller.openRecord(id) }) }) : null;
5715
5743
  }
5716
5744
  function Overlay() {
5717
5745
  const page = (0, import_react23.useSyncExternalStore)(business.subscribe, business.getSnapshot, business.getSnapshot);
5718
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
5719
- !hostBusiness && page.activeId === ID && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(BusinessSurface, { onClose: () => business.close(), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Page, { activeId: page.activeId }) }),
5720
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PanelBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(XinHostNotice, { store: hostState }) }),
5721
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PanelBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LingtingSidebar, { service, controller, onOpenPage: () => business.open(ID) }) }),
5722
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PanelBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MeetingPrompt, { service }) })
5746
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
5747
+ !hostBusiness && page.activeId === ID && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(BusinessSurface, { onClose: () => business.close(), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Page, { activeId: page.activeId }) }),
5748
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PanelBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(XinHostNotice, { store: hostState }) }),
5749
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PanelBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LingtingSidebar, { service, controller, onOpenPage: () => business.open(ID) }) }),
5750
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PanelBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MeetingPrompt, { service }) })
5723
5751
  ] });
5724
5752
  }
5725
5753
  ctx.effect(() => () => {
@@ -92,7 +92,7 @@ function registerMeetingRoutes(connection, runtime) {
92
92
  if (!body.ok) return body.response;
93
93
  const action = body.value.action;
94
94
  const sessionId = asString(body.value.sessionId);
95
- if (action !== "accept" && action !== "ignore" && action !== "mute-app") {
95
+ if (action !== "accept" && action !== "ignore" && action !== "mute-app" && action !== "start-failed") {
96
96
  return json({ ok: false, error: "unknown-action" }, 400);
97
97
  }
98
98
  if (!sessionId) return json({ ok: false, error: "missing-session-id" }, 400);
@@ -141,6 +141,7 @@ function registerMeetingRoutes(connection, runtime) {
141
141
  }
142
142
 
143
143
  // src/plugin/native/supervisor.ts
144
+ import { release as osRelease } from "node:os";
144
145
  import { spawn as nodeSpawn } from "node:child_process";
145
146
 
146
147
  // src/plugin/native/protocol.ts
@@ -490,6 +491,13 @@ function createHelperSupervisor(options = {}) {
490
491
  patch({ health: "unavailable", reason: "helper-not-found", sessions: [] });
491
492
  return;
492
493
  }
494
+ if (resolution.platform === "darwin") {
495
+ const [major, minor] = (options.osRelease ?? osRelease)().split(".").map(Number);
496
+ if (!Number.isFinite(major) || major < 23 || major === 23 && (!Number.isFinite(minor) || minor < 4)) {
497
+ patch({ health: "unavailable", reason: "macos-detection-unsupported", sessions: [], restarts: 0 });
498
+ return;
499
+ }
500
+ }
493
501
  patch({ health: "starting", reason: null });
494
502
  let spawned;
495
503
  try {
@@ -924,14 +932,14 @@ function createMeetingRuntime(options = {}) {
924
932
  const lastSessionStates = /* @__PURE__ */ new Map();
925
933
  let lastNotifiedAt = null;
926
934
  let lastAction = null;
927
- async function notifyPrompt(record) {
935
+ async function notifyPrompt(record, failed = false) {
928
936
  try {
929
937
  const result = await supervisor.command("prompt.show", {
930
938
  promptId: record.promptId,
931
939
  title: "\u7075\u542C",
932
- subtitle: `${record.appName}\u53EF\u80FD\u6B63\u5728\u901A\u8BDD`,
933
- message: "\u9700\u8981\u6211\u5E2E\u4F60\u5F00\u542F\u5F55\u97F3\u8F6C\u5199\u5417\uFF1F\u53EF\u4EE5\u751F\u6210\u5F55\u97F3\u7EAA\u8981\u5E76\u5BF9\u5185\u5BB9\u63D0\u95EE",
934
- acceptLabel: "\u5F00\u542F\u5F55\u97F3\u8F6C\u5199",
940
+ subtitle: failed ? "\u7075\u542C\u542F\u52A8\u672A\u5B8C\u6210" : `${record.appName}\u53EF\u80FD\u6B63\u5728\u901A\u8BDD`,
941
+ message: failed ? "\u8BF7\u68C0\u67E5\u9EA6\u514B\u98CE\u3001\u7CFB\u7EDF\u97F3\u9891\u6743\u9650\u53CA\u7F51\u7EDC\u8FDE\u63A5\uFF0C\u7136\u540E\u91CD\u8BD5\u3002" : "\u9700\u8981\u6211\u5E2E\u4F60\u5F00\u542F\u5F55\u97F3\u8F6C\u5199\u5417\uFF1F\u53EF\u4EE5\u751F\u6210\u5F55\u97F3\u7EAA\u8981\u5E76\u5BF9\u5185\u5BB9\u63D0\u95EE",
942
+ acceptLabel: failed ? "\u91CD\u8BD5\u5F00\u542F\u7075\u542C" : "\u5F00\u542F\u5F55\u97F3\u8F6C\u5199",
935
943
  ignoreLabel: "\u5FFD\u7565",
936
944
  muteLabel: "\u4E0D\u518D\u63D0\u9192",
937
945
  timeoutSeconds: 60
@@ -1046,6 +1054,12 @@ function createMeetingRuntime(options = {}) {
1046
1054
  return { ...config };
1047
1055
  }
1048
1056
  function handleAction(input) {
1057
+ if (input.action === "start-failed") {
1058
+ const record2 = policy.promptRecords().find((item) => item.sessionId === input.sessionId);
1059
+ if (!config.enabled || !record2 || record2.status !== "accepted") return { ok: false, error: "unknown-session" };
1060
+ void notifyPrompt(record2, true);
1061
+ return { ok: true };
1062
+ }
1049
1063
  if (input.action === "mute-app") {
1050
1064
  if (!input.appId) return { ok: false, error: "missing-app-id" };
1051
1065
  const muted = new Set(config.mutedApps);