@yuku123/z-team-component 0.2.75 → 0.2.77
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-BJxIhIPc.js → ChangeLogView-DwuIBDL5.js} +1 -1
- package/dist/{ComponentDoc-CMfr27b7.js → ComponentDoc-B83ray2w.js} +5 -5
- package/dist/{InvitationManagementPage-SMhrq5dN.js → InvitationManagementPage-CIzCRWPq.js} +1 -1
- package/dist/{OnboardingPage-CjLgp-jE.js → OnboardingPage-BpjNlxUb.js} +2 -2
- package/dist/{ScheduledTasks-C2wsuoa9.js → ScheduledTasks-B87VNnoB.js} +5 -5
- package/dist/{SystemShell-y3kvbENk.js → SystemShell-B0kCPBz3.js} +4 -4
- package/dist/{api-CVKSSNXw.js → api-CpE2blgj.js} +1 -1
- package/dist/{createWorkspaceWsHandler-25JfnMML.js → createWorkspaceWsHandler-CzfcRs0V.js} +3801 -3890
- package/dist/index-B2rRYGQK.js +9567 -0
- package/dist/{index-B_oOPFoQ.js → index-BBu4pWAN.js} +2 -2
- package/dist/{index-DWd0Y6qP.js → index-BHDrnEnt.js} +2 -2
- package/dist/{index-CeCBja5s.js → index-BO5y0Gwn.js} +3 -3
- package/dist/{index-WIsi8fln.js → index-B_LJRFsK.js} +73 -73
- package/dist/{index-CbTwXfER.js → index-BoJxTQwX.js} +68 -68
- package/dist/{index-BADGOdUu.js → index-BydWNuk5.js} +392 -392
- package/dist/{index-CfW9kGYJ.js → index-CW-JDoj9.js} +3 -3
- package/dist/{index-D54nAoGP.js → index-CpAUbzCH.js} +5 -5
- package/dist/{index-CchpPnBl.js → index-D1KPGWN9.js} +1 -1
- package/dist/{index-DfecivMN.js → index-D6yh1Kok.js} +13 -13
- package/dist/{index-C9YhDxMT.js → index-DCwvhwes.js} +1 -1
- package/dist/{index-BA3lZUmW.js → index-DF2jRLkS.js} +1 -1
- package/dist/{index-rPNKkWaw.js → index-DK6-iytM.js} +1 -1
- package/dist/{index-fW1JBhEB.js → index-DTBIyd4I.js} +2 -2
- package/dist/{index-3c6HvG__.js → index-DahQUH9c.js} +1 -1
- package/dist/{index-B_O9mXF6.js → index-DeT_z9Dg.js} +1 -1
- package/dist/{index-C6S3MIu4.js → index-DhDdFRHC.js} +2 -2
- package/dist/index-LA0c93lD.js +2908 -0
- package/dist/{index-_53KTMhL.js → index-Sk6xoy0n.js} +1 -1
- package/dist/{index-Pq3n7-vE.js → index-cDBJpBAd.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{instance-B9aQMplq.js → instance-CDGmSyID.js} +13 -13
- package/dist/{menuPermission-CtJddtOO.js → menuPermission-Cn3TADR1.js} +2 -2
- package/dist/pages.js +3 -3
- package/dist/personal-VG7XVvW-.js +294 -0
- package/dist/{schedule-iMEGim0L.js → schedule-Dt_ZRuce.js} +268 -230
- package/dist/webide-BM1A4eJr.js +8399 -0
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
- package/dist/admin-logs-asBlA9MU.js +0 -199
- package/dist/index-Cd_xAvmO.js +0 -9419
- package/dist/index-e9H9wjYU.js +0 -2882
- package/dist/webide-BlpH-J-H.js +0 -8255
|
@@ -7,7 +7,7 @@ import { message as U, Input as H, Tooltip as se, Button as g, Spin as ce, Empty
|
|
|
7
7
|
import ve from "react-markdown";
|
|
8
8
|
import _e from "rehype-highlight";
|
|
9
9
|
import ge from "remark-gfm";
|
|
10
|
-
import { M as oa } from "./index-
|
|
10
|
+
import { M as oa } from "./index-CpAUbzCH.js";
|
|
11
11
|
function j(a) {
|
|
12
12
|
return a ? `?token=${encodeURIComponent(a)}` : "";
|
|
13
13
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { Navigate as t } from "react-router-dom";
|
|
3
3
|
import { lazy as A } from "react";
|
|
4
4
|
import { UnorderedListOutlined as i, HistoryOutlined as T, ClusterOutlined as p, DashboardOutlined as s, ExperimentOutlined as q, SettingOutlined as d, KeyOutlined as n, AppstoreOutlined as r, SafetyCertificateOutlined as P, TeamOutlined as w, ProfileOutlined as b, ApiOutlined as u, HddOutlined as l, ApartmentOutlined as g, InboxOutlined as k, FileTextOutlined as y, SendOutlined as G, CloudServerOutlined as a, NodeIndexOutlined as z, TableOutlined as f, SearchOutlined as m, DatabaseOutlined as v, ConsoleSqlOutlined as E, BranchesOutlined as I, DeploymentUnitOutlined as M, BookOutlined as h, FundOutlined as N, CloudUploadOutlined as _, TagsOutlined as x, CodeOutlined as B } from "@ant-design/icons";
|
|
5
|
-
import { W as R } from "./index-
|
|
5
|
+
import { W as R } from "./index-BBu4pWAN.js";
|
|
6
6
|
import { ConfigApp as U } from "@yuku123/z-config-component";
|
|
7
7
|
import { MistApp as H } from "@yuku123/z-mist-component";
|
|
8
8
|
import { MetaApp as L } from "@yuku123/z-meta-component";
|
|
@@ -16,7 +16,7 @@ import { MqApp as Z } from "@yuku123/z-mq-component";
|
|
|
16
16
|
import { OssApp as J } from "@yuku123/z-oss-component";
|
|
17
17
|
import { ZkbApp as X } from "@yuku123/z-kb-component";
|
|
18
18
|
import { ScriptProductizationPage as o } from "@yuku123/z-agent-component";
|
|
19
|
-
import "./index-
|
|
19
|
+
import "./index-B2rRYGQK.js";
|
|
20
20
|
const $ = "/api/graph";
|
|
21
21
|
let O = !1;
|
|
22
22
|
function ee() {
|
package/dist/index.js
CHANGED
|
@@ -69,14 +69,14 @@ async function C(e) {
|
|
|
69
69
|
);
|
|
70
70
|
return c(n, "获取工单信息失败");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function v(e) {
|
|
73
73
|
return String(e.currentStage ?? e.current_stage ?? "").trim();
|
|
74
74
|
}
|
|
75
75
|
function g(e) {
|
|
76
76
|
const n = e.trim().replace(/[/\\:*?"<>|]/g, "_");
|
|
77
77
|
return n.length > 0 ? n.slice(0, 80) : "workspace";
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function T(e, n) {
|
|
80
80
|
var i;
|
|
81
81
|
const t = e.requirementTitle && e.requirementTitle.trim() || n, s = { ticket_id: n }, a = (i = e.foneUrl) == null ? void 0 : i.trim();
|
|
82
82
|
return a && (s.work_order_url = a), {
|
|
@@ -127,7 +127,7 @@ async function b(e = "") {
|
|
|
127
127
|
};
|
|
128
128
|
return {
|
|
129
129
|
scenario_instance_id: a,
|
|
130
|
-
name: String(s.name ?? "Z-
|
|
130
|
+
name: String(s.name ?? "Z-OPC 自身答疑"),
|
|
131
131
|
scenario_code: String(s.scenario_code ?? "qa_support"),
|
|
132
132
|
workspace_path: String(s.workspace_path ?? ""),
|
|
133
133
|
status: String(s.status ?? "ACTIVE")
|
|
@@ -142,7 +142,7 @@ async function y(e, n = "") {
|
|
|
142
142
|
(l) => u(l)
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
|
-
async function
|
|
145
|
+
async function O(e) {
|
|
146
146
|
const n = await o(
|
|
147
147
|
`${r}/scenario-instances/${e}/close-feedback-tags`,
|
|
148
148
|
{
|
|
@@ -152,7 +152,7 @@ async function A(e) {
|
|
|
152
152
|
);
|
|
153
153
|
return await c(n, "获取关单标签失败");
|
|
154
154
|
}
|
|
155
|
-
async function
|
|
155
|
+
async function P(e) {
|
|
156
156
|
const n = await o(`${r}/scenario-instances/${e}/reopen`, {
|
|
157
157
|
...d,
|
|
158
158
|
method: "POST",
|
|
@@ -160,7 +160,7 @@ async function N(e) {
|
|
|
160
160
|
}), t = await c(n, "重新开启失败");
|
|
161
161
|
return u(t);
|
|
162
162
|
}
|
|
163
|
-
async function
|
|
163
|
+
async function A(e, n) {
|
|
164
164
|
const t = await o(`${r}/scenario-instances/${e}/close`, {
|
|
165
165
|
...d,
|
|
166
166
|
method: "POST",
|
|
@@ -169,7 +169,7 @@ async function O(e, n) {
|
|
|
169
169
|
}), s = await c(t, "关单失败");
|
|
170
170
|
return u(s);
|
|
171
171
|
}
|
|
172
|
-
async function
|
|
172
|
+
async function N(e) {
|
|
173
173
|
const n = await o(
|
|
174
174
|
`${r}/scenario-instances/${e}/retry-init`,
|
|
175
175
|
{
|
|
@@ -199,18 +199,18 @@ async function F(e = "", n = 8) {
|
|
|
199
199
|
}
|
|
200
200
|
export {
|
|
201
201
|
h as a,
|
|
202
|
-
|
|
202
|
+
T as b,
|
|
203
203
|
F as c,
|
|
204
204
|
I as d,
|
|
205
205
|
b as e,
|
|
206
206
|
C as f,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
O as g,
|
|
208
|
+
A as h,
|
|
209
|
+
N as i,
|
|
210
210
|
k as j,
|
|
211
211
|
y as k,
|
|
212
212
|
S as l,
|
|
213
213
|
U as m,
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
v as p,
|
|
215
|
+
P as r
|
|
216
216
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { Alert as h } from "antd";
|
|
3
3
|
import { u as d } from "./useAppStore-DQP0l22d.js";
|
|
4
|
-
import { h as g } from "./schedule-
|
|
5
|
-
import { N as A } from "./index-
|
|
4
|
+
import { h as g } from "./schedule-Dt_ZRuce.js";
|
|
5
|
+
import { N as A } from "./index-B2rRYGQK.js";
|
|
6
6
|
function P() {
|
|
7
7
|
return d((n) => n.permissionState) !== "failed" ? null : /* @__PURE__ */ a(
|
|
8
8
|
h,
|
package/dist/pages.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createElement as e } from "react";
|
|
2
2
|
import { BellOutlined as t, ProjectOutlined as o, DesktopOutlined as r, ReadOutlined as a } from "@ant-design/icons";
|
|
3
|
-
import { S as m, P as p, C as i, Z as n } from "./ComponentDoc-
|
|
3
|
+
import { S as m, P as p, C as i, Z as n } from "./ComponentDoc-B83ray2w.js";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react-router-dom";
|
|
6
6
|
import "antd";
|
|
7
7
|
import "@yuku123/z-frontend-common";
|
|
8
8
|
import "@yuku123/z-frontend-common/ui";
|
|
9
|
-
const h = { title: "
|
|
9
|
+
const h = { title: "Z-OPC 一人公司基建", short: "team" }, O = [
|
|
10
10
|
{ path: "/team/subscribe", title: "订阅", order: 1, Component: m },
|
|
11
11
|
{ path: "/team/project", title: "项目", order: 2, Component: p },
|
|
12
12
|
// 组件文档页(lead 008 §7):放在 /team/:rest* 兜底之前,否则会被兜底路由吃掉。
|
|
@@ -17,5 +17,5 @@ e(t), e(o), e(r), e(a);
|
|
|
17
17
|
export {
|
|
18
18
|
i as ComponentDocPage,
|
|
19
19
|
h as appMeta,
|
|
20
|
-
|
|
20
|
+
O as routes
|
|
21
21
|
};
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { m as p, a, f as r, B as c, n as $, u as i } from "./api-DPkUB1DA.js";
|
|
2
|
+
import { u as d } from "./useAppStore-DQP0l22d.js";
|
|
3
|
+
async function m() {
|
|
4
|
+
d.getState().token && await p().catch(() => {
|
|
5
|
+
}), localStorage.removeItem("token"), localStorage.removeItem("z_team_token"), localStorage.removeItem("userInfo"), localStorage.removeItem("USER_INFO"), localStorage.removeItem("z_ctc_token"), localStorage.removeItem("ctcUrl"), window.USER_INFO = void 0, d.setState({ currentUser: null, token: "", currentProject: void 0 });
|
|
6
|
+
}
|
|
7
|
+
async function g(e = "", t = !1) {
|
|
8
|
+
const n = new URLSearchParams();
|
|
9
|
+
e && n.set("token", e), t && n.set("allUsers", "true");
|
|
10
|
+
const o = n.toString() ? `?${n.toString()}` : "", s = await a(`${c}/personal-note/tree${o}`, r);
|
|
11
|
+
return $(s, "获取笔记文件树失败");
|
|
12
|
+
}
|
|
13
|
+
async function h(e, t = "") {
|
|
14
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await a(`${c}/personal-note${n}`, {
|
|
15
|
+
...r,
|
|
16
|
+
method: "POST",
|
|
17
|
+
headers: { "Content-Type": "application/json" },
|
|
18
|
+
body: JSON.stringify(e)
|
|
19
|
+
});
|
|
20
|
+
return i(o, "新建笔记失败");
|
|
21
|
+
}
|
|
22
|
+
async function S(e, t = "") {
|
|
23
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await a(`${c}/personal-note/${e}${n}`, r);
|
|
24
|
+
return $(o, "获取笔记内容失败");
|
|
25
|
+
}
|
|
26
|
+
async function w(e, t, n = "") {
|
|
27
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", s = await a(`${c}/personal-note/${e}${o}`, {
|
|
28
|
+
...r,
|
|
29
|
+
method: "PUT",
|
|
30
|
+
headers: { "Content-Type": "application/json" },
|
|
31
|
+
body: JSON.stringify(t)
|
|
32
|
+
});
|
|
33
|
+
return i(s, "保存笔记失败");
|
|
34
|
+
}
|
|
35
|
+
async function C(e, t, n = "") {
|
|
36
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", s = await a(`${c}/personal-note/${e}/rename${o}`, {
|
|
37
|
+
...r,
|
|
38
|
+
method: "PUT",
|
|
39
|
+
headers: { "Content-Type": "application/json" },
|
|
40
|
+
body: JSON.stringify({ title: t })
|
|
41
|
+
});
|
|
42
|
+
return i(s, "重命名失败");
|
|
43
|
+
}
|
|
44
|
+
async function I(e, t, n = "") {
|
|
45
|
+
const o = n ? `?token=${encodeURIComponent(n)}` : "", s = await a(`${c}/personal-note/${e}/move${o}`, {
|
|
46
|
+
...r,
|
|
47
|
+
method: "PUT",
|
|
48
|
+
headers: { "Content-Type": "application/json" },
|
|
49
|
+
body: JSON.stringify(t)
|
|
50
|
+
});
|
|
51
|
+
return i(s, "移动节点失败");
|
|
52
|
+
}
|
|
53
|
+
async function U(e, t = "") {
|
|
54
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await a(`${c}/personal-note/${e}${n}`, {
|
|
55
|
+
...r,
|
|
56
|
+
method: "DELETE"
|
|
57
|
+
});
|
|
58
|
+
return i(o, "删除笔记失败");
|
|
59
|
+
}
|
|
60
|
+
async function v(e, t, n, o = "") {
|
|
61
|
+
const s = new URLSearchParams();
|
|
62
|
+
s.set("bindKey", e), s.set("defaultTitle", t), s.set("extraInfo", n), o && s.set("token", o);
|
|
63
|
+
const l = await a(
|
|
64
|
+
`${c}/personal-note/bound?${s.toString()}`,
|
|
65
|
+
r
|
|
66
|
+
);
|
|
67
|
+
return $(l, "获取绑定笔记失败");
|
|
68
|
+
}
|
|
69
|
+
async function T(e, t = "") {
|
|
70
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await a(`${c}/personal-note/${e}/share${n}`, {
|
|
71
|
+
...r,
|
|
72
|
+
method: "POST"
|
|
73
|
+
});
|
|
74
|
+
return i(o, "生成分享链接失败");
|
|
75
|
+
}
|
|
76
|
+
async function O(e = "") {
|
|
77
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await a(
|
|
78
|
+
`${c}/personal-note/favorites${t}`,
|
|
79
|
+
r
|
|
80
|
+
);
|
|
81
|
+
return $(n, "获取收藏列表失败");
|
|
82
|
+
}
|
|
83
|
+
async function R(e, t = "") {
|
|
84
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await a(`${c}/personal-note/${e}/favorite${n}`, {
|
|
85
|
+
...r,
|
|
86
|
+
method: "POST"
|
|
87
|
+
});
|
|
88
|
+
return i(o, "收藏笔记失败");
|
|
89
|
+
}
|
|
90
|
+
async function N(e, t = "") {
|
|
91
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", o = await a(`${c}/personal-note/${e}/favorite${n}`, {
|
|
92
|
+
...r,
|
|
93
|
+
method: "DELETE"
|
|
94
|
+
});
|
|
95
|
+
return i(o, "取消收藏失败");
|
|
96
|
+
}
|
|
97
|
+
async function P(e, t = 50) {
|
|
98
|
+
const n = await a(
|
|
99
|
+
`${c}/scenario-instances/${e}/observer-dispatch-logs?limit=${t}`,
|
|
100
|
+
{ ...r }
|
|
101
|
+
);
|
|
102
|
+
return i(n, "查询派发日志失败");
|
|
103
|
+
}
|
|
104
|
+
async function b(e, t) {
|
|
105
|
+
const n = await a(
|
|
106
|
+
`${c}/scenario-instances/${e}/observer-dispatch-logs/${t}`,
|
|
107
|
+
{ ...r }
|
|
108
|
+
);
|
|
109
|
+
return i(n, "查询派发日志详情失败");
|
|
110
|
+
}
|
|
111
|
+
async function q(e) {
|
|
112
|
+
const t = await a(
|
|
113
|
+
`${c}/scenario-instances/${e}/observer/trigger`,
|
|
114
|
+
{ ...r, method: "POST" }
|
|
115
|
+
);
|
|
116
|
+
return i(t, "触发观察失败");
|
|
117
|
+
}
|
|
118
|
+
function u(e) {
|
|
119
|
+
const t = new URLSearchParams();
|
|
120
|
+
Object.entries(e).forEach(([o, s]) => {
|
|
121
|
+
if (!(s == null || s === "")) {
|
|
122
|
+
if (Array.isArray(s)) {
|
|
123
|
+
s.forEach((l) => {
|
|
124
|
+
l != null && l !== "" && t.append(o, String(l));
|
|
125
|
+
});
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
t.append(o, String(s));
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
const n = t.toString();
|
|
132
|
+
return n ? `?${n}` : "";
|
|
133
|
+
}
|
|
134
|
+
async function E(e) {
|
|
135
|
+
const t = await a(
|
|
136
|
+
`${c}/admin/tool-call-logs${u(e)}`,
|
|
137
|
+
r
|
|
138
|
+
);
|
|
139
|
+
return i(t, "查询工具调用日志失败");
|
|
140
|
+
}
|
|
141
|
+
async function A(e, t = "") {
|
|
142
|
+
const n = await a(
|
|
143
|
+
`${c}/admin/tool-call-logs/${e}${u({ token: t })}`,
|
|
144
|
+
r
|
|
145
|
+
);
|
|
146
|
+
return i(n, "查询工具调用日志详情失败");
|
|
147
|
+
}
|
|
148
|
+
async function L(e = "") {
|
|
149
|
+
const t = await a(
|
|
150
|
+
`${c}/admin/tool-call-logs/tool-types${u({ token: e })}`,
|
|
151
|
+
r
|
|
152
|
+
);
|
|
153
|
+
return i(t, "查询工具类型失败");
|
|
154
|
+
}
|
|
155
|
+
async function _(e = "") {
|
|
156
|
+
const t = await a(
|
|
157
|
+
`${c}/admin/tool-call-logs/agents/names${u({ token: e })}`,
|
|
158
|
+
r
|
|
159
|
+
);
|
|
160
|
+
return i(t, "查询 Agent 名称失败");
|
|
161
|
+
}
|
|
162
|
+
async function j(e) {
|
|
163
|
+
const t = await a(
|
|
164
|
+
`${c}/admin/tool-call-logs/stats${u(e)}`,
|
|
165
|
+
r
|
|
166
|
+
);
|
|
167
|
+
return i(t, "查询工具调用统计失败");
|
|
168
|
+
}
|
|
169
|
+
async function D(e) {
|
|
170
|
+
const t = await a(
|
|
171
|
+
`${c}/admin/tool-call-logs/overview${u(e)}`,
|
|
172
|
+
r
|
|
173
|
+
);
|
|
174
|
+
return i(t, "查询工具调用概览统计失败");
|
|
175
|
+
}
|
|
176
|
+
async function J(e = "") {
|
|
177
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await a(`${c}/personal-agents${t}`, r);
|
|
178
|
+
return i(n, "获取个人 Agent 列表失败");
|
|
179
|
+
}
|
|
180
|
+
async function k(e) {
|
|
181
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await a(
|
|
182
|
+
`${c}/personal-agents/custom-models${t}`,
|
|
183
|
+
r
|
|
184
|
+
);
|
|
185
|
+
return i(n, "获取自定义模型失败");
|
|
186
|
+
}
|
|
187
|
+
async function x(e, t) {
|
|
188
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await a(`${c}/personal-agents/custom-models${n}`, {
|
|
189
|
+
...r,
|
|
190
|
+
method: "POST",
|
|
191
|
+
headers: { "Content-Type": "application/json" },
|
|
192
|
+
body: JSON.stringify(t)
|
|
193
|
+
});
|
|
194
|
+
return i(o, "创建自定义模型失败");
|
|
195
|
+
}
|
|
196
|
+
async function F(e, t, n) {
|
|
197
|
+
const o = e ? `?token=${encodeURIComponent(e)}` : "", s = await a(
|
|
198
|
+
`${c}/personal-agents/custom-models/${t}/toggle${o}`,
|
|
199
|
+
{
|
|
200
|
+
...r,
|
|
201
|
+
method: "POST",
|
|
202
|
+
headers: { "Content-Type": "application/json" },
|
|
203
|
+
body: JSON.stringify({ enable: n })
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
return i(s, "切换自定义模型失败");
|
|
207
|
+
}
|
|
208
|
+
async function B(e, t) {
|
|
209
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await a(
|
|
210
|
+
`${c}/personal-agents/custom-models/${t}${n}`,
|
|
211
|
+
{ ...r, method: "DELETE" }
|
|
212
|
+
);
|
|
213
|
+
await i(o, "删除自定义模型失败");
|
|
214
|
+
}
|
|
215
|
+
async function M(e) {
|
|
216
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await a(
|
|
217
|
+
`${c}/personal-agents/user-settings${t}`,
|
|
218
|
+
r
|
|
219
|
+
), o = await i(n, "获取设置失败");
|
|
220
|
+
try {
|
|
221
|
+
return JSON.parse(o.config || "{}");
|
|
222
|
+
} catch {
|
|
223
|
+
return {};
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
async function z(e, t) {
|
|
227
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await a(`${c}/personal-agents/user-settings${n}`, {
|
|
228
|
+
...r,
|
|
229
|
+
method: "POST",
|
|
230
|
+
headers: { "Content-Type": "application/json" },
|
|
231
|
+
body: JSON.stringify({ config: JSON.stringify(t) })
|
|
232
|
+
});
|
|
233
|
+
await i(o, "保存设置失败");
|
|
234
|
+
}
|
|
235
|
+
async function H(e) {
|
|
236
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await a(
|
|
237
|
+
`${c}/personal-agents/sessions/export${t}`,
|
|
238
|
+
r
|
|
239
|
+
);
|
|
240
|
+
return i(n, "导出失败");
|
|
241
|
+
}
|
|
242
|
+
async function K(e, t) {
|
|
243
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", o = await a(`${c}/personal-agents/devices/touch${n}`, {
|
|
244
|
+
...r,
|
|
245
|
+
method: "POST",
|
|
246
|
+
headers: { "Content-Type": "application/json" },
|
|
247
|
+
body: JSON.stringify({ deviceLabel: t })
|
|
248
|
+
});
|
|
249
|
+
return i(o, "设备上报失败");
|
|
250
|
+
}
|
|
251
|
+
async function Q(e) {
|
|
252
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await a(`${c}/personal-agents/devices${t}`, r);
|
|
253
|
+
return (await i(n, "加载设备失败") || []).map((s) => ({
|
|
254
|
+
id: Number(s.id),
|
|
255
|
+
userId: String(s.user_id ?? s.userId ?? ""),
|
|
256
|
+
deviceLabel: String(s.device_label ?? s.deviceLabel ?? ""),
|
|
257
|
+
firstSeenAt: String(s.first_seen_at ?? s.firstSeenAt ?? ""),
|
|
258
|
+
lastSeenAt: String(s.last_seen_at ?? s.lastSeenAt ?? "")
|
|
259
|
+
}));
|
|
260
|
+
}
|
|
261
|
+
export {
|
|
262
|
+
L as A,
|
|
263
|
+
_ as B,
|
|
264
|
+
E as C,
|
|
265
|
+
A as D,
|
|
266
|
+
D as E,
|
|
267
|
+
j as F,
|
|
268
|
+
O as a,
|
|
269
|
+
T as b,
|
|
270
|
+
N as c,
|
|
271
|
+
R as d,
|
|
272
|
+
J as e,
|
|
273
|
+
S as f,
|
|
274
|
+
g,
|
|
275
|
+
h,
|
|
276
|
+
U as i,
|
|
277
|
+
M as j,
|
|
278
|
+
z as k,
|
|
279
|
+
k as l,
|
|
280
|
+
I as m,
|
|
281
|
+
Q as n,
|
|
282
|
+
B as o,
|
|
283
|
+
x as p,
|
|
284
|
+
H as q,
|
|
285
|
+
C as r,
|
|
286
|
+
m as s,
|
|
287
|
+
F as t,
|
|
288
|
+
w as u,
|
|
289
|
+
v,
|
|
290
|
+
P as w,
|
|
291
|
+
b as x,
|
|
292
|
+
q as y,
|
|
293
|
+
K as z
|
|
294
|
+
};
|