bazilion 0.27.0 → 0.50.0

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 (203) hide show
  1. package/dist/cli.js +405 -243
  2. package/dist/cli.js.map +1 -1
  3. package/dist/daemon.js +1077 -623
  4. package/dist/daemon.js.map +1 -1
  5. package/dist/web/client/assets/ConfigPage-_FY--9PB.js +1 -0
  6. package/dist/web/client/assets/ConfirmDialog-BblXqMVb.js +1 -0
  7. package/dist/web/client/assets/ConnectionsView-BZHJysCa.js +1 -0
  8. package/dist/web/client/assets/FieldRow-k05wfDy9.js +1 -0
  9. package/dist/web/client/assets/SectionTabs-DlfXtepS.js +1 -0
  10. package/dist/web/client/assets/{SkillFindings-8LX6bYf_.js → SkillFindings-CHf5ZGY0.js} +1 -1
  11. package/dist/web/client/assets/SpawnDialog-C-Ujb4bC.js +1 -0
  12. package/dist/web/client/assets/TeamForm-D6EAAF7m.js +1 -0
  13. package/dist/web/client/assets/TeamThread-DpUOwMoi.js +1 -0
  14. package/dist/web/client/assets/UnsavedChangesGuard-DTUP7hwu.js +1 -0
  15. package/dist/web/client/assets/_id-C94dgBDe.js +1 -0
  16. package/dist/web/client/assets/_id-CxmEfoEp.js +1 -0
  17. package/dist/web/client/assets/agents-C-bJ5R_0.js +1 -0
  18. package/dist/web/client/assets/agents-odqBNx-A.js +1 -0
  19. package/dist/web/client/assets/api-CPzQ_z9m.js +1 -0
  20. package/dist/web/client/assets/arrow-right-Dyta3p06.js +1 -0
  21. package/dist/web/client/assets/attention-D0e7o7fh.js +1 -0
  22. package/dist/web/client/assets/chevron-right-B2YEg9rw.js +1 -0
  23. package/dist/web/client/assets/config-B7Y5MtpM.js +3 -0
  24. package/dist/web/client/assets/createLucideIcon-Cgab8gqu.js +1 -0
  25. package/dist/web/client/assets/index-CNVw44IE.js +54 -0
  26. package/dist/web/client/assets/link-ClwtaO_E.js +1 -0
  27. package/dist/web/client/assets/login-Br1F4rQx.js +1 -0
  28. package/dist/web/client/assets/mcp-B8bIAY6k.js +1 -0
  29. package/dist/web/client/assets/routes-BZdlkRdC.js +76 -0
  30. package/dist/web/client/assets/save-ZqeB_I-c.js +1 -0
  31. package/dist/web/client/assets/{services-B2f7e5jV.js → services-CPJxDrVG.js} +1 -1
  32. package/dist/web/client/assets/skills-DE_kQQGj.js +1 -0
  33. package/dist/web/client/assets/style-BWShXY3e.js +7 -0
  34. package/dist/web/client/assets/styles-Tney8jZq.css +2 -0
  35. package/dist/web/client/assets/teams-AcuSLc3I.js +1 -0
  36. package/dist/web/client/assets/teams-tRamPg7O.js +1 -0
  37. package/dist/web/client/assets/telegram-Ku69-GAv.js +1 -0
  38. package/dist/web/client/assets/tokens-DuLNZMgi.js +1 -0
  39. package/dist/web/client/assets/welcome-CrQk6n6I.js +1 -0
  40. package/dist/web/server/assets/{ConfigPage-CGld_wCK.js → ConfigPage-DSLM5CLw.js} +2 -2
  41. package/dist/web/server/assets/{ConfirmDialog-LdVlEanK.js → ConfirmDialog-CvLZgbfY.js} +1 -1
  42. package/dist/web/server/assets/ConnectionsView-DVLNH81Y.js +708 -0
  43. package/dist/web/server/assets/{FieldRow-Dah2KKqo.js → FieldRow-DQBzMtcR.js} +4 -4
  44. package/dist/web/server/assets/{Page-CMSYKXWJ.js → Page-KIL1CsME.js} +1 -1
  45. package/dist/web/server/assets/Rail-D8LhjS38.js +756 -0
  46. package/dist/web/server/assets/{SectionTabs-CqFg9Vwx.js → SectionTabs-CNcvxbR8.js} +1 -16
  47. package/dist/web/server/assets/{SkillFindings-Bd6e81Wu.js → SkillFindings-DX8lCMG7.js} +1 -1
  48. package/dist/web/server/assets/{SpawnDialog-BGNaMfFb.js → SpawnDialog-Brmkl_ll.js} +24 -6
  49. package/dist/web/server/assets/{TeamForm-C93tpn9r.js → TeamForm-CvQAs2FA.js} +1 -1
  50. package/dist/web/server/assets/TeamThread-BNJi6gPM.js +205 -0
  51. package/dist/web/server/assets/{UnsavedChangesGuard-Dm4a27_5.js → UnsavedChangesGuard-B3Lpl08z.js} +8 -4
  52. package/dist/web/server/assets/{TeamPolicyEditor-BHS3J0R9.js → _id-BH1631a8.js} +114 -263
  53. package/dist/web/server/assets/{_id-sW6zXrTP.js → _id-CA3QO7J5.js} +1 -1
  54. package/dist/web/server/assets/{_id-lOVnT5sS.js → _id-CO1PgvyG.js} +5 -5
  55. package/dist/web/server/assets/{_id-B0x1ffz3.js → _id-DIXUiIaB.js} +1 -1
  56. package/dist/web/server/assets/{_id-ByiXeIPS.js → _id-E2N4gZ4O.js} +2 -2
  57. package/dist/web/server/assets/{_id-Bdf_Rg62.js → _id-TVruGcOd.js} +1 -1
  58. package/dist/web/server/assets/_tanstack-start-manifest_v-BVfrV7LQ.js +191 -0
  59. package/dist/web/server/assets/{agents-BNPkidbH.js → agents-BnWgFo6o.js} +1 -1
  60. package/dist/web/server/assets/{agents-BK8OmB8g.js → agents-C63VycUw.js} +2 -2
  61. package/dist/web/server/assets/{agents-D4tqK1kH.js → agents-CalSKogx.js} +14 -15
  62. package/dist/web/server/assets/{agents-Cn9GkXFX.js → agents-CdZvooeQ.js} +1 -1
  63. package/dist/web/server/assets/{agents-lOqc6VGd.js → agents-DPZVni4Q.js} +1 -1
  64. package/dist/web/server/assets/{agents-DycxHDt8.js → agents-DrkEwIpR.js} +8 -8
  65. package/dist/web/server/assets/{attention-DULVjdmF.js → attention-BbE4yc-V.js} +1 -1
  66. package/dist/web/server/assets/{attention-YWnLKA2E.js → attention-Cr7puThv.js} +1 -1
  67. package/dist/web/server/assets/{attention-BIm455bC.js → attention-DIyX3VMB.js} +6 -6
  68. package/dist/web/server/assets/{auth-DiN92ydD.js → auth-dJnrFW6y.js} +1 -1
  69. package/dist/web/server/assets/{config-C1VB28se.js → config-3tPtOmPE.js} +1 -1
  70. package/dist/web/server/assets/{config-BNEgu7WG.js → config-DJGZiPBJ.js} +13 -13
  71. package/dist/web/server/assets/{config-TdVqnqNL.js → config-rUqhMjIs.js} +1 -1
  72. package/dist/web/server/assets/{daemon-client-DL2ik2Em.js → daemon-client-B_ZRIIrT.js} +2 -1
  73. package/dist/web/server/assets/{mcp-BwmpNQPN.js → mcp-C97uAZe1.js} +1 -1
  74. package/dist/web/server/assets/{mcp-B09_O05r.js → mcp-Cf7KzOJ9.js} +9 -9
  75. package/dist/web/server/assets/{mcp-CqdTfXcn.js → mcp-DE14q5c0.js} +1 -1
  76. package/dist/web/server/assets/{router-BI9gmY3S.js → router-w2yPgmC1.js} +412 -259
  77. package/dist/web/server/assets/routes-1FEodTRm.js +16 -0
  78. package/dist/web/server/assets/routes-B6AO0LjK.js +57 -0
  79. package/dist/web/server/assets/routes-D1NHwz6f.js +7644 -0
  80. package/dist/web/server/assets/{services-tCfB1B83.js → services-BjroGXgC.js} +4 -4
  81. package/dist/web/server/assets/{services-Q9HYQXXB.js → services-Cdk40QHq.js} +1 -1
  82. package/dist/web/server/assets/{services-BLvAvb8g.js → services-DsHRLL8q.js} +1 -1
  83. package/dist/web/server/assets/{skills-BZg_txbf.js → skills-CA17GjuZ.js} +1 -1
  84. package/dist/web/server/assets/{skills-C7fqRPna.js → skills-DC1OTc8n.js} +11 -11
  85. package/dist/web/server/assets/{skills-C_g8IKag.js → skills-h5aHa7Q8.js} +1 -1
  86. package/dist/web/server/assets/style-GYDODk2F.js +178 -0
  87. package/dist/web/server/assets/{teams-D4CaU76n.js → teams-Bm63mbTt.js} +1 -1
  88. package/dist/web/server/assets/{teams-DX2HmKqi.js → teams-BxnvFTyn.js} +1 -1
  89. package/dist/web/server/assets/{teams-BS-oweRl.js → teams-Cg-QQWpH.js} +23 -15
  90. package/dist/web/server/assets/{teams-BHkhnt6b.js → teams-D6Tx-Jyn.js} +1 -1
  91. package/dist/web/server/assets/{teams-BSflKBP8.js → teams-OzHTyVi9.js} +6 -6
  92. package/dist/web/server/assets/{teams-CNyB5nM9.js → teams-YrmyutM4.js} +1 -1
  93. package/dist/web/server/assets/{telegram-CrJiygCX.js → telegram-BJ4l_TA_.js} +6 -6
  94. package/dist/web/server/assets/{telegram-C4v1HhyJ.js → telegram-Gy7_9yih.js} +1 -1
  95. package/dist/web/server/assets/{telegram-BUdnc8oF.js → telegram-xU-vXgef.js} +1 -1
  96. package/dist/web/server/assets/{tokens-DqldzPUq.js → tokens-ByPTGFBQ.js} +1 -1
  97. package/dist/web/server/assets/{tokens-B1twAJdd.js → tokens-CEdl8puR.js} +1 -1
  98. package/dist/web/server/assets/{tokens-DdjEyALj.js → tokens-CsqoRt5T.js} +10 -10
  99. package/dist/web/server/assets/{welcome-D0d38Pzx.js → welcome-O6Rjd7yO.js} +1 -1
  100. package/dist/web/server/assets/workspace-DeEYMPDX.js +658 -0
  101. package/dist/web/server/server.js +20 -72
  102. package/dist/worker.js +1 -1
  103. package/dist/worker.js.map +1 -1
  104. package/package.json +1 -1
  105. package/dist/web/client/assets/AgentAvatar-DWx-bM6n.js +0 -1
  106. package/dist/web/client/assets/ChatPane-DOV_HJg-.js +0 -72
  107. package/dist/web/client/assets/ConfigPage-Dfu9DzFX.js +0 -1
  108. package/dist/web/client/assets/ConfirmDialog-536ziJ5P.js +0 -1
  109. package/dist/web/client/assets/FieldRow-z1JqCdqn.js +0 -1
  110. package/dist/web/client/assets/ResultCard-X4nTbjYY.js +0 -1
  111. package/dist/web/client/assets/SectionTabs-DXHzXmmb.js +0 -1
  112. package/dist/web/client/assets/SpawnDialog-DoZl-yes.js +0 -1
  113. package/dist/web/client/assets/SpawnTeamModal-C638hEoN.js +0 -1
  114. package/dist/web/client/assets/TeamForm-C-WzvOl4.js +0 -1
  115. package/dist/web/client/assets/TeamPolicyEditor-CSKBx0oK.js +0 -7
  116. package/dist/web/client/assets/UnsavedChangesGuard-GC-vzw7h.js +0 -1
  117. package/dist/web/client/assets/_id-BKLynswT.js +0 -1
  118. package/dist/web/client/assets/_id-BYM_NORr.js +0 -1
  119. package/dist/web/client/assets/_id-Cxa98a9m.js +0 -1
  120. package/dist/web/client/assets/_id-D4hV1U1t.js +0 -1
  121. package/dist/web/client/assets/agent-actions-CXQCoxKO.js +0 -1
  122. package/dist/web/client/assets/agents-BxPS1_Bp.js +0 -1
  123. package/dist/web/client/assets/agents-GozAWW-l.js +0 -1
  124. package/dist/web/client/assets/attention-Cz9rZcrr.js +0 -1
  125. package/dist/web/client/assets/chevron-right-CPAb1zac.js +0 -1
  126. package/dist/web/client/assets/config-9vv9Lipb.js +0 -3
  127. package/dist/web/client/assets/inbox-DHLArXxl.js +0 -1
  128. package/dist/web/client/assets/index-1YXquAq8.js +0 -52
  129. package/dist/web/client/assets/learning-PvtXm8Ne.js +0 -1
  130. package/dist/web/client/assets/login-DIJpNQFo.js +0 -1
  131. package/dist/web/client/assets/mcp-pKBL0xIf.js +0 -1
  132. package/dist/web/client/assets/members-DHWsgsEs.js +0 -1
  133. package/dist/web/client/assets/memory-CEVppPyU.js +0 -1
  134. package/dist/web/client/assets/plus-BaIRdB10.js +0 -1
  135. package/dist/web/client/assets/policy-DEh4BLSw.js +0 -1
  136. package/dist/web/client/assets/preload-helper-eUUcpe2S.js +0 -1
  137. package/dist/web/client/assets/results-DgJPjEZF.js +0 -1
  138. package/dist/web/client/assets/review-BbshafTQ.js +0 -1
  139. package/dist/web/client/assets/route-Ccb8v41z.js +0 -1
  140. package/dist/web/client/assets/route-D1d6kCEV.js +0 -1
  141. package/dist/web/client/assets/routes-g7V4ru7T.js +0 -1
  142. package/dist/web/client/assets/settings-B6elpcYm.js +0 -1
  143. package/dist/web/client/assets/skills-CngE7TF8.js +0 -1
  144. package/dist/web/client/assets/styles-xUnZ-ep_.css +0 -2
  145. package/dist/web/client/assets/teams-BdJZXOan.js +0 -1
  146. package/dist/web/client/assets/teams-c496ISsT.js +0 -1
  147. package/dist/web/client/assets/telegram-B_-hK6EC.js +0 -1
  148. package/dist/web/client/assets/tokens-CKz8gx4-.js +0 -1
  149. package/dist/web/client/assets/triggers-DCEPciGW.js +0 -1
  150. package/dist/web/client/assets/welcome-D-zVOLGA.js +0 -1
  151. package/dist/web/server/assets/AgentAvatar-8gTAy_tP.js +0 -37
  152. package/dist/web/server/assets/ChatPane-De_FPEoD.js +0 -1887
  153. package/dist/web/server/assets/ResultCard-CZn1w4KA.js +0 -97
  154. package/dist/web/server/assets/Sidebar-puq47KyR.js +0 -430
  155. package/dist/web/server/assets/SpawnTeamModal-C6GbfScI.js +0 -97
  156. package/dist/web/server/assets/_id-BR6tnR6I.js +0 -23
  157. package/dist/web/server/assets/_id-Bm611NQz.js +0 -13
  158. package/dist/web/server/assets/_id-D5UCoyES.js +0 -359
  159. package/dist/web/server/assets/_id-DHx5UmmL.js +0 -12
  160. package/dist/web/server/assets/_id-DLpGmOVm.js +0 -19
  161. package/dist/web/server/assets/_id-Y5ctILG2.js +0 -13
  162. package/dist/web/server/assets/_id-dDA0pdVo.js +0 -54
  163. package/dist/web/server/assets/_tanstack-start-manifest_v-B8u80HjK.js +0 -292
  164. package/dist/web/server/assets/agent-actions-BBdFVdoa.js +0 -20
  165. package/dist/web/server/assets/api-WWxPqx67.js +0 -85
  166. package/dist/web/server/assets/inbox-4Vj5jTT8.js +0 -245
  167. package/dist/web/server/assets/inbox-D4IqUv3l.js +0 -38
  168. package/dist/web/server/assets/inbox-Dle24AfV.js +0 -23
  169. package/dist/web/server/assets/learning-BScq7VbO.js +0 -12
  170. package/dist/web/server/assets/learning-CBWFEnhg.js +0 -263
  171. package/dist/web/server/assets/learning-DWAKevhF.js +0 -25
  172. package/dist/web/server/assets/members-B8QBF6TF.js +0 -12
  173. package/dist/web/server/assets/members-DsF02Wp7.js +0 -12
  174. package/dist/web/server/assets/members-tWZA9b15.js +0 -36
  175. package/dist/web/server/assets/memory-BNN0b-0x.js +0 -12
  176. package/dist/web/server/assets/memory-CTl1E1Rm.js +0 -267
  177. package/dist/web/server/assets/memory-CV5uCBb2.js +0 -12
  178. package/dist/web/server/assets/policy-C9M6zV6w.js +0 -79
  179. package/dist/web/server/assets/policy-h-6NpU3m.js +0 -19
  180. package/dist/web/server/assets/policy-xEw9X0DK.js +0 -12
  181. package/dist/web/server/assets/results-D3A3UA4d.js +0 -182
  182. package/dist/web/server/assets/results-D6Ui5S8D.js +0 -12
  183. package/dist/web/server/assets/results-DWmxvfyn.js +0 -15
  184. package/dist/web/server/assets/review-CyQky-WQ.js +0 -40
  185. package/dist/web/server/assets/review-Sq0GGcPV.js +0 -322
  186. package/dist/web/server/assets/review-XWbSF8cF.js +0 -12
  187. package/dist/web/server/assets/route-BErtkz6t.js +0 -19
  188. package/dist/web/server/assets/route-CLoV-An_.js +0 -48
  189. package/dist/web/server/assets/route-WQ19JkBa.js +0 -19
  190. package/dist/web/server/assets/route-dEK_2GLj.js +0 -203
  191. package/dist/web/server/assets/route-iHTkhO81.js +0 -16
  192. package/dist/web/server/assets/route-zs8uUQtB.js +0 -16
  193. package/dist/web/server/assets/routes-081s4n24.js +0 -45
  194. package/dist/web/server/assets/routes-CWo5WPsr.js +0 -15
  195. package/dist/web/server/assets/routes-Cqp1ufHm.js +0 -56
  196. package/dist/web/server/assets/settings-CVaGv-xF.js +0 -12
  197. package/dist/web/server/assets/settings-D9viV-86.js +0 -561
  198. package/dist/web/server/assets/settings-DaZNZ_CC.js +0 -27
  199. package/dist/web/server/assets/triggers-B7LW784F.js +0 -214
  200. package/dist/web/server/assets/triggers-C5sMCZXv2.js +0 -12
  201. package/dist/web/server/assets/triggers-DMfVdImD.js +0 -12
  202. package/dist/web/client/assets/{TeamPolicyEditor-DLioOiRN.css → style-DLioOiRN.css} +0 -0
  203. package/dist/web/server/assets/{start-DTX6aKCi.js → start-DhW7sy23.js} +1 -1
@@ -1,97 +0,0 @@
1
- import { i as errorMessage, n as api, o as Button, r as apiFetch, t as ApiError } from "./api-WWxPqx67.js";
2
- import { useEffect, useState } from "react";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- //#region src/components/ResultCard.tsx
5
- var PREVIEW_IMAGE = [
6
- "image/png",
7
- "image/jpeg",
8
- "image/gif",
9
- "image/webp"
10
- ];
11
- var PREVIEW_TEXT = ["text/plain", "text/markdown"];
12
- /** A saved result: name, size, download and, for images and text, a preview. */
13
- function ResultCard({ resultId, result: preloaded, showPreview = false }) {
14
- const [result, setResult] = useState(preloaded ?? null);
15
- const [error, setError] = useState("");
16
- const [text, setText] = useState(null);
17
- const [imageOpen, setImageOpen] = useState(false);
18
- const path = `/api/results/${encodeURIComponent(resultId)}`;
19
- useEffect(() => {
20
- if (preloaded) return;
21
- const controller = new AbortController();
22
- api(path, { signal: controller.signal }).then((body) => setResult(body.result)).catch((cause) => {
23
- if (controller.signal.aborted) return;
24
- setError(cause instanceof ApiError && cause.status === 404 ? "This saved file is unavailable (it may have been deleted)." : errorMessage(cause));
25
- });
26
- return () => controller.abort();
27
- }, [path, preloaded]);
28
- async function toggleText() {
29
- if (text !== null) return setText(null);
30
- setError("");
31
- try {
32
- setText(await (await apiFetch(`${path}/preview`)).text());
33
- } catch (cause) {
34
- setError(errorMessage(cause));
35
- }
36
- }
37
- const image = result && PREVIEW_IMAGE.includes(result.mimeType) && result.byteLength <= 10 * 1024 * 1024;
38
- const textual = result && PREVIEW_TEXT.includes(result.mimeType) && result.byteLength <= 256 * 1024;
39
- return /* @__PURE__ */ jsxs("section", {
40
- className: "my-3 rounded-lg border border-fawn bg-ivory p-3 text-chocolate",
41
- "aria-label": "Saved result",
42
- children: [result ? /* @__PURE__ */ jsxs(Fragment, { children: [
43
- /* @__PURE__ */ jsx("p", {
44
- className: "m-0 break-all font-semibold",
45
- children: result.name
46
- }),
47
- /* @__PURE__ */ jsxs("p", {
48
- className: "my-1 text-sm text-mocha-light",
49
- children: [
50
- result.byteLength < 1024 ? `${result.byteLength} B` : `${(result.byteLength / 1024).toFixed(1)} KiB`,
51
- " · ",
52
- result.mimeType,
53
- result.imageModel && ` · generated with ${result.imageModel}`
54
- ]
55
- }),
56
- /* @__PURE__ */ jsxs("div", {
57
- className: "flex flex-wrap gap-2",
58
- children: [
59
- /* @__PURE__ */ jsx("a", {
60
- className: "ghost-btn",
61
- href: `${path}/download`,
62
- download: result.name,
63
- children: "Download"
64
- }),
65
- image && !showPreview && result.imageModel === null && /* @__PURE__ */ jsx(Button, {
66
- variant: "ghost",
67
- onClick: () => setImageOpen((open) => !open),
68
- children: imageOpen ? "Close preview" : "Preview"
69
- }),
70
- textual && /* @__PURE__ */ jsx(Button, {
71
- variant: "ghost",
72
- onClick: () => void toggleText(),
73
- children: text !== null ? "Close preview" : "Preview"
74
- })
75
- ]
76
- }),
77
- image && (showPreview || result.imageModel !== null || imageOpen) && /* @__PURE__ */ jsx("img", {
78
- src: `${path}/preview`,
79
- alt: result.name,
80
- className: "mt-3 max-h-80 max-w-full object-contain"
81
- }),
82
- text !== null && /* @__PURE__ */ jsx("pre", {
83
- className: "mt-3 max-h-80 overflow-auto whitespace-pre-wrap break-words text-sm",
84
- children: text
85
- })
86
- ] }) : !error ? /* @__PURE__ */ jsx("p", {
87
- role: "status",
88
- children: "Loading saved result…"
89
- }) : null, error && /* @__PURE__ */ jsx("p", {
90
- role: "alert",
91
- className: "mt-2 text-sm text-danger",
92
- children: error
93
- })]
94
- });
95
- }
96
- //#endregion
97
- export { ResultCard as t };
@@ -1,430 +0,0 @@
1
- import { n as DEFAULT_TEAM_ID, t as DEFAULT_PROFILE_ID } from "./entities-Dn2xzKIw.js";
2
- import { i as errorMessage, o as Button } from "./api-WWxPqx67.js";
3
- import { n as Dialog$1, r as DialogActions, t as ConfirmDialog } from "./ConfirmDialog-LdVlEanK.js";
4
- import { r as renameAgent, t as archiveAgent } from "./agent-actions-BBdFVdoa.js";
5
- import { t as SpawnDialog } from "./SpawnDialog-BGNaMfFb.js";
6
- import { t as SpawnTeamModal } from "./SpawnTeamModal-C6GbfScI.js";
7
- import { t as TeamForm } from "./TeamForm-C93tpn9r.js";
8
- import { useRef, useState } from "react";
9
- import { Link, useRouter } from "@tanstack/react-router";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
- import { Archive, Bot, ChevronDown, ChevronRight, Pencil, Plus, Send, UsersRound } from "lucide-react";
12
- import { DropdownMenu } from "radix-ui";
13
- //#region src/components/Sidebar.tsx
14
- var SIDEBAR_OPEN_GROUPS_COOKIE = "bz_sidebar_open_groups";
15
- function writeOpenGroupsCookie(map) {
16
- document.cookie = `${SIDEBAR_OPEN_GROUPS_COOKIE}=${encodeURIComponent(JSON.stringify(map))}; Path=/; Max-Age=31536000; SameSite=Lax`;
17
- }
18
- var MENU_ITEM = "flex min-h-8 w-full cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm text-foreground outline-none transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50";
19
- var MENU_LABEL = "flex items-center gap-1.5 px-2.5 pb-1 pt-1 text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground";
20
- function Sidebar({ agents, teams, profiles, teamTemplates, selectedAgentId, initialOpenGroups }) {
21
- const router = useRouter();
22
- const [spawnProfile, setSpawnProfile] = useState(null);
23
- const [spawnTemplate, setSpawnTemplate] = useState(null);
24
- const [createTeamOpen, setCreateTeamOpen] = useState(false);
25
- const [createTeamBusy, setCreateTeamBusy] = useState(false);
26
- const [renameTarget, setRenameTarget] = useState(null);
27
- const [archiveTarget, setArchiveTarget] = useState(null);
28
- const [openGroups, setOpenGroups] = useState(initialOpenGroups);
29
- const newButton = useRef(null);
30
- const refocusNewButton = () => window.requestAnimationFrame(() => newButton.current?.focus());
31
- const sortedProfiles = [...profiles].sort((a, b) => Number(b.id === DEFAULT_PROFILE_ID) - Number(a.id === DEFAULT_PROFILE_ID));
32
- const sortedTeams = [...teams].sort((a, b) => Number(b.id === DEFAULT_TEAM_ID) - Number(a.id === DEFAULT_TEAM_ID));
33
- const agentsByTeam = /* @__PURE__ */ new Map();
34
- for (const agent of agents) agentsByTeam.set(agent.teamId, [...agentsByTeam.get(agent.teamId) ?? [], agent]);
35
- const selectedTeamId = agents.find((agent) => agent.id === selectedAgentId)?.teamId ?? null;
36
- return /* @__PURE__ */ jsxs("aside", {
37
- className: "flex h-full flex-col overflow-hidden rounded-2xl border border-border bg-card shadow-baziu-sm",
38
- children: [
39
- /* @__PURE__ */ jsxs("header", {
40
- className: "flex items-center justify-between gap-3 border-b border-border bg-muted/30 px-3 py-2.5",
41
- children: [/* @__PURE__ */ jsxs("div", {
42
- className: "min-w-0",
43
- children: [/* @__PURE__ */ jsxs("div", {
44
- className: "flex items-center gap-2 text-sm font-semibold text-foreground",
45
- children: [/* @__PURE__ */ jsx("span", {
46
- className: "flex size-7 items-center justify-center rounded-lg bg-accent text-accent-foreground",
47
- children: /* @__PURE__ */ jsx(Bot, {
48
- className: "size-4",
49
- "aria-hidden": "true"
50
- })
51
- }), /* @__PURE__ */ jsx("span", { children: "Agents" })]
52
- }), /* @__PURE__ */ jsxs("p", {
53
- className: "mt-0.5 truncate pl-9 text-xs text-muted-foreground",
54
- children: [
55
- agents.length,
56
- " agent",
57
- agents.length === 1 ? "" : "s",
58
- " across ",
59
- teams.length,
60
- " team",
61
- teams.length === 1 ? "" : "s"
62
- ]
63
- })]
64
- }), /* @__PURE__ */ jsxs(DropdownMenu.Root, {
65
- modal: false,
66
- children: [/* @__PURE__ */ jsx(DropdownMenu.Trigger, {
67
- asChild: true,
68
- children: /* @__PURE__ */ jsxs("button", {
69
- ref: newButton,
70
- type: "button",
71
- "aria-label": "Create a new Agent or Team",
72
- className: "unstyled group inline-flex h-8 items-center gap-1 rounded-lg border border-border bg-card px-2.5 text-xs font-semibold text-foreground shadow-baziu-sm transition-colors hover:border-primary/30 hover:bg-accent hover:text-accent-foreground",
73
- children: [
74
- /* @__PURE__ */ jsx(Plus, {
75
- className: "size-3.5",
76
- "aria-hidden": "true"
77
- }),
78
- "New",
79
- /* @__PURE__ */ jsx(ChevronDown, {
80
- className: "size-3.5 text-muted-foreground transition-transform group-data-[state=open]:rotate-180",
81
- "aria-hidden": "true"
82
- })
83
- ]
84
- })
85
- }), /* @__PURE__ */ jsx(DropdownMenu.Portal, { children: /* @__PURE__ */ jsxs(DropdownMenu.Content, {
86
- align: "end",
87
- sideOffset: 6,
88
- className: "z-50 w-60 rounded-xl border border-border bg-popover p-1.5 text-popover-foreground shadow-baziu-lg outline-none",
89
- children: [
90
- /* @__PURE__ */ jsxs(DropdownMenu.Label, {
91
- className: MENU_LABEL,
92
- children: [/* @__PURE__ */ jsx(Bot, {
93
- className: "size-3",
94
- "aria-hidden": "true"
95
- }), "Agent templates"]
96
- }),
97
- sortedProfiles.length === 0 ? /* @__PURE__ */ jsx(DropdownMenu.Item, {
98
- asChild: true,
99
- className: MENU_ITEM,
100
- children: /* @__PURE__ */ jsx("a", {
101
- href: "/templates/agents",
102
- children: "Create an Agent template"
103
- })
104
- }) : sortedProfiles.map((profile) => /* @__PURE__ */ jsxs(DropdownMenu.Item, {
105
- className: MENU_ITEM,
106
- onSelect: () => setSpawnProfile(profile.id),
107
- children: [/* @__PURE__ */ jsx("span", {
108
- className: "min-w-0 flex-1 truncate",
109
- children: profile.name || profile.id
110
- }), profile.id === "default" && /* @__PURE__ */ jsx("span", {
111
- className: "rounded-full border border-border bg-muted px-1.5 py-0.5 text-xs font-semibold text-muted-foreground",
112
- children: "Default"
113
- })]
114
- }, profile.id)),
115
- /* @__PURE__ */ jsx(DropdownMenu.Separator, { className: "my-1.5 h-px bg-border" }),
116
- /* @__PURE__ */ jsxs(DropdownMenu.Label, {
117
- className: MENU_LABEL,
118
- children: [/* @__PURE__ */ jsx(UsersRound, {
119
- className: "size-3",
120
- "aria-hidden": "true"
121
- }), "Team templates"]
122
- }),
123
- teamTemplates.length === 0 ? /* @__PURE__ */ jsx(DropdownMenu.Item, {
124
- asChild: true,
125
- className: MENU_ITEM,
126
- children: /* @__PURE__ */ jsx("a", {
127
- href: "/templates/teams",
128
- children: "Create a Team template"
129
- })
130
- }) : teamTemplates.map((template) => /* @__PURE__ */ jsxs(DropdownMenu.Item, {
131
- className: MENU_ITEM,
132
- disabled: template.slots.length === 0,
133
- title: template.slots.length === 0 ? "Add at least one member before spawning" : void 0,
134
- onSelect: () => setSpawnTemplate(template),
135
- children: [/* @__PURE__ */ jsx("span", {
136
- className: "min-w-0 flex-1 truncate",
137
- children: template.name || template.id
138
- }), /* @__PURE__ */ jsx("span", {
139
- className: "inline-flex min-w-6 items-center justify-center rounded-full bg-muted px-1.5 font-mono text-xs text-muted-foreground",
140
- children: template.slots.length
141
- })]
142
- }, template.id)),
143
- /* @__PURE__ */ jsx(DropdownMenu.Separator, { className: "my-1.5 h-px bg-border" }),
144
- /* @__PURE__ */ jsxs(DropdownMenu.Item, {
145
- className: MENU_ITEM,
146
- onSelect: () => setCreateTeamOpen(true),
147
- children: [/* @__PURE__ */ jsx(Plus, {
148
- className: "size-3.5",
149
- "aria-hidden": "true"
150
- }), "Create a team"]
151
- })
152
- ]
153
- }) })]
154
- })]
155
- }),
156
- /* @__PURE__ */ jsx("nav", {
157
- className: "flex-1 overflow-y-auto p-1.5",
158
- "aria-label": "Teams and agents",
159
- children: agents.length === 0 ? /* @__PURE__ */ jsxs("div", {
160
- className: "m-1 flex flex-col items-center rounded-xl border border-dashed border-border bg-muted/30 px-4 py-6 text-center",
161
- children: [
162
- /* @__PURE__ */ jsx("p", {
163
- className: "text-sm font-semibold text-foreground",
164
- children: "No agents yet"
165
- }),
166
- /* @__PURE__ */ jsx("p", {
167
- className: "mt-1 text-xs leading-5 text-muted-foreground",
168
- children: "Your default Team is ready. Spawn the first agent to start a conversation."
169
- }),
170
- sortedProfiles[0] ? /* @__PURE__ */ jsx(Button, {
171
- variant: "primary",
172
- className: "mt-3",
173
- onClick: () => setSpawnProfile(sortedProfiles[0]?.id ?? "default"),
174
- children: "Spawn first agent"
175
- }) : /* @__PURE__ */ jsx("a", {
176
- href: "/templates/agents",
177
- className: "mt-3 text-xs font-semibold",
178
- children: "Create an Agent template"
179
- })
180
- ]
181
- }) : sortedTeams.map((team) => {
182
- const teamAgents = agentsByTeam.get(team.id) ?? [];
183
- const containsSelected = selectedTeamId === team.id;
184
- const open = openGroups[team.id] ?? (containsSelected || team.id === "default");
185
- return /* @__PURE__ */ jsxs("details", {
186
- open,
187
- onToggle: (event) => {
188
- const next = event.currentTarget.open;
189
- if (next === open) return;
190
- const merged = {
191
- ...openGroups,
192
- [team.id]: next
193
- };
194
- writeOpenGroupsCookie(merged);
195
- setOpenGroups(merged);
196
- },
197
- className: "group/details mb-1 last:mb-0",
198
- children: [/* @__PURE__ */ jsxs("summary", {
199
- className: `flex min-h-8 cursor-pointer list-none items-center gap-1.5 rounded-lg px-2 py-1.5 text-sm transition-colors hover:bg-accent hover:text-accent-foreground ${containsSelected ? "bg-muted/60 text-foreground" : "text-muted-foreground"}`,
200
- children: [
201
- /* @__PURE__ */ jsx(ChevronRight, {
202
- className: "size-3.5 shrink-0 transition-transform group-open/details:rotate-90",
203
- "aria-hidden": "true"
204
- }),
205
- /* @__PURE__ */ jsx("span", {
206
- className: "flex size-5 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground",
207
- children: /* @__PURE__ */ jsx(UsersRound, {
208
- className: "size-3",
209
- "aria-hidden": "true"
210
- })
211
- }),
212
- /* @__PURE__ */ jsx("span", {
213
- className: "min-w-0 flex-1 truncate font-medium",
214
- children: team.name
215
- }),
216
- team.id === "default" && /* @__PURE__ */ jsx("span", {
217
- className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground",
218
- children: "Default"
219
- }),
220
- /* @__PURE__ */ jsx("span", {
221
- className: "inline-flex min-w-6 items-center justify-center rounded-full border border-border bg-card px-1.5 font-mono text-xs text-muted-foreground",
222
- children: teamAgents.length
223
- })
224
- ]
225
- }), teamAgents.length === 0 ? /* @__PURE__ */ jsx("div", {
226
- className: "py-2 pl-12 pr-2 text-xs text-muted-foreground",
227
- children: "No agents in this team"
228
- }) : /* @__PURE__ */ jsx("div", {
229
- className: "space-y-0.5 py-0.5 pl-2",
230
- children: teamAgents.map((agent) => /* @__PURE__ */ jsx(AgentRow, {
231
- agent,
232
- selected: agent.id === selectedAgentId,
233
- onRename: () => setRenameTarget(agent),
234
- onArchive: () => setArchiveTarget(agent)
235
- }, agent.id))
236
- })]
237
- }, team.id);
238
- })
239
- }),
240
- spawnProfile && /* @__PURE__ */ jsx(SpawnDialog, {
241
- profiles: sortedProfiles,
242
- teams: sortedTeams,
243
- profileId: spawnProfile,
244
- onClose: () => {
245
- setSpawnProfile(null);
246
- refocusNewButton();
247
- }
248
- }),
249
- spawnTemplate && /* @__PURE__ */ jsx(SpawnTeamModal, {
250
- template: spawnTemplate,
251
- teams: sortedTeams,
252
- onClose: () => {
253
- setSpawnTemplate(null);
254
- refocusNewButton();
255
- },
256
- onSpawned: (slug) => {
257
- setSpawnTemplate(null);
258
- router.navigate({
259
- to: "/teams/$id",
260
- params: { id: slug }
261
- });
262
- }
263
- }),
264
- createTeamOpen && /* @__PURE__ */ jsx(Dialog$1, {
265
- title: "Create a team",
266
- description: "A Team is one workspace with its own USER.md, members and shared memory.",
267
- busy: createTeamBusy,
268
- onClose: () => {
269
- setCreateTeamOpen(false);
270
- refocusNewButton();
271
- },
272
- children: /* @__PURE__ */ jsx(TeamForm, {
273
- onBusyChange: setCreateTeamBusy,
274
- onCreated: async () => {
275
- setCreateTeamOpen(false);
276
- await router.invalidate();
277
- },
278
- extraActions: (busy) => /* @__PURE__ */ jsx(Button, {
279
- variant: "ghost",
280
- disabled: busy,
281
- onClick: () => setCreateTeamOpen(false),
282
- children: "Cancel"
283
- })
284
- })
285
- }),
286
- renameTarget && /* @__PURE__ */ jsx(RenameAgentDialog, {
287
- agent: renameTarget,
288
- onClose: () => setRenameTarget(null),
289
- onRenamed: () => router.invalidate()
290
- }),
291
- /* @__PURE__ */ jsx(ConfirmDialog, {
292
- open: archiveTarget !== null,
293
- onOpenChange: (open) => {
294
- if (!open) setArchiveTarget(null);
295
- },
296
- title: `Archive ${archiveTarget?.name ?? "agent"}?`,
297
- description: /* @__PURE__ */ jsx("p", { children: "The Agent will stop appearing in this sidebar and cannot receive normal work. You can restore it later from the Agents page with “Show archived”." }),
298
- confirmLabel: "Archive agent",
299
- confirmVariant: "primary",
300
- onConfirm: async () => {
301
- if (!archiveTarget) return;
302
- await archiveAgent(archiveTarget.id);
303
- await router.invalidate();
304
- }
305
- })
306
- ]
307
- });
308
- }
309
- function AgentRow({ agent, selected, onRename, onArchive }) {
310
- return /* @__PURE__ */ jsxs("div", {
311
- className: "relative rounded-lg",
312
- children: [/* @__PURE__ */ jsxs(Link, {
313
- to: "/",
314
- search: { agent: agent.id },
315
- "aria-current": selected ? "page" : void 0,
316
- className: `block min-h-11 rounded-lg border border-transparent py-1.5 pl-2.5 pr-[4.6rem] transition-colors hover:bg-accent/70 ${selected ? "border-primary/20 bg-accent text-accent-foreground shadow-baziu-sm" : "text-foreground"}`,
317
- children: [/* @__PURE__ */ jsxs("div", {
318
- className: "flex items-center gap-1.5 text-sm font-medium",
319
- children: [
320
- /* @__PURE__ */ jsx("span", {
321
- className: `size-1.5 shrink-0 rounded-full ${selected ? "bg-primary" : "bg-border"}`,
322
- "aria-hidden": "true"
323
- }),
324
- /* @__PURE__ */ jsx("span", {
325
- className: "min-w-0 flex-1 truncate",
326
- children: agent.name
327
- }),
328
- agent.telegramTopicId !== null && /* @__PURE__ */ jsx("span", {
329
- className: "shrink-0 text-primary",
330
- title: `Telegram topic #${agent.telegramTopicId}`,
331
- role: "img",
332
- "aria-label": `Bound to Telegram topic ${agent.telegramTopicId}`,
333
- children: /* @__PURE__ */ jsx(Send, {
334
- className: "size-3",
335
- "aria-hidden": "true"
336
- })
337
- })
338
- ]
339
- }), /* @__PURE__ */ jsxs("div", {
340
- className: "mt-0.5 flex gap-2 pl-3 font-mono text-xs text-muted-foreground",
341
- children: [/* @__PURE__ */ jsx("span", {
342
- className: "uppercase tracking-wide",
343
- children: agent.status
344
- }), /* @__PURE__ */ jsx("span", { children: agent.id.slice(0, 8) })]
345
- })]
346
- }), /* @__PURE__ */ jsxs("div", {
347
- className: "absolute right-1 top-1/2 z-10 flex -translate-y-1/2 gap-0.5",
348
- children: [/* @__PURE__ */ jsx("button", {
349
- type: "button",
350
- onClick: onRename,
351
- title: "Rename",
352
- "aria-label": `Rename ${agent.name}`,
353
- className: "unstyled flex size-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-card hover:text-primary focus-visible:bg-card",
354
- children: /* @__PURE__ */ jsx(Pencil, {
355
- className: "size-3.5",
356
- "aria-hidden": "true"
357
- })
358
- }), /* @__PURE__ */ jsx("button", {
359
- type: "button",
360
- onClick: onArchive,
361
- title: "Archive",
362
- "aria-label": `Archive ${agent.name}`,
363
- className: "unstyled flex size-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive focus-visible:bg-destructive/10 focus-visible:text-destructive",
364
- children: /* @__PURE__ */ jsx(Archive, {
365
- className: "size-3.5",
366
- "aria-hidden": "true"
367
- })
368
- })]
369
- })]
370
- });
371
- }
372
- function RenameAgentDialog({ agent, onClose, onRenamed }) {
373
- const [name, setName] = useState(agent.name);
374
- const [busy, setBusy] = useState(false);
375
- const [error, setError] = useState(null);
376
- const unchanged = !name.trim() || name.trim() === agent.name;
377
- async function submit(event) {
378
- event.preventDefault();
379
- if (unchanged) return;
380
- setBusy(true);
381
- setError(null);
382
- try {
383
- await renameAgent(agent.id, name.trim());
384
- await onRenamed();
385
- onClose();
386
- } catch (cause) {
387
- setError(errorMessage(cause));
388
- setBusy(false);
389
- }
390
- }
391
- return /* @__PURE__ */ jsx(Dialog$1, {
392
- title: `Rename ${agent.name}`,
393
- description: "This changes the display name only; the Agent ID and history stay the same.",
394
- busy,
395
- onClose,
396
- className: "max-w-md",
397
- children: /* @__PURE__ */ jsxs("form", {
398
- onSubmit: (event) => void submit(event),
399
- children: [
400
- /* @__PURE__ */ jsxs("label", { children: ["Agent name", /* @__PURE__ */ jsx("input", {
401
- autoFocus: true,
402
- value: name,
403
- onChange: (event) => setName(event.target.value),
404
- maxLength: 120
405
- })] }),
406
- error && /* @__PURE__ */ jsx("p", {
407
- role: "alert",
408
- className: "mt-3 text-sm text-danger",
409
- children: error
410
- }),
411
- /* @__PURE__ */ jsx("div", {
412
- className: "mt-4",
413
- children: /* @__PURE__ */ jsxs(DialogActions, { children: [/* @__PURE__ */ jsx(Button, {
414
- variant: "ghost",
415
- disabled: busy,
416
- onClick: onClose,
417
- children: "Cancel"
418
- }), /* @__PURE__ */ jsx(Button, {
419
- variant: "primary",
420
- type: "submit",
421
- disabled: busy || unchanged,
422
- children: busy ? "Renaming…" : "Rename agent"
423
- })] })
424
- })
425
- ]
426
- })
427
- });
428
- }
429
- //#endregion
430
- export { Sidebar as n, SIDEBAR_OPEN_GROUPS_COOKIE as t };
@@ -1,97 +0,0 @@
1
- import { i as errorMessage, n as api, o as Button } from "./api-WWxPqx67.js";
2
- import { n as Dialog, r as DialogActions } from "./ConfirmDialog-LdVlEanK.js";
3
- import { useState } from "react";
4
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/components/SpawnTeamModal.tsx
6
- /** Spawn a Team template's Agents and allow edges into a new or existing Team. */
7
- function SpawnTeamModal({ template, teams, initialTeamId = "", onClose, onSpawned }) {
8
- const [teamId, setTeamId] = useState(initialTeamId);
9
- const [userMd, setUserMd] = useState("");
10
- const [error, setError] = useState(null);
11
- const [busy, setBusy] = useState(false);
12
- const target = teamId.trim();
13
- const existing = teams.some((team) => team.id === target);
14
- async function spawn(event) {
15
- event.preventDefault();
16
- setBusy(true);
17
- setError(null);
18
- try {
19
- await api(`/api/team-templates/${encodeURIComponent(template.id)}/spawn`, { body: {
20
- teamId: target,
21
- ...userMd && !existing ? { userMd } : {}
22
- } });
23
- onSpawned(target);
24
- } catch (cause) {
25
- setError(errorMessage(cause));
26
- } finally {
27
- setBusy(false);
28
- }
29
- }
30
- return /* @__PURE__ */ jsx(Dialog, {
31
- title: `Spawn team: ${template.name}`,
32
- description: /* @__PURE__ */ jsxs(Fragment, { children: [
33
- "Creates ",
34
- template.slots.length,
35
- " Agent",
36
- template.slots.length === 1 ? "" : "s",
37
- " and",
38
- " ",
39
- template.edges.length,
40
- " allow edge",
41
- template.edges.length === 1 ? "" : "s",
42
- ". An unknown slug creates a new ",
43
- template.policyMode,
44
- " Team; an existing Team keeps its mode."
45
- ] }),
46
- busy,
47
- onClose,
48
- children: /* @__PURE__ */ jsxs("form", {
49
- onSubmit: (event) => void spawn(event),
50
- children: [
51
- /* @__PURE__ */ jsxs("label", { children: [
52
- "Target Team slug",
53
- /* @__PURE__ */ jsx("input", {
54
- value: teamId,
55
- onChange: (event) => setTeamId(event.target.value),
56
- list: "spawn-team-targets",
57
- required: true
58
- }),
59
- /* @__PURE__ */ jsx("datalist", {
60
- id: "spawn-team-targets",
61
- children: teams.map((team) => /* @__PURE__ */ jsx("option", {
62
- value: team.id,
63
- children: team.name
64
- }, team.id))
65
- })
66
- ] }),
67
- !existing && /* @__PURE__ */ jsxs("label", { children: ["Starter USER.md (new Team only; defaults to the template's)", /* @__PURE__ */ jsx("textarea", {
68
- rows: 3,
69
- value: userMd,
70
- onChange: (event) => setUserMd(event.target.value),
71
- className: "font-mono text-[0.88em] leading-[1.55]"
72
- })] }),
73
- error && /* @__PURE__ */ jsx("p", {
74
- role: "alert",
75
- className: "err mt-2",
76
- children: error
77
- }),
78
- /* @__PURE__ */ jsx("div", {
79
- className: "mt-4",
80
- children: /* @__PURE__ */ jsxs(DialogActions, { children: [/* @__PURE__ */ jsx(Button, {
81
- variant: "ghost",
82
- disabled: busy,
83
- onClick: onClose,
84
- children: "Cancel"
85
- }), /* @__PURE__ */ jsx(Button, {
86
- variant: "primary",
87
- type: "submit",
88
- disabled: busy || !target || template.slots.length === 0,
89
- children: busy ? "Spawning…" : "Spawn team"
90
- })] })
91
- })
92
- ]
93
- })
94
- });
95
- }
96
- //#endregion
97
- export { SpawnTeamModal as t };
@@ -1,23 +0,0 @@
1
- import { t as Route } from "./_id-Y5ctILG2.js";
2
- import { t as ChatPane } from "./ChatPane-De_FPEoD.js";
3
- import { getRouteApi } from "@tanstack/react-router";
4
- import { jsx } from "react/jsx-runtime";
5
- //#region src/routes/agents/$id/index.tsx?tsr-split=component
6
- var agentRoute = getRouteApi("/agents/$id");
7
- function AgentChatPage() {
8
- const { agent } = agentRoute.useLoaderData();
9
- const { messages, head } = Route.useLoaderData();
10
- const { conversation } = Route.useSearch();
11
- return /* @__PURE__ */ jsx("div", {
12
- className: "h-[70vh]",
13
- children: /* @__PURE__ */ jsx(ChatPane, {
14
- agentId: agent.id,
15
- agentName: agent.name,
16
- initialMessages: messages,
17
- initialSessionHead: head,
18
- openConversationId: conversation
19
- })
20
- });
21
- }
22
- //#endregion
23
- export { AgentChatPage as component };
@@ -1,13 +0,0 @@
1
- import { n as createServerFn } from "../server.js";
2
- import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
3
- import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
4
- //#region src/routes/teams/$id/index.tsx
5
- var $$splitComponentImporter = () => import("./_id-D5UCoyES.js");
6
- var fetchContext = createServerFn({ method: "GET" }).validator((data) => data).handler(createSsrRpc("d821ed23cd43821db345683976465a24f170589df68088bb55f750bfe15c26f4"));
7
- var Route = createFileRoute("/teams/$id/")({
8
- loader: ({ params }) => fetchContext({ data: { id: params.id } }),
9
- component: lazyRouteComponent($$splitComponentImporter, "component")
10
- });
11
- /** An empty Team offers its Team templates; the spawn itself is the shared spawn dialog. */
12
- //#endregion
13
- export { Route as t };