@yuku123/z-team-component 0.2.52 → 0.2.53

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 (54) hide show
  1. package/dist/{ChangeLogView-nPAmM1X0.js → ChangeLogView-Dm7C3S14.js} +1 -1
  2. package/dist/{ComponentDoc-Cky9jCGu.js → ComponentDoc-y1NfPcHG.js} +506 -461
  3. package/dist/{InvitationManagementPage-BsbaIGvB.js → InvitationManagementPage-Btw9iVOl.js} +1 -1
  4. package/dist/{OnboardingPage-CHVgeBiO.js → OnboardingPage-wF0OrgfD.js} +2 -2
  5. package/dist/ScheduledTasks-CzzgG3n8.js +9417 -0
  6. package/dist/{SystemShell-4OiqvM11.js → SystemShell-BSCmnOxf.js} +1 -1
  7. package/dist/{admin-logs-D6HtRcK6.js → admin-logs-vR556ORQ.js} +2 -2
  8. package/dist/{api-BT968Uwc.js → api-Bs0qYxjL.js} +1 -1
  9. package/dist/{api-C78tCfne.js → api-Jfnj1ybB.js} +287 -270
  10. package/dist/createWorkspaceWsHandler-obuYWncQ.js +12820 -0
  11. package/dist/{index-BAY37t4f.js → index-B3LhKHBx.js} +4 -4
  12. package/dist/{index-CR3sbzOU.js → index-BNShjps9.js} +7 -7
  13. package/dist/{index-DxFZKDq-.js → index-BXiuxhgz.js} +6 -6
  14. package/dist/{index-CdlfWFvS.js → index-BbkE7r8M.js} +1 -1
  15. package/dist/index-BtWtVMgY.js +474 -0
  16. package/dist/{index-DpcrvKsK.js → index-C5WSr14Z.js} +1 -1
  17. package/dist/{index-D9AqC2O-.js → index-CYViRXQo.js} +1 -1
  18. package/dist/{index-Bdu31aRV.js → index-Ck_D109M.js} +2 -2
  19. package/dist/index-CnEWSsKt.js +582 -0
  20. package/dist/{index-B11_fFjX.js → index-CxrBnzg2.js} +1 -1
  21. package/dist/index-DRrBkbr_.js +100 -0
  22. package/dist/index-DUmgSTQu.js +9179 -0
  23. package/dist/index-DWsfQMp8.js +208 -0
  24. package/dist/{index-LwKUkzKI.js → index-Di_vaPxC.js} +3 -3
  25. package/dist/{index-B_C7H9WL.js → index-Dj5_8ulz.js} +5 -5
  26. package/dist/{index-qK6pyAGy.js → index-DmZdGNnh.js} +4 -4
  27. package/dist/index-DqUOCs_a.js +242 -0
  28. package/dist/{index-DFY3lzq0.js → index-DroZE6Bv.js} +3 -3
  29. package/dist/{index-BAK7UDvY.js → index-JLtVgwZv.js} +1 -1
  30. package/dist/index-Onqu_VQO.js +2828 -0
  31. package/dist/index-Pk7OkJrk.js +1133 -0
  32. package/dist/index-WIsi8fln.js +339 -0
  33. package/dist/{index-ClA0896K.js → index-gxEdw4X4.js} +4 -4
  34. package/dist/index-tADa82Fa.js +130 -0
  35. package/dist/{index-BX1Wd9x9.js → index-yS7XIUis.js} +3 -3
  36. package/dist/index.js +1 -1
  37. package/dist/{instance-D5dhjbgg.js → instance-B0DZJnee.js} +3 -3
  38. package/dist/pages.js +1 -1
  39. package/dist/schedule-D3jTrI1R.js +497 -0
  40. package/dist/{send-default-agent-team-message-C882sJLV.js → send-default-agent-team-message-CbqHaohM.js} +1 -1
  41. package/dist/{sso-user-Bi9_l9yi.js → sso-user-Dw_wwYa-.js} +1 -1
  42. package/dist/{training-Ba09KItE.js → training-CETtJBNQ.js} +1 -1
  43. package/dist/{useAppStore-ibJyVIAX.js → useAppStore-s-CLa-nF.js} +19 -19
  44. package/dist/webide-6j4OVoNA.js +7845 -0
  45. package/dist/z-team-component.css +2 -2
  46. package/package.json +1 -1
  47. package/dist/createWorkspaceWsHandler-mq-UTF2O.js +0 -13028
  48. package/dist/index-7nSly-MA.js +0 -405
  49. package/dist/index-B3-0eXYQ.js +0 -844
  50. package/dist/index-Cp3DAwNx.js +0 -13862
  51. package/dist/index-NaBR2aQE.js +0 -6685
  52. package/dist/index-UsGqMo11.js +0 -848
  53. package/dist/schedule-C-4ksDPw.js +0 -239
  54. package/dist/webide-RsFP9pHM.js +0 -8087
@@ -0,0 +1,497 @@
1
+ import { a as i, f as c, B as d, n as u, u as y, t as $, g as A } from "./api-Jfnj1ybB.js";
2
+ import { jsxs as E, jsx as T } from "react/jsx-runtime";
3
+ import { Component as C } from "react";
4
+ const S = [
5
+ { status: "TODO", label: "待办" },
6
+ { status: "DOING", label: "进行中" },
7
+ { status: "DONE", label: "已完成" }
8
+ ];
9
+ function _(e) {
10
+ if (!e || !e.trim()) return [...S];
11
+ try {
12
+ const t = JSON.parse(e), n = Array.isArray(t == null ? void 0 : t.statusColumns) ? t.statusColumns : null;
13
+ if (!n) return [...S];
14
+ const o = n.map((r) => {
15
+ const a = r ?? {}, s = String(a.status ?? "").trim().toUpperCase(), l = String(a.label ?? "").trim();
16
+ return s && l ? { status: s, label: l } : null;
17
+ }).filter((r) => r != null);
18
+ return o.length > 0 ? o : [...S];
19
+ } catch {
20
+ return [...S];
21
+ }
22
+ }
23
+ function b(e) {
24
+ if (e == null) return !0;
25
+ const t = String(e).trim();
26
+ return t === "" || t === "0";
27
+ }
28
+ function f(e) {
29
+ const t = (s) => {
30
+ if (typeof s != "string" || !s.trim()) return [];
31
+ try {
32
+ const l = JSON.parse(s);
33
+ return Array.isArray(l) ? l.filter((m) => typeof m == "string") : [];
34
+ } catch {
35
+ return [];
36
+ }
37
+ }, n = (s) => {
38
+ if (typeof s != "string" || !s.trim()) return [];
39
+ try {
40
+ const l = JSON.parse(s);
41
+ return Array.isArray(l) ? l.filter(
42
+ (m) => !!m && typeof m == "object" && typeof m.type == "string"
43
+ ) : [];
44
+ } catch {
45
+ return [];
46
+ }
47
+ }, o = () => {
48
+ const s = e.assigneeUserIds;
49
+ let l = null;
50
+ if (Array.isArray(s))
51
+ l = s;
52
+ else if (typeof s == "string" && s.trim())
53
+ try {
54
+ const p = JSON.parse(s);
55
+ l = Array.isArray(p) ? p : null;
56
+ } catch {
57
+ l = s.split(",");
58
+ }
59
+ if (l) {
60
+ const p = l.map((h) => String(h ?? "").trim()).filter(Boolean);
61
+ if (p.length > 0) return Array.from(new Set(p));
62
+ }
63
+ const m = e.assigneeUserId == null ? "" : String(e.assigneeUserId);
64
+ return m.trim() ? [m.trim()] : [];
65
+ }, r = (s) => {
66
+ const l = e.assignees, m = Array.isArray(l) ? l.map((p) => {
67
+ const h = p ?? {}, I = String(h.userId ?? "").trim();
68
+ return I ? { userId: I, name: String(h.name ?? "").trim() || I } : null;
69
+ }).filter((p) => p != null) : [];
70
+ return m.length > 0 ? m : s.map((p) => ({ userId: p, name: p }));
71
+ }, a = o();
72
+ return {
73
+ id: $(e.id),
74
+ projectId: e.projectId == null ? null : $(e.projectId),
75
+ userId: String(e.userId ?? ""),
76
+ title: String(e.title ?? ""),
77
+ detail: e.detail == null ? null : String(e.detail),
78
+ status: e.status ?? "TODO",
79
+ priority: e.priority ?? "MEDIUM",
80
+ dueDate: e.dueDate == null ? null : String(e.dueDate).slice(0, 10),
81
+ assigneeUserId: a[0] ?? null,
82
+ assigneeUserIds: a,
83
+ assignees: r(a),
84
+ projectTitle: e.projectTitle == null || !String(e.projectTitle).trim() ? null : String(e.projectTitle),
85
+ tags: t(e.tags),
86
+ links: n(e.links),
87
+ parentId: b(e.parentId) ? "" : $(e.parentId),
88
+ sortOrder: e.sortOrder == null ? 0 : Number(e.sortOrder),
89
+ completedAt: e.completedAt == null ? null : String(e.completedAt),
90
+ completedBy: e.completedBy == null ? null : String(e.completedBy),
91
+ createByName: e.createByName == null ? null : String(e.createByName),
92
+ updateTime: e.updateTime == null ? null : String(e.updateTime)
93
+ };
94
+ }
95
+ function g(e) {
96
+ const t = e ?? {};
97
+ return {
98
+ id: $(t.id),
99
+ userId: String(t.userId ?? ""),
100
+ title: String(t.title ?? ""),
101
+ icon: t.icon == null ? null : String(t.icon),
102
+ description: t.description == null ? null : String(t.description),
103
+ visibility: t.visibility === "shared" ? "shared" : "private",
104
+ sortOrder: t.sortOrder == null ? 0 : Number(t.sortOrder),
105
+ extraInfo: t.extraInfo == null ? null : String(t.extraInfo),
106
+ createByName: t.createByName == null ? null : String(t.createByName)
107
+ };
108
+ }
109
+ function N(e) {
110
+ const t = e ?? {}, n = Array.isArray(t.memberDetails) ? t.memberDetails : [];
111
+ return {
112
+ ...g(t),
113
+ openCount: t.openCount == null ? 0 : Number(t.openCount),
114
+ memberDetails: n.map((o) => {
115
+ const r = o ?? {}, a = String(r.userId ?? "").trim();
116
+ return a ? { userId: a, userName: String(r.userName ?? "").trim() || a } : null;
117
+ }).filter((o) => o != null)
118
+ };
119
+ }
120
+ async function P(e = "") {
121
+ const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await i(`${d}/todo/projects${t}`, c), o = await u(n, "获取待办项目失败");
122
+ return {
123
+ owned: ((o == null ? void 0 : o.owned) ?? []).map(N),
124
+ joined: ((o == null ? void 0 : o.joined) ?? []).map(N)
125
+ };
126
+ }
127
+ async function L(e, t = "") {
128
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/projects${n}`, {
129
+ ...c,
130
+ method: "POST",
131
+ headers: { "Content-Type": "application/json" },
132
+ body: JSON.stringify(e)
133
+ }), r = await u(o, "新建项目失败");
134
+ return g(r);
135
+ }
136
+ async function M(e, t, n = "") {
137
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${e}${o}`, {
138
+ ...c,
139
+ method: "PUT",
140
+ headers: { "Content-Type": "application/json" },
141
+ body: JSON.stringify(t)
142
+ }), a = await u(r, "更新项目失败");
143
+ return g(a);
144
+ }
145
+ async function D(e, t = "") {
146
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/projects/${e}${n}`, {
147
+ ...c,
148
+ method: "DELETE"
149
+ });
150
+ return y(o, "删除项目失败");
151
+ }
152
+ async function k(e, t, n = "") {
153
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/projects/${e}/members${o}`, {
154
+ ...c,
155
+ method: "POST",
156
+ headers: { "Content-Type": "application/json" },
157
+ body: JSON.stringify(t)
158
+ }), a = await u(r, "添加成员失败");
159
+ return g(a);
160
+ }
161
+ async function B(e, t, n = "") {
162
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
163
+ `${d}/todo/projects/${e}/members/${encodeURIComponent(t)}${o}`,
164
+ { ...c, method: "DELETE" }
165
+ ), a = await u(r, "移除成员失败");
166
+ return g(a);
167
+ }
168
+ async function G(e = {}, t = "") {
169
+ const n = new URLSearchParams();
170
+ t && n.set("token", t), e.view && n.set("view", e.view), e.projectId != null && n.set("projectId", String(e.projectId)), e.status && n.set("status", e.status), e.keyword && n.set("keyword", e.keyword);
171
+ const o = n.toString() ? `?${n.toString()}` : "", r = await i(`${d}/todo/items${o}`, c);
172
+ return (await u(
173
+ r,
174
+ "获取事项失败"
175
+ ) ?? []).map(f);
176
+ }
177
+ async function q(e, t = "") {
178
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items${n}`, {
179
+ ...c,
180
+ method: "POST",
181
+ headers: { "Content-Type": "application/json" },
182
+ body: JSON.stringify(e)
183
+ }), r = await u(o, "新建事项失败");
184
+ return f(r);
185
+ }
186
+ async function J(e, t, n = "") {
187
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}${o}`, {
188
+ ...c,
189
+ method: "PUT",
190
+ headers: { "Content-Type": "application/json" },
191
+ body: JSON.stringify(t)
192
+ }), a = await u(r, "更新事项失败");
193
+ return f(a);
194
+ }
195
+ async function x(e, t = "", n = "") {
196
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}/complete${o}`, {
197
+ ...c,
198
+ method: "POST",
199
+ headers: { "Content-Type": "application/json" },
200
+ body: JSON.stringify({ result: t })
201
+ }), a = await u(r, "完成事项失败");
202
+ return f(a);
203
+ }
204
+ async function W(e, t = "") {
205
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/${e}/reopen${n}`, {
206
+ ...c,
207
+ method: "POST"
208
+ }), r = await u(o, "重开事项失败");
209
+ return f(r);
210
+ }
211
+ async function V(e, t, n = "") {
212
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(`${d}/todo/items/${e}/reorder${o}`, {
213
+ ...c,
214
+ method: "POST",
215
+ headers: { "Content-Type": "application/json" },
216
+ body: JSON.stringify(t)
217
+ }), a = await u(r, "调整排序失败");
218
+ return f(a);
219
+ }
220
+ async function z(e, t = "") {
221
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/reorder-batch${n}`, {
222
+ ...c,
223
+ method: "POST",
224
+ headers: { "Content-Type": "application/json" },
225
+ body: JSON.stringify({ updates: e })
226
+ });
227
+ return y(o, "调整排序失败");
228
+ }
229
+ async function v(e, t = "") {
230
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/projects/reorder-batch${n}`, {
231
+ ...c,
232
+ method: "POST",
233
+ headers: { "Content-Type": "application/json" },
234
+ body: JSON.stringify({ updates: e })
235
+ });
236
+ return y(o, "调整项目排序失败");
237
+ }
238
+ async function F(e, t = "") {
239
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${d}/todo/items/${e}${n}`, {
240
+ ...c,
241
+ method: "DELETE"
242
+ });
243
+ return y(o, "删除事项失败");
244
+ }
245
+ const j = {
246
+ RUNTIME_MONITOR_VIEW: ["RUNTIME_MONITOR_MANAGE"],
247
+ EVALUATION_VIEW: ["EVALUATION_MANAGE"],
248
+ COLLABORATION_VIEW: [
249
+ "AGENT_MANAGE",
250
+ "SKILL_MANAGE",
251
+ "SCENARIO_MANAGE",
252
+ "PROFILE_MANAGE",
253
+ "TAG_MANAGE",
254
+ "TOOL_MANAGE"
255
+ ],
256
+ EVOLUTION_VIEW: ["EVOLUTION_MANAGE"],
257
+ OPS_CONFIG_VIEW: [
258
+ "OPS_CONFIG_MANAGE",
259
+ "ONCALL_MANAGE",
260
+ "ANNOUNCEMENT_MANAGE",
261
+ "OPS_REPORT_MANAGE"
262
+ ],
263
+ KNOWLEDGE_VIEW: ["KNOWLEDGE_MANAGE"],
264
+ WEBIDE_VIEW: ["WEBIDE_MANAGE"]
265
+ };
266
+ function K(e, t) {
267
+ var o;
268
+ if (!e) return !1;
269
+ if (e.is_global_admin || (o = e.permissions) != null && o.includes(t)) return !0;
270
+ const n = j[t];
271
+ return !!(n != null && n.some((r) => {
272
+ var a;
273
+ return (a = e.permissions) == null ? void 0 : a.includes(r);
274
+ }));
275
+ }
276
+ class Y extends C {
277
+ constructor(t) {
278
+ super(t), this.state = { hasError: !1, error: null };
279
+ }
280
+ static getDerivedStateFromError(t) {
281
+ return { hasError: !0, error: t };
282
+ }
283
+ componentDidCatch(t, n) {
284
+ console.error("[ErrorBoundary]", t, n.componentStack);
285
+ }
286
+ render() {
287
+ var t;
288
+ return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ E(
289
+ "div",
290
+ {
291
+ style: {
292
+ display: "flex",
293
+ flexDirection: "column",
294
+ alignItems: "center",
295
+ justifyContent: "center",
296
+ height: "100%",
297
+ padding: 24,
298
+ color: "#999",
299
+ fontSize: 14,
300
+ gap: 8
301
+ },
302
+ children: [
303
+ /* @__PURE__ */ T("div", { style: { fontSize: 16, fontWeight: 600, color: "#ff4d4f" }, children: "渲染异常" }),
304
+ /* @__PURE__ */ T(
305
+ "div",
306
+ {
307
+ style: {
308
+ maxWidth: 400,
309
+ textAlign: "center",
310
+ wordBreak: "break-word"
311
+ },
312
+ children: ((t = this.state.error) == null ? void 0 : t.message) || "未知错误"
313
+ }
314
+ ),
315
+ /* @__PURE__ */ T(
316
+ "button",
317
+ {
318
+ type: "button",
319
+ onClick: () => this.setState({ hasError: !1, error: null }),
320
+ style: {
321
+ marginTop: 8,
322
+ padding: "4px 16px",
323
+ borderRadius: 4,
324
+ border: "1px solid #d9d9d9",
325
+ background: "#fff",
326
+ cursor: "pointer",
327
+ fontSize: 13
328
+ },
329
+ children: "重试"
330
+ }
331
+ )
332
+ ]
333
+ }
334
+ ) : this.props.children;
335
+ }
336
+ }
337
+ function O(e) {
338
+ const t = e && typeof e == "object" ? e : {}, n = Array.isArray(t.items) ? A(t.items) : [];
339
+ return { ...t, items: n };
340
+ }
341
+ async function H(e, t = "") {
342
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
343
+ `${d}/personal-agents/${e}/schedules${n}`,
344
+ c
345
+ );
346
+ return u(o, "获取定时任务列表失败");
347
+ }
348
+ async function Q(e, t, n, o, r = "", a = "", s = "") {
349
+ const l = s ? `?token=${encodeURIComponent(s)}` : "", m = await i(
350
+ `${d}/personal-agents/${e}/schedules${l}`,
351
+ {
352
+ ...c,
353
+ method: "POST",
354
+ headers: { "Content-Type": "application/json" },
355
+ body: JSON.stringify({
356
+ name: t,
357
+ prompt: n,
358
+ cron_expression: o,
359
+ notify_user_id: r,
360
+ notify_user_name: a
361
+ })
362
+ }
363
+ );
364
+ return u(m, "创建定时任务失败");
365
+ }
366
+ async function X(e, t, n, o = "") {
367
+ const r = o ? `?token=${encodeURIComponent(o)}` : "", a = await i(
368
+ `${d}/personal-agents/${e}/schedules/${t}${r}`,
369
+ {
370
+ ...c,
371
+ method: "PUT",
372
+ headers: { "Content-Type": "application/json" },
373
+ body: JSON.stringify(n)
374
+ }
375
+ );
376
+ return u(a, "更新定时任务失败");
377
+ }
378
+ async function Z(e, t, n = "") {
379
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
380
+ `${d}/personal-agents/${e}/schedules/${t}${o}`,
381
+ {
382
+ ...c,
383
+ method: "DELETE"
384
+ }
385
+ );
386
+ return y(r, "删除定时任务失败");
387
+ }
388
+ async function ee(e, t, n, o = "") {
389
+ const r = o ? `?token=${encodeURIComponent(o)}` : "", a = await i(
390
+ `${d}/personal-agents/${e}/schedules/${t}/toggle${r}`,
391
+ {
392
+ ...c,
393
+ method: "POST",
394
+ headers: { "Content-Type": "application/json" },
395
+ body: JSON.stringify({ enable: n })
396
+ }
397
+ );
398
+ return u(a, "切换定时任务状态失败");
399
+ }
400
+ async function te(e, t, n = 1, o = 20, r = "") {
401
+ const a = new URLSearchParams();
402
+ a.set("page", String(n)), a.set("size", String(o)), r && a.set("token", r);
403
+ const s = await i(
404
+ `${d}/personal-agents/${e}/schedules/${t}/logs?${a.toString()}`,
405
+ c
406
+ ), l = await y(s, "获取执行历史失败");
407
+ return O(l);
408
+ }
409
+ async function ne(e, t, n = "") {
410
+ const o = n ? `?token=${encodeURIComponent(n)}` : "", r = await i(
411
+ `${d}/personal-agents/${e}/schedules/${t}/run${o}`,
412
+ {
413
+ ...c,
414
+ method: "POST"
415
+ }
416
+ );
417
+ return u(r, "手动触发任务失败");
418
+ }
419
+ async function oe(e, t = "", n = "") {
420
+ const o = new URLSearchParams();
421
+ t && o.set("keyword", t), n && o.set("token", n);
422
+ const r = await i(
423
+ `${d}/personal-agents/${e}/schedules/staff-search?${o.toString()}`,
424
+ c
425
+ );
426
+ return (await y(r, "搜索员工失败") ?? []).map((s) => {
427
+ const l = (s == null ? void 0 : s.extend) ?? {};
428
+ return {
429
+ userId: String((s == null ? void 0 : s.userId) ?? (s == null ? void 0 : s.id) ?? ""),
430
+ name: String((s == null ? void 0 : s.name) ?? ""),
431
+ accountNo: String((s == null ? void 0 : s.accountNo) ?? ""),
432
+ jobNumber: String((s == null ? void 0 : s.jobNumber) ?? ""),
433
+ flowerName: String((s == null ? void 0 : s.flowerName) ?? l.flowerName ?? "")
434
+ };
435
+ });
436
+ }
437
+ async function re(e = "", t = 50) {
438
+ const n = new URLSearchParams();
439
+ n.set("limit", String(t)), e && n.set("token", e);
440
+ const o = await i(
441
+ `${d}/personal-agents/schedules/notifications?${n.toString()}`,
442
+ c
443
+ ), r = await y(o, "获取通知失败");
444
+ return O(r);
445
+ }
446
+ async function se(e, t = "") {
447
+ const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
448
+ `${d}/personal-agents/schedules/notifications/${e}/read${n}`,
449
+ {
450
+ ...c,
451
+ method: "POST"
452
+ }
453
+ );
454
+ return y(o, "标记已读失败");
455
+ }
456
+ async function ae(e = "") {
457
+ const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await i(
458
+ `${d}/personal-agents/schedules/notifications/read-all${t}`,
459
+ {
460
+ ...c,
461
+ method: "POST"
462
+ }
463
+ );
464
+ return y(n, "标记已读失败");
465
+ }
466
+ export {
467
+ V as A,
468
+ v as B,
469
+ S as D,
470
+ Y as E,
471
+ H as a,
472
+ re as b,
473
+ te as c,
474
+ Q as d,
475
+ Z as e,
476
+ P as f,
477
+ ae as g,
478
+ K as h,
479
+ k as i,
480
+ q as j,
481
+ J as k,
482
+ W as l,
483
+ se as m,
484
+ x as n,
485
+ F as o,
486
+ _ as p,
487
+ B as q,
488
+ ne as r,
489
+ oe as s,
490
+ ee as t,
491
+ X as u,
492
+ L as v,
493
+ M as w,
494
+ D as x,
495
+ G as y,
496
+ z
497
+ };
@@ -1,4 +1,4 @@
1
- import { s as l } from "./api-C78tCfne.js";
1
+ import { s as l } from "./api-Jfnj1ybB.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-C78tCfne.js";
1
+ import { t as l } from "./api-Jfnj1ybB.js";
2
2
  const d = "USER_INFO";
3
3
  function s() {
4
4
  try {
@@ -1,4 +1,4 @@
1
- import { a as g, f, B as y, u as m } from "./api-C78tCfne.js";
1
+ import { a as g, f, B as y, u as m } from "./api-Jfnj1ybB.js";
2
2
  function t(n, a = "") {
3
3
  const i = new URLSearchParams();
4
4
  Object.entries(n).forEach(([u, o]) => {
@@ -1,5 +1,5 @@
1
- import { create as Ce } from "zustand";
2
- import { Q as je, x as M, i as C, y as ne, k 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, n 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-C78tCfne.js";
1
+ import { create as je } from "zustand";
2
+ import { Q as Ce, H as M, i as j, I as ne, k as A, t as _, J as se, K as Pe, L as Ne, M as we, N as Ee, O as xe, P as Fe, R as ae, S as Re, U as Oe, V as B, W as Ue, X as He, w as ie, Y as Le, Z as $e, _ as Ge, $ as De, a0 as Ve, a1 as Be, a2 as qe, a3 as ze, a4 as Ke, a5 as We, a6 as Je, a7 as Ye, a8 as Ze, a9 as Qe, aa as Xe, s as x, ab as et, ac as oe, ad as tt, ae as nt, af as rt, ag as st, ah as at, ai as it, aj as ot, ak as ct, c as lt, al as ut, am as dt, m as ft, an as mt } from "./api-Jfnj1ybB.js";
3
3
  import { message as F } from "antd";
4
4
  const _e = `[[REASONING:正在分析…]]
5
5
  正在分析…
@@ -65,7 +65,7 @@ function Rt(n) {
65
65
  }
66
66
  function pt(n) {
67
67
  var e;
68
- return ((e = n == null ? void 0 : n.scenario_code) == null ? void 0 : e.trim().toLowerCase()) === je;
68
+ return ((e = n == null ? void 0 : n.scenario_code) == null ? void 0 : e.trim().toLowerCase()) === Ce;
69
69
  }
70
70
  function he(n, t) {
71
71
  return pt(n) && !ye(t);
@@ -220,7 +220,7 @@ function ht(n) {
220
220
  return n.sender_type !== "AGENT" || E(n) || n.content === "已取消" ? !1 : n.content === "处理中..." || n.content === "🔄 正在处理中..." || Q(n.content) || n.content.includes("[[REASONING:") || n.content.includes("[[TOOL_CALL:");
221
221
  }
222
222
  function z(n, t, e, r, s, a) {
223
- if (C(a))
223
+ if (j(a))
224
224
  return a;
225
225
  const o = t ? s : r, i = t ?? null;
226
226
  for (let c = o.length - 1; c >= 0; c--) {
@@ -364,7 +364,7 @@ function me(n, t) {
364
364
  const Ie = "$ref";
365
365
  function N(n) {
366
366
  const t = _(n);
367
- return C(t) ? t : void 0;
367
+ return j(t) ? t : void 0;
368
368
  }
369
369
  function ve(n) {
370
370
  if (!n || typeof n != "object" || Array.isArray(n))
@@ -372,7 +372,7 @@ function ve(n) {
372
372
  const t = Object.keys(n);
373
373
  return t.length === 1 && t[0] === Ie;
374
374
  }
375
- function j(n) {
375
+ function C(n) {
376
376
  if (!(!n || typeof n != "object" || Array.isArray(n)) && !ve(n))
377
377
  return n;
378
378
  }
@@ -381,10 +381,10 @@ function w(n) {
381
381
  }
382
382
  function kt(n) {
383
383
  var s;
384
- const t = j(n.submittedValue);
384
+ const t = C(n.submittedValue);
385
385
  if (w(t))
386
386
  return t;
387
- const e = j((s = n.cardForm) == null ? void 0 : s.value);
387
+ const e = C((s = n.cardForm) == null ? void 0 : s.value);
388
388
  if (w(e))
389
389
  return e;
390
390
  const r = typeof n.result == "string" && n.result.trim() ? n.result.trim() : "";
@@ -405,7 +405,7 @@ function Tt(n) {
405
405
  }
406
406
  }
407
407
  function Zt(n, t) {
408
- const e = t.result == null || t.result === "" ? n.result : String(t.result), r = Tt(t.ext), s = j(
408
+ const e = t.result == null || t.result === "" ? n.result : String(t.result), r = Tt(t.ext), s = C(
409
409
  (r == null ? void 0 : r.submittedValue) ?? (r == null ? void 0 : r.submitted_value)
410
410
  ), a = {
411
411
  ...n,
@@ -420,7 +420,7 @@ function be(n) {
420
420
  const t = n, e = N(t.humanTaskId ?? t.human_task_id);
421
421
  if (e == null)
422
422
  return null;
423
- const r = j(t.cardForm) ?? j(t.card_form), s = j(t.submittedValue ?? t.submitted_value), a = typeof t.result == "string" ? t.result : void 0, o = kt({
423
+ const r = C(t.cardForm) ?? C(t.card_form), s = C(t.submittedValue ?? t.submitted_value), a = typeof t.result == "string" ? t.result : void 0, o = kt({
424
424
  submittedValue: s,
425
425
  cardForm: r,
426
426
  result: a
@@ -477,7 +477,7 @@ function ee(n) {
477
477
  sender_id: r,
478
478
  message_type: String(n.message_type ?? n.messageType ?? "TEXT"),
479
479
  content: String(n.content ?? ""),
480
- task_id: a == null || !C(a) ? null : a,
480
+ task_id: a == null || !j(a) ? null : a,
481
481
  ext: l,
482
482
  created_at: String(n.created_at ?? n.createdAt ?? ""),
483
483
  sender_name: String(n.sender_name ?? n.senderName ?? ""),
@@ -606,7 +606,7 @@ function bt(n, t, e) {
606
606
  const s = [...n];
607
607
  return s[r] = { ...t, id: t.id }, s;
608
608
  }
609
- function Ct(n) {
609
+ function jt(n) {
610
610
  var r;
611
611
  const t = (r = n.currentProject) == null ? void 0 : r.id;
612
612
  if (t == null)
@@ -626,7 +626,7 @@ function Ct(n) {
626
626
  }
627
627
  const L = 80;
628
628
  let ge = 0;
629
- function jt(n) {
629
+ function Ct(n) {
630
630
  let t = (n || "").trim();
631
631
  if (!t) return "";
632
632
  t.length > 2e3 && (t = t.slice(0, 2e3));
@@ -652,7 +652,7 @@ function $() {
652
652
  const n = /* @__PURE__ */ new Date(), t = (e) => String(e).padStart(2, "0");
653
653
  return `${t(n.getHours())}:${t(n.getMinutes())}:${t(n.getSeconds())}`;
654
654
  }
655
- const Xt = 3, en = 4, tn = 5, nn = Ce((n, t) => ({
655
+ const Xt = 3, en = 4, tn = 5, nn = je((n, t) => ({
656
656
  currentUser: null,
657
657
  // FEATURE-ZTEAM-MERGE: 优先 z-opc 的 token, 其次 z-team 原生的 z_team_token
658
658
  token: localStorage.getItem("token") || localStorage.getItem("z_team_token") || "",
@@ -1045,7 +1045,7 @@ const Xt = 3, en = 4, tn = 5, nn = Ce((n, t) => ({
1045
1045
  if (!Z(r))
1046
1046
  return;
1047
1047
  const s = r.id;
1048
- if (!C(s))
1048
+ if (!j(s))
1049
1049
  return;
1050
1050
  const a = t();
1051
1051
  let o = G(r, a.members);
@@ -1366,7 +1366,7 @@ const Xt = 3, en = 4, tn = 5, nn = Ce((n, t) => ({
1366
1366
  },
1367
1367
  expandProject: async (e, r) => {
1368
1368
  var g, P;
1369
- const s = String(e.id), a = (r == null ? void 0 : r.expandTree) === !0, o = t(), i = Ct(o), c = le(e, o.currentUser, e.mode), l = o.expandedProjectIds.includes(s), u = i[s], d = !o.fileTrees[s] || o.fileTrees[s].length === 0;
1369
+ const s = String(e.id), a = (r == null ? void 0 : r.expandTree) === !0, o = t(), i = jt(o), c = le(e, o.currentUser, e.mode), l = o.expandedProjectIds.includes(s), u = i[s], d = !o.fileTrees[s] || o.fileTrees[s].length === 0;
1370
1370
  if (((g = o.currentProject) == null ? void 0 : g.id) === s && o.projectSwitchSeq > 0) {
1371
1371
  a && !l && (n({
1372
1372
  expandedProjectIds: [
@@ -1643,8 +1643,8 @@ const Xt = 3, en = 4, tn = 5, nn = Ce((n, t) => ({
1643
1643
  const r = ee(
1644
1644
  e
1645
1645
  ), s = _(r.task_id);
1646
- if (C(s)) {
1647
- const d = jt(r.content);
1646
+ if (j(s)) {
1647
+ const d = Ct(r.content);
1648
1648
  d && t().pushTaskActivity(
1649
1649
  s,
1650
1650
  d,
@@ -1662,7 +1662,7 @@ const Xt = 3, en = 4, tn = 5, nn = Ce((n, t) => ({
1662
1662
  { ...r, task_id: o },
1663
1663
  t().members
1664
1664
  ), c = i.id;
1665
- C(c) && n((d) => {
1665
+ j(c) && n((d) => {
1666
1666
  let f = d.taskMessages;
1667
1667
  if (i.sender_type === "AGENT" && i.task_id && (f = f.filter(
1668
1668
  (g) => !(M(g.id) && g.sender_type === "AGENT" && g.task_id === i.task_id)