@yuku123/z-team-component 0.2.6 → 0.2.8

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 (29) hide show
  1. package/dist/{InvitationManagementPage-BVBwdTi0.js → InvitationManagementPage-DEBZvFZU.js} +2 -2
  2. package/dist/{LowCodePage-DH-DYM7K.js → LowCodePage-yemTBcZ4.js} +1 -1
  3. package/dist/{OnboardingPage-Cy2YU_Og.js → OnboardingPage-Bi3S5eug.js} +2 -2
  4. package/dist/{ProjectApp-YRqDFopZ.js → ProjectApp-9qtrgr7d.js} +154 -168
  5. package/dist/admin-logs-BIRWnOwM.js +254 -0
  6. package/dist/api-3Ur1kq2A.js +2049 -0
  7. package/dist/{api-B6evTauY.js → api-B2d2enyL.js} +1 -1
  8. package/dist/{createWorkspaceWsHandler-DrV9AaO7.js → createWorkspaceWsHandler-CSAGqlPX.js} +3568 -3269
  9. package/dist/{index-l8P_AuvD.js → index-BIVN--Bi.js} +1 -1
  10. package/dist/index-B_YVSwmJ.js +11710 -0
  11. package/dist/{index-DM_AMiPz.js → index-C6SfK489.js} +36 -35
  12. package/dist/{index-BK9rSfN3.js → index-C8uSn9eX.js} +10 -10
  13. package/dist/{index-CuuZlPvb.js → index-CPUeMpa8.js} +4 -4
  14. package/dist/{index-CHSnuHux.js → index-Cml0C09P.js} +12241 -23651
  15. package/dist/{index-Bw02b5qJ.js → index-CsCPAoPb.js} +14819 -13930
  16. package/dist/{index-DYXWNyaR.js → index-D3DF6vFc.js} +17 -17
  17. package/dist/{index-D-oG0ReT.js → index-DMEjkEMq.js} +3 -3
  18. package/dist/{index-D_SjmsjB.js → index-DNyYOedu.js} +4 -4
  19. package/dist/{index-Bh5PFiY9.js → index-wXqXyXmm.js} +33 -32
  20. package/dist/index.js +1 -1
  21. package/dist/instance-ClduEMxs.js +215 -0
  22. package/dist/pages.js +1 -1
  23. package/dist/{send-default-agent-team-message-DxD_vD7Z.js → send-default-agent-team-message-B3Qon0X2.js} +1 -1
  24. package/dist/{sso-user-D1eNVXkY.js → sso-user-BOEGMUJA.js} +1 -1
  25. package/dist/{useAppStore-C12Ala1u.js → useAppStore-D8PnbXea.js} +1 -1
  26. package/dist/z-team-component.css +2 -2
  27. package/package.json +4 -1
  28. package/dist/api-W2_U7Nxd.js +0 -3866
  29. package/dist/ctc-signout-C_dAvsu5.js +0 -9
@@ -1,17 +1,17 @@
1
1
  import { jsx as t, jsxs as l } from "react/jsx-runtime";
2
2
  import { f as ie, r as z } from "./ctc-sso-C-QWy9F8.js";
3
- import { r as ne, h as X, s as oe } from "./sso-user-D1eNVXkY.js";
3
+ import { r as ne, h as X, s as oe } from "./sso-user-BOEGMUJA.js";
4
4
  import { CheckCircleFilled as le, QuestionCircleOutlined as ce, CloseOutlined as me } from "@ant-design/icons";
5
5
  import { message as k, Result as de, Button as D, Spin as G, Input as ue, Image as fe } from "antd";
6
6
  import pe from "query-string";
7
- import { useState as f, useRef as Y, useMemo as K, useCallback as v, useEffect as V } from "react";
7
+ import { useState as f, useRef as Y, useMemo as K, useCallback as w, useEffect as V } from "react";
8
8
  import { useLocation as ge } from "react-router-dom";
9
9
  import { h as W } from "./history-BlrA1eaW.js";
10
- import { w as he, e as be, g as _e } from "./api-W2_U7Nxd.js";
11
- import { u as c } from "./useAppStore-C12Ala1u.js";
10
+ import { v as he, g as be, h as _e } from "./api-3Ur1kq2A.js";
11
+ import { u as c } from "./useAppStore-D8PnbXea.js";
12
12
  /* empty css */
13
13
  import { b as ye } from "./mobile-client-O3yr9h6t.js";
14
- import { a as we, s as ve } from "./send-default-agent-team-message-DxD_vD7Z.js";
14
+ import { a as ve, s as we } from "./send-default-agent-team-message-B3Qon0X2.js";
15
15
  const Ne = 5e3, E = 9, Ce = 10 * 1024 * 1024, Se = /^image\//i, Ie = /\.(png|jpe?g|gif|bmp|webp)$/i;
16
16
  function Pe(a) {
17
17
  return a.type && Se.test(a.type) ? !0 : Ie.test(a.name || "");
@@ -49,7 +49,7 @@ function De() {
49
49
  m.scenarioCode ?? m.scenario_code ?? ""
50
50
  ).trim(), p = c((e) => e.expandProject), d = c((e) => e.updateCurrentUser), [N, H] = f(!1), [_, Z] = f(""), [y, U] = f([]), [M, R] = f("form"), [T, j] = f(""), [A, g] = f("正在登录…"), [B, F] = f([]), P = Y(!1), x = Y(y);
51
51
  x.current = y;
52
- const C = K(() => o ? "" : "缺少参数 scenarioCode", [o]), S = v((e, r) => {
52
+ const C = K(() => o ? "" : "缺少参数 scenarioCode", [o]), S = w((e, r) => {
53
53
  F((n) => [...n, e]), g(r);
54
54
  }, []), ee = (e) => new Promise((r) => {
55
55
  window.setTimeout(r, e);
@@ -60,7 +60,7 @@ function De() {
60
60
  let e = !1, r = 0;
61
61
  const n = 100;
62
62
  let i = !1, s = 0;
63
- const w = 3;
63
+ const v = 3;
64
64
  return (() => {
65
65
  if (e)
66
66
  return;
@@ -91,7 +91,7 @@ function De() {
91
91
  }
92
92
  return;
93
93
  }
94
- if (s >= w) {
94
+ if (s >= v) {
95
95
  z();
96
96
  return;
97
97
  }
@@ -106,7 +106,7 @@ function De() {
106
106
  e = !0;
107
107
  };
108
108
  }, [C, d]);
109
- const te = v(
109
+ const te = w(
110
110
  async (e, r) => {
111
111
  if (P.current)
112
112
  return;
@@ -115,10 +115,10 @@ function De() {
115
115
  try {
116
116
  let s = [];
117
117
  r.length > 0 && (g("正在上传图片…"), s = await he(r));
118
- const w = we(e, s), I = await be(
118
+ const v = ve(e, s), I = await be(
119
119
  {
120
120
  name: n,
121
- description: w,
121
+ description: v,
122
122
  workspace_path: n,
123
123
  scenario_code: o
124
124
  },
@@ -130,7 +130,7 @@ function De() {
130
130
  String(u.currentProject.id),
131
131
  u.projectSwitchSeq,
132
132
  !1
133
- ), S("协作区已就绪", "正在发送协作消息…"), await ve(
133
+ ), S("协作区已就绪", "正在发送协作消息…"), await we(
134
134
  I.id,
135
135
  e,
136
136
  i,
@@ -144,12 +144,12 @@ function De() {
144
144
  );
145
145
  } catch (s) {
146
146
  P.current = !1, R("form");
147
- const w = s instanceof Error ? s.message : String(s);
148
- j(w || "创建工程失败");
147
+ const v = s instanceof Error ? s.message : String(s);
148
+ j(v || "创建工程失败");
149
149
  }
150
150
  },
151
151
  [S, p, a.search, o]
152
- ), L = v((e) => {
152
+ ), L = w((e) => {
153
153
  e.length && U((r) => {
154
154
  const n = E - r.length;
155
155
  if (n <= 0)
@@ -168,7 +168,7 @@ function De() {
168
168
  }
169
169
  return i;
170
170
  });
171
- }, []), re = v((e) => {
171
+ }, []), re = w((e) => {
172
172
  U((r) => {
173
173
  const n = r.find((i) => i.id === e);
174
174
  return n && Q(n), r.filter((i) => i.id !== e);
@@ -177,7 +177,7 @@ function De() {
177
177
  V(() => () => {
178
178
  x.current.forEach(Q);
179
179
  }, []);
180
- const ae = v(
180
+ const ae = w(
181
181
  (e) => {
182
182
  const r = ke(e.clipboardData);
183
183
  r.length > 0 && (e.preventDefault(), L(r));
@@ -1,14 +1,14 @@
1
1
  import { jsx as s, jsxs as C } from "react/jsx-runtime";
2
2
  import { f as z, r as v } from "./ctc-sso-C-QWy9F8.js";
3
- import { r as L, h as N, s as T } from "./sso-user-D1eNVXkY.js";
3
+ import { r as L, h as N, s as T } from "./sso-user-BOEGMUJA.js";
4
4
  import { CheckCircleFilled as q } from "@ant-design/icons";
5
5
  import { Spin as R } from "antd";
6
6
  import W from "query-string";
7
7
  import { useMemo as P, useState as p, useCallback as A, useEffect as U } from "react";
8
8
  import { useLocation as F } from "react-router-dom";
9
9
  import { h as H } from "./history-BlrA1eaW.js";
10
- import { c as Y, g as B } from "./api-W2_U7Nxd.js";
11
- import { u as m } from "./useAppStore-C12Ala1u.js";
10
+ import { c as Y, h as B } from "./api-3Ur1kq2A.js";
11
+ import { u as m } from "./useAppStore-D8PnbXea.js";
12
12
  /* empty css */
13
13
  import { b as G } from "./mobile-client-O3yr9h6t.js";
14
14
  function ne() {
@@ -1,12 +1,12 @@
1
1
  import { AppLayout as j, ErrorBoundary as v, LoginPage as H, StatusTag as K, defaultStatusMap as _ } from "@yuku123/z-frontend-common";
2
- import { a as T } from "./ProjectApp-YRqDFopZ.js";
3
- import { C as F, E as J, d as Q, L as X, c as Y, M as Z, e as $, f as ee, O as te, g as ae, R as oe, h as re, j as ie, k as le, l as ne, r as se, r as de, s as ce } from "./ProjectApp-YRqDFopZ.js";
2
+ import { a as T } from "./ProjectApp-9qtrgr7d.js";
3
+ import { C as F, E as J, d as Q, L as X, c as Y, M as Z, e as $, f as ee, O as te, g as ae, R as oe, h as re, j as ie, k as le, l as ne, r as se, r as de, s as ce } from "./ProjectApp-9qtrgr7d.js";
4
4
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
5
5
  import { useState as l, useEffect as y } from "react";
6
6
  import { Card as g, Alert as x, Table as h, Spin as I, Empty as f, Space as R, Button as s, Tag as c } from "antd";
7
7
  import { ReloadOutlined as w, UserAddOutlined as E, TeamOutlined as b, PlusOutlined as M, CodeOutlined as O } from "@ant-design/icons";
8
- import { default as pe } from "./LowCodePage-DH-DYM7K.js";
9
- import { D as ge } from "./index-CHSnuHux.js";
8
+ import { default as pe } from "./LowCodePage-yemTBcZ4.js";
9
+ import { D as ge } from "./index-Cml0C09P.js";
10
10
  const G = T, S = {
11
11
  LEADER: "red",
12
12
  WORKER: "blue",
@@ -1,25 +1,26 @@
1
1
  import { jsx as c, jsxs as _ } from "react/jsx-runtime";
2
- import { i as $, t as x, a as O, j as v, f as F, p as b, c as D, b as R, u as U, d as B } from "./api-W2_U7Nxd.js";
3
- import { CheckCircleFilled as q } from "@ant-design/icons";
4
- import { Result as A, Button as J, Spin as W } from "antd";
5
- import Z from "query-string";
6
- import { useMemo as j, useState as f, useRef as z, useCallback as H, useEffect as L } from "react";
7
- import { useLocation as M } from "react-router-dom";
2
+ import { i as $, t as x, p as O, c as v, u as F } from "./api-3Ur1kq2A.js";
3
+ import { CheckCircleFilled as b } from "@ant-design/icons";
4
+ import { Result as D, Button as R, Spin as U } from "antd";
5
+ import B from "query-string";
6
+ import { useMemo as j, useState as f, useRef as q, useCallback as A, useEffect as J } from "react";
7
+ import { useLocation as W } from "react-router-dom";
8
8
  import { h as y } from "./history-BlrA1eaW.js";
9
- import { u as w } from "./useAppStore-C12Ala1u.js";
9
+ import { l as Z, j as z, f as H, b as L, p as M } from "./instance-ClduEMxs.js";
10
+ import { u as w } from "./useAppStore-D8PnbXea.js";
10
11
  import { b as N } from "./mobile-client-O3yr9h6t.js";
11
- function nt() {
12
- const m = M(), p = Z.parse(m.search), o = String(
12
+ function ct() {
13
+ const m = W(), p = B.parse(m.search), o = String(
13
14
  p.projectId ?? p.project_id ?? ""
14
15
  ).trim(), a = String(p.ticketId ?? p.ticket_id ?? "").trim(), e = j(() => {
15
16
  if (!o)
16
17
  return null;
17
18
  const t = x(o);
18
19
  return $(t) ? t : null;
19
- }, [o]), u = w((t) => t.token), T = w((t) => t.expandProject), [h, l] = f(""), [P, n] = f("正在启动…"), [k, C] = f([]), g = z(!1), s = H((t, r) => {
20
- C((i) => [...i, t]), n(r);
20
+ }, [o]), u = w((t) => t.token), T = w((t) => t.expandProject), [h, l] = f(""), [P, n] = f("正在启动…"), [k, C] = f([]), g = q(!1), i = A((t, r) => {
21
+ C((s) => [...s, t]), n(r);
21
22
  }, []), I = async (t) => {
22
- s("协作区已就绪", "正在同步工程列表…"), await T(t), s("工作区已准备", "即将进入工作台…"), y.replace(
23
+ i("协作区已就绪", "正在同步工程列表…"), await T(t), i("工作区已准备", "即将进入工作台…"), y.replace(
23
24
  N({
24
25
  projectId: t.id,
25
26
  search: m.search
@@ -27,38 +28,38 @@ function nt() {
27
28
  );
28
29
  }, d = async (t) => {
29
30
  n("正在确认工程信息…");
30
- const r = await O(t, u);
31
+ const r = await Z(t, u);
31
32
  if (r.status === "NOT_FOUND" || !r.scenarioInstance)
32
33
  throw new Error("PROJECT_NOT_FOUND");
33
34
  n("正在加入协作区…");
34
- const i = await v(t, u);
35
- s("已加入协作区", "正在打开协作区…"), await I(i);
35
+ const s = await z(t, u);
36
+ i("已加入协作区", "正在打开协作区…"), await I(s);
36
37
  }, E = async () => {
37
38
  n("正在检查工单信息…");
38
- const t = await F(a);
39
- s("工单信息已获取", "正在解析工程绑定…");
40
- const r = b(t);
39
+ const t = await H(a);
40
+ i("工单信息已获取", "正在解析工程绑定…");
41
+ const r = O(t);
41
42
  if (r != null) {
42
- s("已定位协作区", `正在打开协作区 ${r}…`), await d(r);
43
+ i("已定位协作区", `正在打开协作区 ${r}…`), await d(r);
43
44
  return;
44
45
  }
45
46
  n("正在初始化工程…");
46
- const i = await D(
47
- R(t, a),
47
+ const s = await v(
48
+ L(t, a),
48
49
  u
49
50
  );
50
51
  n("正在关联工单…");
51
52
  try {
52
- await U(
53
+ await F(
53
54
  a,
54
- i.id,
55
- B(t)
55
+ s.id,
56
+ M(t)
56
57
  );
57
58
  } catch {
58
59
  }
59
- n("正在初始化工作区…"), await I(i);
60
+ n("正在初始化工作区…"), await I(s);
60
61
  };
61
- L(() => {
62
+ J(() => {
62
63
  if (!g.current) {
63
64
  if (g.current = !0, o && e == null) {
64
65
  l("projectId 无效,请传入正整数");
@@ -101,16 +102,16 @@ function nt() {
101
102
  }
102
103
  })();
103
104
  }
104
- }, [s, e, o, a, u]);
105
+ }, [i, e, o, a, u]);
105
106
  const S = j(() => e != null && a ? `工单 ${a} · 工程 ${e}` : e != null ? `工程 ${e}` : a ? `工单 ${a}` : "", [e, a]);
106
107
  return h ? /* @__PURE__ */ c("div", { className: "from-ticket-page", children: /* @__PURE__ */ c(
107
- A,
108
+ D,
108
109
  {
109
110
  status: "error",
110
111
  title: "无法打开工程",
111
112
  subTitle: h,
112
113
  extra: /* @__PURE__ */ c(
113
- J,
114
+ R,
114
115
  {
115
116
  type: "primary",
116
117
  onClick: () => y.replace(
@@ -121,7 +122,7 @@ function nt() {
121
122
  )
122
123
  }
123
124
  ) }) : /* @__PURE__ */ c("div", { className: "from-ticket-page", children: /* @__PURE__ */ _("div", { className: "from-ticket-page__panel", children: [
124
- /* @__PURE__ */ c(W, { size: "large" }),
125
+ /* @__PURE__ */ c(U, { size: "large" }),
125
126
  /* @__PURE__ */ c("p", { className: "from-ticket-page__step", children: P }),
126
127
  S ? /* @__PURE__ */ c("p", { className: "from-ticket-page__hint", children: S }) : null,
127
128
  k.length > 0 ? /* @__PURE__ */ c("ul", { className: "from-ticket-page__done-list", children: k.filter((t) => t.trim().length > 0).map((t, r) => /* @__PURE__ */ _(
@@ -129,7 +130,7 @@ function nt() {
129
130
  {
130
131
  className: "from-ticket-page__done-item",
131
132
  children: [
132
- /* @__PURE__ */ c(q, { className: "from-ticket-page__done-icon" }),
133
+ /* @__PURE__ */ c(b, { className: "from-ticket-page__done-icon" }),
133
134
  /* @__PURE__ */ c("span", { children: t })
134
135
  ]
135
136
  },
@@ -138,5 +139,5 @@ function nt() {
138
139
  ] }) });
139
140
  }
140
141
  export {
141
- nt as default
142
+ ct as default
142
143
  };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P as s, S as e, Z as o, i as a } from "./ProjectApp-YRqDFopZ.js";
1
+ import { P as s, S as e, Z as o, i as a } from "./ProjectApp-9qtrgr7d.js";
2
2
  import { h as t } from "./history-BlrA1eaW.js";
3
3
  export {
4
4
  s as ProjectApp,
@@ -0,0 +1,215 @@
1
+ import { a as p, b as f, d as o, e as r, f as l, B as c } from "./api-3Ur1kq2A.js";
2
+ async function C(e, n = "") {
3
+ const t = new URLSearchParams();
4
+ n && t.set("token", n), e.scenario_code && t.set("scenario_code", e.scenario_code), e.status && t.set("status", e.status), e.name && t.set("name", e.name), e.role && t.set("role", e.role), e.create_time_start && t.set("create_time_start", e.create_time_start), e.create_time_end && t.set("create_time_end", e.create_time_end), t.set("page", String(e.page ?? 1)), t.set("size", String(e.size ?? 20));
5
+ const s = await r(
6
+ `${c}/scenario-instances/page?${t.toString()}`,
7
+ l
8
+ );
9
+ return o(s, "获取工作项列表失败");
10
+ }
11
+ function u(e) {
12
+ return {
13
+ id: String(e.id),
14
+ name: String(e.name ?? ""),
15
+ description: String(e.description ?? ""),
16
+ workspace_path: String(e.workspace_path ?? e.workspacePath ?? ""),
17
+ status: String(e.status ?? "ACTIVE"),
18
+ created_at: String(e.created_at ?? e.createdAt ?? ""),
19
+ mode: e.mode != null ? String(e.mode) : void 0,
20
+ scenario_id: e.scenario_id != null ? String(e.scenario_id) : e.scenarioId != null ? String(e.scenarioId) : void 0,
21
+ scenario_code: e.scenario_code != null ? String(e.scenario_code) : e.scenarioCode != null ? String(e.scenarioCode) : void 0,
22
+ scenario_name: e.scenario_name != null ? String(e.scenario_name) : e.scenarioName != null ? String(e.scenarioName) : void 0,
23
+ role: e.role != null ? String(e.role) : void 0,
24
+ llm_code: e.llm_code != null ? String(e.llm_code) : e.llmCode != null ? String(e.llmCode) : void 0,
25
+ close_feedback: m(e, "close_feedback"),
26
+ close_tags: m(e, "close_tags"),
27
+ close_time: m(e, "close_time"),
28
+ close_user: m(e, "close_user"),
29
+ members: Array.isArray(e.members) ? e.members.map((n) => String(n)) : void 0,
30
+ parent_id: g(e)
31
+ };
32
+ }
33
+ function m(e, n) {
34
+ const t = n.replace(/_([a-z])/g, (d, _) => _.toUpperCase());
35
+ if (e[n] != null) return e[n];
36
+ if (e[t] != null) return e[t];
37
+ const s = e.close_info ?? e.closeInfo;
38
+ if (s) {
39
+ if (s[n] != null) return s[n];
40
+ if (s[t] != null) return s[t];
41
+ }
42
+ const a = e.ext;
43
+ if (!a) return;
44
+ const i = a.params;
45
+ if (i)
46
+ return i[n] ?? void 0;
47
+ }
48
+ function g(e) {
49
+ const n = e.ext;
50
+ if (!n) return;
51
+ const t = n.params;
52
+ if (!t) return;
53
+ const s = t.parent_id;
54
+ if (s == null) return;
55
+ const a = s === "" ? "" : String(s);
56
+ return a === "" ? void 0 : a;
57
+ }
58
+ async function T(e) {
59
+ const n = await r(
60
+ `${c}/scenario-instances/${e}/models`
61
+ );
62
+ return await o(n, "获取模型列表失败") ?? [];
63
+ }
64
+ const S = "develop_brain_scenario";
65
+ async function v(e) {
66
+ const n = await p(f(e), {
67
+ method: "GET"
68
+ });
69
+ return o(n, "获取工单信息失败");
70
+ }
71
+ function U(e) {
72
+ return String(e.currentStage ?? e.current_stage ?? "").trim();
73
+ }
74
+ function h(e) {
75
+ const n = e.trim().replace(/[/\\:*?"<>|]/g, "_");
76
+ return n.length > 0 ? n.slice(0, 80) : "workspace";
77
+ }
78
+ function b(e, n) {
79
+ var i;
80
+ const t = e.requirementTitle && e.requirementTitle.trim() || n, s = { ticket_id: n }, a = (i = e.foneUrl) == null ? void 0 : i.trim();
81
+ return a && (s.work_order_url = a), {
82
+ name: t,
83
+ description: `ticket_id_${n}_${t}`,
84
+ workspace_path: h(t),
85
+ scenario_code: S,
86
+ extend_params: s
87
+ };
88
+ }
89
+ async function $(e, n = "") {
90
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await r(
91
+ `${c}/scenario-instances/${e}${t}`,
92
+ l
93
+ ), a = await o(s, "获取项目失败"), i = a.status === "FOUND" ? "FOUND" : "NOT_FOUND", d = a.scenario_instance ?? a.scenarioInstance ?? null;
94
+ return {
95
+ status: i,
96
+ scenarioInstance: d ? u(d) : null
97
+ };
98
+ }
99
+ async function k(e, n = "") {
100
+ const t = await $(e, n);
101
+ if (t.status === "NOT_FOUND" || !t.scenarioInstance)
102
+ throw {
103
+ _apiUserError: !0,
104
+ userMessage: "项目不存在",
105
+ message: "项目不存在"
106
+ };
107
+ return t.scenarioInstance;
108
+ }
109
+ async function y(e, n = "") {
110
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await r(
111
+ `${c}/scenario-instances/${e}/join-self${t}`,
112
+ {
113
+ ...l,
114
+ method: "POST"
115
+ }
116
+ ), a = await o(s, "加入工程失败");
117
+ return u(a);
118
+ }
119
+ async function A(e = "") {
120
+ const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await r(`${c}/self-support${n}`, l), s = await o(t, "获取自身答疑群组失败"), a = Number(s.scenario_instance_id ?? 0);
121
+ if (!Number.isFinite(a) || a <= 0)
122
+ throw {
123
+ _apiUserError: !0,
124
+ userMessage: "自身答疑群组无效",
125
+ message: "自身答疑群组无效"
126
+ };
127
+ return {
128
+ scenario_instance_id: a,
129
+ name: String(s.name ?? "Future-Team 自身答疑"),
130
+ scenario_code: String(s.scenario_code ?? "qa_support"),
131
+ workspace_path: String(s.workspace_path ?? ""),
132
+ status: String(s.status ?? "ACTIVE")
133
+ };
134
+ }
135
+ async function N(e, n = "") {
136
+ const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await r(
137
+ `${c}/scenario-instances/${e}/forks${t}`,
138
+ l
139
+ ), a = await o(s, "获取 Fork 列表失败");
140
+ return (Array.isArray(a) ? a : []).map(
141
+ (d) => u(d)
142
+ );
143
+ }
144
+ async function O(e) {
145
+ const n = await r(
146
+ `${c}/scenario-instances/${e}/close-feedback-tags`,
147
+ {
148
+ ...l,
149
+ method: "GET"
150
+ }
151
+ );
152
+ return await o(n, "获取关单标签失败");
153
+ }
154
+ async function P(e) {
155
+ const n = await r(`${c}/scenario-instances/${e}/reopen`, {
156
+ ...l,
157
+ method: "POST",
158
+ headers: { "Content-Type": "application/json" }
159
+ }), t = await o(n, "重新开启失败");
160
+ return u(t);
161
+ }
162
+ async function F(e, n) {
163
+ const t = await r(`${c}/scenario-instances/${e}/close`, {
164
+ ...l,
165
+ method: "POST",
166
+ headers: { "Content-Type": "application/json" },
167
+ body: JSON.stringify(n)
168
+ }), s = await o(t, "关单失败");
169
+ return u(s);
170
+ }
171
+ async function E(e) {
172
+ const n = await r(
173
+ `${c}/scenario-instances/${e}/retry-init`,
174
+ {
175
+ ...l,
176
+ method: "POST",
177
+ headers: { "Content-Type": "application/json" }
178
+ }
179
+ );
180
+ return o(n, "初始化补偿失败");
181
+ }
182
+ async function x(e = "", n = 8) {
183
+ const t = new URLSearchParams();
184
+ e && t.set("token", e), t.set("limit", String(n));
185
+ const s = await r(
186
+ `${c}/scenario-instances/my-unclosed?${t.toString()}`,
187
+ l
188
+ ), a = await o(
189
+ s,
190
+ "查询未关单失败"
191
+ );
192
+ return (Array.isArray(a) ? a : []).map((i) => ({
193
+ id: Number(i.id ?? 0),
194
+ name: String(i.name ?? ""),
195
+ scenario_code: String(i.scenario_code ?? ""),
196
+ created_at: String(i.created_at ?? i.createdAt ?? "")
197
+ }));
198
+ }
199
+ export {
200
+ C as a,
201
+ b,
202
+ T as c,
203
+ A as d,
204
+ F as e,
205
+ v as f,
206
+ O as g,
207
+ E as h,
208
+ N as i,
209
+ y as j,
210
+ k,
211
+ $ as l,
212
+ x as m,
213
+ U as p,
214
+ P as r
215
+ };
package/dist/pages.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as t, P as e, Z as o } from "./ProjectApp-YRqDFopZ.js";
1
+ import { S as t, P as e, Z as o } from "./ProjectApp-9qtrgr7d.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "react-router-dom";
@@ -1,4 +1,4 @@
1
- import { s as l } from "./api-W2_U7Nxd.js";
1
+ import { s as l } from "./api-3Ur1kq2A.js";
2
2
  function m(o) {
3
3
  const n = o.filter((t) => t.member_type === "AGENT");
4
4
  return n.find((t) => t.is_default === !0) ?? n[0] ?? null;
@@ -1,4 +1,4 @@
1
- import { t as l } from "./api-W2_U7Nxd.js";
1
+ import { t as l } from "./api-3Ur1kq2A.js";
2
2
  const d = "USER_INFO";
3
3
  function s() {
4
4
  try {
@@ -1,5 +1,5 @@
1
1
  import { create as Ce } from "zustand";
2
- import { Q as je, x as M, i as C, y as ne, n as A, t as _, z as se, A as Pe, B as Ne, C as we, D as Ee, E as xe, F as Fe, G as ae, H as Re, I as Oe, J as B, K as Ue, L as He, v as ie, M as Le, N as $e, O as Ge, P as De, R as Ve, S as Be, U as qe, V as ze, W as Ke, X as We, Y as Je, Z as Ye, _ as Ze, $ as Qe, a0 as Xe, s as x, a1 as et, a2 as oe, a3 as tt, a4 as nt, a5 as rt, a6 as st, a7 as at, a8 as it, a9 as ot, aa as ct, c as lt, ab as ut, ac as dt, l as ft, ad as mt } from "./api-W2_U7Nxd.js";
2
+ import { Q as je, x as M, i as C, y as ne, m as A, t as _, z as se, A as Pe, C as Ne, D as we, E as Ee, F as xe, G as Fe, H as ae, I as Re, J as Oe, K as B, L as Ue, M as He, r as ie, N as Le, O as $e, P as Ge, R as De, S as Ve, U as Be, V as qe, W as ze, X as Ke, Y as We, Z as Je, _ as Ye, $ as Ze, a0 as Qe, a1 as Xe, s as x, a2 as et, a3 as oe, a4 as tt, a5 as nt, a6 as rt, a7 as st, a8 as at, a9 as it, aa as ot, ab as ct, c as lt, ac as ut, ad as dt, w as ft, ae as mt } from "./api-3Ur1kq2A.js";
3
3
  import { message as F } from "antd";
4
4
  const _e = `[[REASONING:正在分析…]]
5
5
  正在分析…