@yuku123/z-team-component 0.2.103 → 0.2.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/ChangeLogView-DG-ogBff.js +542 -0
  2. package/dist/ComponentDoc-BW1SyDxk.js +8035 -0
  3. package/dist/InvitationManagementPage-hYvoPEcm.js +495 -0
  4. package/dist/OnboardingPage-KDp-DrzY.js +393 -0
  5. package/dist/ScheduledTasks-CErSDgyW.js +12127 -0
  6. package/dist/SystemShell-DvrY4Bl7.js +688 -0
  7. package/dist/_commonjsHelpers-B52_cu2H.js +26 -0
  8. package/dist/admin-logs-uPnnclwN.js +198 -0
  9. package/dist/api-B__qdRIf.js +20 -0
  10. package/dist/browser-jb_PFvU3.js +1538 -0
  11. package/dist/createWorkspaceWsHandler-BXbn5-Ft.js +13142 -0
  12. package/dist/ctc-sso-DtJHC-2M.js +117 -0
  13. package/dist/echarts-B1OU1xr4.js +16 -0
  14. package/dist/history-BlrA1eaW.js +41 -0
  15. package/dist/index-0smeCTnr.js +42049 -0
  16. package/dist/index-2isWwv1X.js +10169 -0
  17. package/dist/index-BC8f-JP9.js +242 -0
  18. package/dist/index-BK3YDeXH.js +2217 -0
  19. package/dist/index-BOJm25by.js +999 -0
  20. package/dist/index-B_LJRFsK.js +339 -0
  21. package/dist/index-BnJ8UEeZ.js +5892 -0
  22. package/dist/index-BohoJQPr.js +7631 -0
  23. package/dist/index-BwJPAN8f.js +112 -0
  24. package/dist/index-ByhCWenF.js +434 -0
  25. package/dist/index-C2_tfpEj.js +118 -0
  26. package/dist/index-C815hPWS.js +430 -0
  27. package/dist/index-C9fGup9t.js +189 -0
  28. package/dist/index-Cb88Xdh4.js +169 -0
  29. package/dist/index-Cih0yoxc.js +178 -0
  30. package/dist/index-CkWKJORv.js +1645 -0
  31. package/dist/index-CsaGecGX.js +132 -0
  32. package/dist/index-D-xPVrY3.js +316 -0
  33. package/dist/index-DAGa9v8r.js +142 -0
  34. package/dist/index-DBnH-lRh.js +956 -0
  35. package/dist/index-DIFIvVWE.js +93 -0
  36. package/dist/index-DOgCfVB2.js +574 -0
  37. package/dist/index-DWsfQMp8.js +208 -0
  38. package/dist/index-DcurzowX.js +2699 -0
  39. package/dist/index-DhDdFRHC.js +279 -0
  40. package/dist/index-Dpii3P5J.js +1302 -0
  41. package/dist/index-DtHoMz1H.js +8 -0
  42. package/dist/index-YVtm1SRy.js +913 -0
  43. package/dist/index-aI2EXKED.js +479 -0
  44. package/dist/index-q_TPea69.js +315 -0
  45. package/dist/index.js +10 -0
  46. package/dist/index.module-CAa-2T7m.js +72 -0
  47. package/dist/index.module-UI0iz8K0.js +42 -0
  48. package/dist/instance-pdQ_wAhB.js +216 -0
  49. package/dist/menuPermission-CCQjJVXg.js +60 -0
  50. package/dist/mobile-client-O3yr9h6t.js +24 -0
  51. package/dist/pages.js +21 -0
  52. package/dist/send-default-agent-team-message-BzeR4ahf.js +35 -0
  53. package/dist/spark-md5-Dld54a-T.js +178 -0
  54. package/dist/sso-user-DI7oiDdc.js +43 -0
  55. package/dist/training-Bz7Sr5yC.js +450 -0
  56. package/dist/webide-NcHLDiSn.js +5233 -0
  57. package/dist/z-team-component.css +1 -0
  58. package/package.json +1 -1
@@ -0,0 +1,430 @@
1
+ import { jsxs as m, jsx as d } from "react/jsx-runtime";
2
+ import { message as T } from "antd";
3
+ import { useState as b, useRef as D, useCallback as K, useEffect as J } from "react";
4
+ /* empty css */
5
+ const X = "/z-team", Y = typeof window < "u" && window.ZTEAM_USE_KAPI === !0, Z = Y, G = window.ENV_TYPE || window.envType || "", x = `${Z ? "/kapi" : ""}${X}/api/chatdemo`, Q = G || "local", $ = {
6
+ Accept: "application/json",
7
+ "project-env": Q
8
+ };
9
+ async function U(e, a) {
10
+ const s = await e.text().catch(() => "");
11
+ let i = {};
12
+ if (s)
13
+ try {
14
+ i = JSON.parse(s);
15
+ } catch {
16
+ if (!e.ok) throw new Error(a);
17
+ return s;
18
+ }
19
+ if (typeof i.success == "boolean") {
20
+ if (i.success)
21
+ return i.data !== void 0 ? i.data : !0;
22
+ throw new Error(i.message || a);
23
+ }
24
+ if (!e.ok) throw new Error(a);
25
+ return i;
26
+ }
27
+ async function tt(e) {
28
+ const a = e != null && e.trim() ? `?model=${encodeURIComponent(e.trim())}` : "", s = await fetch(`${x}/sessions${a}`, {
29
+ method: "POST",
30
+ credentials: "include",
31
+ headers: $
32
+ });
33
+ return U(s, "创建会话失败");
34
+ }
35
+ async function et(e) {
36
+ const a = await fetch(`${x}/sessions/${encodeURIComponent(e)}`, {
37
+ credentials: "include",
38
+ headers: $
39
+ });
40
+ return U(a, "加载会话失败");
41
+ }
42
+ async function nt(e, a, s) {
43
+ const i = await fetch(
44
+ `${x}/sessions/${encodeURIComponent(e)}/chat`,
45
+ {
46
+ method: "POST",
47
+ credentials: "include",
48
+ headers: { Accept: "application/json", ...$, "Content-Type": "application/json" },
49
+ body: JSON.stringify({
50
+ message: a,
51
+ ...s != null && s.trim() ? { model: s.trim() } : {}
52
+ })
53
+ }
54
+ );
55
+ return U(i, "发送失败");
56
+ }
57
+ function st(e, a) {
58
+ const s = e.split(`
59
+
60
+ `), i = s.pop() ?? "";
61
+ for (const g of s) {
62
+ let u = "";
63
+ for (const _ of g.split(`
64
+ `))
65
+ _.startsWith("data:") && (u += _.slice(5).trim());
66
+ if (!(!u || u === "[DONE]"))
67
+ try {
68
+ a(JSON.parse(u));
69
+ } catch {
70
+ a({ type: "token", data: u });
71
+ }
72
+ }
73
+ return i;
74
+ }
75
+ async function ot(e, a, s, i) {
76
+ var N, p;
77
+ const g = await fetch(
78
+ `${x}/sessions/${encodeURIComponent(e)}/chat/stream`,
79
+ {
80
+ method: "POST",
81
+ credentials: "include",
82
+ headers: {
83
+ ...$,
84
+ "Content-Type": "application/json",
85
+ Accept: "text/event-stream"
86
+ },
87
+ body: JSON.stringify({
88
+ message: a,
89
+ ...i != null && i.trim() ? { model: i.trim() } : {}
90
+ }),
91
+ signal: s.signal
92
+ }
93
+ );
94
+ if (!g.ok || !g.body)
95
+ throw new Error(`流式请求失败 HTTP ${g.status}`);
96
+ const u = g.body.getReader(), _ = new TextDecoder();
97
+ let h = "";
98
+ try {
99
+ for (; ; ) {
100
+ const { done: f, value: w } = await u.read();
101
+ if (f) break;
102
+ h += _.decode(w, { stream: !0 }), h = st(h, s.onEvent);
103
+ }
104
+ } catch (f) {
105
+ if ((N = s.signal) != null && N.aborted) return;
106
+ throw (p = s.onError) == null || p.call(s, f instanceof Error ? f : new Error(String(f))), f;
107
+ }
108
+ }
109
+ const at = "_page_1u2ag_1", rt = "_header_1u2ag_9", ct = "_title_1u2ag_16", it = "_sub_1u2ag_22", lt = "_toolbar_1u2ag_29", ut = "_modelInput_1u2ag_37", dt = "_btn_1u2ag_47", gt = "_btnSecondary_1u2ag_57", pt = "_status_1u2ag_72", mt = "_panel_1u2ag_79", ft = "_messages_1u2ag_91", _t = "_empty_1u2ag_100", ht = "_msgOwn_1u2ag_107", yt = "_msgOwnBubble_1u2ag_112", bt = "_msgAgent_1u2ag_123", wt = "_avatar_1u2ag_129", vt = "_msgAgentBody_1u2ag_141", St = "_msgMeta_1u2ag_145", Nt = "_reasoning_1u2ag_151", At = "_msgAgentBubble_1u2ag_162", kt = "_toolHint_1u2ag_184", Et = "_inputArea_1u2ag_190", Ct = "_textarea_1u2ag_197", Tt = "_inputActions_1u2ag_215", xt = "_tokenUsage_1u2ag_222", o = {
110
+ page: at,
111
+ header: rt,
112
+ title: ct,
113
+ sub: it,
114
+ toolbar: lt,
115
+ modelInput: ut,
116
+ btn: dt,
117
+ btnSecondary: gt,
118
+ status: pt,
119
+ panel: mt,
120
+ messages: ft,
121
+ empty: _t,
122
+ msgOwn: ht,
123
+ msgOwnBubble: yt,
124
+ msgAgent: bt,
125
+ avatar: wt,
126
+ msgAgentBody: vt,
127
+ msgMeta: St,
128
+ reasoning: Nt,
129
+ msgAgentBubble: At,
130
+ toolHint: kt,
131
+ inputArea: Et,
132
+ textarea: Ct,
133
+ inputActions: Tt,
134
+ tokenUsage: xt
135
+ };
136
+ function $t(e, a, s) {
137
+ if (!s)
138
+ return { parts: e, lastKind: a };
139
+ if (a === "tool")
140
+ return {
141
+ parts: [...e, { kind: "tool", hint: s }],
142
+ lastKind: "tool"
143
+ };
144
+ const i = a === "thought" ? "reasoning" : "text", g = e[e.length - 1];
145
+ if (g && g.kind === i) {
146
+ const u = e.slice(0, -1);
147
+ return u.push({
148
+ kind: i,
149
+ content: g.content + s
150
+ }), { parts: u, lastKind: a };
151
+ }
152
+ return {
153
+ parts: [...e, { kind: i, content: s }],
154
+ lastKind: a
155
+ };
156
+ }
157
+ function L(e) {
158
+ const a = (e == null ? void 0 : e.trim()) ?? "";
159
+ return a ? [{ kind: "text", content: a }] : [];
160
+ }
161
+ const Ot = "deepseek-v4-flash";
162
+ function S() {
163
+ return `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
164
+ }
165
+ function Bt(e, a) {
166
+ return { id: e, role: "assistant", parts: [], streaming: a };
167
+ }
168
+ function Mt() {
169
+ const [e, a] = b(""), [s, i] = b(Ot), [g, u] = b([]), [_, h] = b(""), [N, p] = b(""), [f, w] = b(!1), [A, j] = b(!1), k = D(null), I = D(null), E = D(
170
+ /* @__PURE__ */ new Map()
171
+ ), M = K(() => {
172
+ var t;
173
+ (t = I.current) == null || t.scrollIntoView({ behavior: "smooth" });
174
+ }, []);
175
+ J(() => {
176
+ M();
177
+ }, [g, M]);
178
+ const P = (t) => {
179
+ u(
180
+ t.map(
181
+ (n) => n.role === "user" ? { id: S(), role: "user", content: n.content || "" } : {
182
+ id: S(),
183
+ role: "assistant",
184
+ parts: L(n.content || "")
185
+ }
186
+ )
187
+ );
188
+ }, R = K(async () => {
189
+ w(!0), p("创建会话…");
190
+ try {
191
+ const t = await tt(s);
192
+ a(t.sessionId), P(t.messages || []), p("");
193
+ } catch (t) {
194
+ const n = t instanceof Error ? t.message : "创建失败";
195
+ p(n), T.error(n);
196
+ } finally {
197
+ w(!1);
198
+ }
199
+ }, [s]);
200
+ J(() => {
201
+ R();
202
+ }, []);
203
+ const V = async () => {
204
+ if (e) {
205
+ p("刷新中…");
206
+ try {
207
+ const t = await et(e);
208
+ P(t.messages || []), p("");
209
+ } catch (t) {
210
+ T.error(t instanceof Error ? t.message : "刷新失败");
211
+ }
212
+ }
213
+ }, F = () => {
214
+ const t = S();
215
+ return E.current.set(t, null), u((n) => [...n, Bt(t, !0)]), t;
216
+ }, O = (t, n) => {
217
+ u(
218
+ (l) => l.map(
219
+ (r) => r.id === t && r.role === "assistant" ? { ...r, ...n } : r
220
+ )
221
+ );
222
+ }, v = (t, n, l) => {
223
+ u(
224
+ (r) => r.map((c) => {
225
+ if (c.id !== t || c.role !== "assistant")
226
+ return c;
227
+ const { parts: y, lastKind: B } = $t(
228
+ c.parts,
229
+ n,
230
+ l
231
+ );
232
+ return E.current.set(t, B), { ...c, parts: y };
233
+ })
234
+ );
235
+ }, W = (t, n) => {
236
+ const l = n.type, r = n.data;
237
+ if (l === "token" && typeof r == "string")
238
+ v(t, "token", r);
239
+ else if (l === "thought" && typeof r == "string")
240
+ v(t, "thought", r);
241
+ else if (l === "tool_call" && r && typeof r == "object") {
242
+ const c = String(r.tool ?? "tool");
243
+ v(t, "tool", `🔧 ${c} …`);
244
+ } else if (l === "tool_result" && r && typeof r == "object") {
245
+ const c = r, y = String(c.tool ?? ""), B = String(c.result ?? "").slice(0, 120), z = !!c.error;
246
+ v(
247
+ t,
248
+ "tool",
249
+ `${z ? "✗" : "✓"} ${y}: ${B}`
250
+ );
251
+ } else if (l === "error")
252
+ v(t, "token", `
253
+ [错误] ${typeof r == "string" ? r : "error"}`);
254
+ else if (l === "done") {
255
+ E.current.delete(t);
256
+ const c = r && typeof r == "object" ? r.tokenUsage : void 0;
257
+ O(t, {
258
+ streaming: !1,
259
+ ...c && typeof c == "object" ? { tokenUsage: c } : {}
260
+ });
261
+ }
262
+ }, H = async () => {
263
+ var l, r;
264
+ const t = _.trim();
265
+ if (!t || !e || A) return;
266
+ h(""), u((c) => [
267
+ ...c,
268
+ { id: S(), role: "user", content: t }
269
+ ]);
270
+ const n = F();
271
+ j(!0), p("生成中…"), (l = k.current) == null || l.abort(), k.current = new AbortController();
272
+ try {
273
+ await ot(
274
+ e,
275
+ t,
276
+ {
277
+ signal: k.current.signal,
278
+ onEvent: (c) => W(n, c)
279
+ },
280
+ s
281
+ ), O(n, { streaming: !1 }), E.current.delete(n), p("");
282
+ } catch (c) {
283
+ if (!((r = k.current) != null && r.signal.aborted)) {
284
+ const y = c instanceof Error ? c.message : "流式失败";
285
+ T.error(y), v(n, "token", `[失败] ${y}`), O(n, { streaming: !1 }), p(y);
286
+ }
287
+ } finally {
288
+ j(!1);
289
+ }
290
+ }, q = async () => {
291
+ const t = _.trim();
292
+ if (!(!t || !e || A)) {
293
+ h(""), u((n) => [
294
+ ...n,
295
+ { id: S(), role: "user", content: t }
296
+ ]), w(!0), p("同步请求中…");
297
+ try {
298
+ const n = await nt(e, t, s);
299
+ u((l) => [
300
+ ...l,
301
+ {
302
+ id: S(),
303
+ role: "assistant",
304
+ parts: L(n.reply || "")
305
+ }
306
+ ]), p("");
307
+ } catch (n) {
308
+ T.error(n instanceof Error ? n.message : "发送失败");
309
+ } finally {
310
+ w(!1);
311
+ }
312
+ }
313
+ }, C = !e || f || A;
314
+ return /* @__PURE__ */ m("div", { className: o.page, children: [
315
+ /* @__PURE__ */ m("div", { className: o.header, children: [
316
+ /* @__PURE__ */ d("div", { className: o.title, children: "AINative Chat Demo" }),
317
+ /* @__PURE__ */ d("div", { className: o.sub, children: e ? `Session: ${e} · SSE(非 WebSocket)` : "正在初始化…" }),
318
+ /* @__PURE__ */ m("div", { className: o.toolbar, children: [
319
+ /* @__PURE__ */ d(
320
+ "input",
321
+ {
322
+ className: o.modelInput,
323
+ placeholder: "model / llmCode(可选)",
324
+ value: s,
325
+ onChange: (t) => i(t.target.value)
326
+ }
327
+ ),
328
+ /* @__PURE__ */ d(
329
+ "button",
330
+ {
331
+ type: "button",
332
+ className: o.btnSecondary,
333
+ onClick: R,
334
+ disabled: f || A,
335
+ children: "新会话"
336
+ }
337
+ ),
338
+ /* @__PURE__ */ d(
339
+ "button",
340
+ {
341
+ type: "button",
342
+ className: o.btnSecondary,
343
+ onClick: V,
344
+ disabled: C,
345
+ children: "刷新历史"
346
+ }
347
+ )
348
+ ] })
349
+ ] }),
350
+ N ? /* @__PURE__ */ d("div", { className: o.status, children: N }) : null,
351
+ /* @__PURE__ */ m("div", { className: o.panel, children: [
352
+ /* @__PURE__ */ m("div", { className: o.messages, children: [
353
+ g.length === 0 ? /* @__PURE__ */ d("div", { className: o.empty, children: "发送消息开始对话" }) : null,
354
+ g.map(
355
+ (t) => t.role === "user" ? /* @__PURE__ */ d("div", { className: o.msgOwn, children: /* @__PURE__ */ d("div", { className: o.msgOwnBubble, children: t.content }) }, t.id) : t.role === "assistant" ? /* @__PURE__ */ m("div", { className: o.msgAgent, children: [
356
+ /* @__PURE__ */ d("div", { className: o.avatar, children: "🤖" }),
357
+ /* @__PURE__ */ m("div", { className: o.msgAgentBody, children: [
358
+ /* @__PURE__ */ m("div", { className: o.msgMeta, children: [
359
+ "Assistant",
360
+ t.streaming ? " · 生成中" : ""
361
+ ] }),
362
+ t.parts.length === 0 && t.streaming ? /* @__PURE__ */ d("div", { className: o.msgAgentBubble, children: "…" }) : null,
363
+ t.parts.map((n, l) => {
364
+ const c = l === t.parts.length - 1 && t.streaming ? "…" : "";
365
+ return n.kind === "reasoning" ? /* @__PURE__ */ m("div", { className: o.reasoning, children: [
366
+ n.content,
367
+ c
368
+ ] }, l) : n.kind === "text" ? /* @__PURE__ */ m("div", { className: o.msgAgentBubble, children: [
369
+ n.content,
370
+ c
371
+ ] }, l) : /* @__PURE__ */ d("div", { className: o.toolHint, children: n.hint }, l);
372
+ }),
373
+ t.tokenUsage && !t.streaming ? /* @__PURE__ */ m("div", { className: o.tokenUsage, children: [
374
+ "Token in ",
375
+ t.tokenUsage.inputTokenCount ?? 0,
376
+ " / out",
377
+ " ",
378
+ t.tokenUsage.outputTokenCount ?? 0,
379
+ " / total",
380
+ " ",
381
+ t.tokenUsage.totalTokenCount ?? 0
382
+ ] }) : null
383
+ ] })
384
+ ] }, t.id) : null
385
+ ),
386
+ /* @__PURE__ */ d("div", { ref: I })
387
+ ] }),
388
+ /* @__PURE__ */ m("div", { className: o.inputArea, children: [
389
+ /* @__PURE__ */ d(
390
+ "textarea",
391
+ {
392
+ className: o.textarea,
393
+ placeholder: "输入消息,Enter 发送(Shift+Enter 换行)",
394
+ value: _,
395
+ disabled: C,
396
+ onChange: (t) => h(t.target.value),
397
+ onKeyDown: (t) => {
398
+ t.key === "Enter" && !t.shiftKey && (t.preventDefault(), H());
399
+ }
400
+ }
401
+ ),
402
+ /* @__PURE__ */ m("div", { className: o.inputActions, children: [
403
+ /* @__PURE__ */ d(
404
+ "button",
405
+ {
406
+ type: "button",
407
+ className: o.btnSecondary,
408
+ disabled: C,
409
+ onClick: q,
410
+ children: "同步"
411
+ }
412
+ ),
413
+ /* @__PURE__ */ d(
414
+ "button",
415
+ {
416
+ type: "button",
417
+ className: o.btn,
418
+ disabled: C,
419
+ onClick: H,
420
+ children: "发送(SSE)"
421
+ }
422
+ )
423
+ ] })
424
+ ] })
425
+ ] })
426
+ ] });
427
+ }
428
+ export {
429
+ Mt as default
430
+ };
@@ -0,0 +1,189 @@
1
+ import { jsxs as f, jsx as t } from "react/jsx-runtime";
2
+ import { useState as h, useCallback as u } from "react";
3
+ import { S as N, P as H } from "./webide-NcHLDiSn.js";
4
+ import { L as W, P as $, S as j, C as B, E as O, a as q, W as b, b as g, T as z, c as E } from "./ScheduledTasks-CErSDgyW.js";
5
+ import { w as K, p as M } from "./index-2isWwv1X.js";
6
+ import { TodoTab as R } from "@yuku123/z-task-component";
7
+ function V({
8
+ view: s,
9
+ agents: o,
10
+ token: i,
11
+ currentUser: p,
12
+ onOpenChat: d,
13
+ onOpenAgentDetail: m,
14
+ onBackToExtensions: r,
15
+ onOpenTab: a,
16
+ onAgentCreated: T,
17
+ onOpenProject: l,
18
+ onOpenWorkbenchShell: x,
19
+ onOpenHistory: S,
20
+ localLane: n
21
+ }) {
22
+ const [y, k] = h(
23
+ null
24
+ ), [C, P] = h(
25
+ null
26
+ ), A = u(
27
+ (e) => {
28
+ a("notes"), k({ id: e, ts: Date.now() });
29
+ },
30
+ [a]
31
+ ), I = u(
32
+ (e) => {
33
+ a("todo"), P({ id: e, ts: Date.now() });
34
+ },
35
+ [a]
36
+ ), c = s.kind === "chat" ? s.lane === "local" ? `local-${s.sessionId ?? "new"}-${s.ts}` : `${s.agent.id}-${s.sessionId ?? "new"}-${s.ts}` : "none";
37
+ return /* @__PURE__ */ f("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
38
+ s.kind === "chat" && (s.lane === "local" ? (
39
+ /* 本地车道(合并第 3 步):本机 Agent 会话;
40
+ 本机离线/没有伙伴时给可读空态,不让中间区白屏 */
41
+ n && n.activeLocal && n.localOnline ? /* @__PURE__ */ t(
42
+ "div",
43
+ {
44
+ style: {
45
+ flex: 1,
46
+ minHeight: 0,
47
+ display: "flex",
48
+ flexDirection: "column"
49
+ },
50
+ children: /* @__PURE__ */ t(
51
+ W,
52
+ {
53
+ agent: K(n.activeLocal),
54
+ openSessionId: s.sessionId ? String(s.sessionId) : null,
55
+ onOpenSessionConsumed: () => {
56
+ },
57
+ onSessionsMutated: n.refreshSessions
58
+ },
59
+ c
60
+ )
61
+ }
62
+ ) : /* @__PURE__ */ t(
63
+ "div",
64
+ {
65
+ style: {
66
+ flex: 1,
67
+ display: "flex",
68
+ alignItems: "center",
69
+ justifyContent: "center",
70
+ color: "rgba(0,0,0,0.45)",
71
+ fontSize: 13
72
+ },
73
+ children: "本机 Agent 未连接:启动 Z-OPC 桌面端伴生服务后可用本地车道"
74
+ }
75
+ )
76
+ ) : /* @__PURE__ */ t(
77
+ "div",
78
+ {
79
+ style: {
80
+ flex: 1,
81
+ minHeight: 0,
82
+ display: "flex",
83
+ flexDirection: "column"
84
+ },
85
+ children: /* @__PURE__ */ t(
86
+ $,
87
+ {
88
+ agent: s.agent,
89
+ initialSessionId: s.sessionId,
90
+ draftNoAutoPick: s.draft === !0,
91
+ autoSendDraft: s.autoSendDraft ?? null,
92
+ chromeless: !0,
93
+ agents: o,
94
+ onSwitchAgent: (e) => d(e)
95
+ },
96
+ c
97
+ )
98
+ }
99
+ )),
100
+ s.kind === "schedule" && /* @__PURE__ */ t(
101
+ j,
102
+ {
103
+ localOnline: (n == null ? void 0 : n.localOnline) ?? !1,
104
+ agents: o,
105
+ token: i,
106
+ defaultLane: "cloud"
107
+ }
108
+ ),
109
+ s.kind === "history" && /* @__PURE__ */ t(
110
+ B,
111
+ {
112
+ agents: o,
113
+ token: i,
114
+ onOpenSession: (e, D) => d(e, D),
115
+ onBack: r
116
+ }
117
+ ),
118
+ s.kind === "extensions" && /* @__PURE__ */ t(
119
+ O,
120
+ {
121
+ agents: o,
122
+ loading: !1,
123
+ skillsAgent: M(o),
124
+ token: i,
125
+ currentUser: p,
126
+ onChat: (e) => d(e),
127
+ onConfig: m,
128
+ onCreated: T,
129
+ onOpenPersonalTab: a,
130
+ onOpenWorkbenchShell: x,
131
+ onOpenHistory: S,
132
+ capTabRequest: s.cap ? { tab: s.cap, ts: s.ts } : null
133
+ }
134
+ ),
135
+ s.kind === "agentDetail" && /* @__PURE__ */ t("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ t(
136
+ q,
137
+ {
138
+ agent: s.agent,
139
+ onBack: r
140
+ }
141
+ ) }),
142
+ s.kind === "tab" && /* @__PURE__ */ f("div", { style: { flex: 1, minHeight: 0 }, children: [
143
+ s.tab === "projects" && /* @__PURE__ */ t(
144
+ b,
145
+ {
146
+ activeTab: "projects",
147
+ onActiveTabChange: () => {
148
+ },
149
+ onOpenProject: l,
150
+ hideTabs: !0
151
+ }
152
+ ),
153
+ s.tab === "personal" && /* @__PURE__ */ t(
154
+ b,
155
+ {
156
+ activeTab: "personal",
157
+ onActiveTabChange: () => {
158
+ },
159
+ onOpenProject: l,
160
+ hideTabs: !0
161
+ }
162
+ ),
163
+ s.tab === "business-stats" && /* @__PURE__ */ t(N, { source: "scenario" }),
164
+ s.tab === "tools" && /* @__PURE__ */ t(g, { showTools: !0, showWebsites: !1 }),
165
+ s.tab === "websites" && /* @__PURE__ */ t(g, { showTools: !1, showWebsites: !0 }),
166
+ s.tab === "todo" && /* @__PURE__ */ t(
167
+ R,
168
+ {
169
+ onOpenProject: l,
170
+ onOpenNote: A,
171
+ openTodoId: C
172
+ }
173
+ ),
174
+ s.tab === "notes" && /* @__PURE__ */ t(
175
+ H,
176
+ {
177
+ onOpenProject: l,
178
+ onOpenTodo: I,
179
+ openNoteId: y
180
+ }
181
+ ),
182
+ s.tab === "training" && /* @__PURE__ */ t(z, {}),
183
+ s.tab === "webide" && /* @__PURE__ */ t(E, {})
184
+ ] })
185
+ ] });
186
+ }
187
+ export {
188
+ V as default
189
+ };