@yuku123/z-team-component 0.2.137 → 0.2.138

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.
Files changed (49) hide show
  1. package/dist/{AdminModuleContent-B1YxyaNI.js → AdminModuleContent-9gH_G78B.js} +12824 -13238
  2. package/dist/{ChangeLogView-BKQfeeag.js → ChangeLogView-DzFmZVBw.js} +1 -1
  3. package/dist/{ComponentDoc-DHTIWtcE.js → ComponentDoc-KyD5wtuW.js} +435 -445
  4. package/dist/{InvitationManagementPage-DgVqNUvK.js → InvitationManagementPage-6-0uZNuO.js} +1 -1
  5. package/dist/{OnboardingPage-DiBVtw23.js → OnboardingPage-tLarxnp5.js} +2 -2
  6. package/dist/{ScheduledTasks-DuR4sg4k.js → ScheduledTasks-QGmD7Uhz.js} +6 -6
  7. package/dist/SystemShell-CWawiWOn.js +885 -0
  8. package/dist/SystemWorkbench.module-CZv_ruUa.js +36 -0
  9. package/dist/{admin-logs-BZasxvF5.js → admin-logs-DXjxD-y2.js} +1 -1
  10. package/dist/{api-CELjpxxS.js → api-DOjASQ0k.js} +1 -1
  11. package/dist/{api-BhdcdwWj.js → api-Dzr8HLsU.js} +1 -1
  12. package/dist/{createWorkspaceWsHandler-SY-wVjjh.js → createWorkspaceWsHandler-DCokPv4M.js} +3 -3
  13. package/dist/{index-CV3kkXgP.js → index-0AjMJyFL.js} +3 -3
  14. package/dist/{index-CtFdsOsR.js → index-4NOi2xz4.js} +2 -2
  15. package/dist/{index-D3YkA5j4.js → index-4icVyiM3.js} +5 -5
  16. package/dist/{index-BDZOz1cm.js → index-8VddM67M.js} +2 -2
  17. package/dist/{index-DkF5EnSi.js → index-B75TTql4.js} +2 -2
  18. package/dist/{index-C_OjaGAs.js → index-BHfNKXIA.js} +3 -3
  19. package/dist/{index-B2iHgJnx.js → index-BdEokzAv.js} +6 -6
  20. package/dist/{index-NfGgVmob.js → index-BgdqkNkT.js} +3 -3
  21. package/dist/{index-BB7G9ZN4.js → index-C9NwYJh-.js} +1 -1
  22. package/dist/{index-DOdAlZfA.js → index-CLP0LnEz.js} +12 -12
  23. package/dist/index-CNmSLd0s.js +1894 -0
  24. package/dist/{index-X-n1B8fi.js → index-CUOByyqy.js} +3 -3
  25. package/dist/{index-B6Nj2_Zo.js → index-CjYmL2yJ.js} +1 -1
  26. package/dist/{index-Cd3a7nol.js → index-Crzx3zh2.js} +2 -2
  27. package/dist/index-Cwptuq_d.js +1323 -0
  28. package/dist/{index-D9NoVz2x.js → index-DC1fQH0J.js} +2 -2
  29. package/dist/{index-DpiQW5SO.js → index-DGdtqBi4.js} +4 -4
  30. package/dist/{index-Cxvua23F.js → index-DXA0r7Co.js} +2 -2
  31. package/dist/{index-B3K7b3Bf.js → index-DZcMGMHV.js} +4 -4
  32. package/dist/{index-DSH-wcoD.js → index-DarTFF-M.js} +1 -1
  33. package/dist/{index-B0xiWAhM.js → index-DxZEpsT6.js} +10 -10
  34. package/dist/{index-DWi-8Esh.js → index-PJZV-bFc.js} +1 -1
  35. package/dist/{index-Btpel9AF.js → index-VqKcDrn3.js} +2 -2
  36. package/dist/{index-Bwe4EN63.js → index-ZqDoLUxb.js} +1 -1
  37. package/dist/index.js +1 -1
  38. package/dist/{instance-BOFjc82M.js → instance-CDA6R8yG.js} +1 -1
  39. package/dist/{menuPermission-Dfwf-EJP.js → menuPermission-LCjN8Osm.js} +3 -3
  40. package/dist/pages.js +1 -1
  41. package/dist/{send-default-agent-team-message-CvPaOp3a.js → send-default-agent-team-message-3Uyy88s_.js} +1 -1
  42. package/dist/{sso-user-CAWQupk5.js → sso-user-DX2FYQCh.js} +1 -1
  43. package/dist/{training-BYjqU8sn.js → training-BgYM7EV-.js} +1 -1
  44. package/dist/{webide-CDZpzRfx.js → webide-BsF30aLX.js} +1289 -1255
  45. package/dist/z-team-component.css +1 -1
  46. package/package.json +1 -1
  47. package/dist/SystemShell-DoMowhBn.js +0 -981
  48. package/dist/index-BHBuOhK5.js +0 -1299
  49. package/dist/index-DlxfYOdw.js +0 -1718
@@ -380,7 +380,7 @@ async function os(e) {
380
380
  const n = await S(`${b}/common/upload-image`, {
381
381
  method: "POST",
382
382
  body: t
383
- }), r = await f(n, "上传图片失败"), s = typeof (r == null ? void 0 : r.url) == "string" ? r.url : "";
383
+ }), r = await y(n, "上传图片失败"), s = typeof (r == null ? void 0 : r.url) == "string" ? r.url : "";
384
384
  if (!s) {
385
385
  const o = "上传图片失败:响应缺少图片地址";
386
386
  throw _e(o), { _apiUserError: !0, userMessage: o, message: o };
@@ -421,7 +421,7 @@ function Xn(e) {
421
421
  is_global_admin: !!(e.is_global_admin ?? e.globalAdmin ?? e.global_admin ?? e.isPlatformAdmin ?? e.is_platform_admin ?? !1)
422
422
  };
423
423
  }
424
- async function f(e, t) {
424
+ async function y(e, t) {
425
425
  const n = await e.text().catch(() => "");
426
426
  let r = {};
427
427
  if (n)
@@ -468,7 +468,7 @@ async function cs(e, t) {
468
468
  headers: { Accept: "application/json", "Content-Type": "application/json" },
469
469
  credentials: "include",
470
470
  body: JSON.stringify({ identifier: e, password: t })
471
- }), r = await f(n, "登录失败"), s = (r == null ? void 0 : r.userInfo) ?? (r == null ? void 0 : r.user_info) ?? (r == null ? void 0 : r.user) ?? r, o = Xn(s);
471
+ }), r = await y(n, "登录失败"), s = (r == null ? void 0 : r.userInfo) ?? (r == null ? void 0 : r.user_info) ?? (r == null ? void 0 : r.user) ?? r, o = Xn(s);
472
472
  return { token: (r == null ? void 0 : r.token) ?? "", user: o };
473
473
  }
474
474
  async function Zo(e) {
@@ -476,7 +476,7 @@ async function Zo(e) {
476
476
  headers: { Accept: "application/json" },
477
477
  ...g,
478
478
  credentials: "include"
479
- }), n = await f(
479
+ }), n = await y(
480
480
  t,
481
481
  "获取用户信息失败"
482
482
  );
@@ -487,7 +487,7 @@ async function Xo() {
487
487
  ...g,
488
488
  headers: { Accept: "application/json" },
489
489
  credentials: "include"
490
- }), t = await f(e, "获取租户列表失败"), n = (o, i, c) => (o == null ? void 0 : o[i]) ?? (o == null ? void 0 : o[c]), s = (Array.isArray(t == null ? void 0 : t.memberships) ? t.memberships : []).map((o) => ({
490
+ }), t = await y(e, "获取租户列表失败"), n = (o, i, c) => (o == null ? void 0 : o[i]) ?? (o == null ? void 0 : o[c]), s = (Array.isArray(t == null ? void 0 : t.memberships) ? t.memberships : []).map((o) => ({
491
491
  tenantCode: String(n(o, "tenantCode", "tenant_code") ?? ""),
492
492
  roleCode: n(o, "roleCode", "role_code"),
493
493
  memberStatus: n(o, "memberStatus", "member_status")
@@ -503,7 +503,7 @@ async function Yo(e) {
503
503
  ...g,
504
504
  headers: { Accept: "application/json" },
505
505
  credentials: "include"
506
- }), r = await f(n, "获取租户域列表失败"), s = (i, c, l) => (i == null ? void 0 : i[c]) ?? (i == null ? void 0 : i[l]);
506
+ }), r = await y(n, "获取租户域列表失败"), s = (i, c, l) => (i == null ? void 0 : i[c]) ?? (i == null ? void 0 : i[l]);
507
507
  return (Array.isArray(r) ? r : Array.isArray(r == null ? void 0 : r.list) ? r.list : []).map((i) => ({
508
508
  id: s(i, "id", "id"),
509
509
  domainCode: String(s(i, "domainCode", "domain_code") ?? ""),
@@ -519,11 +519,11 @@ async function Qo(e, t) {
519
519
  headers: { Accept: "application/json", "Content-Type": "application/json" },
520
520
  credentials: "include",
521
521
  body: JSON.stringify({ tenantCode: e, domainCode: t || "" })
522
- }), r = await f(n, "切换租户失败");
522
+ }), r = await y(n, "切换租户失败");
523
523
  return { token: (r == null ? void 0 : r.token) ?? "", account: (r == null ? void 0 : r.account) ?? null };
524
524
  }
525
525
  async function ls(e) {
526
- await f(
526
+ await y(
527
527
  await fetch("/kapi/z-ctc/api/ctc/authn/logout", {
528
528
  headers: { Accept: "application/json" },
529
529
  ...g,
@@ -574,11 +574,11 @@ async function ps(e = "", t) {
574
574
  `${b}/scenario-instances/${r ? `?${r}` : ""}`,
575
575
  g
576
576
  );
577
- return f(s, "获取项目列表失败");
577
+ return y(s, "获取项目列表失败");
578
578
  }
579
579
  async function ti(e = "") {
580
580
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/scenarios${t}`, g);
581
- return f(n, "获取场景列表失败");
581
+ return y(n, "获取场景列表失败");
582
582
  }
583
583
  async function Yn(e, t = "") {
584
584
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = {
@@ -589,7 +589,7 @@ async function Yn(e, t = "") {
589
589
  method: "POST",
590
590
  headers: { "Content-Type": "application/json" },
591
591
  body: JSON.stringify(r)
592
- }), o = await f(s, "创建项目失败");
592
+ }), o = await y(s, "创建项目失败");
593
593
  return Ae(o);
594
594
  }
595
595
  const ni = Yn;
@@ -652,7 +652,7 @@ async function ri(e, t) {
652
652
  headers: { "Content-Type": "application/json" },
653
653
  body: JSON.stringify({ llmCode: t || null })
654
654
  }
655
- ), r = await f(n, "设置模型失败");
655
+ ), r = await y(n, "设置模型失败");
656
656
  return Ae(r);
657
657
  }
658
658
  const hs = "qa_support";
@@ -672,14 +672,14 @@ async function ai(e, t, n) {
672
672
  },
673
673
  body: r.toString()
674
674
  });
675
- await f(s, "回写工单关联工程失败");
675
+ await y(s, "回写工单关联工程失败");
676
676
  }
677
677
  async function fs(e) {
678
678
  const t = await S(
679
679
  `${b}/scenario-instances/${e}/team/`,
680
680
  g
681
681
  );
682
- return f(t, "获取团队成员失败");
682
+ return y(t, "获取团队成员失败");
683
683
  }
684
684
  async function ys(e, t) {
685
685
  const n = await S(`${b}/scenario-instances/${e}/team/`, {
@@ -688,7 +688,7 @@ async function ys(e, t) {
688
688
  headers: { "Content-Type": "application/json" },
689
689
  body: JSON.stringify(t)
690
690
  });
691
- return f(n, "添加成员失败");
691
+ return y(n, "添加成员失败");
692
692
  }
693
693
  async function gs(e, t) {
694
694
  const n = await S(
@@ -698,35 +698,35 @@ async function gs(e, t) {
698
698
  method: "DELETE"
699
699
  }
700
700
  );
701
- return f(n, "移除成员失败");
701
+ return y(n, "移除成员失败");
702
702
  }
703
703
  async function bs(e) {
704
704
  const t = await S(
705
705
  `${b}/scenario-instances/${e}/team/available-agents`,
706
706
  g
707
707
  );
708
- return f(t, "获取Agent列表失败");
708
+ return y(t, "获取Agent列表失败");
709
709
  }
710
710
  async function Ss(e) {
711
711
  const t = await S(
712
712
  `${b}/scenario-instances/${e}/team/available-humans`,
713
713
  g
714
714
  );
715
- return f(t, "获取用户列表失败");
715
+ return y(t, "获取用户列表失败");
716
716
  }
717
717
  async function ws(e) {
718
718
  const t = await S(
719
719
  `${b}/scenario-instances/${e}/skills`,
720
720
  g
721
721
  );
722
- return f(t, "获取技能列表失败");
722
+ return y(t, "获取技能列表失败");
723
723
  }
724
724
  async function _s(e) {
725
725
  const t = await S(
726
726
  `${b}/scenario-instances/${e}/all-skills`,
727
727
  g
728
728
  );
729
- return f(t, "获取全部技能列表失败");
729
+ return y(t, "获取全部技能列表失败");
730
730
  }
731
731
  async function Ts(e, t) {
732
732
  const n = await S(`${b}/scenario-instances/${e}/skills`, {
@@ -735,7 +735,7 @@ async function Ts(e, t) {
735
735
  headers: { "Content-Type": "application/json" },
736
736
  body: JSON.stringify({ skill_id: t })
737
737
  });
738
- return f(n, "添加技能失败");
738
+ return y(n, "添加技能失败");
739
739
  }
740
740
  async function ks(e, t) {
741
741
  const n = await S(
@@ -745,7 +745,7 @@ async function ks(e, t) {
745
745
  method: "DELETE"
746
746
  }
747
747
  );
748
- return f(n, "移除技能失败");
748
+ return y(n, "移除技能失败");
749
749
  }
750
750
  async function Is(e, t) {
751
751
  const n = await S(
@@ -757,7 +757,7 @@ async function Is(e, t) {
757
757
  body: JSON.stringify({ agent_skills_path: t })
758
758
  }
759
759
  );
760
- return f(n, "刷新技能失败");
760
+ return y(n, "刷新技能失败");
761
761
  }
762
762
  async function Cs(e) {
763
763
  const t = await S(
@@ -767,13 +767,13 @@ async function Cs(e) {
767
767
  method: "POST"
768
768
  }
769
769
  );
770
- return f(t, "刷新所有技能失败");
770
+ return y(t, "刷新所有技能失败");
771
771
  }
772
772
  async function fn(e, t = 50, n) {
773
773
  let r = `${b}/scenario-instances/${e}/messages?limit=${t}`;
774
774
  n && (r += `&before=${n}`);
775
775
  const s = await S(r, g);
776
- return f(s, "加载聊天记录失败,请稍后重试");
776
+ return y(s, "加载聊天记录失败,请稍后重试");
777
777
  }
778
778
  async function As(e, t, n = "") {
779
779
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
@@ -783,7 +783,7 @@ async function As(e, t, n = "") {
783
783
  method: "POST"
784
784
  }
785
785
  );
786
- return f(s, "标记已读失败");
786
+ return y(s, "标记已读失败");
787
787
  }
788
788
  async function st(e, t, n = "") {
789
789
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
@@ -795,13 +795,13 @@ async function st(e, t, n = "") {
795
795
  body: JSON.stringify(t)
796
796
  }
797
797
  );
798
- return f(s, "发送消息失败");
798
+ return y(s, "发送消息失败");
799
799
  }
800
800
  async function $s(e, t) {
801
801
  const n = await S(
802
802
  `${b}/scenario-instances/${e}/cancel/${t}`,
803
803
  { ...g, method: "POST" }
804
- ), r = await f(n, "取消失败");
804
+ ), r = await y(n, "取消失败");
805
805
  if (r != null && r.warning)
806
806
  throw new Error(String(r.warning));
807
807
  return r;
@@ -811,25 +811,25 @@ async function xs(e, t) {
811
811
  `${b}/scenario-instances/${e}/cancel/${t}/queue`,
812
812
  { ...g, method: "POST" }
813
813
  );
814
- return f(n, "停止队列失败");
814
+ return y(n, "停止队列失败");
815
815
  }
816
816
  async function vs(e) {
817
817
  const t = await S(
818
818
  `${b}/scenario-instances/${e}/executions`,
819
819
  g
820
820
  );
821
- return f(t, "获取执行列表失败");
821
+ return y(t, "获取执行列表失败");
822
822
  }
823
823
  async function yn(e, t = "") {
824
824
  const n = t ? `?subdir=${encodeURIComponent(t)}` : "", r = await S(
825
825
  `${b}/scenario-instances/${e}/workspace/tree${n}`,
826
826
  g
827
827
  );
828
- return f(r, "获取文件树失败");
828
+ return y(r, "获取文件树失败");
829
829
  }
830
830
  async function Ps() {
831
831
  const e = await S(`${b}/workspace/env`, g);
832
- return f(e, "获取环境信息失败");
832
+ return y(e, "获取环境信息失败");
833
833
  }
834
834
  async function Es(e) {
835
835
  const t = await S(
@@ -840,7 +840,7 @@ async function Es(e) {
840
840
  headers: { "Content-Type": "application/json" }
841
841
  }
842
842
  );
843
- return f(t, "同步失败");
843
+ return y(t, "同步失败");
844
844
  }
845
845
  async function Rs(e, t) {
846
846
  const n = await S(
@@ -849,7 +849,7 @@ async function Rs(e, t) {
849
849
  )}`,
850
850
  g
851
851
  );
852
- return f(n, "获取文件内容失败");
852
+ return y(n, "获取文件内容失败");
853
853
  }
854
854
  async function Os(e, t, n) {
855
855
  const r = await S(
@@ -863,7 +863,7 @@ async function Os(e, t, n) {
863
863
  body: JSON.stringify({ content: n })
864
864
  }
865
865
  );
866
- return f(r, "保存文件失败");
866
+ return y(r, "保存文件失败");
867
867
  }
868
868
  async function Ms(e, t, n) {
869
869
  const r = await S(
@@ -875,7 +875,7 @@ async function Ms(e, t, n) {
875
875
  body: JSON.stringify({ old_path: t, new_name: n })
876
876
  }
877
877
  );
878
- return f(r, "重命名失败");
878
+ return y(r, "重命名失败");
879
879
  }
880
880
  async function js(e, t, n) {
881
881
  const r = await S(
@@ -887,7 +887,7 @@ async function js(e, t, n) {
887
887
  body: JSON.stringify({ parent_path: t, name: n })
888
888
  }
889
889
  );
890
- return f(r, "新建文件失败");
890
+ return y(r, "新建文件失败");
891
891
  }
892
892
  async function Ns(e, t, n) {
893
893
  const r = await S(
@@ -899,7 +899,7 @@ async function Ns(e, t, n) {
899
899
  body: JSON.stringify({ parent_path: t, name: n })
900
900
  }
901
901
  );
902
- return f(r, "新建文件夹失败");
902
+ return y(r, "新建文件夹失败");
903
903
  }
904
904
  async function Us(e, t) {
905
905
  const n = await S(
@@ -911,7 +911,7 @@ async function Us(e, t) {
911
911
  body: JSON.stringify({ path: t })
912
912
  }
913
913
  );
914
- return f(n, "删除失败");
914
+ return y(n, "删除失败");
915
915
  }
916
916
  async function zs(e, t, n) {
917
917
  const r = new FormData();
@@ -924,7 +924,7 @@ async function zs(e, t, n) {
924
924
  body: r
925
925
  }
926
926
  );
927
- return f(s, "上传文件失败");
927
+ return y(s, "上传文件失败");
928
928
  }
929
929
  async function Ls(e, t, n) {
930
930
  const r = new FormData();
@@ -937,7 +937,7 @@ async function Ls(e, t, n) {
937
937
  body: r
938
938
  }
939
939
  );
940
- return f(s, "上传文件夹失败");
940
+ return y(s, "上传文件夹失败");
941
941
  }
942
942
  async function Ds(e, t) {
943
943
  const n = await S(
@@ -953,7 +953,7 @@ async function Fs(e, t = "") {
953
953
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
954
954
  `${b}/scenario-instances/${e}${n}`,
955
955
  g
956
- ), s = await f(r, "获取项目失败"), o = s.status === "FOUND" ? "FOUND" : "NOT_FOUND", i = s.scenario_instance ?? s.scenarioInstance ?? null;
956
+ ), s = await y(r, "获取项目失败"), o = s.status === "FOUND" ? "FOUND" : "NOT_FOUND", i = s.scenario_instance ?? s.scenarioInstance ?? null;
957
957
  return {
958
958
  status: o,
959
959
  scenarioInstance: i ? Ae(i) : null
@@ -976,7 +976,7 @@ async function Bs(e, t = "") {
976
976
  ...g,
977
977
  method: "POST"
978
978
  }
979
- ), s = await f(r, "加入工程失败");
979
+ ), s = await y(r, "加入工程失败");
980
980
  return Ae(s);
981
981
  }
982
982
  async function Hs(e, t = "") {
@@ -987,7 +987,7 @@ async function Ks(e) {
987
987
  ...g,
988
988
  method: "DELETE"
989
989
  });
990
- return f(t, "删除项目失败");
990
+ return y(t, "删除项目失败");
991
991
  }
992
992
  async function Gs(e, t, n = "") {
993
993
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
@@ -998,7 +998,7 @@ async function Gs(e, t, n = "") {
998
998
  headers: { "Content-Type": "application/json" },
999
999
  body: JSON.stringify({ mode: t })
1000
1000
  }
1001
- ), o = await f(s, "Fork 项目失败");
1001
+ ), o = await y(s, "Fork 项目失败");
1002
1002
  return Ae(o);
1003
1003
  }
1004
1004
  async function Js(e, t) {
@@ -1007,7 +1007,7 @@ async function Js(e, t) {
1007
1007
  method: "PATCH",
1008
1008
  headers: { "Content-Type": "application/json" },
1009
1009
  body: JSON.stringify(t)
1010
- }), r = await f(n, "更新项目失败");
1010
+ }), r = await y(n, "更新项目失败");
1011
1011
  return Ae(r);
1012
1012
  }
1013
1013
  async function oi(e) {
@@ -1018,7 +1018,7 @@ async function oi(e) {
1018
1018
  method: "POST",
1019
1019
  headers: { "Content-Type": "application/json" }
1020
1020
  }
1021
- ), r = await f(t, "图片重新解析失败");
1021
+ ), r = await y(t, "图片重新解析失败");
1022
1022
  return {
1023
1023
  success: !!r.success,
1024
1024
  message: r.message
@@ -1033,13 +1033,13 @@ async function Vs(e, t, n = "") {
1033
1033
  headers: { "Content-Type": "application/json" }
1034
1034
  }
1035
1035
  );
1036
- return f(s, "创建任务会话失败");
1036
+ return y(s, "创建任务会话失败");
1037
1037
  }
1038
1038
  async function Ws(e, t, n = 50, r, s = "") {
1039
1039
  let o = `${b}/scenario-instances/${e}/task-sessions/${t}/messages?limit=${n}`;
1040
1040
  r && (o += `&before=${r}`), s && (o += `&token=${encodeURIComponent(s)}`);
1041
1041
  const i = await S(o, g);
1042
- return f(i, "获取任务消息失败");
1042
+ return y(i, "获取任务消息失败");
1043
1043
  }
1044
1044
  async function Zs(e, t, n, r = "", s) {
1045
1045
  const o = r ? `?token=${encodeURIComponent(r)}` : "", i = { content: n };
@@ -1053,11 +1053,11 @@ async function Zs(e, t, n, r = "", s) {
1053
1053
  body: JSON.stringify(i)
1054
1054
  }
1055
1055
  );
1056
- return f(c, "发送任务消息失败");
1056
+ return y(c, "发送任务消息失败");
1057
1057
  }
1058
1058
  async function ii(e = "") {
1059
1059
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/scenarios${t}`, g);
1060
- return f(n, "获取场景列表失败");
1060
+ return y(n, "获取场景列表失败");
1061
1061
  }
1062
1062
  async function ci(e, t, n = "") {
1063
1063
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
@@ -1071,14 +1071,14 @@ async function ci(e, t, n = "") {
1071
1071
  body: JSON.stringify(t)
1072
1072
  }
1073
1073
  );
1074
- return f(s, "测试登录失败");
1074
+ return y(s, "测试登录失败");
1075
1075
  }
1076
1076
  async function li(e = "") {
1077
1077
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
1078
1078
  `${b}/admin/agents/identity-envs${t}`,
1079
1079
  g
1080
1080
  );
1081
- return f(n, "获取身份绑定环境列表失败");
1081
+ return y(n, "获取身份绑定环境列表失败");
1082
1082
  }
1083
1083
  async function di(e, t = "") {
1084
1084
  const n = new URLSearchParams();
@@ -1087,7 +1087,7 @@ async function di(e, t = "") {
1087
1087
  `${b}/admin/agents/ctc-members${r}`,
1088
1088
  g
1089
1089
  );
1090
- return f(s, "获取成员列表失败") ?? [];
1090
+ return y(s, "获取成员列表失败") ?? [];
1091
1091
  }
1092
1092
  async function ui(e, t, n = "") {
1093
1093
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/agents/${e}/move${r}`, {
@@ -1096,11 +1096,11 @@ async function ui(e, t, n = "") {
1096
1096
  headers: { "Content-Type": "application/json" },
1097
1097
  body: JSON.stringify(t)
1098
1098
  });
1099
- return f(s, "移动 Agent 分类失败");
1099
+ return y(s, "移动 Agent 分类失败");
1100
1100
  }
1101
1101
  async function pi(e = "") {
1102
1102
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/agents/models${t}`, g);
1103
- return f(n, "获取模型列表失败");
1103
+ return y(n, "获取模型列表失败");
1104
1104
  }
1105
1105
  function Qt(e) {
1106
1106
  const t = Object.entries(e).filter(([, n]) => n !== void 0 && n !== "").map(([n, r]) => `${n}=${encodeURIComponent(r)}`);
@@ -1113,7 +1113,7 @@ async function mi(e, t = "") {
1113
1113
  )}/ontology${Qt({ token: t })}`,
1114
1114
  g
1115
1115
  );
1116
- return (await f(
1116
+ return (await y(
1117
1117
  n,
1118
1118
  "获取前置处理配置失败"
1119
1119
  ) ?? []).map((s) => ({
@@ -1129,7 +1129,7 @@ async function hi(e, t = "") {
1129
1129
  })}`,
1130
1130
  g
1131
1131
  );
1132
- return f(n, "获取本体列表失败") ?? [];
1132
+ return y(n, "获取本体列表失败") ?? [];
1133
1133
  }
1134
1134
  async function fi(e, t = "") {
1135
1135
  const n = await S(
@@ -1139,42 +1139,33 @@ async function fi(e, t = "") {
1139
1139
  })}`,
1140
1140
  g
1141
1141
  );
1142
- return f(n, "获取知识列表失败") ?? [];
1142
+ return y(n, "获取知识列表失败") ?? [];
1143
1143
  }
1144
- async function yi(e, t, n = "") {
1145
- const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/skills/${e}/move${r}`, {
1146
- ...g,
1147
- method: "POST",
1148
- headers: { "Content-Type": "application/json" },
1149
- body: JSON.stringify(t)
1150
- });
1151
- return f(s, "移动 Skill 分类失败");
1152
- }
1153
- async function gi(e = "", t = "") {
1144
+ async function yi(e = "", t = "") {
1154
1145
  const n = new URLSearchParams();
1155
1146
  e && n.append("keyword", e), t && n.append("token", t);
1156
1147
  const r = n.toString() ? `?${n.toString()}` : "", s = await S(
1157
1148
  `${b}/admin/profiles/ctc-staff${r}`,
1158
1149
  g
1159
1150
  );
1160
- return f(s, "获取员工列表失败");
1151
+ return y(s, "获取员工列表失败");
1161
1152
  }
1162
- async function bi(e, t, n = "", r = "") {
1153
+ async function gi(e, t, n = "", r = "") {
1163
1154
  const s = new URLSearchParams();
1164
1155
  s.append("profileScope", e), s.append("memberType", t), n && s.append("scenarioCode", n), r && s.append("token", r);
1165
1156
  const o = s.toString() ? `?${s.toString()}` : "", i = await S(`${b}/admin/profiles${o}`, g);
1166
- return f(i, "获取画像列表失败");
1157
+ return y(i, "获取画像列表失败");
1167
1158
  }
1168
- async function Si(e, t = "") {
1159
+ async function bi(e, t = "") {
1169
1160
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/profiles${n}`, {
1170
1161
  ...g,
1171
1162
  method: "POST",
1172
1163
  headers: { "Content-Type": "application/json" },
1173
1164
  body: JSON.stringify(e)
1174
1165
  });
1175
- return f(r, "保存画像失败");
1166
+ return y(r, "保存画像失败");
1176
1167
  }
1177
- async function wi(e, t, n, r = "", s = "") {
1168
+ async function Si(e, t, n, r = "", s = "") {
1178
1169
  const o = new URLSearchParams();
1179
1170
  r && o.append("scenarioCode", r), s && o.append("token", s);
1180
1171
  const i = o.toString() ? `?${o.toString()}` : "", c = await S(
@@ -1186,33 +1177,33 @@ async function wi(e, t, n, r = "", s = "") {
1186
1177
  method: "DELETE"
1187
1178
  }
1188
1179
  );
1189
- return f(c, "删除画像失败");
1180
+ return y(c, "删除画像失败");
1190
1181
  }
1191
- async function _i(e = "", t = "") {
1182
+ async function wi(e = "", t = "") {
1192
1183
  const n = new URLSearchParams();
1193
1184
  e && n.append("scenarioCode", e), t && n.append("token", t);
1194
1185
  const r = n.toString() ? `?${n.toString()}` : "", s = await S(`${b}/admin/human-on-calls${r}`, g);
1195
- return f(s, "获取值班信息失败");
1186
+ return y(s, "获取值班信息失败");
1196
1187
  }
1197
- async function Ti(e, t, n, r = "") {
1188
+ async function _i(e, t, n, r = "") {
1198
1189
  const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(`${b}/admin/human-on-calls/batch${s}`, {
1199
1190
  ...g,
1200
1191
  method: "POST",
1201
1192
  headers: { "Content-Type": "application/json" },
1202
1193
  body: JSON.stringify({ scenarioCode: e, dayOfWeek: t, onCalls: n })
1203
1194
  });
1204
- return f(o, "保存值班信息失败");
1195
+ return y(o, "保存值班信息失败");
1205
1196
  }
1206
- async function ki(e, t, n, r = "") {
1197
+ async function Ti(e, t, n, r = "") {
1207
1198
  const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(
1208
1199
  `${b}/admin/human-on-calls/${encodeURIComponent(
1209
1200
  e
1210
1201
  )}/${n}/${encodeURIComponent(t)}${s}`,
1211
1202
  { ...g, method: "DELETE" }
1212
1203
  );
1213
- return f(o, "删除值班信息失败");
1204
+ return y(o, "删除值班信息失败");
1214
1205
  }
1215
- async function Ii(e = {}, t = "") {
1206
+ async function ki(e = {}, t = "") {
1216
1207
  const n = [];
1217
1208
  e.scenarioCode && n.push(`scenario_code=${encodeURIComponent(e.scenarioCode)}`), e.status && n.push(`status=${encodeURIComponent(e.status)}`), t && n.push(`token=${encodeURIComponent(t)}`);
1218
1209
  const r = n.length > 0 ? `?${n.join("&")}` : "", s = await S(
@@ -1222,9 +1213,9 @@ async function Ii(e = {}, t = "") {
1222
1213
  method: "POST"
1223
1214
  }
1224
1215
  );
1225
- return f(s, "全量刷新技能失败");
1216
+ return y(s, "全量刷新技能失败");
1226
1217
  }
1227
- async function Ci(e, t = "") {
1218
+ async function Ii(e, t = "") {
1228
1219
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
1229
1220
  `${b}/admin/scenario-instances/${e}/refresh-skills${n}`,
1230
1221
  {
@@ -1232,7 +1223,7 @@ async function Ci(e, t = "") {
1232
1223
  method: "POST"
1233
1224
  }
1234
1225
  );
1235
- return f(r, "刷新技能失败");
1226
+ return y(r, "刷新技能失败");
1236
1227
  }
1237
1228
  function en(e) {
1238
1229
  const t = (...r) => {
@@ -1258,11 +1249,11 @@ function en(e) {
1258
1249
  updateTime: e.update_time == null ? e.updateTime : String(e.update_time)
1259
1250
  };
1260
1251
  }
1261
- async function Ai(e = "") {
1262
- const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/personal-agents${t}`, g), r = await f(n, "获取个人 Agent 列表失败");
1252
+ async function Ci(e = "") {
1253
+ const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/personal-agents${t}`, g), r = await y(n, "获取个人 Agent 列表失败");
1263
1254
  return (Array.isArray(r) ? r : []).map((s) => en(s));
1264
1255
  }
1265
- async function $i(e, t = "") {
1256
+ async function Ai(e, t = "") {
1266
1257
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/personal-agents${n}`, {
1267
1258
  ...g,
1268
1259
  method: "POST",
@@ -1270,10 +1261,10 @@ async function $i(e, t = "") {
1270
1261
  body: JSON.stringify({ display_name: e })
1271
1262
  });
1272
1263
  return en(
1273
- await f(r, "创建个人 Agent 失败")
1264
+ await y(r, "创建个人 Agent 失败")
1274
1265
  );
1275
1266
  }
1276
- async function xi(e, t, n, r, s = "") {
1267
+ async function $i(e, t, n, r, s = "") {
1277
1268
  const o = s ? `?token=${encodeURIComponent(s)}` : "", i = await S(`${b}/personal-agents/ensure${o}`, {
1278
1269
  ...g,
1279
1270
  method: "POST",
@@ -1286,14 +1277,14 @@ async function xi(e, t, n, r, s = "") {
1286
1277
  })
1287
1278
  });
1288
1279
  return en(
1289
- await f(i, "创建个人 Agent 失败")
1280
+ await y(i, "创建个人 Agent 失败")
1290
1281
  );
1291
1282
  }
1292
- async function vi(e, t = "") {
1283
+ async function xi(e, t = "") {
1293
1284
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
1294
1285
  `${b}/personal-agents/${e}/sessions${n}`,
1295
1286
  g
1296
- ), s = await f(
1287
+ ), s = await y(
1297
1288
  r,
1298
1289
  "获取会话列表失败"
1299
1290
  ), o = s == null ? void 0 : s.sessions;
@@ -1303,7 +1294,7 @@ async function vi(e, t = "") {
1303
1294
  userMeta: (s == null ? void 0 : s.userMeta) ?? {}
1304
1295
  };
1305
1296
  }
1306
- async function Pi(e, t = "新会话", n = "", r) {
1297
+ async function vi(e, t = "新会话", n = "", r) {
1307
1298
  const s = n ? `?token=${encodeURIComponent(n)}` : "", o = await S(
1308
1299
  `${b}/personal-agents/${e}/sessions${s}`,
1309
1300
  {
@@ -1320,7 +1311,7 @@ async function Pi(e, t = "新会话", n = "", r) {
1320
1311
  }
1321
1312
  );
1322
1313
  return Xe(
1323
- await f(o, "创建会话失败")
1314
+ await y(o, "创建会话失败")
1324
1315
  );
1325
1316
  }
1326
1317
  function Xe(e) {
@@ -1343,13 +1334,13 @@ function Xe(e) {
1343
1334
  updateTime: i || void 0
1344
1335
  };
1345
1336
  }
1346
- async function Ei(e, t = "") {
1337
+ async function Pi(e, t = "") {
1347
1338
  const n = t ? `&token=${encodeURIComponent(t)}` : "", r = await S(
1348
1339
  `${b}/personal-agents/sessions/search?keyword=${encodeURIComponent(
1349
1340
  e
1350
1341
  )}&limit=50${n}`,
1351
1342
  g
1352
- ), s = await f(r, "搜索会话失败");
1343
+ ), s = await y(r, "搜索会话失败");
1353
1344
  return (Array.isArray(s) ? s : []).map((o) => {
1354
1345
  const i = o ?? {}, c = String(i.matchField || "title");
1355
1346
  return {
@@ -1359,14 +1350,14 @@ async function Ei(e, t = "") {
1359
1350
  };
1360
1351
  });
1361
1352
  }
1362
- async function Ri(e = "") {
1353
+ async function Ei(e = "") {
1363
1354
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
1364
1355
  `${b}/personal-agents/sessions/all${t}`,
1365
1356
  g
1366
- ), r = await f(n, "获取聊天记录失败");
1357
+ ), r = await y(n, "获取聊天记录失败");
1367
1358
  return (Array.isArray(r) ? r : []).map(Xe);
1368
1359
  }
1369
- async function Oi(e, t, n = "", r) {
1360
+ async function Ri(e, t, n = "", r) {
1370
1361
  const s = n ? `?token=${encodeURIComponent(n)}` : "", o = await S(
1371
1362
  `${b}/personal-agents/${e}/sessions/${t}${s}`,
1372
1363
  {
@@ -1379,28 +1370,28 @@ async function Oi(e, t, n = "", r) {
1379
1370
  }
1380
1371
  );
1381
1372
  return Xe(
1382
- await f(o, "会话归组失败")
1373
+ await y(o, "会话归组失败")
1383
1374
  );
1384
1375
  }
1385
- async function Mi(e) {
1376
+ async function Oi(e) {
1386
1377
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/personal-agents/models${t}`, g);
1387
- return f(n, "获取模型列表失败");
1378
+ return y(n, "获取模型列表失败");
1388
1379
  }
1389
- async function ji(e) {
1380
+ async function Mi(e) {
1390
1381
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
1391
1382
  `${b}/personal-agents/custom-models${t}`,
1392
1383
  g
1393
1384
  );
1394
- return f(n, "获取自定义模型失败");
1385
+ return y(n, "获取自定义模型失败");
1395
1386
  }
1396
- async function Ni(e, t, n = "") {
1387
+ async function ji(e, t, n = "") {
1397
1388
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
1398
1389
  `${b}/personal-agents/${e}/sessions/${t}${r}`,
1399
1390
  { ...g, method: "DELETE" }
1400
1391
  );
1401
- return f(s, "删除会话失败");
1392
+ return y(s, "删除会话失败");
1402
1393
  }
1403
- async function Ui(e, t, n, r = "") {
1394
+ async function Ni(e, t, n, r = "") {
1404
1395
  const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(
1405
1396
  `${b}/personal-agents/${e}/sessions/${t}${s}`,
1406
1397
  {
@@ -1410,16 +1401,16 @@ async function Ui(e, t, n, r = "") {
1410
1401
  body: JSON.stringify({ title: n })
1411
1402
  }
1412
1403
  );
1413
- return f(o, "重命名会话失败");
1404
+ return y(o, "重命名会话失败");
1414
1405
  }
1415
- async function zi(e, t, n = "") {
1406
+ async function Ui(e, t, n = "") {
1416
1407
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
1417
1408
  `${b}/personal-agents/${e}/sessions/${t}/messages${r}`,
1418
1409
  g
1419
1410
  );
1420
- return f(s, "获取消息历史失败");
1411
+ return y(s, "获取消息历史失败");
1421
1412
  }
1422
- async function Li(e, t, n, r, s, o, i, c, l, d) {
1413
+ async function zi(e, t, n, r, s, o, i, c, l, d) {
1423
1414
  const u = r ? `?token=${encodeURIComponent(r)}` : "", h = `${b}/personal-agents/${e}/sessions/${t}/chat/stream${u}`;
1424
1415
  try {
1425
1416
  const m = await fetch(h, {
@@ -1430,15 +1421,15 @@ async function Li(e, t, n, r, s, o, i, c, l, d) {
1430
1421
  signal: d
1431
1422
  });
1432
1423
  if (!m.ok || !m.body) {
1433
- const y = await m.text().catch(() => "");
1434
- o(new Error(y || `HTTP ${m.status}`));
1424
+ const f = await m.text().catch(() => "");
1425
+ o(new Error(f || `HTTP ${m.status}`));
1435
1426
  return;
1436
1427
  }
1437
1428
  const C = m.body.getReader(), O = new TextDecoder();
1438
1429
  let _ = "", x = "";
1439
1430
  for (; ; ) {
1440
- const { done: y, value: A } = await C.read();
1441
- if (y) break;
1431
+ const { done: f, value: A } = await C.read();
1432
+ if (f) break;
1442
1433
  _ += O.decode(A, { stream: !0 });
1443
1434
  const k = _.split(`
1444
1435
  `);
@@ -1475,19 +1466,19 @@ async function Li(e, t, n, r, s, o, i, c, l, d) {
1475
1466
  }
1476
1467
  }
1477
1468
  const Xs = "http://127.0.0.1:28080";
1478
- async function Di(e) {
1469
+ async function Li(e) {
1479
1470
  await fetch(`${Xs}/v1/sessions/${e}`, {
1480
1471
  method: "DELETE"
1481
1472
  });
1482
1473
  }
1483
- async function Fi(e = {}) {
1474
+ async function Di(e = {}) {
1484
1475
  const t = new URLSearchParams(), { name: n, scenarioInstanceId: r, page: s = 1, size: o = 50, token: i = "" } = e;
1485
1476
  n && t.set("name", n), r != null && r !== "" && t.set("scenarioInstanceId", String(r)), t.set("page", String(s)), t.set("size", String(o)), i && t.set("token", i);
1486
1477
  const c = t.toString(), l = await S(
1487
1478
  `${b}/admin/tasks${c ? `?${c}` : ""}`,
1488
1479
  g
1489
1480
  );
1490
- return f(l, "获取任务列表失败");
1481
+ return y(l, "获取任务列表失败");
1491
1482
  }
1492
1483
  function Ys(e) {
1493
1484
  const t = new URLSearchParams();
@@ -1497,44 +1488,44 @@ function Ys(e) {
1497
1488
  const n = t.toString();
1498
1489
  return n ? `?${n}` : "";
1499
1490
  }
1500
- async function qi(e) {
1491
+ async function Fi(e) {
1501
1492
  const t = await S(
1502
1493
  `${b}/admin/tool-call-logs/timeline${Ys(e)}`,
1503
1494
  g
1504
1495
  );
1505
- return f(t, "查询工具调用时间轴统计失败");
1496
+ return y(t, "查询工具调用时间轴统计失败");
1506
1497
  }
1507
- async function Bi(e) {
1498
+ async function qi(e) {
1508
1499
  const t = [];
1509
1500
  e.date && t.push(`date=${encodeURIComponent(e.date)}`), e.scenarioCode && t.push(`scenarioCode=${encodeURIComponent(e.scenarioCode)}`), e.token && t.push(`token=${encodeURIComponent(e.token)}`);
1510
1501
  const n = t.length > 0 ? `?${t.join("&")}` : "", r = await S(
1511
1502
  `${b}/admin/statistics/token-daily${n}`,
1512
1503
  g
1513
1504
  );
1514
- return f(r, "获取 Token 单日统计失败");
1505
+ return y(r, "获取 Token 单日统计失败");
1515
1506
  }
1516
- async function Hi(e = "z-team") {
1507
+ async function Bi(e = "z-team") {
1517
1508
  const t = await S(
1518
1509
  `${b}/change-log/versions?repo=${encodeURIComponent(e)}`,
1519
1510
  g
1520
1511
  );
1521
- return f(t, "获取变更日志版本列表失败");
1512
+ return y(t, "获取变更日志版本列表失败");
1522
1513
  }
1523
- async function Ki(e, t, n = "z-team") {
1514
+ async function Hi(e, t, n = "z-team") {
1524
1515
  const r = new URLSearchParams();
1525
1516
  e != null && r.set("versionId", String(e)), r.set("repo", n);
1526
1517
  const s = await S(
1527
1518
  `${b}/change-log/detail?${r.toString()}`,
1528
1519
  g
1529
1520
  );
1530
- return f(s, "获取变更日志详情失败");
1521
+ return y(s, "获取变更日志详情失败");
1531
1522
  }
1532
- async function Gi(e) {
1523
+ async function Ki(e) {
1533
1524
  const t = await S(
1534
1525
  `${as}/evolution/records/${e}/reset`,
1535
1526
  { ...g, method: "POST" }
1536
1527
  );
1537
- return f(t, "操作失败");
1528
+ return y(t, "操作失败");
1538
1529
  }
1539
1530
  function ae(e) {
1540
1531
  const t = new URLSearchParams();
@@ -1544,7 +1535,7 @@ function ae(e) {
1544
1535
  const n = t.toString();
1545
1536
  return n ? `?${n}` : "";
1546
1537
  }
1547
- async function Ji(e) {
1538
+ async function Gi(e) {
1548
1539
  const t = await S(
1549
1540
  `${b}/admin/qa-eval/closed-instances${ae({
1550
1541
  close_date: e.closeDate,
@@ -1554,13 +1545,13 @@ async function Ji(e) {
1554
1545
  token: e.token
1555
1546
  })}`,
1556
1547
  g
1557
- ), n = await f(
1548
+ ), n = await y(
1558
1549
  t,
1559
1550
  "获取已关单实例列表失败"
1560
1551
  );
1561
1552
  return Array.isArray(n == null ? void 0 : n.list) ? n.list : [];
1562
1553
  }
1563
- async function Vi(e) {
1554
+ async function Ji(e) {
1564
1555
  const t = await S(
1565
1556
  `${b}/admin/qa-eval/overview${ae({
1566
1557
  close_date: e.closeDate,
@@ -1571,18 +1562,18 @@ async function Vi(e) {
1571
1562
  })}`,
1572
1563
  g
1573
1564
  );
1574
- return f(t, "获取 QA 评测总览失败");
1565
+ return y(t, "获取 QA 评测总览失败");
1575
1566
  }
1576
- async function Wi(e, t = "") {
1567
+ async function Vi(e, t = "") {
1577
1568
  const n = await S(
1578
1569
  `${b}/admin/qa-eval/report/${e}/cancel${ae({
1579
1570
  token: t
1580
1571
  })}`,
1581
1572
  { ...g, method: "POST" }
1582
1573
  );
1583
- return f(n, "取消评测失败");
1574
+ return y(n, "取消评测失败");
1584
1575
  }
1585
- async function Zi(e, t, n = "") {
1576
+ async function Wi(e, t, n = "") {
1586
1577
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
1587
1578
  `${b}/admin/scenario-templates/preview${r}`,
1588
1579
  {
@@ -1595,14 +1586,14 @@ async function Zi(e, t, n = "") {
1595
1586
  if (!s.ok) throw new Error(`HTTP ${s.status}`);
1596
1587
  return s.text();
1597
1588
  }
1598
- async function Xi(e, t = "") {
1589
+ async function Zi(e, t = "") {
1599
1590
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
1600
1591
  `${b}/tasks/${e}/human-assist${n}`,
1601
1592
  { ...g, method: "GET" }
1602
1593
  );
1603
- return f(r, "查询人机协助卡片失败");
1594
+ return y(r, "查询人机协助卡片失败");
1604
1595
  }
1605
- async function Yi(e, t, n, r = "") {
1596
+ async function Xi(e, t, n, r = "") {
1606
1597
  const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(
1607
1598
  `${b}/scenario-instances/${e}/card-forms/${t}/submit${s}`,
1608
1599
  {
@@ -1612,9 +1603,9 @@ async function Yi(e, t, n, r = "") {
1612
1603
  body: JSON.stringify({ value: n })
1613
1604
  }
1614
1605
  );
1615
- return f(o, "提交卡片表单失败");
1606
+ return y(o, "提交卡片表单失败");
1616
1607
  }
1617
- async function Qi(e, t, n = "") {
1608
+ async function Yi(e, t, n = "") {
1618
1609
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
1619
1610
  `${b}/tasks/${e}/submit-assist${r}`,
1620
1611
  {
@@ -1624,25 +1615,25 @@ async function Qi(e, t, n = "") {
1624
1615
  body: JSON.stringify({ value: t })
1625
1616
  }
1626
1617
  );
1627
- return f(s, "提交人机协助任务失败");
1618
+ return y(s, "提交人机协助任务失败");
1628
1619
  }
1629
- function ec(e) {
1620
+ function Qi(e) {
1630
1621
  return webIdeFetch(`/instances/${e}`, { method: "DELETE" });
1631
1622
  }
1632
- async function tc(e = "") {
1623
+ async function ec(e = "") {
1633
1624
  const t = await S(
1634
1625
  `${b}/admin/runtime-monitor/schedule${ae({ token: e })}`,
1635
1626
  g
1636
1627
  );
1637
- return f(t, "查询定时任务概览失败");
1628
+ return y(t, "查询定时任务概览失败");
1638
1629
  }
1639
- async function nc(e) {
1630
+ async function tc(e) {
1640
1631
  const t = new URLSearchParams();
1641
1632
  t.set("scenarioCode", e.scenarioCode), e.startDate && t.set("startDate", e.startDate), e.endDate && t.set("endDate", e.endDate), e.creatorId && t.set("creatorId", e.creatorId), e.tagFilters && Object.keys(e.tagFilters).length > 0 && t.set("tagFilters", JSON.stringify(e.tagFilters)), e.groupBy && t.set("groupBy", e.groupBy), e.token && t.set("token", e.token);
1642
1633
  const n = await S(
1643
1634
  `${b}/admin/statistics/business?${t.toString()}`,
1644
1635
  g
1645
- ), r = await f(n, "业务指标查询失败");
1636
+ ), r = await y(n, "业务指标查询失败");
1646
1637
  return {
1647
1638
  total: Number((r == null ? void 0 : r.total) ?? 0),
1648
1639
  trend: Array.isArray(r == null ? void 0 : r.trend) ? r.trend : [],
@@ -1653,7 +1644,7 @@ async function nc(e) {
1653
1644
  activeCreators: (r == null ? void 0 : r.activeCreators) ?? void 0
1654
1645
  };
1655
1646
  }
1656
- async function rc(e, t = "") {
1647
+ async function nc(e, t = "") {
1657
1648
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
1658
1649
  `${b}/admin/scenario-tags/values/${e}${n}`,
1659
1650
  {
@@ -1661,9 +1652,9 @@ async function rc(e, t = "") {
1661
1652
  method: "DELETE"
1662
1653
  }
1663
1654
  );
1664
- return f(r, "删除标签值失败");
1655
+ return y(r, "删除标签值失败");
1665
1656
  }
1666
- async function sc(e, t, n) {
1657
+ async function rc(e, t, n) {
1667
1658
  const r = await S(
1668
1659
  `${b}/scenario-instances/${e}/workspace/git-clone`,
1669
1660
  {
@@ -1678,21 +1669,21 @@ async function sc(e, t, n) {
1678
1669
  })
1679
1670
  }
1680
1671
  );
1681
- return f(r, "Git Clone 失败");
1672
+ return y(r, "Git Clone 失败");
1682
1673
  }
1683
- async function ac() {
1674
+ async function sc() {
1684
1675
  const e = await S(
1685
1676
  `${b}/scenarios/biz-consult-domains`,
1686
1677
  g
1687
1678
  );
1688
- return f(e, "获取业务域选项失败");
1679
+ return y(e, "获取业务域选项失败");
1689
1680
  }
1690
- async function oc(e = "") {
1681
+ async function ac(e = "") {
1691
1682
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
1692
1683
  `${b}/admin/statistics/current-dept${t}`,
1693
1684
  g
1694
1685
  );
1695
- return f(n, "获取当前用户部门信息失败");
1686
+ return y(n, "获取当前用户部门信息失败");
1696
1687
  }
1697
1688
  function Qs(e) {
1698
1689
  const t = new URLSearchParams();
@@ -1702,7 +1693,7 @@ function Qs(e) {
1702
1693
  const n = t.toString();
1703
1694
  return n ? `?${n}` : "";
1704
1695
  }
1705
- async function ic(e) {
1696
+ async function oc(e) {
1706
1697
  const t = await S(
1707
1698
  `${b}/admin/evaluation/instances/${e.id}/snapshot-preview${Qs({
1708
1699
  section: e.section,
@@ -1713,7 +1704,7 @@ async function ic(e) {
1713
1704
  })}`,
1714
1705
  g
1715
1706
  );
1716
- return f(t, "获取快照预览失败");
1707
+ return y(t, "获取快照预览失败");
1717
1708
  }
1718
1709
  const ea = typeof window < "u" && window.ZTEAM_WEBIDE_ADMIN_BASE || "http://localhost/kapi/webide/admin";
1719
1710
  async function ta(e, t) {
@@ -1731,38 +1722,38 @@ async function ta(e, t) {
1731
1722
  return {};
1732
1723
  }
1733
1724
  }
1734
- function cc(e) {
1725
+ function ic(e) {
1735
1726
  return ta(`/presets/${e}`, { method: "DELETE" });
1736
1727
  }
1737
- const lc = Zn;
1738
- async function dc(e) {
1728
+ const cc = Zn;
1729
+ async function lc(e) {
1739
1730
  const t = new FormData();
1740
1731
  t.append("file", e);
1741
1732
  const n = await S(`${b}/common/upload-video`, {
1742
1733
  method: "POST",
1743
1734
  body: t
1744
- }), r = await f(n, "上传视频失败"), s = typeof (r == null ? void 0 : r.url) == "string" ? r.url : "";
1735
+ }), r = await y(n, "上传视频失败"), s = typeof (r == null ? void 0 : r.url) == "string" ? r.url : "";
1745
1736
  if (!s) {
1746
1737
  const o = "上传视频失败:响应缺少视频地址";
1747
1738
  throw _e(o), { _apiUserError: !0, userMessage: o, message: o };
1748
1739
  }
1749
1740
  return s;
1750
1741
  }
1751
- function uc() {
1742
+ function dc() {
1752
1743
  const e = "登录已失效,请重新登录";
1753
1744
  throw _e(e), { _apiUserError: !0, userMessage: e, message: e };
1754
1745
  }
1755
- async function pc(e) {
1746
+ async function uc(e) {
1756
1747
  const t = await S(
1757
1748
  `${b}/scenario-instances/${e}/interaction-mode`,
1758
1749
  { ...g }
1759
- ), n = await f(
1750
+ ), n = await y(
1760
1751
  t,
1761
1752
  "查询交互模式失败"
1762
1753
  );
1763
1754
  return (n == null ? void 0 : n.mode) ?? "dispatch";
1764
1755
  }
1765
- async function mc(e, t) {
1756
+ async function pc(e, t) {
1766
1757
  const n = await S(
1767
1758
  `${b}/scenario-instances/${e}/interaction-mode`,
1768
1759
  {
@@ -1771,42 +1762,42 @@ async function mc(e, t) {
1771
1762
  headers: { "Content-Type": "application/json" },
1772
1763
  body: JSON.stringify({ mode: t })
1773
1764
  }
1774
- ), r = await f(
1765
+ ), r = await y(
1775
1766
  n,
1776
1767
  "切换交互模式失败"
1777
1768
  );
1778
1769
  return (r == null ? void 0 : r.mode) ?? t;
1779
1770
  }
1780
- async function hc(e = "") {
1771
+ async function mc(e = "") {
1781
1772
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
1782
1773
  `${b}/admin/indexer/overview${t}`,
1783
1774
  Ce()
1784
1775
  );
1785
- return f(n, "获取索引概览失败");
1776
+ return y(n, "获取索引概览失败");
1786
1777
  }
1787
- async function fc(e = "") {
1788
- const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/indexer/repos${t}`, Ce()), r = await f(
1778
+ async function hc(e = "") {
1779
+ const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/indexer/repos${t}`, Ce()), r = await y(
1789
1780
  n,
1790
1781
  "获取索引仓库列表失败"
1791
1782
  );
1792
1783
  return Array.isArray(r == null ? void 0 : r.repos) ? r.repos : [];
1793
1784
  }
1794
- async function yc(e, t = "") {
1785
+ async function fc(e, t = "") {
1795
1786
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/indexer/repos${n}`, Ce({
1796
1787
  method: "POST",
1797
1788
  headers: { "Content-Type": "application/json" },
1798
1789
  body: JSON.stringify(e)
1799
1790
  }));
1800
- return f(r, "保存索引仓库失败");
1791
+ return y(r, "保存索引仓库失败");
1801
1792
  }
1802
- async function gc(e, t = "") {
1793
+ async function yc(e, t = "") {
1803
1794
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
1804
1795
  `${b}/admin/indexer/repos/${encodeURIComponent(e)}${n}`,
1805
1796
  Ce({ method: "DELETE" })
1806
1797
  );
1807
- return f(r, "删除索引仓库失败");
1798
+ return y(r, "删除索引仓库失败");
1808
1799
  }
1809
- async function bc(e, t, n = "") {
1800
+ async function gc(e, t, n = "") {
1810
1801
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
1811
1802
  `${b}/admin/indexer/repos/${encodeURIComponent(
1812
1803
  e
@@ -1817,43 +1808,43 @@ async function bc(e, t, n = "") {
1817
1808
  body: JSON.stringify({ enabled: t })
1818
1809
  })
1819
1810
  );
1820
- return f(s, "切换仓库启停失败");
1811
+ return y(s, "切换仓库启停失败");
1821
1812
  }
1822
- async function Sc(e, t = "") {
1813
+ async function bc(e, t = "") {
1823
1814
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
1824
1815
  `${b}/admin/indexer/repos/${encodeURIComponent(
1825
1816
  e
1826
1817
  )}/rebuild${n}`,
1827
1818
  Ce({ method: "POST" })
1828
1819
  );
1829
- return f(r, "触发重建失败");
1820
+ return y(r, "触发重建失败");
1830
1821
  }
1831
- async function wc(e = "") {
1822
+ async function Sc(e = "") {
1832
1823
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/indexer/poll${t}`, Ce({
1833
1824
  method: "POST"
1834
1825
  }));
1835
- return f(n, "触发轮询失败");
1826
+ return y(n, "触发轮询失败");
1836
1827
  }
1837
- async function _c(e = "") {
1828
+ async function wc(e = "") {
1838
1829
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
1839
1830
  `${b}/admin/notify-channel/list${t}`,
1840
1831
  g
1841
- ), r = await f(
1832
+ ), r = await y(
1842
1833
  n,
1843
1834
  "获取消息渠道状态失败"
1844
1835
  );
1845
1836
  return Array.isArray(r == null ? void 0 : r.channels) ? r.channels : [];
1846
1837
  }
1847
- async function Tc(e, t = "") {
1838
+ async function _c(e, t = "") {
1848
1839
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/notify-channel/test${n}`, {
1849
1840
  ...g,
1850
1841
  method: "POST",
1851
1842
  headers: { "Content-Type": "application/json" },
1852
1843
  body: JSON.stringify(e)
1853
1844
  });
1854
- return f(r, "测试发送失败");
1845
+ return y(r, "测试发送失败");
1855
1846
  }
1856
- async function kc(e, t = "") {
1847
+ async function Tc(e, t = "") {
1857
1848
  const n = await S(
1858
1849
  `${b}/admin/schedule-task${ae({
1859
1850
  token: t,
@@ -1863,9 +1854,9 @@ async function kc(e, t = "") {
1863
1854
  })}`,
1864
1855
  g
1865
1856
  );
1866
- return f(n, "查询定时任务模版失败");
1857
+ return y(n, "查询定时任务模版失败");
1867
1858
  }
1868
- async function Ic(e, t = "") {
1859
+ async function kc(e, t = "") {
1869
1860
  const n = await S(
1870
1861
  `${b}/admin/schedule-task${ae({ token: t })}`,
1871
1862
  {
@@ -1875,9 +1866,9 @@ async function Ic(e, t = "") {
1875
1866
  body: JSON.stringify(e)
1876
1867
  }
1877
1868
  );
1878
- return f(n, "新建定时任务模版失败");
1869
+ return y(n, "新建定时任务模版失败");
1879
1870
  }
1880
- async function Cc(e, t, n = "") {
1871
+ async function Ic(e, t, n = "") {
1881
1872
  const r = await S(
1882
1873
  `${b}/admin/schedule-task/${encodeURIComponent(
1883
1874
  e
@@ -1889,9 +1880,9 @@ async function Cc(e, t, n = "") {
1889
1880
  body: JSON.stringify(t)
1890
1881
  }
1891
1882
  );
1892
- return f(r, "更新定时任务模版失败");
1883
+ return y(r, "更新定时任务模版失败");
1893
1884
  }
1894
- async function Ac(e, t, n = "") {
1885
+ async function Cc(e, t, n = "") {
1895
1886
  const r = await S(
1896
1887
  `${b}/admin/schedule-task/${encodeURIComponent(
1897
1888
  e
@@ -1903,36 +1894,36 @@ async function Ac(e, t, n = "") {
1903
1894
  body: JSON.stringify({ enabled: t })
1904
1895
  }
1905
1896
  );
1906
- return f(r, "切换模版状态失败");
1897
+ return y(r, "切换模版状态失败");
1907
1898
  }
1908
- async function $c(e, t = "") {
1899
+ async function Ac(e, t = "") {
1909
1900
  const n = await S(
1910
1901
  `${b}/admin/schedule-task/${encodeURIComponent(
1911
1902
  e
1912
1903
  )}/activate${ae({ token: t })}`,
1913
1904
  { ...g, method: "POST" }
1914
1905
  );
1915
- return f(n, "激活模版失败");
1906
+ return y(n, "激活模版失败");
1916
1907
  }
1917
- async function xc(e, t = "") {
1908
+ async function $c(e, t = "") {
1918
1909
  const n = await S(
1919
1910
  `${b}/admin/schedule-task/${encodeURIComponent(
1920
1911
  e
1921
1912
  )}${ae({ token: t })}`,
1922
1913
  { ...g, method: "DELETE" }
1923
1914
  );
1924
- return f(n, "删除模版失败");
1915
+ return y(n, "删除模版失败");
1925
1916
  }
1926
- async function vc(e, t = "") {
1917
+ async function xc(e, t = "") {
1927
1918
  const n = await S(
1928
1919
  `${b}/admin/schedule-task/${encodeURIComponent(
1929
1920
  e
1930
1921
  )}/run${ae({ token: t })}`,
1931
1922
  { ...g, method: "POST" }
1932
1923
  );
1933
- return f(n, "手动执行失败");
1924
+ return y(n, "手动执行失败");
1934
1925
  }
1935
- async function Pc(e, t = "") {
1926
+ async function vc(e, t = "") {
1936
1927
  const n = await S(
1937
1928
  `${b}/admin/schedule-task/history-all${ae({
1938
1929
  token: t,
@@ -1942,9 +1933,9 @@ async function Pc(e, t = "") {
1942
1933
  })}`,
1943
1934
  g
1944
1935
  );
1945
- return f(n, "查询运行记录失败");
1936
+ return y(n, "查询运行记录失败");
1946
1937
  }
1947
- async function Ec(e, t, n, r, s = "") {
1938
+ async function Pc(e, t, n, r, s = "") {
1948
1939
  const o = s ? `?token=${encodeURIComponent(s)}` : "", i = await S(
1949
1940
  `${b}/admin/permissions/users/${e}/roles${o}`,
1950
1941
  {
@@ -1954,59 +1945,59 @@ async function Ec(e, t, n, r, s = "") {
1954
1945
  body: JSON.stringify({ staffName: t, accountNo: n, roleIds: r })
1955
1946
  }
1956
1947
  );
1957
- return f(i, "更新用户角色失败");
1948
+ return y(i, "更新用户角色失败");
1958
1949
  }
1959
- async function Rc(e, t = "") {
1950
+ async function Ec(e, t = "") {
1960
1951
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
1961
1952
  `${b}/admin/permissions/users/${e}/detail${n}`,
1962
1953
  g
1963
1954
  );
1964
- return f(r, "获取用户授权详情失败");
1955
+ return y(r, "获取用户授权详情失败");
1965
1956
  }
1966
- async function Oc(e = "") {
1957
+ async function Rc(e = "") {
1967
1958
  const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/roles${t}`, g);
1968
- return f(n, "获取角色列表失败") ?? [];
1959
+ return y(n, "获取角色列表失败") ?? [];
1969
1960
  }
1970
- async function Mc(e, t = "") {
1961
+ async function Oc(e, t = "") {
1971
1962
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
1972
1963
  `${b}/admin/roles/${e}${n}`,
1973
1964
  g
1974
1965
  );
1975
- return f(r, "获取角色详情失败");
1966
+ return y(r, "获取角色详情失败");
1976
1967
  }
1977
- async function jc(e, t = "") {
1968
+ async function Mc(e, t = "") {
1978
1969
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/roles${n}`, {
1979
1970
  ...g,
1980
1971
  method: "POST",
1981
1972
  headers: { "Content-Type": "application/json" },
1982
1973
  body: JSON.stringify(e)
1983
1974
  });
1984
- return f(r, "创建角色失败");
1975
+ return y(r, "创建角色失败");
1985
1976
  }
1986
- async function Nc(e, t, n = "") {
1977
+ async function jc(e, t, n = "") {
1987
1978
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/roles/${e}${r}`, {
1988
1979
  ...g,
1989
1980
  method: "PUT",
1990
1981
  headers: { "Content-Type": "application/json" },
1991
1982
  body: JSON.stringify(t)
1992
1983
  });
1993
- return f(s, "更新角色失败");
1984
+ return y(s, "更新角色失败");
1994
1985
  }
1995
- async function Uc(e, t = "") {
1986
+ async function Nc(e, t = "") {
1996
1987
  const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/roles/${e}${n}`, {
1997
1988
  ...g,
1998
1989
  method: "DELETE"
1999
1990
  });
2000
- return f(r, "删除角色失败");
1991
+ return y(r, "删除角色失败");
2001
1992
  }
2002
- async function zc(e, t, n = "") {
1993
+ async function Uc(e, t, n = "") {
2003
1994
  const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/roles/${e}/users${r}`, {
2004
1995
  ...g,
2005
1996
  method: "PUT",
2006
1997
  headers: { "Content-Type": "application/json" },
2007
1998
  body: JSON.stringify({ users: t })
2008
1999
  });
2009
- return f(s, "更新角色成员失败");
2000
+ return y(s, "更新角色成员失败");
2010
2001
  }
2011
2002
  function tn(e, t) {
2012
2003
  if (!t || e.member_type !== "HUMAN")
@@ -2038,7 +2029,7 @@ function At(e, t) {
2038
2029
  function Qn(e) {
2039
2030
  return !!(e != null && e.is_global_admin);
2040
2031
  }
2041
- function Lc(e) {
2032
+ function zc(e) {
2042
2033
  return Qn(e);
2043
2034
  }
2044
2035
  function na(e) {
@@ -2100,10 +2091,10 @@ function rr(e, t, n, r) {
2100
2091
  }
2101
2092
  return !1;
2102
2093
  }
2103
- function Dc(e) {
2094
+ function Lc(e) {
2104
2095
  return Number(e.sender_id) === 0 ? !0 : (e.content || "").trim().startsWith("【任务 #");
2105
2096
  }
2106
- function Fc(e) {
2097
+ function Dc(e) {
2107
2098
  if (!e) return "";
2108
2099
  try {
2109
2100
  const t = e.trim(), n = /[zZ]$|[+-]\d{2}:?\d{2}$/.test(t) ? new Date(t) : /* @__PURE__ */ new Date(`${t.replace(" ", "T")}+08:00`);
@@ -2115,7 +2106,7 @@ function Fc(e) {
2115
2106
  return "";
2116
2107
  }
2117
2108
  }
2118
- function qc(e, t) {
2109
+ function Fc(e, t) {
2119
2110
  if (e.sender_type !== "AGENT")
2120
2111
  return !1;
2121
2112
  const n = e.task_id ?? null;
@@ -2126,7 +2117,7 @@ function qc(e, t) {
2126
2117
  }
2127
2118
  return !1;
2128
2119
  }
2129
- function Bc(e, t) {
2120
+ function qc(e, t) {
2130
2121
  const n = e.content === "处理中..." || e.content === "🔄 正在处理中...", r = e.content.includes("[[REASONING:");
2131
2122
  if (!n && !r)
2132
2123
  return !1;
@@ -2146,7 +2137,7 @@ function Bc(e, t) {
2146
2137
  }
2147
2138
  return !1;
2148
2139
  }
2149
- function Hc(e) {
2140
+ function Bc(e) {
2150
2141
  return typeof e.content == "string" && (e.content.includes("【卡片表单已确认】") || e.content.includes("【卡片表单已提交】"));
2151
2142
  }
2152
2143
  function Ye(e) {
@@ -2167,11 +2158,11 @@ function ar(e) {
2167
2158
  function aa(e) {
2168
2159
  return e.replace(sr, "").trimEnd();
2169
2160
  }
2170
- function Kc(e) {
2161
+ function Hc(e) {
2171
2162
  let t = aa(e);
2172
2163
  return t = t.replace(/^\*\*本轮小结\*\*\s*/i, ""), t = t.replace(/^>\s*针对用户消息[^\n]*\n+/m, ""), t = t.replace(/^_生成中…_\s*/m, ""), t.trim();
2173
2164
  }
2174
- function Gc(e) {
2165
+ function Kc(e) {
2175
2166
  const t = /* @__PURE__ */ new Map();
2176
2167
  for (const n of e) {
2177
2168
  if (!Ye(n))
@@ -2181,7 +2172,7 @@ function Gc(e) {
2181
2172
  }
2182
2173
  return t;
2183
2174
  }
2184
- function Jc(e, t) {
2175
+ function Gc(e, t) {
2185
2176
  const n = ar(e.content);
2186
2177
  if (n != null && n.preview)
2187
2178
  return n.preview;
@@ -2224,7 +2215,7 @@ function ia(e, t) {
2224
2215
  return Number(n);
2225
2216
  return null;
2226
2217
  }
2227
- function Vc(e, t) {
2218
+ function Jc(e, t) {
2228
2219
  return e.sender_type !== "AGENT" || Ye(e) ? null : ia(e, t);
2229
2220
  }
2230
2221
  const bn = [
@@ -2237,15 +2228,15 @@ const bn = [
2237
2228
  "#f5222d",
2238
2229
  "#faad14"
2239
2230
  ];
2240
- function Wc(e) {
2231
+ function Vc(e) {
2241
2232
  let t = 0;
2242
2233
  for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
2243
2234
  return bn[Math.abs(t) % bn.length];
2244
2235
  }
2245
- function Zc(e) {
2236
+ function Wc(e) {
2246
2237
  return e ? e.charAt(0).toUpperCase() : "?";
2247
2238
  }
2248
- function Xc(e, t, n, r, s) {
2239
+ function Zc(e, t, n, r, s) {
2249
2240
  return rr(t, n, r, s);
2250
2241
  }
2251
2242
  function oe(e, t = "success", n) {
@@ -2263,7 +2254,7 @@ function oe(e, t = "success", n) {
2263
2254
  v.success(e, n);
2264
2255
  }
2265
2256
  }
2266
- function Yc() {
2257
+ function Xc() {
2267
2258
  return null;
2268
2259
  }
2269
2260
  const Sn = 20, wn = 200;
@@ -2277,7 +2268,7 @@ function at(e) {
2277
2268
  return 0;
2278
2269
  }
2279
2270
  }
2280
- function Qc(e) {
2271
+ function Yc(e) {
2281
2272
  const t = e == null ? void 0 : e.trim();
2282
2273
  if (!t)
2283
2274
  return "";
@@ -2301,7 +2292,7 @@ function Qc(e) {
2301
2292
  function Ht(e, t) {
2302
2293
  return `${t ?? ""}\0${e ?? ""}`;
2303
2294
  }
2304
- function el(e) {
2295
+ function Qc(e) {
2305
2296
  const t = /* @__PURE__ */ new Map();
2306
2297
  for (const r of Object.values(e)) {
2307
2298
  const s = Ht(r.agentName, r.task_id), o = t.get(s) ?? [];
@@ -2382,7 +2373,7 @@ function la(e) {
2382
2373
  return null;
2383
2374
  }
2384
2375
  }
2385
- function tl(e, t) {
2376
+ function el(e, t) {
2386
2377
  const n = t.result == null || t.result === "" ? e.result : String(t.result), r = la(t.ext), s = je(
2387
2378
  (r == null ? void 0 : r.submittedValue) ?? (r == null ? void 0 : r.submitted_value)
2388
2379
  ), o = {
@@ -2619,7 +2610,7 @@ function ya(e) {
2619
2610
  const o = s.split(/[。;;!?\n]/)[0].trim();
2620
2611
  return o.length > 48 ? o.slice(0, 48) + "…" : o;
2621
2612
  }
2622
- function nl(e) {
2613
+ function tl(e) {
2623
2614
  let t = (e || "").trim();
2624
2615
  if (!t) return "";
2625
2616
  t.length > 200 && (t = t.slice(0, 200));
@@ -2630,7 +2621,7 @@ function dt() {
2630
2621
  const e = /* @__PURE__ */ new Date(), t = (n) => String(n).padStart(2, "0");
2631
2622
  return `${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
2632
2623
  }
2633
- const rl = 3, sl = 4, al = 5, In = ur((e, t) => ({
2624
+ const nl = 3, rl = 4, sl = 5, In = ur((e, t) => ({
2634
2625
  currentUser: null,
2635
2626
  permissionState: "unknown",
2636
2627
  // FEATURE-ZTEAM-MERGE: 优先 z-opc 的 token, 其次 z-team 原生的 z_team_token
@@ -3020,7 +3011,7 @@ const rl = 3, sl = 4, al = 5, In = ur((e, t) => ({
3020
3011
  e({ pendingTeamChatContent: n }), t().requestChatScrollBottom("team", !0);
3021
3012
  },
3022
3013
  addMessage: (n) => {
3023
- var x, y;
3014
+ var x, f;
3024
3015
  const r = Kt(
3025
3016
  n
3026
3017
  );
@@ -3049,7 +3040,7 @@ const rl = 3, sl = 4, al = 5, In = ur((e, t) => ({
3049
3040
  ...i,
3050
3041
  is_own: !0,
3051
3042
  sender_id: i.sender_id ?? (l == null ? void 0 : l.id) ?? null,
3052
- sender_name: i.sender_name || ((y = o.currentUser) == null ? void 0 : y.display_name) || ""
3043
+ sender_name: i.sender_name || ((f = o.currentUser) == null ? void 0 : f.display_name) || ""
3053
3044
  });
3054
3045
  const O = h && !m && i.is_own === !0;
3055
3046
  let _ = null;
@@ -3354,8 +3345,8 @@ const rl = 3, sl = 4, al = 5, In = ur((e, t) => ({
3354
3345
  expandedProjectIds: [
3355
3346
  .../* @__PURE__ */ new Set([...i.expandedProjectIds, s])
3356
3347
  ]
3357
- }), h && t().loadFileTree()), e((y) => {
3358
- const A = y.projects.filter(
3348
+ }), h && t().loadFileTree()), e((f) => {
3349
+ const A = f.projects.filter(
3359
3350
  (T, M, K) => K.findIndex((I) => I.id === T.id) === M
3360
3351
  ), k = A.findIndex((T) => T.id === s);
3361
3352
  return {
@@ -3368,8 +3359,8 @@ const rl = 3, sl = 4, al = 5, In = ur((e, t) => ({
3368
3359
  return;
3369
3360
  }
3370
3361
  const C = i.projectSwitchSeq + 1, O = o && !d ? [.../* @__PURE__ */ new Set([...i.expandedProjectIds, s])] : i.expandedProjectIds;
3371
- ((x = i.currentProject) == null ? void 0 : x.id) !== s && Bt(), e((y) => {
3372
- const A = y.projects.filter(
3362
+ ((x = i.currentProject) == null ? void 0 : x.id) !== s && Bt(), e((f) => {
3363
+ const A = f.projects.filter(
3373
3364
  (T, M, K) => K.findIndex((I) => I.id === T.id) === M
3374
3365
  ), k = A.findIndex((T) => T.id === s);
3375
3366
  return {
@@ -3861,7 +3852,7 @@ dr({
3861
3852
  useToken: () => In((e) => e.token),
3862
3853
  useCurrentUser: () => In((e) => e.currentUser)
3863
3854
  });
3864
- const ol = [
3855
+ const al = [
3865
3856
  "/config",
3866
3857
  // z-config 配置中心
3867
3858
  "/mist",
@@ -3883,7 +3874,7 @@ const ol = [
3883
3874
  "/mq",
3884
3875
  // z-mq 消息队列
3885
3876
  "/kb",
3886
- // z-kb 知识库
3877
+ // z-kb 知识库(2026-11-11 菜单摘除,SystemShell 把 /kb/* 重定向到认知工作台 /z-kb/*)
3887
3878
  "/oss",
3888
3879
  // z-oss 对象存储
3889
3880
  "/schedule"
@@ -3911,11 +3902,11 @@ function Mt(e) {
3911
3902
  const n = [...t.failures];
3912
3903
  t.listeners.forEach((r) => r(n));
3913
3904
  }
3914
- function il() {
3905
+ function ol() {
3915
3906
  var e;
3916
3907
  return ((e = Je[Ge]) == null ? void 0 : e.failures) ?? [];
3917
3908
  }
3918
- function cl(e) {
3909
+ function il(e) {
3919
3910
  const t = Je[Ge];
3920
3911
  return t ? (t.listeners.add(e), e(t.failures), () => t.listeners.delete(e)) : () => {
3921
3912
  };
@@ -3957,10 +3948,10 @@ Ta();
3957
3948
  const ne = (e) => {
3958
3949
  const t = hr(e);
3959
3950
  return (n) => /* @__PURE__ */ a(fr, { fallback: null, children: /* @__PURE__ */ a(t, { ...n }) });
3960
- }, xe = ne(() => import("./index-B0xiWAhM.js").then((e) => e.at)), ka = ne(() => import("./index-DOdAlZfA.js")), Ia = ne(() => import("./index-Cd3a7nol.js")), Ca = ne(() => import("./index-X-n1B8fi.js")), Aa = ne(() => import("./index-CV3kkXgP.js")), $a = ne(() => import("./index-Btpel9AF.js"));
3961
- ne(() => import("./index-D3YkA5j4.js"));
3962
- const xa = ne(() => import("./index-C815hPWS.js")), va = ne(() => import("./index-DWi-8Esh.js")), Pa = ne(() => import("./index-DhDdFRHC.js")), Ea = ne(() => import("./index-DSH-wcoD.js")), Ra = ne(() => import("./index-B6Nj2_Zo.js")), Oa = ne(() => import("./index-B_LJRFsK.js")), Ma = ne(() => import("./index-CtFdsOsR.js"));
3963
- function ll({ forcedMode: e }) {
3951
+ }, xe = ne(() => import("./index-DxZEpsT6.js").then((e) => e.at)), ka = ne(() => import("./index-CLP0LnEz.js")), Ia = ne(() => import("./index-Crzx3zh2.js")), Ca = ne(() => import("./index-CUOByyqy.js")), Aa = ne(() => import("./index-0AjMJyFL.js")), $a = ne(() => import("./index-VqKcDrn3.js"));
3952
+ ne(() => import("./index-4icVyiM3.js"));
3953
+ const xa = ne(() => import("./index-C815hPWS.js")), va = ne(() => import("./index-PJZV-bFc.js")), Pa = ne(() => import("./index-DhDdFRHC.js")), Ea = ne(() => import("./index-DarTFF-M.js")), Ra = ne(() => import("./index-CjYmL2yJ.js")), Oa = ne(() => import("./index-B_LJRFsK.js")), Ma = ne(() => import("./index-4NOi2xz4.js"));
3954
+ function cl({ forcedMode: e }) {
3964
3955
  const { pathname: t } = yr(), n = t.replace(/\/+$/, "") || "/";
3965
3956
  return e === "system" ? /* @__PURE__ */ a(xe, { forcedChatMode: Sa(n) }) : e === "dev" ? /* @__PURE__ */ a(xe, { forcedChatMode: "dev" }) : e === "knowledge" ? /* @__PURE__ */ a(xe, { forcedChatMode: "knowledge" }) : n === "/workspace" ? /* @__PURE__ */ a(xe, {}) : n === "/workspace/phone" ? /* @__PURE__ */ a(ka, {}) : n === "/workspace/from-ticket" ? /* @__PURE__ */ a(Ia, {}) : n === "/workspace/from-scenario" ? /* @__PURE__ */ a(Ca, {}) : n === "/workspace/build-by-form" ? /* @__PURE__ */ a(Aa, {}) : n === "/scenario" ? /* @__PURE__ */ a($a, {}) : n === "/admin" ? /* @__PURE__ */ a(xe, {}) : n === "/welcome" ? /* @__PURE__ */ a(va, {}) : n === "/portal" ? /* @__PURE__ */ a(Pa, {}) : n === "/chatdemo" ? /* @__PURE__ */ a(xa, {}) : n === "/embed/chat" || n.startsWith("/embed/chat/") ? /* @__PURE__ */ a(Ma, {}) : n === "/change-log" ? /* @__PURE__ */ a(Ea, {}) : n === "/docs" ? /* @__PURE__ */ a(Ra, {}) : n === "/download" ? /* @__PURE__ */ a(Oa, {}) : /* @__PURE__ */ a(xe, {});
3966
3957
  }
@@ -4061,7 +4052,7 @@ function nn(e = {}) {
4061
4052
  userInfoKey: e.userInfoKey
4062
4053
  }), t;
4063
4054
  }
4064
- const H = nn(), dl = nn(), ut = nn({ baseURL: "/api", timeout: 1e4 }), pt = (e) => e ? typeof e.total == "number" ? e.total : Array.isArray(e) ? e.length : Array.isArray(e.records) ? e.records.length : Array.isArray(e.data) ? e.data.length : 0 : 0, Fa = [
4055
+ const H = nn(), ll = nn(), ut = nn({ baseURL: "/api", timeout: 1e4 }), pt = (e) => e ? typeof e.total == "number" ? e.total : Array.isArray(e) ? e.length : Array.isArray(e.records) ? e.records.length : Array.isArray(e.data) ? e.data.length : 0 : 0, Fa = [
4065
4056
  {
4066
4057
  key: "ai",
4067
4058
  color: "violet",
@@ -4159,7 +4150,7 @@ const H = nn(), dl = nn(), ut = nn({ baseURL: "/api", timeout: 1e4 }), pt = (e)
4159
4150
  }
4160
4151
  ]
4161
4152
  }
4162
- ], ul = () => {
4153
+ ], dl = () => {
4163
4154
  const [e, t] = $({
4164
4155
  configCount: null,
4165
4156
  projectCount: null,
@@ -4361,29 +4352,29 @@ const kt = "/mock-platform", Q = (e, t) => Qe.get(`${kt}${e}`, { params: t }).th
4361
4352
  }
4362
4353
  }, { Text: me, Paragraph: Ha } = pe, xn = { GET: "green", POST: "blue", PUT: "orange", DELETE: "red", PATCH: "purple" };
4363
4354
  function Jt({ activeEnvCode: e }) {
4364
- const [t, n] = $([]), [r, s] = $(!1), [o, i] = $(null), [c, l] = $(!1), [d, u] = $(null), [h, m] = $(""), C = h.trim() ? t.filter((y) => `${y.path || ""} ${y.mock_code || ""}`.toLowerCase().includes(h.trim().toLowerCase())) : t;
4355
+ const [t, n] = $([]), [r, s] = $(!1), [o, i] = $(null), [c, l] = $(!1), [d, u] = $(null), [h, m] = $(""), C = h.trim() ? t.filter((f) => `${f.path || ""} ${f.mock_code || ""}`.toLowerCase().includes(h.trim().toLowerCase())) : t;
4365
4356
  Y(() => {
4366
4357
  O();
4367
4358
  }, [e]);
4368
4359
  const O = async () => {
4369
4360
  s(!0), i(null);
4370
4361
  try {
4371
- const y = await J.endpoints.list(e);
4372
- n(Array.isArray(y) ? y : []);
4373
- } catch (y) {
4374
- i((y == null ? void 0 : y.message) || "API unavailable"), n([]);
4362
+ const f = await J.endpoints.list(e);
4363
+ n(Array.isArray(f) ? f : []);
4364
+ } catch (f) {
4365
+ i((f == null ? void 0 : f.message) || "API unavailable"), n([]);
4375
4366
  } finally {
4376
4367
  s(!1);
4377
4368
  }
4378
- }, _ = (y) => `${window.location.origin}/api/mock/${y.env_code || e || "default"}${y.path || ""}`, x = [
4369
+ }, _ = (f) => `${window.location.origin}/api/mock/${f.env_code || e || "default"}${f.path || ""}`, x = [
4379
4370
  {
4380
4371
  title: "路径",
4381
4372
  dataIndex: "path",
4382
4373
  key: "path",
4383
4374
  width: 280,
4384
- render: (y, A) => /* @__PURE__ */ p(U, { children: [
4375
+ render: (f, A) => /* @__PURE__ */ p(U, { children: [
4385
4376
  /* @__PURE__ */ a(E, { color: xn[A.method] || "default", children: A.method }),
4386
- /* @__PURE__ */ a(me, { code: !0, copyable: { text: y }, children: y })
4377
+ /* @__PURE__ */ a(me, { code: !0, copyable: { text: f }, children: f })
4387
4378
  ] })
4388
4379
  },
4389
4380
  { title: "编码", dataIndex: "mock_code", key: "mock_code", width: 160 },
@@ -4393,9 +4384,9 @@ function Jt({ activeEnvCode: e }) {
4393
4384
  key: "priority",
4394
4385
  width: 80,
4395
4386
  align: "center",
4396
- render: (y) => /* @__PURE__ */ p(E, { color: "blue", children: [
4387
+ render: (f) => /* @__PURE__ */ p(E, { color: "blue", children: [
4397
4388
  "P",
4398
- y || 5
4389
+ f || 5
4399
4390
  ] })
4400
4391
  },
4401
4392
  { title: "状态码", dataIndex: "status_code", key: "status_code", width: 80, align: "center" },
@@ -4405,8 +4396,8 @@ function Jt({ activeEnvCode: e }) {
4405
4396
  key: "delay_ms",
4406
4397
  width: 80,
4407
4398
  align: "center",
4408
- render: (y) => y > 0 ? /* @__PURE__ */ p(me, { type: "warning", children: [
4409
- y,
4399
+ render: (f) => f > 0 ? /* @__PURE__ */ p(me, { type: "warning", children: [
4400
+ f,
4410
4401
  "ms"
4411
4402
  ] }) : /* @__PURE__ */ a(me, { type: "secondary", children: "-" })
4412
4403
  },
@@ -4415,14 +4406,14 @@ function Jt({ activeEnvCode: e }) {
4415
4406
  dataIndex: "fault_type",
4416
4407
  key: "fault_type",
4417
4408
  width: 110,
4418
- render: (y) => y && y !== "NONE" ? /* @__PURE__ */ a(E, { color: "red", children: y }) : /* @__PURE__ */ a(me, { type: "secondary", children: "-" })
4409
+ render: (f) => f && f !== "NONE" ? /* @__PURE__ */ a(E, { color: "red", children: f }) : /* @__PURE__ */ a(me, { type: "secondary", children: "-" })
4419
4410
  },
4420
4411
  {
4421
4412
  title: "场景",
4422
4413
  dataIndex: "scenario_code",
4423
4414
  key: "scenario_code",
4424
4415
  width: 130,
4425
- render: (y) => y ? /* @__PURE__ */ a(E, { color: "purple", children: y }) : /* @__PURE__ */ a(me, { type: "secondary", children: "-" })
4416
+ render: (f) => f ? /* @__PURE__ */ a(E, { color: "purple", children: f }) : /* @__PURE__ */ a(me, { type: "secondary", children: "-" })
4426
4417
  },
4427
4418
  {
4428
4419
  title: "命中",
@@ -4430,7 +4421,7 @@ function Jt({ activeEnvCode: e }) {
4430
4421
  key: "hit_count",
4431
4422
  width: 80,
4432
4423
  align: "center",
4433
- render: (y) => /* @__PURE__ */ a(me, { strong: !0, children: y || 0 })
4424
+ render: (f) => /* @__PURE__ */ a(me, { strong: !0, children: f || 0 })
4434
4425
  },
4435
4426
  {
4436
4427
  title: "状态",
@@ -4438,14 +4429,14 @@ function Jt({ activeEnvCode: e }) {
4438
4429
  key: "status",
4439
4430
  width: 100,
4440
4431
  align: "center",
4441
- render: (y) => y === 1 ? /* @__PURE__ */ a(E, { color: "green", children: "启用" }) : /* @__PURE__ */ a(E, { children: "禁用" })
4432
+ render: (f) => f === 1 ? /* @__PURE__ */ a(E, { color: "green", children: "启用" }) : /* @__PURE__ */ a(E, { children: "禁用" })
4442
4433
  },
4443
4434
  {
4444
4435
  title: "操作",
4445
4436
  key: "action",
4446
4437
  width: 160,
4447
4438
  fixed: "right",
4448
- render: (y, A) => /* @__PURE__ */ p(U, { size: "small", children: [
4439
+ render: (f, A) => /* @__PURE__ */ p(U, { size: "small", children: [
4449
4440
  /* @__PURE__ */ a(Oe, { title: "预览响应", children: /* @__PURE__ */ a(
4450
4441
  j,
4451
4442
  {
@@ -4489,18 +4480,18 @@ function Jt({ activeEnvCode: e }) {
4489
4480
  ] }) }),
4490
4481
  /* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ p(F, { children: [
4491
4482
  /* @__PURE__ */ a("strong", { children: "已启用" }),
4492
- /* @__PURE__ */ a("div", { style: { fontSize: 22, color: "#52c41a" }, children: t.filter((y) => y.status === 1).length })
4483
+ /* @__PURE__ */ a("div", { style: { fontSize: 22, color: "#52c41a" }, children: t.filter((f) => f.status === 1).length })
4493
4484
  ] }) }),
4494
4485
  /* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ p(F, { children: [
4495
4486
  /* @__PURE__ */ a("strong", { children: "已禁用" }),
4496
- /* @__PURE__ */ a("div", { style: { fontSize: 22, color: "#ff4d4f" }, children: t.filter((y) => y.status === 0).length })
4487
+ /* @__PURE__ */ a("div", { style: { fontSize: 22, color: "#ff4d4f" }, children: t.filter((f) => f.status === 0).length })
4497
4488
  ] }) }),
4498
4489
  /* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ p(F, { children: [
4499
4490
  /* @__PURE__ */ a("strong", { children: "总命中" }),
4500
4491
  /* @__PURE__ */ a("div", { style: {
4501
4492
  fontSize: 22,
4502
4493
  color: "#1890ff"
4503
- }, children: t.reduce((y, A) => y + (A.hit_count || 0), 0) })
4494
+ }, children: t.reduce((f, A) => f + (A.hit_count || 0), 0) })
4504
4495
  ] }) })
4505
4496
  ] }),
4506
4497
  /* @__PURE__ */ p(U, { style: { marginBottom: 16 }, children: [
@@ -4510,7 +4501,7 @@ function Jt({ activeEnvCode: e }) {
4510
4501
  allowClear: !0,
4511
4502
  placeholder: "按路径 / 编码过滤",
4512
4503
  style: { width: 220 },
4513
- onChange: (y) => m(y.target.value)
4504
+ onChange: (f) => m(f.target.value)
4514
4505
  }
4515
4506
  ),
4516
4507
  /* @__PURE__ */ a(j, { icon: /* @__PURE__ */ a(ce, {}), onClick: O, children: "刷新" })
@@ -4845,9 +4836,9 @@ const { Text: be } = pe, Nt = { PASS: "green", FAIL: "red", SKIP: "default" }, V
4845
4836
  function Wa() {
4846
4837
  const [e, t] = $([]), [n, r] = $(!1), [s, o] = $([]), [i, c] = $(!1), [l, d] = $(null), [u, h] = $(null), [m, C] = $(!1), [O, _] = $(""), x = O.trim() ? e.filter((T) => `${T.case_code || ""} ${T.case_name || ""} ${T.request_url || ""}`.toLowerCase().includes(O.trim().toLowerCase())) : e;
4847
4838
  Y(() => {
4848
- y();
4839
+ f();
4849
4840
  }, []);
4850
- const y = async () => {
4841
+ const f = async () => {
4851
4842
  r(!0);
4852
4843
  try {
4853
4844
  const T = await J.cases.list();
@@ -4860,7 +4851,7 @@ function Wa() {
4860
4851
  }, A = async (T) => {
4861
4852
  try {
4862
4853
  const M = await J.cases.run(T.case_code);
4863
- d(M), c(!0), (M == null ? void 0 : M.status) === "PASS" ? v.success("用例通过") : v.error("用例失败: " + ((M == null ? void 0 : M.error) || (M == null ? void 0 : M.actualStatus))), y();
4854
+ d(M), c(!0), (M == null ? void 0 : M.status) === "PASS" ? v.success("用例通过") : v.error("用例失败: " + ((M == null ? void 0 : M.error) || (M == null ? void 0 : M.actualStatus))), f();
4864
4855
  } catch (M) {
4865
4856
  v.error("执行失败: " + (M == null ? void 0 : M.message));
4866
4857
  }
@@ -4871,7 +4862,7 @@ function Wa() {
4871
4862
  }
4872
4863
  try {
4873
4864
  const T = await J.cases.runBatch(s);
4874
- h(T), C(!0), v.success(`批量执行完成: ${T == null ? void 0 : T.pass} 通过, ${T == null ? void 0 : T.fail} 失败`), y();
4865
+ h(T), C(!0), v.success(`批量执行完成: ${T == null ? void 0 : T.pass} 通过, ${T == null ? void 0 : T.fail} 失败`), f();
4875
4866
  } catch {
4876
4867
  v.error("批量执行失败");
4877
4868
  }
@@ -4974,7 +4965,7 @@ function Wa() {
4974
4965
  onChange: (T) => _(T.target.value)
4975
4966
  }
4976
4967
  ),
4977
- /* @__PURE__ */ a(j, { icon: /* @__PURE__ */ a(ce, {}), onClick: y, children: "刷新" }),
4968
+ /* @__PURE__ */ a(j, { icon: /* @__PURE__ */ a(ce, {}), onClick: f, children: "刷新" }),
4978
4969
  /* @__PURE__ */ p(
4979
4970
  j,
4980
4971
  {
@@ -5161,8 +5152,8 @@ function Za() {
5161
5152
  }
5162
5153
  }, O = async (x) => {
5163
5154
  try {
5164
- const y = await J.recordings.requests(x.recording_code);
5165
- c(x), d(Array.isArray(y) ? y : []), o(!0);
5155
+ const f = await J.recordings.requests(x.recording_code);
5156
+ c(x), d(Array.isArray(f) ? f : []), o(!0);
5166
5157
  } catch {
5167
5158
  v.error("加载失败");
5168
5159
  }
@@ -5203,12 +5194,12 @@ function Za() {
5203
5194
  key: "action",
5204
5195
  width: 120,
5205
5196
  fixed: "right",
5206
- render: (x, y) => /* @__PURE__ */ a(U, { size: "small", children: /* @__PURE__ */ a(
5197
+ render: (x, f) => /* @__PURE__ */ a(U, { size: "small", children: /* @__PURE__ */ a(
5207
5198
  j,
5208
5199
  {
5209
5200
  size: "small",
5210
5201
  type: "link",
5211
- onClick: () => O(y),
5202
+ onClick: () => O(f),
5212
5203
  children: "详情"
5213
5204
  }
5214
5205
  ) })
@@ -5338,7 +5329,7 @@ function Ya() {
5338
5329
  const O = async () => {
5339
5330
  o(!0);
5340
5331
  try {
5341
- const [y, A] = await Promise.all([
5332
+ const [f, A] = await Promise.all([
5342
5333
  J.requestLogs.list({
5343
5334
  path: u || void 0,
5344
5335
  matched: m,
@@ -5346,42 +5337,42 @@ function Ya() {
5346
5337
  }),
5347
5338
  J.requestLogs.stats().catch(() => null)
5348
5339
  ]);
5349
- t(Array.isArray(y) ? y : []), r(A);
5340
+ t(Array.isArray(f) ? f : []), r(A);
5350
5341
  } catch {
5351
5342
  v.warning("加载失败");
5352
5343
  } finally {
5353
5344
  o(!1);
5354
5345
  }
5355
- }, _ = (y) => {
5356
- c(y), d(!0);
5346
+ }, _ = (f) => {
5347
+ c(f), d(!0);
5357
5348
  }, x = [
5358
5349
  {
5359
5350
  title: "时间",
5360
5351
  dataIndex: "create_time",
5361
5352
  key: "create_time",
5362
5353
  width: 170,
5363
- render: (y) => y ? new Date(y).toLocaleString() : "-"
5354
+ render: (f) => f ? new Date(f).toLocaleString() : "-"
5364
5355
  },
5365
5356
  {
5366
5357
  title: "环境",
5367
5358
  dataIndex: "env_code",
5368
5359
  key: "env_code",
5369
5360
  width: 100,
5370
- render: (y) => /* @__PURE__ */ a(E, { children: y })
5361
+ render: (f) => /* @__PURE__ */ a(E, { children: f })
5371
5362
  },
5372
5363
  {
5373
5364
  title: "方法",
5374
5365
  dataIndex: "request_method",
5375
5366
  key: "request_method",
5376
5367
  width: 80,
5377
- render: (y) => /* @__PURE__ */ a(E, { color: "blue", children: y })
5368
+ render: (f) => /* @__PURE__ */ a(E, { color: "blue", children: f })
5378
5369
  },
5379
5370
  {
5380
5371
  title: "路径",
5381
5372
  dataIndex: "request_path",
5382
5373
  key: "request_path",
5383
5374
  ellipsis: !0,
5384
- render: (y) => /* @__PURE__ */ a(Ee, { code: !0, children: y })
5375
+ render: (f) => /* @__PURE__ */ a(Ee, { code: !0, children: f })
5385
5376
  },
5386
5377
  {
5387
5378
  title: "状态",
@@ -5389,7 +5380,7 @@ function Ya() {
5389
5380
  key: "response_status",
5390
5381
  width: 90,
5391
5382
  align: "center",
5392
- render: (y) => y ? /* @__PURE__ */ a(E, { color: y >= 400 ? "red" : "green", children: y }) : "-"
5383
+ render: (f) => f ? /* @__PURE__ */ a(E, { color: f >= 400 ? "red" : "green", children: f }) : "-"
5393
5384
  },
5394
5385
  {
5395
5386
  title: "匹配",
@@ -5397,14 +5388,14 @@ function Ya() {
5397
5388
  key: "matched",
5398
5389
  width: 90,
5399
5390
  align: "center",
5400
- render: (y) => y === 1 ? /* @__PURE__ */ a(E, { color: "green", children: "命中" }) : /* @__PURE__ */ a(E, { color: "red", children: "未匹配" })
5391
+ render: (f) => f === 1 ? /* @__PURE__ */ a(E, { color: "green", children: "命中" }) : /* @__PURE__ */ a(E, { color: "red", children: "未匹配" })
5401
5392
  },
5402
5393
  {
5403
5394
  title: "回退",
5404
5395
  dataIndex: "fallback_type",
5405
5396
  key: "fallback_type",
5406
5397
  width: 100,
5407
- render: (y) => y ? /* @__PURE__ */ a(E, { color: Xa[y], children: y }) : "-"
5398
+ render: (f) => f ? /* @__PURE__ */ a(E, { color: Xa[f], children: f }) : "-"
5408
5399
  },
5409
5400
  {
5410
5401
  title: "耗时",
@@ -5412,7 +5403,7 @@ function Ya() {
5412
5403
  key: "duration_ms",
5413
5404
  width: 80,
5414
5405
  align: "center",
5415
- render: (y) => `${y || 0}ms`
5406
+ render: (f) => `${f || 0}ms`
5416
5407
  },
5417
5408
  {
5418
5409
  title: "Mock",
@@ -5420,13 +5411,13 @@ function Ya() {
5420
5411
  key: "mock_code",
5421
5412
  width: 160,
5422
5413
  ellipsis: !0,
5423
- render: (y) => y ? /* @__PURE__ */ a(Ee, { code: !0, children: y }) : "-"
5414
+ render: (f) => f ? /* @__PURE__ */ a(Ee, { code: !0, children: f }) : "-"
5424
5415
  },
5425
5416
  {
5426
5417
  title: "操作",
5427
5418
  key: "action",
5428
5419
  width: 80,
5429
- render: (y, A) => /* @__PURE__ */ a(
5420
+ render: (f, A) => /* @__PURE__ */ a(
5430
5421
  j,
5431
5422
  {
5432
5423
  size: "small",
@@ -5483,7 +5474,7 @@ function Ya() {
5483
5474
  allowClear: !0,
5484
5475
  style: { width: 240 },
5485
5476
  value: u,
5486
- onChange: (y) => h(y.target.value),
5477
+ onChange: (f) => h(f.target.value),
5487
5478
  onPressEnter: O
5488
5479
  }
5489
5480
  ),
@@ -5706,10 +5697,10 @@ function Qa() {
5706
5697
  )
5707
5698
  ] });
5708
5699
  }
5709
- const pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5700
+ const ul = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5710
5701
  __proto__: null,
5711
5702
  default: Qa
5712
- }, Symbol.toStringTag, { value: "Module" })), { Text: Le, Paragraph: ml } = pe, En = [
5703
+ }, Symbol.toStringTag, { value: "Module" })), { Text: Le, Paragraph: pl } = pe, En = [
5713
5704
  {
5714
5705
  group: "基础数据",
5715
5706
  icon: /* @__PURE__ */ a(Fe, {}),
@@ -5765,7 +5756,7 @@ const pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5765
5756
  ]
5766
5757
  }
5767
5758
  ];
5768
- function hl({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
5759
+ function ml({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
5769
5760
  const [r, s] = $(""), o = (h) => {
5770
5761
  var m;
5771
5762
  try {
@@ -5871,8 +5862,8 @@ function hl({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
5871
5862
  );
5872
5863
  }
5873
5864
  const { TextArea: Rn } = B, { Text: Re, Paragraph: eo } = pe;
5874
- function fl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
5875
- const [s, o] = $(""), [i, c] = $(null), [l, d] = $(null), [u, h] = $(!1), [m, C] = $(null), [O, _] = $(!1), [x, y] = $("import"), [A] = N.useForm(), [k] = N.useForm(), P = () => {
5865
+ function hl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
5866
+ const [s, o] = $(""), [i, c] = $(null), [l, d] = $(null), [u, h] = $(!1), [m, C] = $(null), [O, _] = $(!1), [x, f] = $("import"), [A] = N.useForm(), [k] = N.useForm(), P = () => {
5876
5867
  o(""), c(null), d(null), C(null), A.resetFields(), k.resetFields();
5877
5868
  }, T = () => {
5878
5869
  P(), t();
@@ -6048,7 +6039,7 @@ function fl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
6048
6039
  We,
6049
6040
  {
6050
6041
  activeKey: x,
6051
- onChange: y,
6042
+ onChange: f,
6052
6043
  style: { marginTop: 16 },
6053
6044
  items: [
6054
6045
  {
@@ -6117,8 +6108,8 @@ function to(e) {
6117
6108
  return { GET: "blue", POST: "green", PUT: "orange", DELETE: "red", PATCH: "purple" }[e] || "default";
6118
6109
  }
6119
6110
  const { TextArea: On } = B;
6120
- function yl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
6121
- const [s, o] = $("paste"), [i, c] = $(""), [l, d] = $(null), [u, h] = $(null), [m, C] = $(!1), [O, _] = $([]), [x, y] = $(!1), [A] = N.useForm(), k = Un(null), P = () => {
6111
+ function fl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
6112
+ const [s, o] = $("paste"), [i, c] = $(""), [l, d] = $(null), [u, h] = $(null), [m, C] = $(!1), [O, _] = $([]), [x, f] = $(!1), [A] = N.useForm(), k = Un(null), P = () => {
6122
6113
  c(""), d(null), h(null), _([]), A.resetFields();
6123
6114
  }, T = () => {
6124
6115
  P(), t();
@@ -6171,7 +6162,7 @@ function yl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
6171
6162
  } catch {
6172
6163
  return;
6173
6164
  }
6174
- y(!0);
6165
+ f(!0);
6175
6166
  try {
6176
6167
  const G = (l.endpoints || []).map((W, rn) => ({
6177
6168
  method: W.method,
@@ -6190,7 +6181,7 @@ function yl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
6190
6181
  } catch (G) {
6191
6182
  v.error(String((G == null ? void 0 : G.message) || G));
6192
6183
  } finally {
6193
- y(!1);
6184
+ f(!1);
6194
6185
  }
6195
6186
  }, L = [
6196
6187
  {
@@ -6412,7 +6403,7 @@ function ao() {
6412
6403
  }
6413
6404
  }
6414
6405
  });
6415
- }, y = async (I) => {
6406
+ }, f = async (I) => {
6416
6407
  try {
6417
6408
  const w = await H.post(`/subscribe/subscription/${I}/enable`);
6418
6409
  w && w.success !== !1 ? (v.success("已启用"), _()) : v.error((w == null ? void 0 : w.message) || "启用失败");
@@ -6617,7 +6608,7 @@ function ao() {
6617
6608
  {
6618
6609
  type: "link",
6619
6610
  size: "small",
6620
- onClick: () => y(w.id),
6611
+ onClick: () => f(w.id),
6621
6612
  children: "启用"
6622
6613
  }
6623
6614
  ),
@@ -6865,7 +6856,7 @@ const io = [
6865
6856
  function jn() {
6866
6857
  const { id: e } = zn(), t = Ze(), n = !!e, [r] = N.useForm(), [s, o] = $(!1), [i, c] = $(!1), [l, d] = $([]), [u, h] = $([]), m = N.useWatch("sourceType", r), C = N.useWatch("extractorType", r), O = N.useWatch("authType", r);
6867
6858
  Y(() => {
6868
- _(), x(), n && y();
6859
+ _(), x(), n && f();
6869
6860
  }, [e]);
6870
6861
  const _ = async () => {
6871
6862
  try {
@@ -6879,7 +6870,7 @@ function jn() {
6879
6870
  h(Array.isArray(P) ? P.filter((T) => T.status === 1) : []);
6880
6871
  } catch {
6881
6872
  }
6882
- }, y = async () => {
6873
+ }, f = async () => {
6883
6874
  o(!0);
6884
6875
  try {
6885
6876
  const k = await H.get(`/subscribe/subscription/${e}`), P = (k == null ? void 0 : k.data) ?? k;
@@ -7117,7 +7108,7 @@ function po() {
7117
7108
  } catch {
7118
7109
  v.error("加载抽取项失败");
7119
7110
  }
7120
- }, _ = s.reduce((A, k) => A + (k.successCount || 0), 0), x = s.reduce((A, k) => A + (k.deadLetterCount || 0), 0), y = s.reduce((A, k) => A + (k.duplicateCount || 0), 0);
7111
+ }, _ = s.reduce((A, k) => A + (k.successCount || 0), 0), x = s.reduce((A, k) => A + (k.deadLetterCount || 0), 0), f = s.reduce((A, k) => A + (k.duplicateCount || 0), 0);
7121
7112
  return /* @__PURE__ */ p("div", { children: [
7122
7113
  /* @__PURE__ */ a(
7123
7114
  Ue,
@@ -7165,7 +7156,7 @@ function po() {
7165
7156
  styles: { content: { color: "#cf1322" } }
7166
7157
  }
7167
7158
  ) }) }),
7168
- /* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ a(F, { children: /* @__PURE__ */ a(X, { title: "重复跳过", value: y }) }) })
7159
+ /* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ a(F, { children: /* @__PURE__ */ a(X, { title: "重复跳过", value: f }) }) })
7169
7160
  ] }),
7170
7161
  /* @__PURE__ */ p(se, { gutter: 16, children: [
7171
7162
  /* @__PURE__ */ a(D, { span: 12, children: /* @__PURE__ */ a(
@@ -7265,7 +7256,7 @@ function mo() {
7265
7256
  /* @__PURE__ */ a(ue, { path: "runs", element: /* @__PURE__ */ a(po, {}) })
7266
7257
  ] });
7267
7258
  }
7268
- const gl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7259
+ const yl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7269
7260
  __proto__: null,
7270
7261
  default: mo
7271
7262
  }, Symbol.toStringTag, { value: "Module" })), ho = {
@@ -7428,9 +7419,9 @@ function go() {
7428
7419
  const P = t.get("subscriptionId"), T = t.get("itemIds");
7429
7420
  P && (x(Number(P)), n.setFieldValue("sourceSubscriptionId", Number(P)), A(P)), T && O(T.split(",").map(Number).filter(Boolean));
7430
7421
  }, [t]), Y(() => {
7431
- y();
7422
+ f();
7432
7423
  }, []);
7433
- const y = async () => {
7424
+ const f = async () => {
7434
7425
  try {
7435
7426
  const P = await H.get("/subscribe/subscription/list"), T = (P == null ? void 0 : P.data) ?? P ?? [];
7436
7427
  l(Array.isArray(T) ? T.filter((M) => M.status === "VERIFIED") : []);
@@ -7641,16 +7632,16 @@ function So() {
7641
7632
  const _ = i.trim();
7642
7633
  c(""), d(!0);
7643
7634
  const x = { seq: -1, role: "USER", content: _, createdAt: (/* @__PURE__ */ new Date()).toISOString() };
7644
- o((y) => [...y, x]);
7635
+ o((f) => [...f, x]);
7645
7636
  try {
7646
- const y = await H.post(`/project/${e}/chat`, { message: _ });
7647
- if (y && y.success !== !1) {
7648
- const k = (y.data ?? y).message;
7637
+ const f = await H.post(`/project/${e}/chat`, { message: _ });
7638
+ if (f && f.success !== !1) {
7639
+ const k = (f.data ?? f).message;
7649
7640
  o((P) => [...P.filter((M) => M.seq !== -1), ...k ? [k] : []]), setTimeout(h, 100);
7650
7641
  } else
7651
- v.error((y == null ? void 0 : y.message) || "发送失败");
7652
- } catch (y) {
7653
- v.error("发送失败: " + ((y == null ? void 0 : y.message) || ""));
7642
+ v.error((f == null ? void 0 : f.message) || "发送失败");
7643
+ } catch (f) {
7644
+ v.error("发送失败: " + ((f == null ? void 0 : f.message) || ""));
7654
7645
  } finally {
7655
7646
  d(!1);
7656
7647
  }
@@ -7708,15 +7699,15 @@ function So() {
7708
7699
  children: [
7709
7700
  /* @__PURE__ */ a("div", { ref: u, style: { flex: 1, overflow: "auto", padding: 16, background: "#fafafa" }, children: s.length === 0 ? /* @__PURE__ */ a(mr, { description: "还没有消息, 跟 Agent 说点什么?" }) : /* @__PURE__ */ p(U, { orientation: "vertical", style: { width: "100%" }, size: "middle", children: [
7710
7701
  s.map((_) => {
7711
- const x = Nn[_.role] || Nn.SYSTEM, y = _.role === "USER";
7702
+ const x = Nn[_.role] || Nn.SYSTEM, f = _.role === "USER";
7712
7703
  return /* @__PURE__ */ a("div", { style: {
7713
7704
  display: "flex",
7714
- justifyContent: y ? "flex-end" : "flex-start"
7705
+ justifyContent: f ? "flex-end" : "flex-start"
7715
7706
  }, children: /* @__PURE__ */ p("div", { style: {
7716
7707
  maxWidth: "70%",
7717
- background: y ? "#1677ff" : "#fff",
7718
- color: y ? "#fff" : "#000",
7719
- border: y ? "none" : "1px solid #e8e8e8",
7708
+ background: f ? "#1677ff" : "#fff",
7709
+ color: f ? "#fff" : "#000",
7710
+ border: f ? "none" : "1px solid #e8e8e8",
7720
7711
  borderRadius: 8,
7721
7712
  padding: "10px 14px",
7722
7713
  boxShadow: "0 1px 2px rgba(0,0,0,0.04)"
@@ -7798,30 +7789,30 @@ function wo() {
7798
7789
  /* @__PURE__ */ a(ue, { path: ":id", element: /* @__PURE__ */ a(So, {}) })
7799
7790
  ] });
7800
7791
  }
7801
- const bl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7792
+ const gl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7802
7793
  __proto__: null,
7803
7794
  default: wo
7804
7795
  }, Symbol.toStringTag, { value: "Module" })), _o = "# z-team-component\n\nz-team(团队工作台)的**跨仓唯一前端面**:把「多模式工作台 / 模式切换 / z-opc 业务套件聚合 / 订阅域 / 项目域」\n这一整套团队工作台页面收敛成一个可复用的 React 组件包,由主壳(z-opc 主前端)挂载。\n\n- **npm 包名**:`@yuku123/z-team-component`\n- **宿主接入**:双入口 —— `.`(`ZTeamApp` / `SubscribeApp` / `ProjectApp`)与 `./pages`(`routes` / `appMeta` / `menuItems`)\n- **后端**:与 z-opc 主壳同源的 `/api/**`(axios `baseURL = '/api'`,Cookie 模式 `withCredentials`)\n- **技术栈**:React 19 + antd 6 + react-router-dom 7 + vite(**library mode**,双入口 `index` / `pages`,\n 基座与全部 `@yuku123/*` 一律 **external**,由消费方用自己的 node_modules 解析)\n\n> ⚠ z-team 是**主壳的总控包**:它自己不承载某个业务域,而是把 z-opc 的业务套件(`/ctc/*`、`/ai/*`、`/config/*` …)\n> 聚合进工作台外壳里渲染。所以本文档描述的是 **z-team 自身的能力**(工作台 / 模式切换 / 套件聚合 / 订阅 / 项目)。\n\n---\n\n## 一、能力概览\n\n### 1.1 顶层路由(`src/pages-manifest.ts` 的 `routes`)\n\n| 路由 | 组件 | 能力 |\n|------|------|------|\n| `/team/subscribe` | `SubscribeApp` | 订阅域:订阅列表 / 编辑 / 运行历史 |\n| `/team/project` | `ProjectApp` | 项目域:项目列表 / 创建 / 详情 |\n| `/team/docs` | `ComponentDocPage` | 本文件渲染页(左侧 240px TOC + 右侧正文) |\n| `/team/:rest*` | `ZTeamApp` | **兜底**:`ZTeamApp` 内部按 `useLocation().pathname` 懒加载分发到下面 15 个域 |\n\n`menuItems`:`/team/subscribe`(订阅)/ `/team/project`(项目)/ `/team/workspace`(工作台)/ `/team/docs`(组件文档,末项)。\n\n### 1.2 `ZTeamApp` 顶层分发(`src/zteam-adapter/App.tsx`)\n\n| pathname | 渲染的域 | 源文件 |\n|----------|----------|--------|\n| `/workspace` | 工作台 | `src/zteam/pages/workspace/index.tsx` |\n| `/workspace/phone` | 移动端工作台 | `src/zteam/pages/workspace/phone/index.tsx` |\n| `/workspace/from-ticket` | 从工单进入 | `src/zteam/pages/workspace/from-ticket.tsx` |\n| `/workspace/from-scenario` | 从场景进入 | `src/zteam/pages/workspace/from-scenario.tsx` |\n| `/workspace/build-by-form` | 表单构建 | `src/zteam/pages/workspace/build-by-form.tsx` |\n| `/scenario` | 场景 | `src/zteam/pages/scenario/index.tsx` |\n| `/admin` | 管理后台(走工作台外壳的 admin 分支) | `src/zteam/pages/admin/index.tsx` |\n| `/welcome` | 产品介绍 | `src/zteam/pages/welcome/index.tsx` |\n| `/portal` | 场景入口 | `src/zteam/pages/portal/index.tsx` |\n| `/chatdemo` | 聊天演示 | `src/zteam/pages/chatdemo/index.tsx` |\n| `/embed/chat` | 嵌入式聊天 | `src/zteam/pages/embed/chat/index.tsx` |\n| `/change-log` | 变更记录 | `src/zteam/pages/change-log/index.tsx` |\n| `/docs` | **操作手册页**(52KB 手写暗色主题页,**与本文件的组件文档页不是一回事**) | `src/zteam/pages/docs/index.tsx` |\n\n`src/zteam/pages/` 下共 **14 个域目录**:`admin` / `agenthub-digital-brain-test` / `change-log` / `chatdemo` /\n`docs` / `download` / `embed` / `login` / `note` / `phone` / `portal` / `scenario` / `welcome` / `workspace`。\n其中 `agenthub-digital-brain-test` / `download` / `login` / `note` **没有** `ZTeamApp` 顶层分支,\n由域内路由或别的入口进入。\n\n> **2026-11-07:`rpa` 域目录已删除(RPA 入口整体下线)。** RPA 是脚本中心(z-script)的产品皮,\n> 前端 tab / `/rpa/*` 路由 / 页面全部移除,执行能力留在脚本中心继续增强;老链接 `/rpa/*` 由主壳重定向到 `/workspace`。\n\n### 1.3 工作台模式切换(`src/zteam/pages/workspace/utils/chatMode.ts`)\n\n`ChatMode` 共 12 种:`personal` / `collaboration` / `smart` / `product` / `dev` / `test` / `ops` / `admin` /\n`system` / `life` / `training` / `knowledge`(默认 `collaboration`)。\n\n模式切换统一走 `history.push` 到对应顶层路由(`Layout/index.tsx` 的 `handleModeSwitch`):\n\n| 模式 | 落点 |\n|------|------|\n| `system` | `/ctc/4a/account`(z-opc 业务路径;已在业务路径上时不重复跳) |\n| `test` | `/test/qa/dashboard` |\n| `admin` | `/admin?mode=admin` |\n| 其余模式 | `/workspace?mode=xxx`(必须带 `?desktop=1`,否则窄视口会被重定向到移动端工作台) |\n\n模式持久化在 URL query 上(`?mode=xxx`,`replaceState` 不污染历史记录);\n`/admin*` → `admin`、`/ops/*` → `ops`、`/lc/*` → `dev` 由 `readModeFromUrl()` 自动识别。\n\n### 1.4 套件聚合(`src/zteam/pages/workspace/components/Layout/SystemShell.tsx`)\n\n`SystemShell` 用一张 `SYSTEM_ROUTES` 表把 **z-opc 的业务套件**接进工作台的右侧内容区,\n用 `matchSystemPath()` 做 pathname 匹配(精确 → 通配 `*` / 参数 `:param`),支持 `/ctc/*`、`/ai/*`、`/config/*`、\n`/task/*`、`/workflow/*`、`/schedule/*`、`/mist/*`、`/meta/*`、`/msg/*`、`/rpc/*`、`/kb/*`、`/product/*`、`/ops/*` 等前缀。\n\n## 二、导出面\n\n```js\n// 主入口(. 桶):工作台主壳 + 订阅 / 项目域 + 公共设施\nimport ZTeamApp, {SubscribeApp, ProjectApp, history, isTokenExpired, ComponentDocPage}\n from '@yuku123/z-team-component'\n\n// 宿主组装面(./pages 桶):路由清单 + 菜单\nimport {routes, appMeta, menuItems, ComponentDocPage} from '@yuku123/z-team-component/pages'\n```\n\n- `routes`:`/team/subscribe`、`/team/project`、`/team/docs`、`/team/:rest*`(兜底)。\n- `appMeta`:`{ title: 'Z-OPC 一人公司基建', short: 'team' }`。\n- `ComponentDocPage`:组件文档页,**主入口与 `./pages` 桶都具名导出**(名字全仓统一,主壳按这个名字取)。\n\n## 三、API 端点\n\n请求实例由 `src/common/services/api.js` 的 axios 工厂创建:`baseURL = '/api'`(可用 `configureBaseURL()` 改),\n`timeout = 15000`,`withCredentials = true`(**Cookie 模式,不设 Authorization Header**)。\n下表路径是 `src/common/services/`、`src/services/`、`src/subscribe/services/`、`src/project/services/` 里\n**实际调用**的路径(已补上 `/api` 前缀)。\n\n| 方法 | 路径 | 说明 |\n|---|---|---|\n| POST | `/api/ctc/authn/login` | 登录 |\n| GET | `/api/ctc/authn/my-tenants` | 我的租户 |\n| POST | `/api/ctc/authn/select-tenant` | 选择租户 |\n| POST | `/api/ctc/authn/switch-tenant` | 切换租户 |\n| GET | `/api/ctc/app-menu/tree` | 应用菜单树 |\n| GET/POST | `/api/ctc/ac/invitations`、`/accept`、`/redeem`、`/leave` | 邀请(加入 / 兑换 / 退出) |\n| GET/POST | `/api/ctc/ac/invitations/members`、`/members/{memberId}/remove`、`/{id}/revoke` | 邀请成员管理 |\n| GET/POST/PUT/DELETE | `/api/agent/team/workspace`、`/workspace/{id}` | Agent 团队工作区 |\n| GET | `/api/agent/team/workspace/list`、`/file-tree-by-path`、`/file-content` | 工作区列表 / 文件树 / 文件内容 |\n| GET/POST/PUT/DELETE | `/api/agent/team/work-item`、`/work-item/{id}` | 工作项 |\n| GET | `/api/agent/team/conversation/{conversationId}/work-items` | 会话下的工作项 |\n| POST | `/api/agent/skill/register`、`/heartbeat`、`/pull`、`/sync-logs` | 技能注册 / 心跳 / 拉取 / 日志回传 |\n| POST/GET | `/api/agent/skill/bind`、`/unbind`、`/bindings` | 技能绑定 |\n| GET/POST/DELETE | `/api/agent/instance/list`、`/get`、`/create`、`/create-container`、`/create-external`、`/destroy-container`、`/destroy-local-process`、`/agent-types`、`/health`、`/status` | Agent 实例(容器 / 外部 / 本地进程) |\n| POST/GET | `/api/bot/feedback`、`/feedback/recent`、`/feedback/score` | Bot 反馈 |\n| GET | `/api/skill/get`、`/api/skill/page` | 技能查询 |\n| GET/POST | `/api/task`、`/task/list`、`/task/complete`、`/task/move`、`/task/project/list` | 任务 |\n| GET/POST | `/api/project`、`/api/project/archive`、`/api/project/user/list` | 项目 |\n| GET/POST/PUT/DELETE | `/api/mock-platform/{environments,endpoints,scenarios,cases,recordings,...}` | Mock 平台(`z-script-web` 的 `MockPlatformController`) |\n| GET | `/api/{name}/list`、`/api/{name}/page`、`/api/{name}/byId` | 通用 CRUD 工厂(`makeApi(name)`,`src/common/services/api.js`) |\n\n各服务模块另有自己的探活端点(`/api/agentTeam/health`、`/api/ctcAc/health`、`/api/ctcAcDomain/health`、\n`/api/ctcSurl/health`、`/api/ctcUser/health`、`/api/job/health`、`/api/metaApp/health`、\n`/api/privateConfig/health`、`/api/webide/health`)。\n\n## 四、页面说明\n\n### 4.1 工作台(`src/zteam/pages/workspace/`)\n\n工作台是本包最大的域,含 `Layout`(顶栏 + 模式切换 + 内容区)、`ProductWorkbench` / `SmartWorkbench` /\n`DevWorkbench` / `OpsWorkbench` 等工作台壳,以及聊天、笔记、代码编辑、知识图谱等通用组件。\n\n### 4.2 套件聚合壳(`SystemShell`)\n\n工作台的「系统」模式用它把 z-opc 业务页面(账号 / 角色 / 应用 / 租户 / 组织 / 权限 / 短链 / 字典 / 审计 /\nwebide / Agent / LLM / MCP / 技能 / OSS / 任务 / 流程 / 调度 / 密钥 / 运维 等)渲染进工作台右侧内容区,\n而不是回到 z-opc 旧 Layout。\n\n### 4.3 订阅域(`src/subscribe/pages/`)\n\n`SubscribeApp` + `SubscriptionList` / `SubscriptionEdit` / `RunHistory`:订阅的列表、编辑与运行历史。\n\n### 4.4 项目域(`src/project/pages/`)\n\n`ProjectApp` + `ProjectList` / `ProjectCreate` / `ProjectDetail`:项目的列表、创建与详情。\n\n### 4.5 组件文档\n\n本文件。内容以 `?raw` 在编译期内联,零额外请求;左侧 240px TOC 随滚动联动。\n渲染用基座的 `ComponentDoc`(`@yuku123/z-frontend-common/ui`),不在本包重写 TOC / 两栏 / 滚动联动。\n\n## 五、配置\n\n| 配置项 | 默认值 | 说明 |\n|---|---|---|\n| `configureBaseURL(baseURL)` | `'/api'` | 改写 axios `baseURL`(`src/common/services/api.js`) |\n| 请求 `timeout` | `15000` | axios 实例默认值 |\n| `withCredentials` | `true` | Cookie 模式;**不设 Authorization Header** |\n| vite `external` | 25 个精确包 + 4 条前缀规则 | `react` / `react-dom` / `antd` / `@ant-design/icons` / `@yuku123/*` / `@zopc-mock/*` / `echarts/*` / `highlight.js/*` 等一律 external,**消费方必须自备** |\n| vite alias | `@` → `src/`、`@zteam` → `src/zteam/` | 仅 standalone 构建用;打包后路径已解析 |\n| 模式 URL 参数 | `?mode=xxx` | 持久化在 query 上;`collaboration` 是默认值,不写入 URL |\n| `?desktop=1` | — | 强制桌面版工作台(窄视口默认跳 `/workspace/phone`) |\n\n## 六、已知限制\n\n- **`/team/docs` 目前没有可达路径**:主壳 `z-opc-main-starter-frontend/src/domainRoutes.ts` 的 `DOMAINS` 数组里\n **没有注册 z-team 域**(截至 2026-10-23),所以 z-team 的 `routes` 清单还没有被主壳消费。\n ⇒ 需要主控决定是否接线(注册 z-team 域,或在主壳里显式挂 `ComponentDocPage`)。\n- **`ZTeamApp` 内部没有 `/team/docs` 分支**:它按**绝对 pathname** 分发(`/workspace`、`/scenario`、`/docs` …),\n 未知路径兜底渲染工作台。所以即使走了 `/team/:rest*` 兜底路由,`/team/docs` 也会落进工作台而不是文档页。\n (`ZTeamApp` 不在本批次的改动范围内,需要单独接线。)\n- **已有另一个「文档页」**:`src/zteam/pages/docs/index.tsx` 是 52KB 的手写暗色主题**操作手册**页,\n 路由是 `/docs`。它与本 §7 的**组件文档页**不是一回事(内容、样式、来源都不同),别混淆。\n- **本仓没有 `tsconfig.json`,构建不做类型检查**(`npm run build` = `vite build` + 产物守卫脚本)。\n 基座只发 JS 不发 `.d.ts`,`src/z-frontend-common-ui.d.ts` 是手写的最小声明;\n 新增基座组件时要同步补声明(当前该声明文件里**还没有** `ComponentDoc`,因为本包的文档页走的是 `.jsx`,不参与类型检查)。\n- **组件包必须 external 基座**:`@yuku123/z-frontend-common/ui` 在 dist 里保持裸 import,\n 消费方(主壳)必须自己装基座,否则会出现两份 UI 主题。\n- **工作台下的部分工作台壳仍在改造中**(`ProductWorkbench` / `SmartWorkbench` 等),页面结构可能继续变,\n 本文档只描述到「域 + 顶层路由 + 模式」这一层,域内二级页面未逐页展开。\n- **请求是 Cookie 模式**:后端 `SsoInterceptor` 靠 `Accept` / `Content-Type` 判断「是不是 API 请求」,\n 裸 `fetch` 不带 `Accept` 会被当成页面访问而 302 跳登录页(构建产物有 `guard-fetch-accept.mjs` 守卫)。\n\n## 七、变更记录\n\n| 版本 | 变更 |\n|---|---|\n| 0.2.96 | 协作壳本地车道(合并第 3 步):`hooks/useLocalLane.ts`(30s 轮询 + web 隧道 / Tauri 直连),Sidebar 单聊分区并列「本机任务」组(`ft_exclusive_force_desktop=1` 浏览器可验桌面链路),CollabPersonalHost chat 视图按 lane 渲染 LocalChatArea / PersonalChatArea |\n| 0.2.93 | 顶部「个人」tab 下线(协作侧栏单聊分区已承载个人会话);RPA 前端入口整体下线(ChatMode 移除 rpa / Layout tab 分支 / `/rpa/*` 路由 → 主壳重定向 `/workspace`;RpaShell 与 `pages/rpa/` 删除),执行能力留在脚本中心 |\n| 0.2.30(未发布) | 新增组件文档页 `ComponentDocPage`(lead 008 §7):`src/DOC.md` + 基座 `ComponentDoc` 薄包装 + 菜单末项 `/team/docs` |\n| 0.2.30 | 工作台模式体系(13 种 `ChatMode`)+ `SystemShell` 套件聚合 + 订阅 / 项目双域 |\n";
7805
- function Sl() {
7796
+ function bl() {
7806
7797
  return /* @__PURE__ */ a(zr, { markdown: _o, title: "组件文档 — Z-OPC 一人公司基建" });
7807
7798
  }
7808
7799
  export {
7809
- Bt as $,
7800
+ Ko as $,
7810
7801
  ls as A,
7811
7802
  Te as B,
7812
- Sl as C,
7803
+ bl as C,
7813
7804
  No as D,
7814
- il as E,
7815
- cl as F,
7816
- fl as G,
7805
+ ol as E,
7806
+ il as F,
7807
+ hl as G,
7817
7808
  Jt as H,
7818
7809
  Vt as I,
7819
- hl as J,
7820
- ul as K,
7810
+ ml as J,
7811
+ dl as K,
7821
7812
  Ya as L,
7822
7813
  Qa as M,
7823
7814
  Ja as N,
7824
- yl as O,
7815
+ fl as O,
7825
7816
  wo as P,
7826
7817
  Wa as Q,
7827
7818
  Za as R,
@@ -7830,22 +7821,22 @@ export {
7830
7821
  nn as U,
7831
7822
  H as V,
7832
7823
  Da as W,
7833
- Ho as X,
7834
- Qr as Y,
7835
- ll as Z,
7836
- Ko as _,
7824
+ Ta as X,
7825
+ Ho as Y,
7826
+ cl as Z,
7827
+ Qr as _,
7837
7828
  ke as a,
7838
- Zc as a$,
7839
- Qc as a0,
7829
+ Wc as a$,
7830
+ Bt as a0,
7840
7831
  Yc as a1,
7841
- Ta as a2,
7842
- ol as a3,
7843
- gi as a4,
7832
+ Xc as a2,
7833
+ al as a3,
7834
+ yi as a4,
7844
7835
  os as a5,
7845
- dc as a6,
7836
+ lc as a6,
7846
7837
  ii as a7,
7847
- nc as a8,
7848
- oc as a9,
7838
+ tc as a8,
7839
+ ac as a9,
7849
7840
  yn as aA,
7850
7841
  Sa as aB,
7851
7842
  ei as aC,
@@ -7853,110 +7844,110 @@ export {
7853
7844
  Rs as aE,
7854
7845
  Ro as aF,
7855
7846
  Kt as aG,
7856
- Xi as aH,
7857
- Qi as aI,
7858
- Yi as aJ,
7847
+ Zi as aH,
7848
+ Yi as aI,
7849
+ Xi as aJ,
7859
7850
  Ke as aK,
7860
7851
  ca as aL,
7861
7852
  cr as aM,
7862
7853
  qo as aN,
7863
- tl as aO,
7864
- rl as aP,
7865
- al as aQ,
7866
- sl as aR,
7854
+ el as aO,
7855
+ nl as aP,
7856
+ sl as aQ,
7857
+ rl as aR,
7867
7858
  Do as aS,
7868
7859
  Fo as aT,
7869
7860
  Uo as aU,
7870
7861
  zo as aV,
7871
7862
  Lo as aW,
7872
7863
  ar as aX,
7873
- Kc as aY,
7874
- Jc as aZ,
7864
+ Hc as aY,
7865
+ Gc as aZ,
7875
7866
  ua as a_,
7876
7867
  Bo as aa,
7877
- Di as ab,
7878
- zi as ac,
7868
+ Li as ab,
7869
+ Ui as ac,
7879
7870
  pi as ad,
7880
- Mi as ae,
7881
- ji as af,
7882
- vi as ag,
7883
- Li as ah,
7871
+ Oi as ae,
7872
+ Mi as af,
7873
+ xi as ag,
7874
+ zi as ah,
7884
7875
  ti as ai,
7885
- ec as aj,
7886
- Oi as ak,
7887
- $i as al,
7876
+ Qi as aj,
7877
+ Ri as ak,
7878
+ Ai as al,
7888
7879
  Kr as am,
7889
- uc as an,
7880
+ dc as an,
7890
7881
  Ct as ao,
7891
7882
  as as ap,
7892
- xi as aq,
7893
- ac as ar,
7883
+ $i as aq,
7884
+ sc as ar,
7894
7885
  Yo as as,
7895
7886
  Xo as at,
7896
7887
  Qo as au,
7897
- Ei as av,
7898
- Lc as aw,
7888
+ Pi as av,
7889
+ zc as aw,
7899
7890
  di as ax,
7900
7891
  at as ay,
7901
7892
  _t as az,
7902
7893
  Ie as b,
7903
- Nc as b$,
7904
- Wc as b0,
7894
+ jc as b$,
7895
+ Vc as b0,
7905
7896
  Oo as b1,
7906
7897
  b as b2,
7907
- Dc as b3,
7908
- Gc as b4,
7909
- Hc as b5,
7898
+ Lc as b3,
7899
+ Kc as b4,
7900
+ Bc as b5,
7910
7901
  Ye as b6,
7911
7902
  Ft as b7,
7912
- Vc as b8,
7913
- qc as b9,
7903
+ Jc as b8,
7904
+ Fc as b9,
7914
7905
  ci as bA,
7915
7906
  dn as bB,
7916
7907
  qr as bC,
7917
- Fi as bD,
7918
- qi as bE,
7919
- ic as bF,
7920
- bi as bG,
7921
- wi as bH,
7922
- Si as bI,
7908
+ Di as bD,
7909
+ Fi as bE,
7910
+ oc as bF,
7911
+ gi as bG,
7912
+ Si as bH,
7913
+ bi as bI,
7923
7914
  Go as bJ,
7924
- fc as bK,
7925
- hc as bL,
7926
- Sc as bM,
7927
- bc as bN,
7928
- gc as bO,
7929
- wc as bP,
7915
+ hc as bK,
7916
+ mc as bL,
7917
+ bc as bM,
7918
+ gc as bN,
7919
+ yc as bO,
7920
+ Sc as bP,
7930
7921
  Jo as bQ,
7931
7922
  Vo as bR,
7932
- yc as bS,
7933
- _c as bT,
7934
- Tc as bU,
7935
- _i as bV,
7936
- Ti as bW,
7937
- ki as bX,
7938
- Oc as bY,
7939
- Mc as bZ,
7940
- jc as b_,
7941
- Bc as ba,
7942
- Fc as bb,
7943
- Xc as bc,
7923
+ fc as bS,
7924
+ wc as bT,
7925
+ _c as bU,
7926
+ wi as bV,
7927
+ _i as bW,
7928
+ Ti as bX,
7929
+ Rc as bY,
7930
+ Oc as bZ,
7931
+ Mc as b_,
7932
+ qc as ba,
7933
+ Dc as bb,
7934
+ Zc as bc,
7944
7935
  rr as bd,
7945
7936
  At as be,
7946
- pc as bf,
7947
- mc as bg,
7937
+ uc as bf,
7938
+ pc as bg,
7948
7939
  Cs as bh,
7949
7940
  ri as bi,
7950
- el as bj,
7951
- f as bk,
7941
+ Qc as bj,
7942
+ y as bk,
7952
7943
  fn as bl,
7953
7944
  fs as bm,
7954
7945
  Yr as bn,
7955
- lc as bo,
7956
- Gi as bp,
7946
+ cc as bo,
7947
+ Ki as bp,
7957
7948
  oi as bq,
7958
- sc as br,
7959
- nl as bs,
7949
+ rc as br,
7950
+ tl as bs,
7960
7951
  er as bt,
7961
7952
  jo as bu,
7962
7953
  mi as bv,
@@ -7965,33 +7956,32 @@ export {
7965
7956
  ui as by,
7966
7957
  li as bz,
7967
7958
  qt as c,
7968
- Uc as c0,
7969
- zc as c1,
7970
- Rc as c2,
7971
- Ec as c3,
7972
- Wi as c4,
7973
- Ji as c5,
7974
- Vi as c6,
7975
- Ci as c7,
7976
- Ii as c8,
7977
- Zi as c9,
7978
- tc as ca,
7979
- Pc as cb,
7980
- kc as cc,
7981
- Cc as cd,
7982
- Ic as ce,
7983
- Ac as cf,
7984
- $c as cg,
7985
- vc as ch,
7986
- xc as ci,
7987
- yi as cj,
7988
- Bi as ck,
7989
- rc as cl,
7990
- cc as cm,
7991
- pl as cn,
7959
+ Nc as c0,
7960
+ Uc as c1,
7961
+ Ec as c2,
7962
+ Pc as c3,
7963
+ Vi as c4,
7964
+ Gi as c5,
7965
+ Ji as c6,
7966
+ Ii as c7,
7967
+ ki as c8,
7968
+ Wi as c9,
7969
+ ec as ca,
7970
+ vc as cb,
7971
+ Tc as cc,
7972
+ Ic as cd,
7973
+ kc as ce,
7974
+ Cc as cf,
7975
+ Ac as cg,
7976
+ xc as ch,
7977
+ $c as ci,
7978
+ qi as cj,
7979
+ nc as ck,
7980
+ ic as cl,
7981
+ ul as cm,
7982
+ yl as cn,
7992
7983
  gl as co,
7993
- bl as cp,
7994
- dl as d,
7984
+ ll as d,
7995
7985
  we as e,
7996
7986
  ge as f,
7997
7987
  Yn as g,
@@ -7999,19 +7989,19 @@ export {
7999
7989
  Na as i,
8000
7990
  ni as j,
8001
7991
  Zo as k,
8002
- Hi as l,
8003
- Ki as m,
7992
+ Bi as l,
7993
+ Hi as m,
8004
7994
  he as n,
8005
- Ai as o,
7995
+ Ci as o,
8006
7996
  si as p,
8007
- Ri as q,
7997
+ Ei as q,
8008
7998
  Fr as r,
8009
7999
  st as s,
8010
8000
  q as t,
8011
8001
  In as u,
8012
- Ui as v,
8002
+ Ni as v,
8013
8003
  oe as w,
8014
- Ni as x,
8015
- Pi as y,
8004
+ ji as x,
8005
+ vi as y,
8016
8006
  Wo as z
8017
8007
  };