@yuku123/z-team-component 0.2.142 → 0.2.144
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/{AdminModuleContent-DIntalEE.js → AdminModuleContent-CI41-loR.js} +6 -6
- package/dist/{ChangeLogView-BG0idpcI.js → ChangeLogView-CX_OBYdc.js} +1 -1
- package/dist/{ComponentDoc-DmA8kQED.js → ComponentDoc-BHX2fG49.js} +3 -3
- package/dist/{InvitationManagementPage-BmvQrlzu.js → InvitationManagementPage-BGAOTVOU.js} +1 -1
- package/dist/{OnboardingPage-BNqu7ED-.js → OnboardingPage-m7WDhG28.js} +2 -2
- package/dist/{ScheduledTasks-BpLYITou.js → ScheduledTasks-DqvvqROs.js} +6 -6
- package/dist/SettingsModal-COXFhGnd.js +1103 -0
- package/dist/{SystemShell-CHJGJAor.js → SystemShell-Bds4cq9N.js} +336 -287
- package/dist/{admin-logs-CGbHioxz.js → admin-logs-BwDg5q4t.js} +1 -1
- package/dist/{api-DTQ6gite.js → api-CskpHyom.js} +1 -1
- package/dist/{api-CVAq8S_3.js → api-G8KaVVN3.js} +1 -1
- package/dist/{createWorkspaceWsHandler-eEZssgTR.js → createWorkspaceWsHandler-ctpaXi2d.js} +1941 -1942
- package/dist/{index-CwohTaZ3.js → index-B17uPWGl.js} +4 -4
- package/dist/{index-BruNw5wQ.js → index-B7JFmBYe.js} +1 -1
- package/dist/{index-BXas8GPY.js → index-BMUQTAmb.js} +2 -2
- package/dist/{index-DUEGauT8.js → index-BOly7cia.js} +1 -1
- package/dist/index-BYnrTKwB.js +8411 -0
- package/dist/{index-WYKbD2Kc.js → index-BZc2uUlh.js} +1 -1
- package/dist/{index-C6TJo_6f.js → index-BgG4dDXJ.js} +3 -3
- package/dist/{index-DoQpFpjM.js → index-CI6Emdzl.js} +285 -293
- package/dist/{index-1hUJPdXC.js → index-CJKCpzvH.js} +2 -2
- package/dist/{index-ZTJ7n_J_.js → index-CRhxaCtd.js} +21 -21
- package/dist/{index-ByWmrjar.js → index-CUPU72rT.js} +2 -2
- package/dist/{index-DCbdksxa.js → index-DGaDQP0Y.js} +3 -3
- package/dist/{index-iFIFnLjk.js → index-DQe837UG.js} +3 -3
- package/dist/{index-DnA9mLM4.js → index-DWxhaeje.js} +2 -2
- package/dist/{index-CnHG8LvQ.js → index-DZFSy0Rv.js} +2 -2
- package/dist/{index-DNofgrle.js → index-DmfZyJzc.js} +2 -2
- package/dist/{index-CkFZb89W.js → index-DmrI2KwP.js} +3 -3
- package/dist/{index-D2qy0vH-.js → index-DoXcaHVL.js} +2 -2
- package/dist/index-Dpcve4hK.js +20 -0
- package/dist/{index-BiKw2Cl_.js → index-DyTKK4_R.js} +1 -1
- package/dist/{index-G4_ZNL1t.js → index-Svv8bFhP.js} +2 -2
- package/dist/{index-ClaU3cVV.js → index-UM4UGCCT.js} +2 -2
- package/dist/{index-B02tvvRk.js → index-aGZZ0IIh.js} +1 -1
- package/dist/{index-BLDm7Ltq.js → index-i8ZgRX12.js} +4 -4
- package/dist/{index-D6jssKSM.js → index-iRJ67LFe.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{instance-Ce0ksjOY.js → instance-DxMam1i4.js} +1 -1
- package/dist/{menuPermission-CXN-JDku.js → menuPermission-B3X5wSsa.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-Caz3lGg6.js → send-default-agent-team-message-Ba49_sZR.js} +1 -1
- package/dist/{training-ry7fCVV4.js → training-BRcZMYpA.js} +1 -1
- package/dist/{webide-DyvaibPK.js → webide-DWzy29mH.js} +3 -3
- package/dist/z-team-component.css +1 -1
- package/package.json +2 -2
- package/dist/index-CSuF7xTK.js +0 -9496
|
@@ -0,0 +1,1103 @@
|
|
|
1
|
+
import { jsxs as a, Fragment as H, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useRef as W, useMemo as F, useEffect as M, useCallback as G } from "react";
|
|
3
|
+
import { f as X, p as q, a as Y, b as V, l as ee, r as ne, t as te, c as ae, d as ce, e as ie, g as se, h as j } from "./createWorkspaceWsHandler-ctpaXi2d.js";
|
|
4
|
+
import { o as le, t as oe, v as Z, U as re, x as Q, b as de, K as me, H as he, B as ue, R as pe, y as Ne, Z as ve, z as fe, E as _e, G as ye, I as ge, Q as be, J as Ce } from "./index-BYnrTKwB.js";
|
|
5
|
+
import { a as we, f as Te, B as Se, b as ke } from "./ComponentDoc-BHX2fG49.js";
|
|
6
|
+
async function Be(c = {}, i = "") {
|
|
7
|
+
const t = new URLSearchParams();
|
|
8
|
+
c.keyword && t.set("keyword", c.keyword), c.category && t.set("category", c.category), c.status !== void 0 && t.set("status", String(c.status)), i && t.set("token", i);
|
|
9
|
+
const h = await we(
|
|
10
|
+
`${Se}/admin/ft-skills?${t.toString()}`,
|
|
11
|
+
Te
|
|
12
|
+
), m = await ke(h, "获取 FT skill 列表失败");
|
|
13
|
+
if (Array.isArray(m)) return m;
|
|
14
|
+
const o = m == null ? void 0 : m.items;
|
|
15
|
+
return Array.isArray(o) ? o : [];
|
|
16
|
+
}
|
|
17
|
+
const Oe = "_overlay_iopci_1", Ae = "_modal_iopci_11", Ie = "_closeBtn_iopci_24", Ee = "_dockedPage_iopci_45", Pe = "_menuCol_iopci_55", De = "_searchBox_iopci_66", Re = "_menuGroup_iopci_90", Me = "_menuGroupTitle_iopci_96", He = "_menuItem_iopci_103", Le = "_menuItemActive_iopci_124", $e = "_menuItemDisabled_iopci_130", xe = "_menuIcon_iopci_135", Ge = "_menuEmpty_iopci_140", Ke = "_contentCol_iopci_148", ze = "_contentHeader_iopci_156", Ue = "_contentHeaderRow_iopci_163", We = "_saveStatus_iopci_174", Fe = "_saveStatusError_iopci_180", qe = "_contentBody_iopci_184", je = "_section_iopci_190", Qe = "_sectionTitle_iopci_194", Ze = "_card_iopci_201", Je = "_row_iopci_208", Xe = "_rowMain_iopci_220", Ye = "_rowTitle_iopci_224", Ve = "_rowDesc_iopci_230", en = "_selectBox_iopci_237", nn = "_disabled_iopci_270", tn = "_placeholderHost_iopci_276", an = "_placeholderIcon_iopci_286", cn = "_placeholderTitle_iopci_291", sn = "_placeholderDesc_iopci_296", ln = "_fieldInput_iopci_301", on = "_formGrid_iopci_316", rn = "_formActions_iopci_322", dn = "_primaryBtn_iopci_326", mn = "_ghostBtn_iopci_340", hn = "_switchBtn_iopci_355", un = "_switchOn_iopci_379", pn = "_mono_iopci_385", Nn = "_hint_iopci_390", vn = "_errorTip_iopci_396", fn = "_emptyTip_iopci_401", _n = "_selectWrap_iopci_408", yn = "_inputCell_iopci_443", gn = "_sectionHeadRow_iopci_448", bn = "_formHint_iopci_464", Cn = "_successTip_iopci_470", wn = "_enablePill_iopci_476", Tn = "_enableOn_iopci_488", n = {
|
|
18
|
+
overlay: Oe,
|
|
19
|
+
modal: Ae,
|
|
20
|
+
closeBtn: Ie,
|
|
21
|
+
dockedPage: Ee,
|
|
22
|
+
menuCol: Pe,
|
|
23
|
+
searchBox: De,
|
|
24
|
+
menuGroup: Re,
|
|
25
|
+
menuGroupTitle: Me,
|
|
26
|
+
menuItem: He,
|
|
27
|
+
menuItemActive: Le,
|
|
28
|
+
menuItemDisabled: $e,
|
|
29
|
+
menuIcon: xe,
|
|
30
|
+
menuEmpty: Ge,
|
|
31
|
+
contentCol: Ke,
|
|
32
|
+
contentHeader: ze,
|
|
33
|
+
contentHeaderRow: Ue,
|
|
34
|
+
saveStatus: We,
|
|
35
|
+
saveStatusError: Fe,
|
|
36
|
+
contentBody: qe,
|
|
37
|
+
section: je,
|
|
38
|
+
sectionTitle: Qe,
|
|
39
|
+
card: Ze,
|
|
40
|
+
row: Je,
|
|
41
|
+
rowMain: Xe,
|
|
42
|
+
rowTitle: Ye,
|
|
43
|
+
rowDesc: Ve,
|
|
44
|
+
selectBox: en,
|
|
45
|
+
disabled: nn,
|
|
46
|
+
placeholderHost: tn,
|
|
47
|
+
placeholderIcon: an,
|
|
48
|
+
placeholderTitle: cn,
|
|
49
|
+
placeholderDesc: sn,
|
|
50
|
+
fieldInput: ln,
|
|
51
|
+
formGrid: on,
|
|
52
|
+
formActions: rn,
|
|
53
|
+
primaryBtn: dn,
|
|
54
|
+
ghostBtn: mn,
|
|
55
|
+
switchBtn: hn,
|
|
56
|
+
switchOn: un,
|
|
57
|
+
mono: pn,
|
|
58
|
+
hint: Nn,
|
|
59
|
+
errorTip: vn,
|
|
60
|
+
emptyTip: fn,
|
|
61
|
+
selectWrap: _n,
|
|
62
|
+
inputCell: yn,
|
|
63
|
+
sectionHeadRow: gn,
|
|
64
|
+
formHint: bn,
|
|
65
|
+
successTip: Cn,
|
|
66
|
+
enablePill: wn,
|
|
67
|
+
enableOn: Tn
|
|
68
|
+
};
|
|
69
|
+
function Sn() {
|
|
70
|
+
try {
|
|
71
|
+
return le() ? !0 : typeof localStorage < "u" && localStorage.getItem("ft_exclusive_force_desktop") === "1";
|
|
72
|
+
} catch {
|
|
73
|
+
return !1;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const x = [
|
|
77
|
+
{
|
|
78
|
+
title: "设置",
|
|
79
|
+
items: [
|
|
80
|
+
{ key: "general", label: "通用", icon: /* @__PURE__ */ e(Z, {}) },
|
|
81
|
+
{ key: "profile", label: "个人主页", icon: /* @__PURE__ */ e(re, {}) },
|
|
82
|
+
{ key: "plan", label: "套餐与积分", icon: /* @__PURE__ */ e(Q, {}) },
|
|
83
|
+
{ key: "appearance", label: "外观", icon: /* @__PURE__ */ e(de, {}) },
|
|
84
|
+
{ key: "shortcuts", label: "快捷键", icon: /* @__PURE__ */ e(me, {}) }
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: "功能",
|
|
89
|
+
items: [
|
|
90
|
+
{ key: "personalize", label: "个性化", icon: /* @__PURE__ */ e(he, {}) },
|
|
91
|
+
{ key: "memory", label: "记忆与进化", icon: /* @__PURE__ */ e(ue, {}) },
|
|
92
|
+
{ key: "agents", label: "智能体", icon: /* @__PURE__ */ e(pe, {}) },
|
|
93
|
+
{ key: "models", label: "模型", icon: /* @__PURE__ */ e(Ne, {}) },
|
|
94
|
+
{ key: "assistant", label: "助理", icon: /* @__PURE__ */ e(ve, {}) },
|
|
95
|
+
{ key: "devices", label: "设备连接", icon: /* @__PURE__ */ e(fe, {}) }
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
title: "数据与安全",
|
|
100
|
+
items: [
|
|
101
|
+
{ key: "data", label: "数据管理", icon: /* @__PURE__ */ e(Q, {}) },
|
|
102
|
+
{ key: "apps", label: "应用管理", icon: /* @__PURE__ */ e(_e, {}) },
|
|
103
|
+
{ key: "security", label: "安全中心", icon: /* @__PURE__ */ e(ye, {}) }
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
title: "",
|
|
108
|
+
items: [
|
|
109
|
+
{ key: "about", label: "关于", icon: /* @__PURE__ */ e(ge, {}) },
|
|
110
|
+
{
|
|
111
|
+
key: "feedback",
|
|
112
|
+
label: "获取帮助",
|
|
113
|
+
icon: /* @__PURE__ */ e(be, {})
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
];
|
|
118
|
+
function B(c, i, t, h = "") {
|
|
119
|
+
var o;
|
|
120
|
+
const m = (o = c[i]) == null ? void 0 : o[t];
|
|
121
|
+
return typeof m == "string" ? m : h;
|
|
122
|
+
}
|
|
123
|
+
function O(c, i, t, h = !1) {
|
|
124
|
+
var o;
|
|
125
|
+
const m = (o = c[i]) == null ? void 0 : o[t];
|
|
126
|
+
return typeof m == "boolean" ? m : h;
|
|
127
|
+
}
|
|
128
|
+
function T({
|
|
129
|
+
checked: c,
|
|
130
|
+
onChange: i,
|
|
131
|
+
title: t
|
|
132
|
+
}) {
|
|
133
|
+
return /* @__PURE__ */ e(
|
|
134
|
+
"button",
|
|
135
|
+
{
|
|
136
|
+
type: "button",
|
|
137
|
+
title: t,
|
|
138
|
+
className: `${n.switchBtn} ${c ? n.switchOn : ""}`,
|
|
139
|
+
"aria-pressed": c,
|
|
140
|
+
onClick: () => i(!c)
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
function A({
|
|
145
|
+
value: c,
|
|
146
|
+
options: i,
|
|
147
|
+
onChange: t
|
|
148
|
+
}) {
|
|
149
|
+
return /* @__PURE__ */ e("span", { className: n.selectWrap, children: /* @__PURE__ */ e("select", { value: c, onChange: (h) => t(h.target.value), children: i.map((h) => /* @__PURE__ */ e("option", { value: h.value, children: h.label }, h.value)) }) });
|
|
150
|
+
}
|
|
151
|
+
function l({
|
|
152
|
+
title: c,
|
|
153
|
+
desc: i,
|
|
154
|
+
children: t
|
|
155
|
+
}) {
|
|
156
|
+
return /* @__PURE__ */ a("div", { className: n.row, children: [
|
|
157
|
+
/* @__PURE__ */ a("div", { className: n.rowMain, children: [
|
|
158
|
+
/* @__PURE__ */ e("div", { className: n.rowTitle, children: c }),
|
|
159
|
+
i && /* @__PURE__ */ e("div", { className: n.rowDesc, children: i })
|
|
160
|
+
] }),
|
|
161
|
+
t
|
|
162
|
+
] });
|
|
163
|
+
}
|
|
164
|
+
function kn({
|
|
165
|
+
config: c,
|
|
166
|
+
update: i
|
|
167
|
+
}) {
|
|
168
|
+
return /* @__PURE__ */ a(H, { children: [
|
|
169
|
+
/* @__PURE__ */ a("section", { className: n.section, children: [
|
|
170
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "常规" }),
|
|
171
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
172
|
+
/* @__PURE__ */ e(l, { title: "语言", desc: "伙伴回复使用的语言(界面文案暂为中文)。", children: /* @__PURE__ */ e(
|
|
173
|
+
A,
|
|
174
|
+
{
|
|
175
|
+
value: B(c, "general", "language", "zh-CN"),
|
|
176
|
+
options: [
|
|
177
|
+
{ value: "zh-CN", label: "简体中文" },
|
|
178
|
+
{ value: "en-US", label: "English" }
|
|
179
|
+
],
|
|
180
|
+
onChange: (t) => i("general", { language: t })
|
|
181
|
+
}
|
|
182
|
+
) }),
|
|
183
|
+
/* @__PURE__ */ e(l, { title: "字体大小", desc: "调节对话与界面文字大小。", children: /* @__PURE__ */ e(
|
|
184
|
+
A,
|
|
185
|
+
{
|
|
186
|
+
value: B(c, "general", "fontSize", "medium"),
|
|
187
|
+
options: [
|
|
188
|
+
{ value: "small", label: "小" },
|
|
189
|
+
{ value: "medium", label: "标准" },
|
|
190
|
+
{ value: "large", label: "大" }
|
|
191
|
+
],
|
|
192
|
+
onChange: (t) => i("general", { fontSize: t })
|
|
193
|
+
}
|
|
194
|
+
) })
|
|
195
|
+
] })
|
|
196
|
+
] }),
|
|
197
|
+
/* @__PURE__ */ a("section", { className: n.section, children: [
|
|
198
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "存储" }),
|
|
199
|
+
/* @__PURE__ */ e("div", { className: n.card, children: /* @__PURE__ */ e(l, { title: "本地会话缓存", desc: "缓存会话记录以加速历史加载。", children: /* @__PURE__ */ e(
|
|
200
|
+
T,
|
|
201
|
+
{
|
|
202
|
+
checked: O(c, "general", "chatCache", !0),
|
|
203
|
+
onChange: (t) => i("general", { chatCache: t })
|
|
204
|
+
}
|
|
205
|
+
) }) })
|
|
206
|
+
] })
|
|
207
|
+
] });
|
|
208
|
+
}
|
|
209
|
+
function Bn({
|
|
210
|
+
config: c,
|
|
211
|
+
update: i
|
|
212
|
+
}) {
|
|
213
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
214
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "个人主页" }),
|
|
215
|
+
/* @__PURE__ */ e("p", { className: n.hint, children: "昵称会用于工作台问候语与伙伴对你的称呼;个性签名显示在欢迎语下方。" }),
|
|
216
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
217
|
+
/* @__PURE__ */ e(l, { title: "昵称", children: /* @__PURE__ */ e("div", { className: n.inputCell, children: /* @__PURE__ */ e(
|
|
218
|
+
"input",
|
|
219
|
+
{
|
|
220
|
+
className: n.fieldInput,
|
|
221
|
+
placeholder: "怎么称呼你",
|
|
222
|
+
value: B(c, "profile", "nickname"),
|
|
223
|
+
onChange: (t) => i("profile", { nickname: t.target.value })
|
|
224
|
+
}
|
|
225
|
+
) }) }),
|
|
226
|
+
/* @__PURE__ */ e(l, { title: "个性签名", desc: "展示在工作台欢迎语下方。", children: /* @__PURE__ */ e("div", { className: n.inputCell, children: /* @__PURE__ */ e(
|
|
227
|
+
"input",
|
|
228
|
+
{
|
|
229
|
+
className: n.fieldInput,
|
|
230
|
+
placeholder: "一句话介绍自己",
|
|
231
|
+
value: B(c, "profile", "bio"),
|
|
232
|
+
onChange: (t) => i("profile", { bio: t.target.value })
|
|
233
|
+
}
|
|
234
|
+
) }) })
|
|
235
|
+
] })
|
|
236
|
+
] });
|
|
237
|
+
}
|
|
238
|
+
function On({
|
|
239
|
+
config: c,
|
|
240
|
+
update: i
|
|
241
|
+
}) {
|
|
242
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
243
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "外观" }),
|
|
244
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
245
|
+
/* @__PURE__ */ e(
|
|
246
|
+
l,
|
|
247
|
+
{
|
|
248
|
+
title: "主题",
|
|
249
|
+
desc: "深色主题覆盖主要界面;个别历史面板仍为浅色。",
|
|
250
|
+
children: /* @__PURE__ */ e(
|
|
251
|
+
A,
|
|
252
|
+
{
|
|
253
|
+
value: B(c, "appearance", "theme", "light"),
|
|
254
|
+
options: [
|
|
255
|
+
{ value: "light", label: "浅色" },
|
|
256
|
+
{ value: "dark", label: "深色" },
|
|
257
|
+
{ value: "system", label: "跟随系统" }
|
|
258
|
+
],
|
|
259
|
+
onChange: (t) => i("appearance", { theme: t })
|
|
260
|
+
}
|
|
261
|
+
)
|
|
262
|
+
}
|
|
263
|
+
),
|
|
264
|
+
/* @__PURE__ */ e(l, { title: "紧凑消息密度", desc: "聊天消息行距更紧凑。", children: /* @__PURE__ */ e(
|
|
265
|
+
T,
|
|
266
|
+
{
|
|
267
|
+
checked: O(c, "appearance", "compact"),
|
|
268
|
+
onChange: (t) => i("appearance", { compact: t })
|
|
269
|
+
}
|
|
270
|
+
) }),
|
|
271
|
+
/* @__PURE__ */ e(
|
|
272
|
+
l,
|
|
273
|
+
{
|
|
274
|
+
title: "对话区宽度",
|
|
275
|
+
desc: "中间宽在宽屏下限宽居中;全宽铺满整个对话面板。",
|
|
276
|
+
children: /* @__PURE__ */ e(
|
|
277
|
+
A,
|
|
278
|
+
{
|
|
279
|
+
value: B(c, "appearance", "chatPanelWidth", "full"),
|
|
280
|
+
options: [
|
|
281
|
+
{ value: "standard", label: "中间宽" },
|
|
282
|
+
{ value: "full", label: "占满全宽" }
|
|
283
|
+
],
|
|
284
|
+
onChange: (t) => i("appearance", { chatPanelWidth: t })
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
] })
|
|
290
|
+
] });
|
|
291
|
+
}
|
|
292
|
+
function An({
|
|
293
|
+
config: c,
|
|
294
|
+
update: i
|
|
295
|
+
}) {
|
|
296
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
297
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "快捷键" }),
|
|
298
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
299
|
+
/* @__PURE__ */ e(l, { title: "发送消息", desc: "聊天输入框的发送方式。", children: /* @__PURE__ */ e(
|
|
300
|
+
A,
|
|
301
|
+
{
|
|
302
|
+
value: B(c, "shortcuts", "sendKey", "enter"),
|
|
303
|
+
options: [
|
|
304
|
+
{ value: "enter", label: "Enter 发送" },
|
|
305
|
+
{ value: "mod-enter", label: "Cmd/Ctrl + Enter 发送" }
|
|
306
|
+
],
|
|
307
|
+
onChange: (t) => i("shortcuts", { sendKey: t })
|
|
308
|
+
}
|
|
309
|
+
) }),
|
|
310
|
+
/* @__PURE__ */ e(l, { title: "搜索与命令", desc: "唤出命令面板:找会话、跳页面、切车道。", children: /* @__PURE__ */ e("span", { className: n.mono, children: "⌘ K" }) }),
|
|
311
|
+
/* @__PURE__ */ e(l, { title: "新建任务", desc: "本地车道直接开本机会话,云端车道落到新建页。", children: /* @__PURE__ */ e("span", { className: n.mono, children: "⌘ N" }) })
|
|
312
|
+
] })
|
|
313
|
+
] });
|
|
314
|
+
}
|
|
315
|
+
function In({
|
|
316
|
+
config: c,
|
|
317
|
+
update: i
|
|
318
|
+
}) {
|
|
319
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
320
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "个性化" }),
|
|
321
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
322
|
+
/* @__PURE__ */ e(l, { title: "回复风格", desc: "伙伴回复的详略倾向。", children: /* @__PURE__ */ e(
|
|
323
|
+
A,
|
|
324
|
+
{
|
|
325
|
+
value: B(c, "personalize", "replyStyle", "balanced"),
|
|
326
|
+
options: [
|
|
327
|
+
{ value: "concise", label: "简洁" },
|
|
328
|
+
{ value: "balanced", label: "均衡" },
|
|
329
|
+
{ value: "detailed", label: "详细" }
|
|
330
|
+
],
|
|
331
|
+
onChange: (t) => i("personalize", { replyStyle: t })
|
|
332
|
+
}
|
|
333
|
+
) }),
|
|
334
|
+
/* @__PURE__ */ e(l, { title: "建议追问", desc: "回复结束后给出可点的追问建议。", children: /* @__PURE__ */ e(
|
|
335
|
+
T,
|
|
336
|
+
{
|
|
337
|
+
checked: O(c, "personalize", "suggestReplies", !0),
|
|
338
|
+
onChange: (t) => i("personalize", { suggestReplies: t })
|
|
339
|
+
}
|
|
340
|
+
) })
|
|
341
|
+
] })
|
|
342
|
+
] });
|
|
343
|
+
}
|
|
344
|
+
function En({
|
|
345
|
+
config: c,
|
|
346
|
+
update: i
|
|
347
|
+
}) {
|
|
348
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
349
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "记忆与进化" }),
|
|
350
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
351
|
+
/* @__PURE__ */ e(l, { title: "对话记忆", desc: "允许伙伴记住对话要点,越用越懂你。", children: /* @__PURE__ */ e(
|
|
352
|
+
T,
|
|
353
|
+
{
|
|
354
|
+
checked: O(c, "memory", "enabled", !0),
|
|
355
|
+
onChange: (t) => i("memory", { enabled: t })
|
|
356
|
+
}
|
|
357
|
+
) }),
|
|
358
|
+
/* @__PURE__ */ e(l, { title: "记忆范围", desc: "全部会话=记忆跨会话累积;仅当前会话=每个会话独立。", children: /* @__PURE__ */ e(
|
|
359
|
+
A,
|
|
360
|
+
{
|
|
361
|
+
value: B(c, "memory", "scope", "all"),
|
|
362
|
+
options: [
|
|
363
|
+
{ value: "all", label: "全部会话" },
|
|
364
|
+
{ value: "current", label: "仅当前会话" }
|
|
365
|
+
],
|
|
366
|
+
onChange: (t) => i("memory", { scope: t })
|
|
367
|
+
}
|
|
368
|
+
) })
|
|
369
|
+
] })
|
|
370
|
+
] });
|
|
371
|
+
}
|
|
372
|
+
function Pn({
|
|
373
|
+
config: c,
|
|
374
|
+
update: i
|
|
375
|
+
}) {
|
|
376
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
377
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "智能体" }),
|
|
378
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
379
|
+
/* @__PURE__ */ e(l, { title: "会话自动小结", desc: "新建会话时自动为上一个会话生成小结,显示在聊天记录里。", children: /* @__PURE__ */ e(
|
|
380
|
+
T,
|
|
381
|
+
{
|
|
382
|
+
checked: O(c, "agents", "autoSummary", !0),
|
|
383
|
+
onChange: (t) => i("agents", { autoSummary: t })
|
|
384
|
+
}
|
|
385
|
+
) }),
|
|
386
|
+
/* @__PURE__ */ e(l, { title: "开场问候", desc: "新任务页显示伙伴问候语。", children: /* @__PURE__ */ e(
|
|
387
|
+
T,
|
|
388
|
+
{
|
|
389
|
+
checked: O(c, "agents", "greeting", !0),
|
|
390
|
+
onChange: (t) => i("agents", { greeting: t })
|
|
391
|
+
}
|
|
392
|
+
) })
|
|
393
|
+
] })
|
|
394
|
+
] });
|
|
395
|
+
}
|
|
396
|
+
function Dn({
|
|
397
|
+
config: c,
|
|
398
|
+
update: i
|
|
399
|
+
}) {
|
|
400
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
401
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "助理" }),
|
|
402
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
403
|
+
/* @__PURE__ */ e(l, { title: "任务到期提醒", desc: "定时任务到期时提醒你。", children: /* @__PURE__ */ e(
|
|
404
|
+
T,
|
|
405
|
+
{
|
|
406
|
+
checked: O(c, "assistant", "reminders", !0),
|
|
407
|
+
onChange: (t) => i("assistant", { reminders: t })
|
|
408
|
+
}
|
|
409
|
+
) }),
|
|
410
|
+
/* @__PURE__ */ e(l, { title: "每日工作摘要", desc: "每天汇总你的任务进展。", children: /* @__PURE__ */ e(
|
|
411
|
+
T,
|
|
412
|
+
{
|
|
413
|
+
checked: O(c, "assistant", "dailyDigest"),
|
|
414
|
+
onChange: (t) => i("assistant", { dailyDigest: t })
|
|
415
|
+
}
|
|
416
|
+
) })
|
|
417
|
+
] })
|
|
418
|
+
] });
|
|
419
|
+
}
|
|
420
|
+
function Rn({
|
|
421
|
+
config: c,
|
|
422
|
+
update: i,
|
|
423
|
+
token: t,
|
|
424
|
+
desktop: h
|
|
425
|
+
}) {
|
|
426
|
+
const m = h ? `桌面客户端 · ${j()}` : j(), o = typeof Notification < "u", [p, g] = f([]);
|
|
427
|
+
M(() => {
|
|
428
|
+
ee(t).then(g).catch(() => {
|
|
429
|
+
});
|
|
430
|
+
}, [t]);
|
|
431
|
+
const d = (u) => {
|
|
432
|
+
if (!u) return "";
|
|
433
|
+
const y = new Date(u);
|
|
434
|
+
return Number.isNaN(y.getTime()) ? u : y.toLocaleString();
|
|
435
|
+
};
|
|
436
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
437
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "设备连接" }),
|
|
438
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
439
|
+
/* @__PURE__ */ e(l, { title: "当前设备", desc: "当前登录使用的端。", children: /* @__PURE__ */ e("span", { className: n.mono, children: m }) }),
|
|
440
|
+
h && /* @__PURE__ */ e(
|
|
441
|
+
l,
|
|
442
|
+
{
|
|
443
|
+
title: "本机 Agent",
|
|
444
|
+
desc: "桌面客户端内置本地 Agent(127.0.0.1:28080),本地车道的任务由它在本机执行,数据不出本机。",
|
|
445
|
+
children: /* @__PURE__ */ e("span", { className: n.mono, children: "内置" })
|
|
446
|
+
}
|
|
447
|
+
),
|
|
448
|
+
/* @__PURE__ */ e(
|
|
449
|
+
l,
|
|
450
|
+
{
|
|
451
|
+
title: "桌面端系统通知",
|
|
452
|
+
desc: o ? "收到伙伴回复或工作通知时弹系统通知。" : "当前浏览器不支持系统通知,请在桌面客户端使用。",
|
|
453
|
+
children: /* @__PURE__ */ e(
|
|
454
|
+
T,
|
|
455
|
+
{
|
|
456
|
+
checked: O(c, "devices", "desktopNotify", !0),
|
|
457
|
+
onChange: (u) => {
|
|
458
|
+
u && ne(), i("devices", { desktopNotify: u });
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
)
|
|
462
|
+
}
|
|
463
|
+
),
|
|
464
|
+
p.length > 0 ? /* @__PURE__ */ e("div", { className: n.row, children: /* @__PURE__ */ a("div", { className: n.rowMain, children: [
|
|
465
|
+
/* @__PURE__ */ e("div", { className: n.rowTitle, children: "最近访问设备" }),
|
|
466
|
+
/* @__PURE__ */ e("div", { className: n.rowDesc, children: p.slice(0, 5).map((u) => /* @__PURE__ */ a("div", { children: [
|
|
467
|
+
u.deviceLabel,
|
|
468
|
+
" · 最近 ",
|
|
469
|
+
d(u.lastSeenAt)
|
|
470
|
+
] }, u.id)) })
|
|
471
|
+
] }) }) : null
|
|
472
|
+
] })
|
|
473
|
+
] });
|
|
474
|
+
}
|
|
475
|
+
function Mn({
|
|
476
|
+
config: c,
|
|
477
|
+
update: i
|
|
478
|
+
}) {
|
|
479
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
480
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "安全中心" }),
|
|
481
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
482
|
+
/* @__PURE__ */ e(l, { title: "登录提醒", desc: "新设备首次访问工作台时通知你。", children: /* @__PURE__ */ e(
|
|
483
|
+
T,
|
|
484
|
+
{
|
|
485
|
+
checked: O(c, "security", "loginNotify", !0),
|
|
486
|
+
onChange: (t) => i("security", { loginNotify: t })
|
|
487
|
+
}
|
|
488
|
+
) }),
|
|
489
|
+
/* @__PURE__ */ a("div", { className: n.row, children: [
|
|
490
|
+
/* @__PURE__ */ a("div", { className: n.rowMain, children: [
|
|
491
|
+
/* @__PURE__ */ e("div", { className: n.rowTitle, children: "双重验证" }),
|
|
492
|
+
/* @__PURE__ */ e("div", { className: n.rowDesc, children: "由统一认证中心(4A / CTC)托管,工作台不另建第二套身份因子;在认证中心开启后自动继承。" })
|
|
493
|
+
] }),
|
|
494
|
+
/* @__PURE__ */ e("span", { className: `${n.selectBox} ${n.disabled}`, children: "统一认证管理" })
|
|
495
|
+
] })
|
|
496
|
+
] })
|
|
497
|
+
] });
|
|
498
|
+
}
|
|
499
|
+
function Hn({
|
|
500
|
+
config: c,
|
|
501
|
+
update: i,
|
|
502
|
+
token: t
|
|
503
|
+
}) {
|
|
504
|
+
const [h, m] = f(!1), [o, p] = f(""), g = async () => {
|
|
505
|
+
m(!0), p("");
|
|
506
|
+
try {
|
|
507
|
+
const { fileName: d, content: u } = await se(t), y = new Blob([u], {
|
|
508
|
+
type: "text/markdown;charset=utf-8"
|
|
509
|
+
}), C = URL.createObjectURL(y), r = document.createElement("a");
|
|
510
|
+
r.href = C, r.download = d || "z-team-chat.md", r.click(), URL.revokeObjectURL(C), p("已导出全部个人会话记录");
|
|
511
|
+
} catch (d) {
|
|
512
|
+
p(d instanceof Error ? d.message : String(d));
|
|
513
|
+
} finally {
|
|
514
|
+
m(!1);
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
518
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "数据管理" }),
|
|
519
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
520
|
+
/* @__PURE__ */ e(
|
|
521
|
+
l,
|
|
522
|
+
{
|
|
523
|
+
title: "会话保留时长",
|
|
524
|
+
desc: "超过时限的会话每日自动归档(软删除,可由管理员恢复)。",
|
|
525
|
+
children: /* @__PURE__ */ e(
|
|
526
|
+
A,
|
|
527
|
+
{
|
|
528
|
+
value: B(c, "data", "retention", "180d"),
|
|
529
|
+
options: [
|
|
530
|
+
{ value: "90d", label: "保留 90 天" },
|
|
531
|
+
{ value: "180d", label: "保留 180 天" },
|
|
532
|
+
{ value: "forever", label: "永久保留" }
|
|
533
|
+
],
|
|
534
|
+
onChange: (d) => i("data", { retention: d })
|
|
535
|
+
}
|
|
536
|
+
)
|
|
537
|
+
}
|
|
538
|
+
),
|
|
539
|
+
/* @__PURE__ */ e(l, { title: "导出聊天记录", desc: "导出当前账号全部个人会话为 Markdown 文件。", children: /* @__PURE__ */ e(
|
|
540
|
+
"button",
|
|
541
|
+
{
|
|
542
|
+
type: "button",
|
|
543
|
+
className: n.ghostBtn,
|
|
544
|
+
disabled: h,
|
|
545
|
+
onClick: () => void g(),
|
|
546
|
+
children: h ? "导出中…" : "导出"
|
|
547
|
+
}
|
|
548
|
+
) })
|
|
549
|
+
] }),
|
|
550
|
+
o && /* @__PURE__ */ e("p", { className: n.hint, children: o })
|
|
551
|
+
] });
|
|
552
|
+
}
|
|
553
|
+
const z = {
|
|
554
|
+
name: "",
|
|
555
|
+
endpoint: "",
|
|
556
|
+
apiKey: "",
|
|
557
|
+
modelName: ""
|
|
558
|
+
};
|
|
559
|
+
function Ln({ token: c }) {
|
|
560
|
+
const [i, t] = f([]), [h, m] = f(!0), [o, p] = f(z), [g, d] = f(!1), [u, y] = f(!1), [C, r] = f(""), [_, w] = f(""), S = G(async () => {
|
|
561
|
+
m(!0);
|
|
562
|
+
try {
|
|
563
|
+
const s = await V(c);
|
|
564
|
+
t(s || []), r("");
|
|
565
|
+
} catch (s) {
|
|
566
|
+
r(s instanceof Error ? s.message : String(s));
|
|
567
|
+
} finally {
|
|
568
|
+
m(!1);
|
|
569
|
+
}
|
|
570
|
+
}, [c]);
|
|
571
|
+
M(() => {
|
|
572
|
+
S();
|
|
573
|
+
}, [S]);
|
|
574
|
+
const I = /^https?:\/\/.+/i.test(o.endpoint.trim()), b = !u && o.name.trim() !== "" && I && o.apiKey.trim() !== "" && o.modelName.trim() !== "", L = async () => {
|
|
575
|
+
if (b) {
|
|
576
|
+
y(!0);
|
|
577
|
+
try {
|
|
578
|
+
await ie(c, {
|
|
579
|
+
name: o.name.trim(),
|
|
580
|
+
endpoint: o.endpoint.trim(),
|
|
581
|
+
apiKey: o.apiKey.trim(),
|
|
582
|
+
modelName: o.modelName.trim()
|
|
583
|
+
}), p(z), d(!1), w("模型已添加,输入区模型菜单即可选用"), window.setTimeout(() => w(""), 3e3), await S();
|
|
584
|
+
} catch (s) {
|
|
585
|
+
r(s instanceof Error ? s.message : String(s));
|
|
586
|
+
} finally {
|
|
587
|
+
y(!1);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}, E = async (s) => {
|
|
591
|
+
try {
|
|
592
|
+
await te(c, s.id, !s.enable), await S();
|
|
593
|
+
} catch (k) {
|
|
594
|
+
r(k instanceof Error ? k.message : String(k));
|
|
595
|
+
}
|
|
596
|
+
}, P = async (s) => {
|
|
597
|
+
if (await ae({ content: `确定删除自定义模型「${s.name}」吗?` }))
|
|
598
|
+
try {
|
|
599
|
+
await ce(c, s.id), await S();
|
|
600
|
+
} catch (k) {
|
|
601
|
+
r(k instanceof Error ? k.message : String(k));
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
return /* @__PURE__ */ a(H, { children: [
|
|
605
|
+
/* @__PURE__ */ a("section", { className: n.section, children: [
|
|
606
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "自定义模型" }),
|
|
607
|
+
/* @__PURE__ */ e("p", { className: n.hint, children: "配置指向 OpenAI 兼容端点的模型供聊天直接选用,例如自研 LLM Gateway(端点形如 http://host:9099/v1,密钥填网关签发的 AK)。 配置后输入区右侧模型菜单会出现「自定义模型」分组。" }),
|
|
608
|
+
C && /* @__PURE__ */ e("p", { className: n.errorTip, children: C }),
|
|
609
|
+
_ && /* @__PURE__ */ e("p", { className: n.successTip, children: _ }),
|
|
610
|
+
/* @__PURE__ */ e("div", { className: n.card, children: h ? /* @__PURE__ */ e("div", { className: n.emptyTip, children: "加载中…" }) : i.length === 0 ? /* @__PURE__ */ a("div", { className: n.emptyTip, children: [
|
|
611
|
+
"还没有自定义模型",
|
|
612
|
+
g ? ",填写下方表单添加。" : ",点右上角「添加模型」。"
|
|
613
|
+
] }) : i.map((s) => /* @__PURE__ */ a("div", { className: n.row, children: [
|
|
614
|
+
/* @__PURE__ */ a("div", { className: n.rowMain, children: [
|
|
615
|
+
/* @__PURE__ */ a("div", { className: n.rowTitle, children: [
|
|
616
|
+
s.name,
|
|
617
|
+
/* @__PURE__ */ e(
|
|
618
|
+
"span",
|
|
619
|
+
{
|
|
620
|
+
className: `${n.enablePill} ${s.enable ? n.enableOn : ""}`,
|
|
621
|
+
children: s.enable ? "已启用" : "已停用"
|
|
622
|
+
}
|
|
623
|
+
)
|
|
624
|
+
] }),
|
|
625
|
+
/* @__PURE__ */ a("div", { className: `${n.rowDesc} ${n.mono}`, children: [
|
|
626
|
+
s.modelName,
|
|
627
|
+
" · ",
|
|
628
|
+
s.endpoint,
|
|
629
|
+
" · ",
|
|
630
|
+
s.apiKeyMasked
|
|
631
|
+
] })
|
|
632
|
+
] }),
|
|
633
|
+
/* @__PURE__ */ e(
|
|
634
|
+
T,
|
|
635
|
+
{
|
|
636
|
+
checked: s.enable,
|
|
637
|
+
title: s.enable ? "停用" : "启用",
|
|
638
|
+
onChange: () => void E(s)
|
|
639
|
+
}
|
|
640
|
+
),
|
|
641
|
+
/* @__PURE__ */ e(
|
|
642
|
+
"button",
|
|
643
|
+
{
|
|
644
|
+
type: "button",
|
|
645
|
+
className: n.ghostBtn,
|
|
646
|
+
onClick: () => void P(s),
|
|
647
|
+
children: "删除"
|
|
648
|
+
}
|
|
649
|
+
)
|
|
650
|
+
] }, s.id)) })
|
|
651
|
+
] }),
|
|
652
|
+
/* @__PURE__ */ a("section", { className: n.section, children: [
|
|
653
|
+
/* @__PURE__ */ a("div", { className: n.sectionHeadRow, children: [
|
|
654
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "添加模型" }),
|
|
655
|
+
!g && /* @__PURE__ */ e(
|
|
656
|
+
"button",
|
|
657
|
+
{
|
|
658
|
+
type: "button",
|
|
659
|
+
className: n.primaryBtn,
|
|
660
|
+
onClick: () => d(!0),
|
|
661
|
+
children: "添加模型"
|
|
662
|
+
}
|
|
663
|
+
)
|
|
664
|
+
] }),
|
|
665
|
+
g && /* @__PURE__ */ a("div", { className: n.card, children: [
|
|
666
|
+
/* @__PURE__ */ a("div", { className: n.formGrid, children: [
|
|
667
|
+
/* @__PURE__ */ e(
|
|
668
|
+
"input",
|
|
669
|
+
{
|
|
670
|
+
className: n.fieldInput,
|
|
671
|
+
placeholder: "显示名,如 My Gateway 模型",
|
|
672
|
+
value: o.name,
|
|
673
|
+
onChange: (s) => p({ ...o, name: s.target.value })
|
|
674
|
+
}
|
|
675
|
+
),
|
|
676
|
+
/* @__PURE__ */ e(
|
|
677
|
+
"input",
|
|
678
|
+
{
|
|
679
|
+
className: n.fieldInput,
|
|
680
|
+
placeholder: "模型名,如 qwen3.6-flash",
|
|
681
|
+
value: o.modelName,
|
|
682
|
+
onChange: (s) => p({ ...o, modelName: s.target.value })
|
|
683
|
+
}
|
|
684
|
+
)
|
|
685
|
+
] }),
|
|
686
|
+
/* @__PURE__ */ a("div", { className: n.formGrid, children: [
|
|
687
|
+
/* @__PURE__ */ a("div", { children: [
|
|
688
|
+
/* @__PURE__ */ e(
|
|
689
|
+
"input",
|
|
690
|
+
{
|
|
691
|
+
className: n.fieldInput,
|
|
692
|
+
placeholder: "Endpoint(OpenAI 兼容 base url)",
|
|
693
|
+
value: o.endpoint,
|
|
694
|
+
onChange: (s) => p({ ...o, endpoint: s.target.value })
|
|
695
|
+
}
|
|
696
|
+
),
|
|
697
|
+
o.endpoint.trim() !== "" && !I && /* @__PURE__ */ e("div", { className: n.formHint, children: "端点需以 http:// 或 https:// 开头" })
|
|
698
|
+
] }),
|
|
699
|
+
/* @__PURE__ */ e(
|
|
700
|
+
"input",
|
|
701
|
+
{
|
|
702
|
+
className: n.fieldInput,
|
|
703
|
+
type: "password",
|
|
704
|
+
placeholder: "API Key",
|
|
705
|
+
value: o.apiKey,
|
|
706
|
+
onChange: (s) => p({ ...o, apiKey: s.target.value })
|
|
707
|
+
}
|
|
708
|
+
)
|
|
709
|
+
] }),
|
|
710
|
+
/* @__PURE__ */ a("div", { className: n.formActions, children: [
|
|
711
|
+
/* @__PURE__ */ e(
|
|
712
|
+
"button",
|
|
713
|
+
{
|
|
714
|
+
type: "button",
|
|
715
|
+
className: n.ghostBtn,
|
|
716
|
+
onClick: () => {
|
|
717
|
+
d(!1), p(z);
|
|
718
|
+
},
|
|
719
|
+
children: "取消"
|
|
720
|
+
}
|
|
721
|
+
),
|
|
722
|
+
/* @__PURE__ */ e(
|
|
723
|
+
"button",
|
|
724
|
+
{
|
|
725
|
+
type: "button",
|
|
726
|
+
className: n.primaryBtn,
|
|
727
|
+
disabled: !b,
|
|
728
|
+
onClick: () => void L(),
|
|
729
|
+
children: u ? "保存中…" : "保存"
|
|
730
|
+
}
|
|
731
|
+
)
|
|
732
|
+
] })
|
|
733
|
+
] })
|
|
734
|
+
] })
|
|
735
|
+
] });
|
|
736
|
+
}
|
|
737
|
+
function $n({ desktop: c }) {
|
|
738
|
+
return /* @__PURE__ */ a(H, { children: [
|
|
739
|
+
/* @__PURE__ */ a("section", { className: n.section, children: [
|
|
740
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "套餐" }),
|
|
741
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
742
|
+
/* @__PURE__ */ e(l, { title: "当前套餐", desc: "团队内部部署,功能全量开放。", children: /* @__PURE__ */ e("span", { className: n.mono, children: "内部团队版" }) }),
|
|
743
|
+
/* @__PURE__ */ e(
|
|
744
|
+
l,
|
|
745
|
+
{
|
|
746
|
+
title: "云端模型额度",
|
|
747
|
+
desc: "平台模型由团队统一接入与结算,个人使用不单独计费。",
|
|
748
|
+
children: /* @__PURE__ */ e("span", { className: n.mono, children: "不限" })
|
|
749
|
+
}
|
|
750
|
+
)
|
|
751
|
+
] })
|
|
752
|
+
] }),
|
|
753
|
+
/* @__PURE__ */ a("section", { className: n.section, children: [
|
|
754
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "积分说明" }),
|
|
755
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
756
|
+
/* @__PURE__ */ e(
|
|
757
|
+
l,
|
|
758
|
+
{
|
|
759
|
+
title: "自有模型不占额度",
|
|
760
|
+
desc: "在「模型」页接入自有 OpenAI 兼容网关(如自研 LLM Gateway),调用走你自己的密钥。",
|
|
761
|
+
children: /* @__PURE__ */ e("span", { className: n.mono, children: "自助" })
|
|
762
|
+
}
|
|
763
|
+
),
|
|
764
|
+
c && /* @__PURE__ */ e(
|
|
765
|
+
l,
|
|
766
|
+
{
|
|
767
|
+
title: "本地车道不耗云端额度",
|
|
768
|
+
desc: "桌面客户端可直连本机 Agent 执行任务,本机推理不经云端计费链路。",
|
|
769
|
+
children: /* @__PURE__ */ e("span", { className: n.mono, children: "已内置" })
|
|
770
|
+
}
|
|
771
|
+
)
|
|
772
|
+
] })
|
|
773
|
+
] })
|
|
774
|
+
] });
|
|
775
|
+
}
|
|
776
|
+
const R = 8;
|
|
777
|
+
function xn({ token: c, desktop: i }) {
|
|
778
|
+
const [t, h] = f([]), [m, o] = f([]), [p, g] = f(!0);
|
|
779
|
+
M(() => {
|
|
780
|
+
let r = !0;
|
|
781
|
+
g(!0);
|
|
782
|
+
const _ = [
|
|
783
|
+
Be({}, c).then((w) => {
|
|
784
|
+
r && h(w || []);
|
|
785
|
+
}).catch(() => {
|
|
786
|
+
})
|
|
787
|
+
];
|
|
788
|
+
return i && _.push(
|
|
789
|
+
Ce().then((w) => {
|
|
790
|
+
r && o(w || []);
|
|
791
|
+
}).catch(() => {
|
|
792
|
+
})
|
|
793
|
+
), Promise.all(_).finally(() => {
|
|
794
|
+
r && g(!1);
|
|
795
|
+
}), () => {
|
|
796
|
+
r = !1;
|
|
797
|
+
};
|
|
798
|
+
}, [c, i]);
|
|
799
|
+
const d = (r) => r.map((_) => /* @__PURE__ */ e("div", { className: n.row, children: /* @__PURE__ */ a("div", { className: n.rowMain, children: [
|
|
800
|
+
/* @__PURE__ */ a("div", { className: n.rowTitle, children: [
|
|
801
|
+
_.title,
|
|
802
|
+
_.enabled != null && /* @__PURE__ */ e(
|
|
803
|
+
"span",
|
|
804
|
+
{
|
|
805
|
+
className: `${n.enablePill} ${_.enabled ? n.enableOn : ""}`,
|
|
806
|
+
children: _.enabled ? "已启用" : "已停用"
|
|
807
|
+
}
|
|
808
|
+
)
|
|
809
|
+
] }),
|
|
810
|
+
/* @__PURE__ */ e("div", { className: n.rowDesc, children: _.desc })
|
|
811
|
+
] }) }, _.key)), u = m.slice(0, R).map((r) => ({
|
|
812
|
+
key: r.id,
|
|
813
|
+
title: r.name,
|
|
814
|
+
desc: r.description || r.category || r.skill_code,
|
|
815
|
+
enabled: r.enabled
|
|
816
|
+
})), y = t.slice(0, R).map((r, _) => ({
|
|
817
|
+
key: String(r.id ?? `${r.code ?? "ft"}-${_}`),
|
|
818
|
+
title: r.name || r.code || "未命名技能",
|
|
819
|
+
desc: r.description || r.category || ""
|
|
820
|
+
})), C = /* @__PURE__ */ e("div", { className: n.emptyTip, children: "加载中…" });
|
|
821
|
+
return /* @__PURE__ */ a(H, { children: [
|
|
822
|
+
i && /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
823
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "本地技能" }),
|
|
824
|
+
/* @__PURE__ */ e("p", { className: n.hint, children: "桌面客户端可将技能落在本机(本地 Agent 接管),离线也能用。 新增与启停在「更多能力 → 技能市场」。" }),
|
|
825
|
+
/* @__PURE__ */ e("div", { className: n.card, children: p ? C : u.length === 0 ? /* @__PURE__ */ e("div", { className: n.emptyTip, children: "本机还没有技能,去「更多能力 → 技能市场」安装" }) : d(u) }),
|
|
826
|
+
m.length > R && /* @__PURE__ */ a("p", { className: n.hint, children: [
|
|
827
|
+
"共 ",
|
|
828
|
+
m.length,
|
|
829
|
+
" 个本地技能,仅展示前 ",
|
|
830
|
+
R,
|
|
831
|
+
" 个。"
|
|
832
|
+
] })
|
|
833
|
+
] }),
|
|
834
|
+
/* @__PURE__ */ a("section", { className: n.section, children: [
|
|
835
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "云端技能" }),
|
|
836
|
+
/* @__PURE__ */ e("p", { className: n.hint, children: "云端技能市场安装的技能,全部端可用。管理入口在「更多能力 → 技能市场 / 伙伴技能」。" }),
|
|
837
|
+
/* @__PURE__ */ e("div", { className: n.card, children: p ? C : y.length === 0 ? /* @__PURE__ */ e("div", { className: n.emptyTip, children: "还没有云端技能,去「更多能力 → 技能市场」安装" }) : d(y) }),
|
|
838
|
+
t.length > R && /* @__PURE__ */ a("p", { className: n.hint, children: [
|
|
839
|
+
"共 ",
|
|
840
|
+
t.length,
|
|
841
|
+
" 个云端技能,仅展示前 ",
|
|
842
|
+
R,
|
|
843
|
+
" 个。"
|
|
844
|
+
] })
|
|
845
|
+
] })
|
|
846
|
+
] });
|
|
847
|
+
}
|
|
848
|
+
function Gn({ label: c }) {
|
|
849
|
+
return /* @__PURE__ */ a("div", { className: n.placeholderHost, children: [
|
|
850
|
+
/* @__PURE__ */ e("span", { className: n.placeholderIcon, children: /* @__PURE__ */ e(Z, {}) }),
|
|
851
|
+
/* @__PURE__ */ e("span", { className: n.placeholderTitle, children: c }),
|
|
852
|
+
/* @__PURE__ */ e("span", { className: n.placeholderDesc, children: "该设置项即将上线" })
|
|
853
|
+
] });
|
|
854
|
+
}
|
|
855
|
+
function Kn({ desktop: c }) {
|
|
856
|
+
const i = typeof Notification < "u" ? "支持" : "不支持";
|
|
857
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
858
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "关于" }),
|
|
859
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
860
|
+
/* @__PURE__ */ e(l, { title: "z-team 智能工作台", desc: "个人工作台 / 协作工作台 / 群学习。", children: /* @__PURE__ */ a("span", { className: n.mono, children: [
|
|
861
|
+
"v",
|
|
862
|
+
"0.2.142"
|
|
863
|
+
] }) }),
|
|
864
|
+
/* @__PURE__ */ e(
|
|
865
|
+
l,
|
|
866
|
+
{
|
|
867
|
+
title: "运行形态",
|
|
868
|
+
desc: c ? "桌面客户端(Tauri):内置本机 Agent 与本地技能,能力更强。" : "远端 Web:浏览器直接访问,也可内嵌于桌面客户端获得更强能力。",
|
|
869
|
+
children: /* @__PURE__ */ e("span", { className: n.mono, children: c ? "桌面客户端" : "远端 Web" })
|
|
870
|
+
}
|
|
871
|
+
),
|
|
872
|
+
/* @__PURE__ */ e(l, { title: "统一认证", desc: "登录态由 4A / CTC SSO 托管。", children: /* @__PURE__ */ e("span", { className: n.mono, children: "SSO" }) }),
|
|
873
|
+
/* @__PURE__ */ e(l, { title: "系统通知", desc: "当前浏览器对桌面系统通知的支持情况。", children: /* @__PURE__ */ e("span", { className: n.mono, children: i }) })
|
|
874
|
+
] })
|
|
875
|
+
] });
|
|
876
|
+
}
|
|
877
|
+
function zn() {
|
|
878
|
+
return /* @__PURE__ */ a("section", { className: n.section, children: [
|
|
879
|
+
/* @__PURE__ */ e("h3", { className: n.sectionTitle, children: "获取帮助" }),
|
|
880
|
+
/* @__PURE__ */ e("p", { className: n.hint, children: "常见能力入口与自助排查说明,均可在本工作台内完成。" }),
|
|
881
|
+
/* @__PURE__ */ a("div", { className: n.card, children: [
|
|
882
|
+
/* @__PURE__ */ e(
|
|
883
|
+
l,
|
|
884
|
+
{
|
|
885
|
+
title: "发送与快捷键",
|
|
886
|
+
desc: "默认 Enter 发送、Shift+Enter 换行;可在「快捷键」页改为 Cmd/Ctrl+Enter 发送。⌘K 搜索与命令,⌘N 新建任务。",
|
|
887
|
+
children: /* @__PURE__ */ e("span", { className: n.mono, children: "快捷键" })
|
|
888
|
+
}
|
|
889
|
+
),
|
|
890
|
+
/* @__PURE__ */ e(
|
|
891
|
+
l,
|
|
892
|
+
{
|
|
893
|
+
title: "接入自研模型",
|
|
894
|
+
desc: "在「模型」页添加 OpenAI 兼容端点(如自研 LLM Gateway)与 AK,输入区模型菜单即可选用。",
|
|
895
|
+
children: /* @__PURE__ */ e("span", { className: n.mono, children: "模型" })
|
|
896
|
+
}
|
|
897
|
+
),
|
|
898
|
+
/* @__PURE__ */ e(
|
|
899
|
+
l,
|
|
900
|
+
{
|
|
901
|
+
title: "记忆与个性化",
|
|
902
|
+
desc: "「记忆与进化」控制是否允许伙伴沉淀记忆;「个性化」控制回复详略与追问建议。",
|
|
903
|
+
children: /* @__PURE__ */ e("span", { className: n.mono, children: "个性化" })
|
|
904
|
+
}
|
|
905
|
+
),
|
|
906
|
+
/* @__PURE__ */ e(
|
|
907
|
+
l,
|
|
908
|
+
{
|
|
909
|
+
title: "数据与隐私",
|
|
910
|
+
desc: "会话缓存可关;保留期与聊天记录导出在「数据管理」;登录提醒在「安全中心」。",
|
|
911
|
+
children: /* @__PURE__ */ e("span", { className: n.mono, children: "数据" })
|
|
912
|
+
}
|
|
913
|
+
),
|
|
914
|
+
/* @__PURE__ */ e(
|
|
915
|
+
l,
|
|
916
|
+
{
|
|
917
|
+
title: "登录异常",
|
|
918
|
+
desc: "登录态由统一认证(4A / CTC)托管,异常时退出后重新登录;仍失败请联系管理员。",
|
|
919
|
+
children: /* @__PURE__ */ e("span", { className: n.mono, children: "SSO" })
|
|
920
|
+
}
|
|
921
|
+
)
|
|
922
|
+
] })
|
|
923
|
+
] });
|
|
924
|
+
}
|
|
925
|
+
function Qn({
|
|
926
|
+
open: c,
|
|
927
|
+
onClose: i,
|
|
928
|
+
token: t,
|
|
929
|
+
docked: h = !1
|
|
930
|
+
}) {
|
|
931
|
+
const [m, o] = f("general"), [p, g] = f(""), [d, u] = f({}), [y, C] = f(!1), [r, _] = f(!1), [w, S] = f("idle"), I = W({}), b = W(null);
|
|
932
|
+
I.current = d;
|
|
933
|
+
const L = F(() => {
|
|
934
|
+
const N = p.trim().toLowerCase();
|
|
935
|
+
return N ? x.map((v) => ({
|
|
936
|
+
...v,
|
|
937
|
+
items: v.items.filter((D) => D.label.toLowerCase().includes(N))
|
|
938
|
+
})).filter((v) => v.items.length > 0) : x;
|
|
939
|
+
}, [p]), E = F(() => {
|
|
940
|
+
for (const N of x) {
|
|
941
|
+
const v = N.items.find((D) => D.key === m);
|
|
942
|
+
if (v) return v;
|
|
943
|
+
}
|
|
944
|
+
return x[0].items[0];
|
|
945
|
+
}, [m]);
|
|
946
|
+
M(() => {
|
|
947
|
+
if (!c) return;
|
|
948
|
+
let N = !0;
|
|
949
|
+
return C(!1), _(!1), X(t).then((v) => {
|
|
950
|
+
N && (u(v || {}), q(v || {}), C(!0));
|
|
951
|
+
}).catch(() => {
|
|
952
|
+
N && _(!0);
|
|
953
|
+
}), () => {
|
|
954
|
+
N = !1;
|
|
955
|
+
};
|
|
956
|
+
}, [c, t]);
|
|
957
|
+
const P = G(async () => {
|
|
958
|
+
b.current != null && (window.clearTimeout(b.current), b.current = null), S("saving");
|
|
959
|
+
try {
|
|
960
|
+
await Y(t, I.current), S("saved");
|
|
961
|
+
} catch {
|
|
962
|
+
S("error");
|
|
963
|
+
}
|
|
964
|
+
}, [t]), s = G(
|
|
965
|
+
(N, v) => {
|
|
966
|
+
u((D) => {
|
|
967
|
+
const K = {
|
|
968
|
+
...D,
|
|
969
|
+
[N]: { ...D[N] ?? {}, ...v }
|
|
970
|
+
};
|
|
971
|
+
return I.current = K, q(K), K;
|
|
972
|
+
}), S("saving"), b.current != null && window.clearTimeout(b.current), b.current = window.setTimeout(() => void P(), 600);
|
|
973
|
+
},
|
|
974
|
+
[P]
|
|
975
|
+
), k = G(() => {
|
|
976
|
+
b.current != null && P(), i();
|
|
977
|
+
}, [P, i]);
|
|
978
|
+
if (M(
|
|
979
|
+
() => () => {
|
|
980
|
+
b.current != null && window.clearTimeout(b.current);
|
|
981
|
+
},
|
|
982
|
+
[]
|
|
983
|
+
), !c) return null;
|
|
984
|
+
const $ = Sn(), J = () => {
|
|
985
|
+
if (!y)
|
|
986
|
+
return r ? /* @__PURE__ */ e("div", { className: n.emptyTip, children: "设置加载失败,请关闭后重试。" }) : /* @__PURE__ */ e("div", { className: n.emptyTip, children: "加载中…" });
|
|
987
|
+
switch (E.key) {
|
|
988
|
+
case "general":
|
|
989
|
+
return /* @__PURE__ */ e(kn, { config: d, update: s });
|
|
990
|
+
case "profile":
|
|
991
|
+
return /* @__PURE__ */ e(Bn, { config: d, update: s });
|
|
992
|
+
case "appearance":
|
|
993
|
+
return /* @__PURE__ */ e(On, { config: d, update: s });
|
|
994
|
+
case "shortcuts":
|
|
995
|
+
return /* @__PURE__ */ e(An, { config: d, update: s });
|
|
996
|
+
case "personalize":
|
|
997
|
+
return /* @__PURE__ */ e(In, { config: d, update: s });
|
|
998
|
+
case "memory":
|
|
999
|
+
return /* @__PURE__ */ e(En, { config: d, update: s });
|
|
1000
|
+
case "agents":
|
|
1001
|
+
return /* @__PURE__ */ e(Pn, { config: d, update: s });
|
|
1002
|
+
case "assistant":
|
|
1003
|
+
return /* @__PURE__ */ e(Dn, { config: d, update: s });
|
|
1004
|
+
case "devices":
|
|
1005
|
+
return /* @__PURE__ */ e(
|
|
1006
|
+
Rn,
|
|
1007
|
+
{
|
|
1008
|
+
config: d,
|
|
1009
|
+
update: s,
|
|
1010
|
+
token: t,
|
|
1011
|
+
desktop: $
|
|
1012
|
+
}
|
|
1013
|
+
);
|
|
1014
|
+
case "security":
|
|
1015
|
+
return /* @__PURE__ */ e(Mn, { config: d, update: s });
|
|
1016
|
+
case "data":
|
|
1017
|
+
return /* @__PURE__ */ e(Hn, { config: d, update: s, token: t });
|
|
1018
|
+
case "models":
|
|
1019
|
+
return /* @__PURE__ */ e(Ln, { token: t });
|
|
1020
|
+
case "plan":
|
|
1021
|
+
return /* @__PURE__ */ e($n, { desktop: $ });
|
|
1022
|
+
case "apps":
|
|
1023
|
+
return /* @__PURE__ */ e(xn, { token: t, desktop: $ });
|
|
1024
|
+
case "about":
|
|
1025
|
+
return /* @__PURE__ */ e(Kn, { desktop: $ });
|
|
1026
|
+
case "feedback":
|
|
1027
|
+
return /* @__PURE__ */ e(zn, {});
|
|
1028
|
+
default:
|
|
1029
|
+
return /* @__PURE__ */ e(Gn, { label: E.label });
|
|
1030
|
+
}
|
|
1031
|
+
}, U = /* @__PURE__ */ a(H, { children: [
|
|
1032
|
+
/* @__PURE__ */ a("aside", { className: n.menuCol, children: [
|
|
1033
|
+
/* @__PURE__ */ a("div", { className: n.searchBox, children: [
|
|
1034
|
+
/* @__PURE__ */ e(oe, {}),
|
|
1035
|
+
/* @__PURE__ */ e(
|
|
1036
|
+
"input",
|
|
1037
|
+
{
|
|
1038
|
+
value: p,
|
|
1039
|
+
onChange: (N) => g(N.target.value),
|
|
1040
|
+
placeholder: "搜索设置项"
|
|
1041
|
+
}
|
|
1042
|
+
)
|
|
1043
|
+
] }),
|
|
1044
|
+
L.map((N) => /* @__PURE__ */ a("div", { className: n.menuGroup, children: [
|
|
1045
|
+
N.title && /* @__PURE__ */ e("div", { className: n.menuGroupTitle, children: N.title }),
|
|
1046
|
+
N.items.map((v) => /* @__PURE__ */ a(
|
|
1047
|
+
"button",
|
|
1048
|
+
{
|
|
1049
|
+
type: "button",
|
|
1050
|
+
className: `${n.menuItem} ${v.key === m ? n.menuItemActive : ""} ${v.disabled ? n.menuItemDisabled : ""}`,
|
|
1051
|
+
onClick: () => o(v.key),
|
|
1052
|
+
children: [
|
|
1053
|
+
/* @__PURE__ */ e("span", { className: n.menuIcon, children: v.icon }),
|
|
1054
|
+
/* @__PURE__ */ e("span", { children: v.label })
|
|
1055
|
+
]
|
|
1056
|
+
},
|
|
1057
|
+
v.key
|
|
1058
|
+
))
|
|
1059
|
+
] }, N.title || "misc")),
|
|
1060
|
+
L.length === 0 && /* @__PURE__ */ e("div", { className: n.menuEmpty, children: "无匹配设置项" })
|
|
1061
|
+
] }),
|
|
1062
|
+
/* @__PURE__ */ a("main", { className: n.contentCol, children: [
|
|
1063
|
+
/* @__PURE__ */ a("div", { className: n.contentHeaderRow, children: [
|
|
1064
|
+
/* @__PURE__ */ e("span", { className: n.contentHeader, children: E.label }),
|
|
1065
|
+
y && !r && E.key !== "models" && /* @__PURE__ */ a(
|
|
1066
|
+
"span",
|
|
1067
|
+
{
|
|
1068
|
+
className: `${n.saveStatus} ${w === "error" ? n.saveStatusError : ""}`,
|
|
1069
|
+
children: [
|
|
1070
|
+
w === "saving" && "保存中…",
|
|
1071
|
+
w === "saved" && "已保存",
|
|
1072
|
+
w === "error" && "保存失败,改动会在下次修改时重试"
|
|
1073
|
+
]
|
|
1074
|
+
}
|
|
1075
|
+
)
|
|
1076
|
+
] }),
|
|
1077
|
+
/* @__PURE__ */ e("div", { className: n.contentBody, children: J() })
|
|
1078
|
+
] }),
|
|
1079
|
+
/* @__PURE__ */ e(
|
|
1080
|
+
"button",
|
|
1081
|
+
{
|
|
1082
|
+
type: "button",
|
|
1083
|
+
className: n.closeBtn,
|
|
1084
|
+
onClick: k,
|
|
1085
|
+
"aria-label": "关闭设置",
|
|
1086
|
+
children: "×"
|
|
1087
|
+
}
|
|
1088
|
+
)
|
|
1089
|
+
] });
|
|
1090
|
+
return h ? /* @__PURE__ */ e("div", { className: `${n.modal} ${n.dockedPage}`, role: "dialog", "aria-label": "设置", children: U }) : /* @__PURE__ */ e("div", { className: n.overlay, onClick: k, children: /* @__PURE__ */ e(
|
|
1091
|
+
"div",
|
|
1092
|
+
{
|
|
1093
|
+
className: n.modal,
|
|
1094
|
+
role: "dialog",
|
|
1095
|
+
"aria-label": "设置",
|
|
1096
|
+
onClick: (N) => N.stopPropagation(),
|
|
1097
|
+
children: U
|
|
1098
|
+
}
|
|
1099
|
+
) });
|
|
1100
|
+
}
|
|
1101
|
+
export {
|
|
1102
|
+
Qn as default
|
|
1103
|
+
};
|