@yuku123/z-team-component 0.2.7 → 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.
- package/dist/{InvitationManagementPage-BPxjj0Dg.js → InvitationManagementPage-DEBZvFZU.js} +2 -2
- package/dist/{LowCodePage-CtC4Ca6N.js → LowCodePage-yemTBcZ4.js} +1 -1
- package/dist/{OnboardingPage-Vvj77L6H.js → OnboardingPage-Bi3S5eug.js} +2 -2
- package/dist/{ProjectApp-Dp_yHlHK.js → ProjectApp-9qtrgr7d.js} +154 -168
- package/dist/admin-logs-BIRWnOwM.js +254 -0
- package/dist/api-3Ur1kq2A.js +2049 -0
- package/dist/{api-DLBRWSFh.js → api-B2d2enyL.js} +1 -1
- package/dist/{createWorkspaceWsHandler-DrV9AaO7.js → createWorkspaceWsHandler-CSAGqlPX.js} +3568 -3269
- package/dist/{index-l8P_AuvD.js → index-BIVN--Bi.js} +1 -1
- package/dist/index-B_YVSwmJ.js +11710 -0
- package/dist/{index-DM_AMiPz.js → index-C6SfK489.js} +36 -35
- package/dist/{index-BK9rSfN3.js → index-C8uSn9eX.js} +10 -10
- package/dist/{index-CuuZlPvb.js → index-CPUeMpa8.js} +4 -4
- package/dist/{index-bRlb91E0.js → index-Cml0C09P.js} +12239 -23662
- package/dist/{index-Bw02b5qJ.js → index-CsCPAoPb.js} +14819 -13930
- package/dist/{index-DYXWNyaR.js → index-D3DF6vFc.js} +17 -17
- package/dist/{index-D-oG0ReT.js → index-DMEjkEMq.js} +3 -3
- package/dist/{index-BaBdw0pt.js → index-DNyYOedu.js} +4 -4
- package/dist/{index-Bh5PFiY9.js → index-wXqXyXmm.js} +33 -32
- package/dist/index.js +1 -1
- package/dist/instance-ClduEMxs.js +215 -0
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-DxD_vD7Z.js → send-default-agent-team-message-B3Qon0X2.js} +1 -1
- package/dist/{sso-user-D1eNVXkY.js → sso-user-BOEGMUJA.js} +1 -1
- package/dist/{useAppStore-C12Ala1u.js → useAppStore-D8PnbXea.js} +1 -1
- package/dist/z-team-component.css +2 -2
- package/package.json +4 -1
- package/dist/api-W2_U7Nxd.js +0 -3866
- 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-
|
|
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
|
|
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 {
|
|
11
|
-
import { u as c } from "./useAppStore-
|
|
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
|
|
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 =
|
|
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
|
|
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 >=
|
|
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 =
|
|
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
|
|
118
|
+
const v = ve(e, s), I = await be(
|
|
119
119
|
{
|
|
120
120
|
name: n,
|
|
121
|
-
description:
|
|
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
|
|
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
|
|
148
|
-
j(
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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-
|
|
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,
|
|
11
|
-
import { u as m } from "./useAppStore-
|
|
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-
|
|
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-
|
|
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-
|
|
9
|
-
import { D as ge } from "./index-
|
|
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,
|
|
3
|
-
import { CheckCircleFilled as
|
|
4
|
-
import { Result as
|
|
5
|
-
import
|
|
6
|
-
import { useMemo as j, useState as f, useRef as
|
|
7
|
-
import { useLocation as
|
|
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 {
|
|
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
|
|
12
|
-
const m =
|
|
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 =
|
|
20
|
-
C((
|
|
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
|
-
|
|
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
|
|
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
|
|
35
|
-
|
|
35
|
+
const s = await z(t, u);
|
|
36
|
+
i("已加入协作区", "正在打开协作区…"), await I(s);
|
|
36
37
|
}, E = async () => {
|
|
37
38
|
n("正在检查工单信息…");
|
|
38
|
-
const t = await
|
|
39
|
-
|
|
40
|
-
const r =
|
|
39
|
+
const t = await H(a);
|
|
40
|
+
i("工单信息已获取", "正在解析工程绑定…");
|
|
41
|
+
const r = O(t);
|
|
41
42
|
if (r != null) {
|
|
42
|
-
|
|
43
|
+
i("已定位协作区", `正在打开协作区 ${r}…`), await d(r);
|
|
43
44
|
return;
|
|
44
45
|
}
|
|
45
46
|
n("正在初始化工程…");
|
|
46
|
-
const
|
|
47
|
-
|
|
47
|
+
const s = await v(
|
|
48
|
+
L(t, a),
|
|
48
49
|
u
|
|
49
50
|
);
|
|
50
51
|
n("正在关联工单…");
|
|
51
52
|
try {
|
|
52
|
-
await
|
|
53
|
+
await F(
|
|
53
54
|
a,
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
s.id,
|
|
56
|
+
M(t)
|
|
56
57
|
);
|
|
57
58
|
} catch {
|
|
58
59
|
}
|
|
59
|
-
n("正在初始化工作区…"), await I(
|
|
60
|
+
n("正在初始化工作区…"), await I(s);
|
|
60
61
|
};
|
|
61
|
-
|
|
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
|
-
}, [
|
|
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
|
-
|
|
108
|
+
D,
|
|
108
109
|
{
|
|
109
110
|
status: "error",
|
|
110
111
|
title: "无法打开工程",
|
|
111
112
|
subTitle: h,
|
|
112
113
|
extra: /* @__PURE__ */ c(
|
|
113
|
-
|
|
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(
|
|
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(
|
|
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
|
-
|
|
142
|
+
ct as default
|
|
142
143
|
};
|
package/dist/index.js
CHANGED
|
@@ -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,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,
|
|
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
|
正在分析…
|