@yuku123/z-team-component 0.2.103 → 0.2.104
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/ChangeLogView-DG-ogBff.js +542 -0
- package/dist/ComponentDoc-BW1SyDxk.js +8035 -0
- package/dist/InvitationManagementPage-hYvoPEcm.js +495 -0
- package/dist/OnboardingPage-KDp-DrzY.js +393 -0
- package/dist/ScheduledTasks-CErSDgyW.js +12127 -0
- package/dist/SystemShell-DvrY4Bl7.js +688 -0
- package/dist/_commonjsHelpers-B52_cu2H.js +26 -0
- package/dist/admin-logs-uPnnclwN.js +198 -0
- package/dist/api-B__qdRIf.js +20 -0
- package/dist/browser-jb_PFvU3.js +1538 -0
- package/dist/createWorkspaceWsHandler-BXbn5-Ft.js +13142 -0
- package/dist/ctc-sso-DtJHC-2M.js +117 -0
- package/dist/echarts-B1OU1xr4.js +16 -0
- package/dist/history-BlrA1eaW.js +41 -0
- package/dist/index-0smeCTnr.js +42049 -0
- package/dist/index-2isWwv1X.js +10169 -0
- package/dist/index-BC8f-JP9.js +242 -0
- package/dist/index-BK3YDeXH.js +2217 -0
- package/dist/index-BOJm25by.js +999 -0
- package/dist/index-B_LJRFsK.js +339 -0
- package/dist/index-BnJ8UEeZ.js +5892 -0
- package/dist/index-BohoJQPr.js +7631 -0
- package/dist/index-BwJPAN8f.js +112 -0
- package/dist/index-ByhCWenF.js +434 -0
- package/dist/index-C2_tfpEj.js +118 -0
- package/dist/index-C815hPWS.js +430 -0
- package/dist/index-C9fGup9t.js +189 -0
- package/dist/index-Cb88Xdh4.js +169 -0
- package/dist/index-Cih0yoxc.js +178 -0
- package/dist/index-CkWKJORv.js +1645 -0
- package/dist/index-CsaGecGX.js +132 -0
- package/dist/index-D-xPVrY3.js +316 -0
- package/dist/index-DAGa9v8r.js +142 -0
- package/dist/index-DBnH-lRh.js +956 -0
- package/dist/index-DIFIvVWE.js +93 -0
- package/dist/index-DOgCfVB2.js +574 -0
- package/dist/index-DWsfQMp8.js +208 -0
- package/dist/index-DcurzowX.js +2699 -0
- package/dist/index-DhDdFRHC.js +279 -0
- package/dist/index-Dpii3P5J.js +1302 -0
- package/dist/index-DtHoMz1H.js +8 -0
- package/dist/index-YVtm1SRy.js +913 -0
- package/dist/index-aI2EXKED.js +479 -0
- package/dist/index-q_TPea69.js +315 -0
- package/dist/index.js +10 -0
- package/dist/index.module-CAa-2T7m.js +72 -0
- package/dist/index.module-UI0iz8K0.js +42 -0
- package/dist/instance-pdQ_wAhB.js +216 -0
- package/dist/menuPermission-CCQjJVXg.js +60 -0
- package/dist/mobile-client-O3yr9h6t.js +24 -0
- package/dist/pages.js +21 -0
- package/dist/send-default-agent-team-message-BzeR4ahf.js +35 -0
- package/dist/spark-md5-Dld54a-T.js +178 -0
- package/dist/sso-user-DI7oiDdc.js +43 -0
- package/dist/training-Bz7Sr5yC.js +450 -0
- package/dist/webide-NcHLDiSn.js +5233 -0
- package/dist/z-team-component.css +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { f as ie, r as z } from "./ctc-sso-DtJHC-2M.js";
|
|
3
|
+
import { r as ne, h as X, s as oe } from "./sso-user-DI7oiDdc.js";
|
|
4
|
+
import { CheckCircleFilled as le, QuestionCircleOutlined as ce, CloseOutlined as me } from "@ant-design/icons";
|
|
5
|
+
import { message as k, Result as de, Button as D, Spin as G, Input as ue, Image as fe } from "antd";
|
|
6
|
+
import pe from "query-string";
|
|
7
|
+
import { useState as f, useRef as Y, useMemo as K, useCallback as w, useEffect as V } from "react";
|
|
8
|
+
import { useLocation as ge } from "react-router-dom";
|
|
9
|
+
import { h as W } from "./history-BlrA1eaW.js";
|
|
10
|
+
import { d as c, o as he, h as be, j as _e } from "./ComponentDoc-BW1SyDxk.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
import { b as ye } from "./mobile-client-O3yr9h6t.js";
|
|
13
|
+
import { a as ve, s as we } from "./send-default-agent-team-message-BzeR4ahf.js";
|
|
14
|
+
const Ne = 5e3, E = 9, Ce = 10 * 1024 * 1024, Se = /^image\//i, Ie = /\.(png|jpe?g|gif|bmp|webp)$/i;
|
|
15
|
+
function Pe(a) {
|
|
16
|
+
return a.type && Se.test(a.type) ? !0 : Ie.test(a.name || "");
|
|
17
|
+
}
|
|
18
|
+
function ke(a) {
|
|
19
|
+
var o;
|
|
20
|
+
if (!((o = a == null ? void 0 : a.items) != null && o.length))
|
|
21
|
+
return [];
|
|
22
|
+
const m = [];
|
|
23
|
+
for (let p = 0; p < a.items.length; p += 1) {
|
|
24
|
+
const d = a.items[p];
|
|
25
|
+
if (d.kind === "file" && d.type.startsWith("image/")) {
|
|
26
|
+
const N = d.getAsFile();
|
|
27
|
+
N && m.push(N);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return m;
|
|
31
|
+
}
|
|
32
|
+
function Ee(a) {
|
|
33
|
+
return {
|
|
34
|
+
id: `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
35
|
+
file: a,
|
|
36
|
+
previewUrl: URL.createObjectURL(a)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function Q(a) {
|
|
40
|
+
URL.revokeObjectURL(a.previewUrl);
|
|
41
|
+
}
|
|
42
|
+
function Ue(a) {
|
|
43
|
+
return a.map((m) => m.file);
|
|
44
|
+
}
|
|
45
|
+
const J = 30;
|
|
46
|
+
function Xe() {
|
|
47
|
+
const a = ge(), m = pe.parse(a.search), o = String(
|
|
48
|
+
m.scenarioCode ?? m.scenario_code ?? ""
|
|
49
|
+
).trim(), p = c((e) => e.expandProject), d = c((e) => e.updateCurrentUser), [N, H] = f(!1), [_, Z] = f(""), [y, U] = f([]), [M, R] = f("form"), [j, T] = f(""), [A, g] = f("正在登录…"), [B, F] = f([]), P = Y(!1), x = Y(y);
|
|
50
|
+
x.current = y;
|
|
51
|
+
const C = K(() => o ? "" : "缺少参数 scenarioCode", [o]), S = w((e, r) => {
|
|
52
|
+
F((n) => [...n, e]), g(r);
|
|
53
|
+
}, []), ee = (e) => new Promise((r) => {
|
|
54
|
+
window.setTimeout(r, e);
|
|
55
|
+
});
|
|
56
|
+
V(() => {
|
|
57
|
+
if (C)
|
|
58
|
+
return;
|
|
59
|
+
let e = !1, r = 0;
|
|
60
|
+
const n = 100;
|
|
61
|
+
let i = !1, s = 0;
|
|
62
|
+
const v = 3;
|
|
63
|
+
return (() => {
|
|
64
|
+
if (e)
|
|
65
|
+
return;
|
|
66
|
+
const u = async () => {
|
|
67
|
+
if (e)
|
|
68
|
+
return;
|
|
69
|
+
let h = ne();
|
|
70
|
+
if ((!h || !X(h)) && !i) {
|
|
71
|
+
i = !0;
|
|
72
|
+
try {
|
|
73
|
+
const b = await ie();
|
|
74
|
+
b.kind === "authenticated" ? h = b.user : b.kind === "unauthenticated" && (s += 1);
|
|
75
|
+
} catch {
|
|
76
|
+
} finally {
|
|
77
|
+
i = !1;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (h && X(h)) {
|
|
81
|
+
d(oe(h));
|
|
82
|
+
const b = c.getState().token;
|
|
83
|
+
try {
|
|
84
|
+
const se = await _e(b);
|
|
85
|
+
e || d(se);
|
|
86
|
+
} catch {
|
|
87
|
+
!e && b && (localStorage.removeItem("z_team_token"), c.setState({ token: "" }));
|
|
88
|
+
} finally {
|
|
89
|
+
e || (H(!0), g(""));
|
|
90
|
+
}
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (s >= v) {
|
|
94
|
+
z();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (r += 1, r >= n) {
|
|
98
|
+
z();
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
window.setTimeout(() => void u(), 150);
|
|
102
|
+
};
|
|
103
|
+
u();
|
|
104
|
+
})(), () => {
|
|
105
|
+
e = !0;
|
|
106
|
+
};
|
|
107
|
+
}, [C, d]);
|
|
108
|
+
const te = w(
|
|
109
|
+
async (e, r) => {
|
|
110
|
+
if (P.current)
|
|
111
|
+
return;
|
|
112
|
+
P.current = !0, R("loading"), F([]), g("正在按场景创建工程…");
|
|
113
|
+
const n = e.slice(0, J), i = c.getState().token;
|
|
114
|
+
try {
|
|
115
|
+
let s = [];
|
|
116
|
+
r.length > 0 && (g("正在上传图片…"), s = await he(r));
|
|
117
|
+
const v = ve(e, s), I = await be(
|
|
118
|
+
{
|
|
119
|
+
name: n,
|
|
120
|
+
description: v,
|
|
121
|
+
workspace_path: n,
|
|
122
|
+
scenario_code: o
|
|
123
|
+
},
|
|
124
|
+
i
|
|
125
|
+
);
|
|
126
|
+
S("工程已创建", "正在打开协作区…"), g("正在同步工程列表…"), await p(I);
|
|
127
|
+
const u = c.getState();
|
|
128
|
+
u.currentProject && await u.refreshProjectPanels(
|
|
129
|
+
String(u.currentProject.id),
|
|
130
|
+
u.projectSwitchSeq,
|
|
131
|
+
!1
|
|
132
|
+
), S("协作区已就绪", "正在发送协作消息…"), await we(
|
|
133
|
+
I.id,
|
|
134
|
+
e,
|
|
135
|
+
i,
|
|
136
|
+
c.getState().members,
|
|
137
|
+
s
|
|
138
|
+
), await c.getState().loadMessages(), S("协作消息已发送", "即将进入工作台…"), g("即将进入工作台…"), await ee(2e3), W.replace(
|
|
139
|
+
ye({
|
|
140
|
+
projectId: I.id,
|
|
141
|
+
search: a.search
|
|
142
|
+
})
|
|
143
|
+
);
|
|
144
|
+
} catch (s) {
|
|
145
|
+
P.current = !1, R("form");
|
|
146
|
+
const v = s instanceof Error ? s.message : String(s);
|
|
147
|
+
T(v || "创建工程失败");
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
[S, p, a.search, o]
|
|
151
|
+
), L = w((e) => {
|
|
152
|
+
e.length && U((r) => {
|
|
153
|
+
const n = E - r.length;
|
|
154
|
+
if (n <= 0)
|
|
155
|
+
return k.warning(`最多粘贴 ${E} 张图片`), r;
|
|
156
|
+
const i = [...r];
|
|
157
|
+
for (const s of e.slice(0, n)) {
|
|
158
|
+
if (!Pe(s)) {
|
|
159
|
+
k.warning("仅支持粘贴图片");
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
if (s.size > Ce) {
|
|
163
|
+
k.warning("单张图片不能超过 10MB");
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
i.push(Ee(s));
|
|
167
|
+
}
|
|
168
|
+
return i;
|
|
169
|
+
});
|
|
170
|
+
}, []), re = w((e) => {
|
|
171
|
+
U((r) => {
|
|
172
|
+
const n = r.find((i) => i.id === e);
|
|
173
|
+
return n && Q(n), r.filter((i) => i.id !== e);
|
|
174
|
+
});
|
|
175
|
+
}, []);
|
|
176
|
+
V(() => () => {
|
|
177
|
+
x.current.forEach(Q);
|
|
178
|
+
}, []);
|
|
179
|
+
const ae = w(
|
|
180
|
+
(e) => {
|
|
181
|
+
const r = ke(e.clipboardData);
|
|
182
|
+
r.length > 0 && (e.preventDefault(), L(r));
|
|
183
|
+
},
|
|
184
|
+
[L]
|
|
185
|
+
), $ = () => {
|
|
186
|
+
const e = _.trim();
|
|
187
|
+
e && (T(""), te(e, Ue(y)));
|
|
188
|
+
}, O = K(() => {
|
|
189
|
+
const e = _.trim().slice(0, J);
|
|
190
|
+
return `场景 ${o}${e ? ` · ${e}` : ""}`;
|
|
191
|
+
}, [_, o]);
|
|
192
|
+
if (C || j && M === "form")
|
|
193
|
+
return /* @__PURE__ */ t("div", { className: "build-by-form-page", children: /* @__PURE__ */ t(
|
|
194
|
+
de,
|
|
195
|
+
{
|
|
196
|
+
status: "error",
|
|
197
|
+
title: "无法继续",
|
|
198
|
+
subTitle: C || j,
|
|
199
|
+
extra: /* @__PURE__ */ t(
|
|
200
|
+
D,
|
|
201
|
+
{
|
|
202
|
+
type: "primary",
|
|
203
|
+
onClick: () => W.replace("/workspace"),
|
|
204
|
+
children: "返回工作台"
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
}
|
|
208
|
+
) });
|
|
209
|
+
if (!N)
|
|
210
|
+
return /* @__PURE__ */ t("div", { className: "build-by-form-page", children: /* @__PURE__ */ t("div", { className: "build-by-form-page__shell", children: /* @__PURE__ */ t("div", { className: "build-by-form-page__panel", children: /* @__PURE__ */ l("div", { className: "build-by-form-page__loading", children: [
|
|
211
|
+
/* @__PURE__ */ t(G, { size: "large" }),
|
|
212
|
+
/* @__PURE__ */ t("p", { className: "build-by-form-page__step", children: A || "正在登录…" })
|
|
213
|
+
] }) }) }) });
|
|
214
|
+
if (M === "loading")
|
|
215
|
+
return /* @__PURE__ */ t("div", { className: "build-by-form-page", children: /* @__PURE__ */ t("div", { className: "build-by-form-page__shell", children: /* @__PURE__ */ t("div", { className: "build-by-form-page__panel", children: /* @__PURE__ */ l("div", { className: "build-by-form-page__loading", children: [
|
|
216
|
+
/* @__PURE__ */ t(G, { size: "large" }),
|
|
217
|
+
/* @__PURE__ */ t("p", { className: "build-by-form-page__step", children: A }),
|
|
218
|
+
O ? /* @__PURE__ */ t("p", { className: "build-by-form-page__meta", children: O }) : null,
|
|
219
|
+
B.length > 0 ? /* @__PURE__ */ t("ul", { className: "build-by-form-page__done-list", children: B.map((e, r) => /* @__PURE__ */ l(
|
|
220
|
+
"li",
|
|
221
|
+
{
|
|
222
|
+
className: "build-by-form-page__done-item",
|
|
223
|
+
children: [
|
|
224
|
+
/* @__PURE__ */ t(le, { className: "build-by-form-page__done-icon" }),
|
|
225
|
+
/* @__PURE__ */ t("span", { children: e })
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
`${r}-${e}`
|
|
229
|
+
)) }) : null
|
|
230
|
+
] }) }) }) });
|
|
231
|
+
const q = !!_.trim();
|
|
232
|
+
return /* @__PURE__ */ t("div", { className: "build-by-form-page", children: /* @__PURE__ */ t("div", { className: "build-by-form-page__shell", children: /* @__PURE__ */ l("div", { className: "build-by-form-page__panel", children: [
|
|
233
|
+
/* @__PURE__ */ l("div", { className: "build-by-form-page__header", children: [
|
|
234
|
+
/* @__PURE__ */ t("div", { className: "build-by-form-page__icon", "aria-hidden": !0, children: /* @__PURE__ */ t(ce, {}) }),
|
|
235
|
+
/* @__PURE__ */ l("div", { children: [
|
|
236
|
+
/* @__PURE__ */ t("h1", { className: "build-by-form-page__title", children: "描述你的问题" }),
|
|
237
|
+
/* @__PURE__ */ t("p", { className: "build-by-form-page__subtitle", children: "提交后将创建协作空间,并把问题发送给智能体" })
|
|
238
|
+
] })
|
|
239
|
+
] }),
|
|
240
|
+
/* @__PURE__ */ l("div", { className: "build-by-form-page__field", onPaste: ae, children: [
|
|
241
|
+
/* @__PURE__ */ t(
|
|
242
|
+
"label",
|
|
243
|
+
{
|
|
244
|
+
className: "build-by-form-page__label",
|
|
245
|
+
htmlFor: "build-by-form-question",
|
|
246
|
+
children: "请描述问题"
|
|
247
|
+
}
|
|
248
|
+
),
|
|
249
|
+
/* @__PURE__ */ t(
|
|
250
|
+
ue.TextArea,
|
|
251
|
+
{
|
|
252
|
+
id: "build-by-form-question",
|
|
253
|
+
className: "build-by-form-page__textarea",
|
|
254
|
+
value: _,
|
|
255
|
+
onChange: (e) => Z(e.target.value),
|
|
256
|
+
onKeyDown: (e) => {
|
|
257
|
+
(e.metaKey || e.ctrlKey) && e.key === "Enter" && q && (e.preventDefault(), $());
|
|
258
|
+
},
|
|
259
|
+
placeholder: "请尽量描述清楚现象、期望结果或相关背景…(可在输入框内 Ctrl+V 粘贴图片)",
|
|
260
|
+
autoSize: { minRows: 6, maxRows: 14 },
|
|
261
|
+
maxLength: Ne,
|
|
262
|
+
showCount: !0,
|
|
263
|
+
autoFocus: !0
|
|
264
|
+
}
|
|
265
|
+
),
|
|
266
|
+
y.length > 0 ? /* @__PURE__ */ t("ul", { className: "build-by-form-page__preview-list", children: y.map((e) => /* @__PURE__ */ l(
|
|
267
|
+
"li",
|
|
268
|
+
{
|
|
269
|
+
className: "build-by-form-page__preview-item",
|
|
270
|
+
children: [
|
|
271
|
+
/* @__PURE__ */ t(
|
|
272
|
+
fe,
|
|
273
|
+
{
|
|
274
|
+
src: e.previewUrl,
|
|
275
|
+
alt: "粘贴的图片",
|
|
276
|
+
className: "build-by-form-page__preview-img",
|
|
277
|
+
preview: { mask: "预览" }
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
/* @__PURE__ */ t(
|
|
281
|
+
"button",
|
|
282
|
+
{
|
|
283
|
+
type: "button",
|
|
284
|
+
className: "build-by-form-page__preview-remove",
|
|
285
|
+
"aria-label": "移除图片",
|
|
286
|
+
onClick: () => re(e.id),
|
|
287
|
+
children: /* @__PURE__ */ t(me, {})
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
e.id
|
|
293
|
+
)) }) : /* @__PURE__ */ l("p", { className: "build-by-form-page__paste-hint", children: [
|
|
294
|
+
"支持 Ctrl+V / ⌘+V 粘贴图片,最多 ",
|
|
295
|
+
E,
|
|
296
|
+
" 张"
|
|
297
|
+
] })
|
|
298
|
+
] }),
|
|
299
|
+
/* @__PURE__ */ t(
|
|
300
|
+
D,
|
|
301
|
+
{
|
|
302
|
+
type: "primary",
|
|
303
|
+
block: !0,
|
|
304
|
+
size: "large",
|
|
305
|
+
className: "build-by-form-page__submit",
|
|
306
|
+
disabled: !q,
|
|
307
|
+
onClick: $,
|
|
308
|
+
children: "确认并开始"
|
|
309
|
+
}
|
|
310
|
+
)
|
|
311
|
+
] }) }) });
|
|
312
|
+
}
|
|
313
|
+
export {
|
|
314
|
+
Xe as default
|
|
315
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { C as e, P as s, S as a, Z as r, i } from "./ComponentDoc-BW1SyDxk.js";
|
|
2
|
+
import { h as m } from "./history-BlrA1eaW.js";
|
|
3
|
+
export {
|
|
4
|
+
e as ComponentDocPage,
|
|
5
|
+
s as ProjectApp,
|
|
6
|
+
a as SubscribeApp,
|
|
7
|
+
r as ZTeamApp,
|
|
8
|
+
m as history,
|
|
9
|
+
i as isTokenExpired
|
|
10
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const c = "_hub_1scx0_1", o = "_header_1scx0_9", t = "_backBtn_1scx0_19", n = "_title_1scx0_35", e = "_bodySplit_1scx0_42", _ = "_spinWrapper_1scx0_55", a = "_columnsLayout_1scx0_70", s = "_catNav_1scx0_78", r = "_catNavTitle_1scx0_89", v = "_catItem_1scx0_97", l = "_catItemActive_1scx0_116", m = "_columnGridWrap_1scx0_122", d = "_catTag_1scx0_131", x = "_columnGrid_1scx0_122", u = "_columnCard_1scx0_149", i = "_columnCover_1scx0_163", p = "_columnCoverPlaceholder_1scx0_176", I = "_columnInfo_1scx0_182", G = "_columnDesc_1scx0_191", T = "_columnMeta_1scx0_200", C = "_latestUpdate_1scx0_204", A = "_latestTime_1scx0_214", N = "_deleteIcon_1scx0_229", b = "_columnActionsBar_1scx0_238", h = "_actionBtn_1scx0_245", g = "_actionBtnDanger_1scx0_263", y = "_ownerTag_1scx0_272", B = "_coverGrid_1scx0_279", D = "_coverCell_1scx0_284", U = "_coverItem_1scx0_287", k = "_coverNone_1scx0_301", L = "_coverUpload_1scx0_311", M = "_coverUploadIcon_1scx0_319", S = "_coverUploadingMask_1scx0_322", w = "_coverItemSelected_1scx0_330", O = "_coverName_1scx0_334", P = "_splitLayout_1scx0_346", W = "_articleNav_1scx0_354", f = "_navColumnDesc_1scx0_365", E = "_navGroup_1scx0_378", R = "_navToolbar_1scx0_382", $ = "_navAddGroup_1scx0_386", j = "_navGroupOps_1scx0_406", q = "_navGroupTitle_1scx0_415", z = "_navGroupIcon_1scx0_428", F = "_navGroupName_1scx0_433", H = "_navGroupCount_1scx0_440", J = "_navChapter_1scx0_447", K = "_navItem_1scx0_451", Q = "_navItemActive_1scx0_464", V = "_navTitle_1scx0_468", X = "_navItemRead_1scx0_472", Y = "_navIndex_1scx0_475", Z = "_readDot_1scx0_492", cc = "_navOps_1scx0_499", oc = "_navEmpty_1scx0_509", tc = "_readerPane_1scx0_513", nc = "_readerContent_1scx0_528", ec = "_tocAside_1scx0_534", _c = "_tocTitle_1scx0_545", ac = "_tocList_1scx0_554", sc = "_tocItem_1scx0_559", rc = "_tocSub_1scx0_576", vc = "_tocItemActive_1scx0_579", lc = "_readerTitle_1scx0_592", mc = "_readerMeta_1scx0_599", dc = "_markdown_1scx0_611", xc = {
|
|
2
|
+
hub: c,
|
|
3
|
+
header: o,
|
|
4
|
+
backBtn: t,
|
|
5
|
+
title: n,
|
|
6
|
+
bodySplit: e,
|
|
7
|
+
spinWrapper: _,
|
|
8
|
+
columnsLayout: a,
|
|
9
|
+
catNav: s,
|
|
10
|
+
catNavTitle: r,
|
|
11
|
+
catItem: v,
|
|
12
|
+
catItemActive: l,
|
|
13
|
+
columnGridWrap: m,
|
|
14
|
+
catTag: d,
|
|
15
|
+
columnGrid: x,
|
|
16
|
+
columnCard: u,
|
|
17
|
+
columnCover: i,
|
|
18
|
+
columnCoverPlaceholder: p,
|
|
19
|
+
columnInfo: I,
|
|
20
|
+
columnDesc: G,
|
|
21
|
+
columnMeta: T,
|
|
22
|
+
latestUpdate: C,
|
|
23
|
+
latestTime: A,
|
|
24
|
+
deleteIcon: N,
|
|
25
|
+
columnActionsBar: b,
|
|
26
|
+
actionBtn: h,
|
|
27
|
+
actionBtnDanger: g,
|
|
28
|
+
ownerTag: y,
|
|
29
|
+
coverGrid: B,
|
|
30
|
+
coverCell: D,
|
|
31
|
+
coverItem: U,
|
|
32
|
+
coverNone: k,
|
|
33
|
+
coverUpload: L,
|
|
34
|
+
coverUploadIcon: M,
|
|
35
|
+
coverUploadingMask: S,
|
|
36
|
+
coverItemSelected: w,
|
|
37
|
+
coverName: O,
|
|
38
|
+
splitLayout: P,
|
|
39
|
+
articleNav: W,
|
|
40
|
+
navColumnDesc: f,
|
|
41
|
+
navGroup: E,
|
|
42
|
+
navToolbar: R,
|
|
43
|
+
navAddGroup: $,
|
|
44
|
+
navGroupOps: j,
|
|
45
|
+
navGroupTitle: q,
|
|
46
|
+
navGroupIcon: z,
|
|
47
|
+
navGroupName: F,
|
|
48
|
+
navGroupCount: H,
|
|
49
|
+
navChapter: J,
|
|
50
|
+
navItem: K,
|
|
51
|
+
navItemActive: Q,
|
|
52
|
+
navTitle: V,
|
|
53
|
+
navItemRead: X,
|
|
54
|
+
navIndex: Y,
|
|
55
|
+
readDot: Z,
|
|
56
|
+
navOps: cc,
|
|
57
|
+
navEmpty: oc,
|
|
58
|
+
readerPane: tc,
|
|
59
|
+
readerContent: nc,
|
|
60
|
+
tocAside: ec,
|
|
61
|
+
tocTitle: _c,
|
|
62
|
+
tocList: ac,
|
|
63
|
+
tocItem: sc,
|
|
64
|
+
tocSub: rc,
|
|
65
|
+
tocItemActive: vc,
|
|
66
|
+
readerTitle: lc,
|
|
67
|
+
readerMeta: mc,
|
|
68
|
+
markdown: dc
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
xc as h
|
|
72
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const t = "_scenarioPage_1rtig_1", e = "_toolbar_1rtig_11", i = "_toolbarLeft_1rtig_22", o = "_pageTitle_1rtig_30", r = "_statInline_1rtig_39", _ = "_statChip_1rtig_47", n = "_statDivider_1rtig_53", s = "_pageActions_1rtig_60", a = "_tableCard_1rtig_68", c = "_tableWrap_1rtig_76", l = "_codeTag_1rtig_136", g = "_nameCell_1rtig_146", d = "_defaultBadge_1rtig_166", m = "_descCell_1rtig_180", p = "_mutedCell_1rtig_186", I = "_actionGroup_1rtig_190", f = "_emptyState_1rtig_203", y = "_emptyIcon_1rtig_212", b = "_emptyTitle_1rtig_225", C = "_emptyHint_1rtig_232", T = "_loadingWrap_1rtig_240", w = "_scenarioDrawerWrap_1rtig_266", u = "_section_1rtig_275", D = "_formRow_1rtig_279", R = "_formLabel_1rtig_283", S = "_formHint_1rtig_291", W = "_formRowPair_1rtig_298", v = "_sectionDivider_1rtig_307", A = "_listItemRow_1rtig_323", B = "_listItemIndex_1rtig_339", H = "_listItemBody_1rtig_354", L = "_listItemActions_1rtig_367", P = "_inlineFields_1rtig_375", x = "_dirTree_1rtig_395", h = "_dirNode_1rtig_401", F = "_dirTreeScroll_1rtig_411", G = "_readmeSection_1rtig_417", N = {
|
|
2
|
+
scenarioPage: t,
|
|
3
|
+
toolbar: e,
|
|
4
|
+
toolbarLeft: i,
|
|
5
|
+
pageTitle: o,
|
|
6
|
+
statInline: r,
|
|
7
|
+
statChip: _,
|
|
8
|
+
statDivider: n,
|
|
9
|
+
pageActions: s,
|
|
10
|
+
tableCard: a,
|
|
11
|
+
tableWrap: c,
|
|
12
|
+
codeTag: l,
|
|
13
|
+
nameCell: g,
|
|
14
|
+
defaultBadge: d,
|
|
15
|
+
descCell: m,
|
|
16
|
+
mutedCell: p,
|
|
17
|
+
actionGroup: I,
|
|
18
|
+
emptyState: f,
|
|
19
|
+
emptyIcon: y,
|
|
20
|
+
emptyTitle: b,
|
|
21
|
+
emptyHint: C,
|
|
22
|
+
loadingWrap: T,
|
|
23
|
+
scenarioDrawerWrap: w,
|
|
24
|
+
section: u,
|
|
25
|
+
formRow: D,
|
|
26
|
+
formLabel: R,
|
|
27
|
+
formHint: S,
|
|
28
|
+
formRowPair: W,
|
|
29
|
+
sectionDivider: v,
|
|
30
|
+
listItemRow: A,
|
|
31
|
+
listItemIndex: B,
|
|
32
|
+
listItemBody: H,
|
|
33
|
+
listItemActions: L,
|
|
34
|
+
inlineFields: P,
|
|
35
|
+
dirTree: x,
|
|
36
|
+
dirNode: h,
|
|
37
|
+
dirTreeScroll: F,
|
|
38
|
+
readmeSection: G
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
N as s
|
|
42
|
+
};
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { a as o, f as d, B as r, u as c } from "./ComponentDoc-BW1SyDxk.js";
|
|
2
|
+
async function h(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 o(
|
|
6
|
+
`${r}/scenario-instances/page?${t.toString()}`,
|
|
7
|
+
d
|
|
8
|
+
);
|
|
9
|
+
return c(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: p(e)
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function m(e, n) {
|
|
34
|
+
const t = n.replace(/_([a-z])/g, (l, _) => _.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 p(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 I(e) {
|
|
59
|
+
const n = await o(
|
|
60
|
+
`${r}/scenario-instances/${e}/models`
|
|
61
|
+
);
|
|
62
|
+
return await c(n, "获取模型列表失败") ?? [];
|
|
63
|
+
}
|
|
64
|
+
const f = "develop_brain_scenario";
|
|
65
|
+
async function C(e) {
|
|
66
|
+
const n = await o(
|
|
67
|
+
`${r}/dev-brain/agent/ticket?ticketId=${encodeURIComponent(e)}`,
|
|
68
|
+
d
|
|
69
|
+
);
|
|
70
|
+
return c(n, "获取工单信息失败");
|
|
71
|
+
}
|
|
72
|
+
function v(e) {
|
|
73
|
+
return String(e.currentStage ?? e.current_stage ?? "").trim();
|
|
74
|
+
}
|
|
75
|
+
function g(e) {
|
|
76
|
+
const n = e.trim().replace(/[/\\:*?"<>|]/g, "_");
|
|
77
|
+
return n.length > 0 ? n.slice(0, 80) : "workspace";
|
|
78
|
+
}
|
|
79
|
+
function T(e, n) {
|
|
80
|
+
var i;
|
|
81
|
+
const t = e.requirementTitle && e.requirementTitle.trim() || n, s = { ticket_id: n }, a = (i = e.foneUrl) == null ? void 0 : i.trim();
|
|
82
|
+
return a && (s.work_order_url = a), {
|
|
83
|
+
name: t,
|
|
84
|
+
description: `ticket_id_${n}_${t}`,
|
|
85
|
+
workspace_path: g(t),
|
|
86
|
+
scenario_code: f,
|
|
87
|
+
extend_params: s
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
async function S(e, n = "") {
|
|
91
|
+
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await o(
|
|
92
|
+
`${r}/scenario-instances/${e}${t}`,
|
|
93
|
+
d
|
|
94
|
+
), a = await c(s, "获取项目失败"), i = a.status === "FOUND" ? "FOUND" : "NOT_FOUND", l = a.scenario_instance ?? a.scenarioInstance ?? null;
|
|
95
|
+
return {
|
|
96
|
+
status: i,
|
|
97
|
+
scenarioInstance: l ? u(l) : null
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
async function U(e, n = "") {
|
|
101
|
+
const t = await S(e, n);
|
|
102
|
+
if (t.status === "NOT_FOUND" || !t.scenarioInstance)
|
|
103
|
+
throw {
|
|
104
|
+
_apiUserError: !0,
|
|
105
|
+
userMessage: "项目不存在",
|
|
106
|
+
message: "项目不存在"
|
|
107
|
+
};
|
|
108
|
+
return t.scenarioInstance;
|
|
109
|
+
}
|
|
110
|
+
async function k(e, n = "") {
|
|
111
|
+
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await o(
|
|
112
|
+
`${r}/scenario-instances/${e}/join-self${t}`,
|
|
113
|
+
{
|
|
114
|
+
...d,
|
|
115
|
+
method: "POST"
|
|
116
|
+
}
|
|
117
|
+
), a = await c(s, "加入工程失败");
|
|
118
|
+
return u(a);
|
|
119
|
+
}
|
|
120
|
+
async function b(e = "") {
|
|
121
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await o(`${r}/self-support${n}`, d), s = await c(t, "获取自身答疑群组失败"), a = Number(s.scenario_instance_id ?? 0);
|
|
122
|
+
if (!Number.isFinite(a) || a <= 0)
|
|
123
|
+
throw {
|
|
124
|
+
_apiUserError: !0,
|
|
125
|
+
userMessage: "自身答疑群组无效",
|
|
126
|
+
message: "自身答疑群组无效"
|
|
127
|
+
};
|
|
128
|
+
return {
|
|
129
|
+
scenario_instance_id: a,
|
|
130
|
+
name: String(s.name ?? "Z-OPC 自身答疑"),
|
|
131
|
+
scenario_code: String(s.scenario_code ?? "qa_support"),
|
|
132
|
+
workspace_path: String(s.workspace_path ?? ""),
|
|
133
|
+
status: String(s.status ?? "ACTIVE")
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
async function y(e, n = "") {
|
|
137
|
+
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await o(
|
|
138
|
+
`${r}/scenario-instances/${e}/forks${t}`,
|
|
139
|
+
d
|
|
140
|
+
), a = await c(s, "获取 Fork 列表失败");
|
|
141
|
+
return (Array.isArray(a) ? a : []).map(
|
|
142
|
+
(l) => u(l)
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
async function O(e) {
|
|
146
|
+
const n = await o(
|
|
147
|
+
`${r}/scenario-instances/${e}/close-feedback-tags`,
|
|
148
|
+
{
|
|
149
|
+
...d,
|
|
150
|
+
method: "GET"
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
return await c(n, "获取关单标签失败");
|
|
154
|
+
}
|
|
155
|
+
async function P(e) {
|
|
156
|
+
const n = await o(`${r}/scenario-instances/${e}/reopen`, {
|
|
157
|
+
...d,
|
|
158
|
+
method: "POST",
|
|
159
|
+
headers: { "Content-Type": "application/json" }
|
|
160
|
+
}), t = await c(n, "重新开启失败");
|
|
161
|
+
return u(t);
|
|
162
|
+
}
|
|
163
|
+
async function A(e, n) {
|
|
164
|
+
const t = await o(`${r}/scenario-instances/${e}/close`, {
|
|
165
|
+
...d,
|
|
166
|
+
method: "POST",
|
|
167
|
+
headers: { "Content-Type": "application/json" },
|
|
168
|
+
body: JSON.stringify(n)
|
|
169
|
+
}), s = await c(t, "关单失败");
|
|
170
|
+
return u(s);
|
|
171
|
+
}
|
|
172
|
+
async function N(e) {
|
|
173
|
+
const n = await o(
|
|
174
|
+
`${r}/scenario-instances/${e}/retry-init`,
|
|
175
|
+
{
|
|
176
|
+
...d,
|
|
177
|
+
method: "POST",
|
|
178
|
+
headers: { "Content-Type": "application/json" }
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
return c(n, "初始化补偿失败");
|
|
182
|
+
}
|
|
183
|
+
async function F(e = "", n = 8) {
|
|
184
|
+
const t = new URLSearchParams();
|
|
185
|
+
e && t.set("token", e), t.set("limit", String(n));
|
|
186
|
+
const s = await o(
|
|
187
|
+
`${r}/scenario-instances/my-unclosed?${t.toString()}`,
|
|
188
|
+
d
|
|
189
|
+
), a = await c(
|
|
190
|
+
s,
|
|
191
|
+
"查询未关单失败"
|
|
192
|
+
);
|
|
193
|
+
return (Array.isArray(a) ? a : []).map((i) => ({
|
|
194
|
+
id: Number(i.id ?? 0),
|
|
195
|
+
name: String(i.name ?? ""),
|
|
196
|
+
scenario_code: String(i.scenario_code ?? ""),
|
|
197
|
+
created_at: String(i.created_at ?? i.createdAt ?? "")
|
|
198
|
+
}));
|
|
199
|
+
}
|
|
200
|
+
export {
|
|
201
|
+
h as a,
|
|
202
|
+
T as b,
|
|
203
|
+
F as c,
|
|
204
|
+
I as d,
|
|
205
|
+
b as e,
|
|
206
|
+
C as f,
|
|
207
|
+
O as g,
|
|
208
|
+
A as h,
|
|
209
|
+
N as i,
|
|
210
|
+
k as j,
|
|
211
|
+
y as k,
|
|
212
|
+
S as l,
|
|
213
|
+
U as m,
|
|
214
|
+
v as p,
|
|
215
|
+
P as r
|
|
216
|
+
};
|