bazilion 0.52.0 → 0.54.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 (210) hide show
  1. package/dist/cli.js +3 -3
  2. package/dist/cli.js.map +1 -1
  3. package/dist/daemon.js +296 -232
  4. package/dist/daemon.js.map +1 -1
  5. package/dist/web/client/assets/AddProviderDialog-CkwSq3C7.js +1 -0
  6. package/dist/web/client/assets/AgentTemplateParts-CEn_4qVs.js +1 -0
  7. package/dist/web/client/assets/Button-UiegBKOK.js +1 -0
  8. package/dist/web/client/assets/ConfigPage-CUbHBhzx.js +1 -0
  9. package/dist/web/client/assets/ConfirmDialog-VqBOFZEp.js +1 -0
  10. package/dist/web/client/assets/ConnectionsView-ByARMcWP.js +1 -0
  11. package/dist/web/client/assets/ManagePage-BJWZd1ts.js +1 -0
  12. package/dist/web/client/assets/SectionTabs-ViZKm3-B.js +1 -0
  13. package/dist/web/client/assets/Segmented-MYKKTuZO.js +1 -0
  14. package/dist/web/client/assets/SkillsParts-UvNK5SYP.js +1 -0
  15. package/dist/web/client/assets/SpawnTeamModal-DG5UbJNK.js +1 -0
  16. package/dist/web/client/assets/TeamForm-DGlxWv4e.js +1 -0
  17. package/dist/web/client/assets/TeamThread-mkwODO0S.js +1 -0
  18. package/dist/web/client/assets/UnsavedChangesGuard-BmdwLH99.js +1 -0
  19. package/dist/web/client/assets/_id-CvcxNmBH.js +1 -0
  20. package/dist/web/client/assets/_id-UyBk7gRl.js +1 -0
  21. package/dist/web/client/assets/access-C8d8vaQ6.js +1 -0
  22. package/dist/web/client/assets/agent-actions-BgE9fKHH.js +1 -0
  23. package/dist/web/client/assets/agents-CgtzqBpD.js +1 -0
  24. package/dist/web/client/assets/agents-D7W4BT8r.js +1 -0
  25. package/dist/web/client/assets/arrow-right-D0HKRb7U.js +1 -0
  26. package/dist/web/client/assets/attention-D9mQWoKt.js +1 -0
  27. package/dist/web/client/assets/bot-Bb--PFVU.js +1 -0
  28. package/dist/web/client/assets/chevron-right-bs0TUSl2.js +1 -0
  29. package/dist/web/client/assets/config-Dw6GWf38.js +1 -0
  30. package/dist/web/client/assets/createLucideIcon-DkniuEtD.js +1 -0
  31. package/dist/web/client/assets/download-C4t9l5wR.js +1 -0
  32. package/dist/web/client/assets/file-text-DzbjpYrV.js +1 -0
  33. package/dist/web/client/assets/images-DSYgPKM7.js +1 -0
  34. package/dist/web/client/assets/index-YW0gXPfk.js +14 -0
  35. package/dist/web/client/assets/key-round-BpK4-E3T.js +1 -0
  36. package/dist/web/client/assets/list-checks-JNXcmws9.js +1 -0
  37. package/dist/web/client/assets/login-DcQJk5-U.js +1 -0
  38. package/dist/web/client/assets/manage-SRGSx8n2.js +1 -0
  39. package/dist/web/client/assets/mcp-BUWu4TvS.js +1 -0
  40. package/dist/web/client/assets/message-square-DM2MP9vF.js +1 -0
  41. package/dist/web/client/assets/network-BJ4iPjQO.js +1 -0
  42. package/dist/web/client/assets/parts-LZxl9Gvc.js +41 -0
  43. package/dist/web/client/assets/plus-CLGNN5QX.js +1 -0
  44. package/dist/web/client/assets/routes-BxIIyGho.js +85 -0
  45. package/dist/web/client/assets/skills-C7DzIwFJ.js +1 -0
  46. package/dist/web/client/assets/square-terminal-Dmm6cV-G.js +1 -0
  47. package/dist/web/client/assets/style-CA2GAk9b.js +7 -0
  48. package/dist/web/client/assets/styles-C3CDSGAr.css +2 -0
  49. package/dist/web/client/assets/system-zQ0NnQML.js +1 -0
  50. package/dist/web/client/assets/teams-BEIJHObN.js +1 -0
  51. package/dist/web/client/assets/teams-DlOc7Ods.js +1 -0
  52. package/dist/web/client/assets/telegram-DKHq5DpE.js +1 -0
  53. package/dist/web/client/assets/tools-BKIpLaiC.js +1 -0
  54. package/dist/web/client/assets/use-resource-CQaIZbpy.js +1 -0
  55. package/dist/web/client/assets/users-round-BJrym3FG.js +1 -0
  56. package/dist/web/client/assets/welcome-CyS4Hrd-.js +1 -0
  57. package/dist/web/client/assets/wrench-GbE1M1RJ.js +1 -0
  58. package/dist/web/server/assets/{AddProviderDialog-Tn4AskPm.js → AddProviderDialog-Nc5mc_P6.js} +106 -8
  59. package/dist/web/server/assets/AgentTemplateParts-DZK_r3nQ.js +266 -0
  60. package/dist/web/server/assets/{ConfigPage-DqDUujmt.js → ConfigPage-CxzL-gTm.js} +2 -2
  61. package/dist/web/server/assets/{ConfirmDialog-DfaJ--A6.js → ConfirmDialog-4xeCXKHe.js} +1 -2
  62. package/dist/web/server/assets/{ConnectionsView-DAG-zNBz.js → ConnectionsView-B02FjNsM.js} +9 -9
  63. package/dist/web/server/assets/ManagePage-BfCWE8Lj.js +29 -0
  64. package/dist/web/server/assets/ModelMenu-D-hTgYOO.js +278 -0
  65. package/dist/web/server/assets/{Rail-BIC_4ptO.js → Rail-3gbidhyv.js} +17 -110
  66. package/dist/web/server/assets/{SectionTabs-BGsrf-UQ.js → SectionTabs-CWQ5orUW.js} +9 -2
  67. package/dist/web/server/assets/SkillsParts-D58l8voo.js +199 -0
  68. package/dist/web/server/assets/SpawnDialog-MJWwppgC.js +1648 -0
  69. package/dist/web/server/assets/SpawnTeamModal-RjzAeX_Q.js +124 -0
  70. package/dist/web/server/assets/TeamForm-DdOgIMiV.js +138 -0
  71. package/dist/web/server/assets/{TeamThread-DuLlGDcw.js → TeamThread-D-PvO3fu.js} +9 -9
  72. package/dist/web/server/assets/{UnsavedChangesGuard-DrOvPV14.js → UnsavedChangesGuard-Bb5frygQ.js} +1 -1
  73. package/dist/web/server/assets/{_id-TVruGcOd.js → _id-BKzOw78O.js} +11 -3
  74. package/dist/web/server/assets/_id-BPjVkcNb.js +396 -0
  75. package/dist/web/server/assets/_id-BUfy-GwH.js +16 -0
  76. package/dist/web/server/assets/{_id-yN0z7VqE.js → _id-C1_l6oSR.js} +257 -207
  77. package/dist/web/server/assets/{_id-DJnYgisy.js → _id-CHvYQhWt.js} +8 -4
  78. package/dist/web/server/assets/_id-De3Bm0SG.js +39 -0
  79. package/dist/web/server/assets/_tanstack-start-manifest_v-CR3jm1nY.js +256 -0
  80. package/dist/web/server/assets/access-CNfvQ3NB.js +295 -0
  81. package/dist/web/server/assets/{access-GMGed5O8.js → access-Cm_izIIC.js} +2 -2
  82. package/dist/web/server/assets/{access-C_pupPks.js → access-WWspT0v4.js} +2 -1
  83. package/dist/web/server/assets/agent-actions-COnfW5AU.js +20 -0
  84. package/dist/web/server/assets/agents-C7UmTjfO.js +13 -0
  85. package/dist/web/server/assets/{agents-BnWgFo6o.js → agents-CRtMfKqX.js} +9 -6
  86. package/dist/web/server/assets/agents-D0hfGIMK.js +134 -0
  87. package/dist/web/server/assets/agents-DQowl6Ly.js +31 -0
  88. package/dist/web/server/assets/agents-DzpqlIuJ.js +12 -0
  89. package/dist/web/server/assets/agents-NOkh61dV.js +323 -0
  90. package/dist/web/server/assets/attention-CRvxt22X.js +232 -0
  91. package/dist/web/server/assets/{attention-Cr7puThv.js → attention-CgWhXjX7.js} +4 -1
  92. package/dist/web/server/assets/{attention-DS3O9UmJ.js → attention-Cx9ZWPOO.js} +4 -2
  93. package/dist/web/server/assets/{config-DjTGA4iZ.js → config-B5CS8juO.js} +2 -2
  94. package/dist/web/server/assets/{config-Q7livfa3.js → config-D117117T.js} +51 -102
  95. package/dist/web/server/assets/createSsrRpc-CwTd0zrB.js +72 -0
  96. package/dist/web/server/assets/{login-VV10kZBl.js → login-IF0Gbsuq.js} +36 -2
  97. package/dist/web/server/assets/{login-JoIjlcmu.js → login-va4EtvA8.js} +34 -45
  98. package/dist/web/server/assets/manage-Ce6cI4eW.js +240 -0
  99. package/dist/web/server/assets/{mcp-ZARSOxZW.js → mcp-Bm9U6x7N.js} +2 -2
  100. package/dist/web/server/assets/mcp-C96PBxpb.js +376 -0
  101. package/dist/web/server/assets/page-title-CwcbXMhx.js +95 -0
  102. package/dist/web/server/assets/{router-Dh2-IvLL.js → router-8Iq19GOz.js} +366 -203
  103. package/dist/web/server/assets/{routes-C9NawqcV.js → routes-BLo-fWbQ.js} +2681 -1667
  104. package/dist/web/server/assets/{routes-CDskMy5C.js → routes-BXvYYFrN.js} +2 -2
  105. package/dist/web/server/assets/routes-Kwam6JmS.js +89 -0
  106. package/dist/web/server/assets/{skills-StN15QhC.js → skills-BqCnA-74.js} +2 -2
  107. package/dist/web/server/assets/skills-DSezIdDc.js +157 -0
  108. package/dist/web/server/assets/{skills-h5aHa7Q8.js → skills-DWzlT_hC.js} +9 -1
  109. package/dist/web/server/assets/{style-GYDODk2F.js → style-C2hIPY_Y.js} +2 -2
  110. package/dist/web/server/assets/{system-Dl-1RhoP.js → system-CcLCmkIC.js} +2 -2
  111. package/dist/web/server/assets/{system-DtswhLW6.js → system-D3th6n2E.js} +4 -2
  112. package/dist/web/server/assets/system-E0VePdzO.js +145 -0
  113. package/dist/web/server/assets/{teams-BxnvFTyn.js → teams-70u1XQTr.js} +1 -3
  114. package/dist/web/server/assets/{teams-YrmyutM4.js → teams-BopOP4x7.js} +8 -1
  115. package/dist/web/server/assets/teams-CQVV18D3.js +216 -0
  116. package/dist/web/server/assets/teams-CdCmBJIj.js +174 -0
  117. package/dist/web/server/assets/{teams-5PMGvHuM.js → teams-DScFp8mK.js} +2 -2
  118. package/dist/web/server/assets/{teams-CbIPKf99.js → teams-DxA-vnzY.js} +4 -2
  119. package/dist/web/server/assets/telegram-DJ8s_91Y.js +1057 -0
  120. package/dist/web/server/assets/{telegram-Cv0D4gyz.js → telegram-DR7xijeS.js} +2 -2
  121. package/dist/web/server/assets/{tools-ioJcPzMW.js → tools-CsH9DI-4.js} +2 -2
  122. package/dist/web/server/assets/{tools-OfD22R-C.js → tools-V6kezUpL.js} +55 -218
  123. package/dist/web/server/assets/{use-resource-DVzK0toP.js → use-resource-CjcJwn7F.js} +1 -1
  124. package/dist/web/server/assets/{welcome-jxmpE_Jb.js → welcome-BpmcD-ia.js} +2 -2
  125. package/dist/web/server/assets/{welcome-FFEbrNT1.js → welcome-Ya8TkL4v.js} +10 -10
  126. package/dist/web/server/server.js +19 -19
  127. package/dist/worker.js +17 -0
  128. package/dist/worker.js.map +1 -1
  129. package/package.json +1 -1
  130. package/dist/web/client/assets/AddProviderDialog-BiGLKnu2.js +0 -1
  131. package/dist/web/client/assets/ConfigPage-DvBzy2MN.js +0 -1
  132. package/dist/web/client/assets/ConfirmDialog-CiZ5tk9R.js +0 -1
  133. package/dist/web/client/assets/ConnectionsView-Czkpm2JY.js +0 -1
  134. package/dist/web/client/assets/Dialog-s_kPtI-W.js +0 -1
  135. package/dist/web/client/assets/ModelMenu-BfUPoRjV.js +0 -1
  136. package/dist/web/client/assets/SectionTabs-DENNb6Nw.js +0 -1
  137. package/dist/web/client/assets/Segmented-Dh77vmpp.js +0 -1
  138. package/dist/web/client/assets/SkillFindings-Xng11qqx.js +0 -1
  139. package/dist/web/client/assets/SkillsPicker-hI3YXvib.js +0 -1
  140. package/dist/web/client/assets/SpawnDialog-CKWFQ6jk.js +0 -1
  141. package/dist/web/client/assets/Tabs-f6bHvCGn.js +0 -1
  142. package/dist/web/client/assets/TeamForm-kda1HYZG.js +0 -1
  143. package/dist/web/client/assets/TeamThread-2rm1JGSk.js +0 -1
  144. package/dist/web/client/assets/UnsavedChangesGuard-nx6dv2Yw.js +0 -1
  145. package/dist/web/client/assets/_id-B72mIpcE.js +0 -1
  146. package/dist/web/client/assets/_id-Bzavnza1.js +0 -1
  147. package/dist/web/client/assets/access-Yw9jODuk.js +0 -1
  148. package/dist/web/client/assets/agents-C9xoyL7o.js +0 -1
  149. package/dist/web/client/assets/agents-TviG16wx.js +0 -1
  150. package/dist/web/client/assets/api-HC_YzjBy.js +0 -1
  151. package/dist/web/client/assets/arrow-right-Gm_FDWJ_.js +0 -1
  152. package/dist/web/client/assets/attention-DmURtlJm.js +0 -1
  153. package/dist/web/client/assets/check-BjgKoGvU.js +0 -1
  154. package/dist/web/client/assets/chevron-right-CUZiA2aG.js +0 -1
  155. package/dist/web/client/assets/config-UZz_mjO5.js +0 -1
  156. package/dist/web/client/assets/createLucideIcon-C6gOo8sD.js +0 -1
  157. package/dist/web/client/assets/dist-BWppw70N.js +0 -41
  158. package/dist/web/client/assets/dist-D2dwY7MR.js +0 -1
  159. package/dist/web/client/assets/entities-xVoB-p2j.js +0 -1
  160. package/dist/web/client/assets/index-Df1oUtAP.js +0 -14
  161. package/dist/web/client/assets/link-Cbztlp_R.js +0 -1
  162. package/dist/web/client/assets/login-CPfdaqsV.js +0 -1
  163. package/dist/web/client/assets/mcp-FlYnNon0.js +0 -1
  164. package/dist/web/client/assets/model-facts-DoB6QD5y.js +0 -1
  165. package/dist/web/client/assets/parts-tIDBNsYA.js +0 -1
  166. package/dist/web/client/assets/plus-CWrKMtvA.js +0 -1
  167. package/dist/web/client/assets/routes-BZaWCoQj.js +0 -76
  168. package/dist/web/client/assets/save-f9O-CQia.js +0 -1
  169. package/dist/web/client/assets/skills-C7yDPC8s.js +0 -1
  170. package/dist/web/client/assets/style-DDuTFJUu.js +0 -7
  171. package/dist/web/client/assets/styles-BviXU81u.css +0 -2
  172. package/dist/web/client/assets/system-CL3Kz36L.js +0 -1
  173. package/dist/web/client/assets/teams-CQTEF5gV.js +0 -1
  174. package/dist/web/client/assets/teams-DQ7SqVyF.js +0 -1
  175. package/dist/web/client/assets/telegram-BLgxtGhZ.js +0 -1
  176. package/dist/web/client/assets/tools-pOQyGVYo.js +0 -1
  177. package/dist/web/client/assets/use-resource-C3MBZJop.js +0 -1
  178. package/dist/web/client/assets/welcome-Hr6JpMef.js +0 -1
  179. package/dist/web/client/assets/wrench-6BEIqKDn.js +0 -1
  180. package/dist/web/server/assets/Dialog-aup_yJv5.js +0 -85
  181. package/dist/web/server/assets/ModelMenu-DUY9aHkE.js +0 -138
  182. package/dist/web/server/assets/SkillFindings-BdATze1A.js +0 -46
  183. package/dist/web/server/assets/SkillsPicker-DlqEfRWh.js +0 -67
  184. package/dist/web/server/assets/SpawnDialog-D_SMPCG_.js +0 -132
  185. package/dist/web/server/assets/Tabs-BhF41MfQ.js +0 -20
  186. package/dist/web/server/assets/TeamForm-ilBaeLI4.js +0 -96
  187. package/dist/web/server/assets/_id-BsZcsabI.js +0 -383
  188. package/dist/web/server/assets/_id-D8Kj0F30.js +0 -18
  189. package/dist/web/server/assets/_id-QYifTM9w.js +0 -28
  190. package/dist/web/server/assets/_tanstack-start-manifest_v-D6zrzUC7.js +0 -223
  191. package/dist/web/server/assets/access-DKOpcHIJ.js +0 -232
  192. package/dist/web/server/assets/agents-B6OR3x99.js +0 -327
  193. package/dist/web/server/assets/agents-B7642eRO.js +0 -130
  194. package/dist/web/server/assets/agents-BJ-_oC2e.js +0 -14
  195. package/dist/web/server/assets/agents-CjV0w-Zy.js +0 -12
  196. package/dist/web/server/assets/agents-Dy_Q-9lG.js +0 -27
  197. package/dist/web/server/assets/attention-CLP4HYBz.js +0 -216
  198. package/dist/web/server/assets/createSsrRpc-GCCF14VW.js +0 -169
  199. package/dist/web/server/assets/entities-Dn2xzKIw.js +0 -16
  200. package/dist/web/server/assets/mcp-BI-FD-JI.js +0 -250
  201. package/dist/web/server/assets/model-facts-mrfrWQne.js +0 -136
  202. package/dist/web/server/assets/parts-B31PJkhi.js +0 -190
  203. package/dist/web/server/assets/routes-BJIJWCIE.js +0 -16
  204. package/dist/web/server/assets/skills-BqLq3ZXq.js +0 -275
  205. package/dist/web/server/assets/system-BtRA2HUs.js +0 -138
  206. package/dist/web/server/assets/teams-COaU0wN9.js +0 -108
  207. package/dist/web/server/assets/teams-Ca8W4mvl.js +0 -88
  208. package/dist/web/server/assets/telegram-Yx8nm6Ei.js +0 -984
  209. package/dist/web/server/assets/utils-C_uf36nf.js +0 -8
  210. package/dist/web/server/assets/workspace-DaitCM0t.js +0 -651
@@ -1,29 +1,30 @@
1
1
  import { r as readCookie } from "./cookies-HnTYjKRp.js";
2
- import { C as api, T as errorMessage, c as parseWorkspaceSearch, d as AgentAvatar, p as agentState, u as Button } from "./workspace-DaitCM0t.js";
2
+ import { $ as agentState, H as parseWorkspaceSearch, K as Button, W as Dialog$1, dt as errorMessage, et as shortTime, lt as api, q as AgentAvatar, t as SpawnDialog } from "./SpawnDialog-MJWwppgC.js";
3
3
  import { n as publicOriginConfig } from "./public-origin-BpDkdS5Q.js";
4
4
  import { t as DAEMON_BASE_URL } from "./daemon-client-B_ZRIIrT.js";
5
- import { o as PageShell } from "./createSsrRpc-GCCF14VW.js";
6
- import { i as BaziuLogo, n as ThemeToggle, r as PawIcon, t as Route$3 } from "./login-JoIjlcmu.js";
7
- import { i as isSetupOpen, n as PUBLIC_PATHS, r as fetchAuthState, t as Route$4 } from "./welcome-jxmpE_Jb.js";
8
- import { t as Route$5 } from "./routes-BJIJWCIE.js";
9
- import { t as Route$6 } from "./teams-5PMGvHuM.js";
10
- import { t as Route$7 } from "./skills-StN15QhC.js";
11
- import { t as Route$8 } from "./config-DjTGA4iZ.js";
12
- import { t as Route$9 } from "./attention-DS3O9UmJ.js";
13
- import { t as Route$10 } from "./agents-BJ-_oC2e.js";
14
- import { t as Route$11 } from "./tools-ioJcPzMW.js";
15
- import { t as Route$12 } from "./telegram-Cv0D4gyz.js";
16
- import { t as Route$13 } from "./system-Dl-1RhoP.js";
17
- import { t as Route$14 } from "./mcp-ZARSOxZW.js";
18
- import { t as Route$15 } from "./access-GMGed5O8.js";
19
- import { t as Route$16 } from "./teams-CbIPKf99.js";
20
- import { t as Route$17 } from "./agents-CjV0w-Zy.js";
21
- import { t as Route$18 } from "./_id-DJnYgisy.js";
22
- import { t as Route$19 } from "./_id-D8Kj0F30.js";
5
+ import { i as useAttentionCount, r as AttentionCountProvider, t as PageTitleProvider } from "./page-title-CwcbXMhx.js";
6
+ import { r as PageShell } from "./createSsrRpc-CwTd0zrB.js";
7
+ import { a as PawIcon, i as useThemeMode, n as THEME_MODES, o as BaziuLogo, r as setThemeMode, t as Route$3 } from "./login-va4EtvA8.js";
8
+ import { i as isTyping, n as NEW_CONVERSATION_EVENT, r as SHORTCUTS, t as Route$4 } from "./routes-Kwam6JmS.js";
9
+ import { i as isSetupOpen, n as PUBLIC_PATHS, r as fetchAuthState, t as Route$5 } from "./welcome-BpmcD-ia.js";
10
+ import { t as Route$6 } from "./teams-DScFp8mK.js";
11
+ import { t as Route$7 } from "./skills-BqCnA-74.js";
12
+ import { t as Route$8 } from "./config-B5CS8juO.js";
13
+ import { t as Route$9 } from "./attention-Cx9ZWPOO.js";
14
+ import { t as Route$10 } from "./agents-DzpqlIuJ.js";
15
+ import { t as Route$11 } from "./tools-CsH9DI-4.js";
16
+ import { t as Route$12 } from "./telegram-DR7xijeS.js";
17
+ import { t as Route$13 } from "./system-CcLCmkIC.js";
18
+ import { t as Route$14 } from "./mcp-Bm9U6x7N.js";
19
+ import { t as Route$15 } from "./access-Cm_izIIC.js";
20
+ import { t as Route$16 } from "./teams-DxA-vnzY.js";
21
+ import { t as Route$17 } from "./agents-C7UmTjfO.js";
22
+ import { t as Route$18 } from "./_id-CHvYQhWt.js";
23
+ import { t as Route$19 } from "./_id-BUfy-GwH.js";
23
24
  import { useEffect, useMemo, useState } from "react";
24
25
  import { HeadContent, Link, Outlet, Scripts, createFileRoute, createRootRoute, createRouter, redirect, useNavigate, useRouter, useRouterState } from "@tanstack/react-router";
25
26
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
26
- import { BellRing, Bot, ChevronDown, LayoutTemplate, LogOut, Search, Settings2, SlidersHorizontal, Sparkles, UsersRound } from "lucide-react";
27
+ import { BellRing, Check, Keyboard, LayoutGrid, LogOut, MessageSquarePlus, Monitor, Moon, Search, Settings2, Sun, UserPlus, UserRound } from "lucide-react";
27
28
  import { Dialog, DropdownMenu } from "radix-ui";
28
29
  //#region src/components/RouteStates.tsx
29
30
  /** The router's error view for every route: a loader failed. The top nav stays usable. */
@@ -101,30 +102,38 @@ var PAGES = [
101
102
  ],
102
103
  [
103
104
  "Agents",
104
- "Every Agent, archived ones too",
105
+ "Every Agent by Team: archive, move, delete",
105
106
  "/agents"
106
107
  ],
107
108
  [
108
109
  "Teams",
109
- "Register and remove Teams",
110
+ "Create and remove Teams",
110
111
  "/teams"
111
112
  ],
112
113
  [
113
- "Templates",
114
- "Agent and Team templates",
115
- "/templates"
114
+ "Agent templates",
115
+ "What a new Agent starts with",
116
+ "/templates/agents"
117
+ ],
118
+ [
119
+ "Team templates",
120
+ "Rosters that spawn a whole Team",
121
+ "/templates/teams"
116
122
  ],
117
123
  [
118
124
  "Skills",
119
- "Prompt skills",
125
+ "Import, review and remove prompt skills",
120
126
  "/skills"
121
127
  ],
122
128
  [
123
129
  "Setup",
124
- "Models, tools, Telegram, access",
130
+ "Models, tools, MCP, Telegram, access, system",
125
131
  "/config"
126
132
  ]
127
133
  ];
134
+ /** How many Agents' conversations are looked at for "Recent conversations", and how many shown. */
135
+ var RECENT_AGENTS = 3;
136
+ var RECENT_CONVERSATIONS = 5;
128
137
  /** Destinations whose label or hint holds every word of the query. */
129
138
  function filterDestinations(all, query) {
130
139
  const words = query.toLowerCase().split(/\s+/).filter(Boolean);
@@ -134,44 +143,137 @@ function filterDestinations(all, query) {
134
143
  return words.every((word) => text.includes(word));
135
144
  });
136
145
  }
137
- function JumpPalette({ open, onClose }) {
146
+ /**
147
+ * Agents in the palette's order: those waiting for you, then those working, then the rest by when
148
+ * they were last active, most recent first.
149
+ */
150
+ function orderAgents(agents, activity) {
151
+ const kind = (agent) => agentState(activity.get(agent.id), void 0).kind;
152
+ const last = (agent) => activity.get(agent.id)?.lastActivityAt ?? 0;
153
+ return {
154
+ waiting: agents.filter((agent) => kind(agent) === "needs"),
155
+ working: agents.filter((agent) => kind(agent) === "working"),
156
+ rest: agents.filter((agent) => kind(agent) !== "needs" && kind(agent) !== "working").toSorted((a, b) => last(b) - last(a))
157
+ };
158
+ }
159
+ function JumpPalette({ open, onClose, onShowShortcuts }) {
138
160
  const navigate = useNavigate();
139
161
  const location = useRouterState({ select: (state) => state.location });
140
162
  const [query, setQuery] = useState("");
141
163
  const [active, setActive] = useState(0);
142
164
  const [agents, setAgents] = useState([]);
143
165
  const [teams, setTeams] = useState([]);
166
+ const [profiles, setProfiles] = useState([]);
144
167
  const [activity, setActivity] = useState([]);
168
+ const [recent, setRecent] = useState([]);
169
+ const [dark, setDark] = useState(false);
170
+ const [spawning, setSpawning] = useState(false);
145
171
  useEffect(() => {
146
172
  if (!open) return;
147
173
  setQuery("");
148
174
  setActive(0);
175
+ setDark(document.documentElement.classList.contains("dark"));
149
176
  const controller = new AbortController();
150
177
  const signal = controller.signal;
151
178
  Promise.all([
152
179
  api("/api/agents", { signal }),
153
180
  api("/api/teams", { signal }),
154
- api("/api/activity", { signal })
155
- ]).then(([nextAgents, nextTeams, nextActivity]) => {
181
+ api("/api/activity", { signal }),
182
+ api("/api/profiles", { signal })
183
+ ]).then(async ([nextAgents, nextTeams, nextActivity, nextProfiles]) => {
156
184
  setAgents(nextAgents);
157
185
  setTeams(nextTeams);
158
186
  setActivity(nextActivity.agents);
187
+ setProfiles(nextProfiles);
188
+ const latest = nextActivity.agents.filter((entry) => entry.lastActivityAt !== null).toSorted((a, b) => (b.lastActivityAt ?? 0) - (a.lastActivityAt ?? 0)).slice(0, RECENT_AGENTS);
189
+ setRecent((await Promise.all(latest.map((entry) => api(`/api/agents/${encodeURIComponent(entry.agentId)}/conversations?limit=3`, { signal }).then((list) => list.conversations.map((conversation) => ({
190
+ id: conversation.id,
191
+ agentId: entry.agentId,
192
+ title: conversation.title,
193
+ updatedAt: conversation.updatedAt,
194
+ selected: conversation.id === list.selectedId
195
+ })))))).flat().toSorted((a, b) => b.updatedAt - a.updatedAt).slice(0, RECENT_CONVERSATIONS));
159
196
  }).catch(() => {});
160
197
  return () => controller.abort();
161
198
  }, [open]);
162
199
  const shown = filterDestinations(useMemo(() => {
163
200
  const teamName = new Map(teams.map((team) => [team.id, team.name]));
164
- const states = new Map(activity.map((entry) => [entry.agentId, entry]));
201
+ const byAgent = new Map(activity.map((entry) => [entry.agentId, entry]));
202
+ const agentById = new Map(agents.map((agent) => [agent.id, agent]));
165
203
  const here = location.pathname === "/" ? parseWorkspaceSearch(location.search) : void 0;
166
- const hereTeam = here?.team ?? agents.find((agent) => agent.id === here?.agent)?.teamId ?? void 0;
167
- const list = agents.map((agent) => ({
204
+ const hereAgent = here?.agent ? agentById.get(here.agent) : void 0;
205
+ const hereTeam = here?.team ?? hereAgent?.teamId ?? void 0;
206
+ const agentDestination = (agent, group) => ({
168
207
  key: `agent:${agent.id}`,
169
- group: "Agents",
208
+ group,
170
209
  label: agent.name,
171
- hint: `${teamName.get(agent.teamId) ?? agent.teamId} · ${agentState(states.get(agent.id), void 0).text}`,
210
+ hint: `${teamName.get(agent.teamId) ?? agent.teamId} · ${agentState(byAgent.get(agent.id), void 0).text}`,
172
211
  agent,
173
212
  search: { agent: agent.id }
174
- }));
213
+ });
214
+ const ordered = orderAgents(agents, byAgent);
215
+ const list = [...ordered.waiting.map((agent) => agentDestination(agent, "Waiting for you")), ...ordered.working.map((agent) => agentDestination(agent, "Working now"))];
216
+ if (hereAgent && !here?.view) list.push({
217
+ key: "action:new-conversation",
218
+ group: "Actions",
219
+ label: `New conversation with ${hereAgent.name}`,
220
+ hint: "The current one stays in its list",
221
+ icon: /* @__PURE__ */ jsx(MessageSquarePlus, {
222
+ className: "size-4",
223
+ "aria-hidden": "true"
224
+ }),
225
+ run: () => window.dispatchEvent(new CustomEvent(NEW_CONVERSATION_EVENT, { detail: { agentId: hereAgent.id } }))
226
+ });
227
+ list.push({
228
+ key: "action:spawn",
229
+ group: "Actions",
230
+ label: "Add an Agent",
231
+ hint: hereTeam ? `To ${teamName.get(hereTeam) ?? hereTeam}, or another Team` : "To a Team",
232
+ icon: /* @__PURE__ */ jsx(UserPlus, {
233
+ className: "size-4",
234
+ "aria-hidden": "true"
235
+ }),
236
+ run: () => setSpawning(true)
237
+ }, {
238
+ key: "action:theme",
239
+ group: "Actions",
240
+ label: dark ? "Switch to the light theme" : "Switch to the dark theme",
241
+ hint: "For this browser",
242
+ icon: dark ? /* @__PURE__ */ jsx(Sun, {
243
+ className: "size-4",
244
+ "aria-hidden": "true"
245
+ }) : /* @__PURE__ */ jsx(Moon, {
246
+ className: "size-4",
247
+ "aria-hidden": "true"
248
+ }),
249
+ run: () => setThemeMode(dark ? "light" : "dark")
250
+ }, {
251
+ key: "action:shortcuts",
252
+ group: "Actions",
253
+ label: "Keyboard shortcuts",
254
+ hint: "Press ? anywhere",
255
+ icon: /* @__PURE__ */ jsx(Keyboard, {
256
+ className: "size-4",
257
+ "aria-hidden": "true"
258
+ }),
259
+ run: onShowShortcuts
260
+ });
261
+ list.push(...ordered.rest.map((agent) => agentDestination(agent, "Agents")));
262
+ for (const conversation of recent) {
263
+ const agent = agentById.get(conversation.agentId);
264
+ if (!agent) continue;
265
+ list.push({
266
+ key: `conversation:${conversation.id}`,
267
+ group: "Recent conversations",
268
+ label: conversation.title,
269
+ hint: `${agent.name} · ${shortTime(conversation.updatedAt)}`,
270
+ agent,
271
+ search: conversation.selected ? { agent: agent.id } : {
272
+ agent: agent.id,
273
+ conversation: conversation.id
274
+ }
275
+ });
276
+ }
175
277
  for (const team of teams) list.push({
176
278
  key: `team:${team.id}`,
177
279
  group: "Teams",
@@ -229,19 +331,24 @@ function JumpPalette({ open, onClose }) {
229
331
  agents,
230
332
  teams,
231
333
  activity,
232
- location
334
+ recent,
335
+ location,
336
+ dark,
337
+ onShowShortcuts
233
338
  ]), query);
234
339
  const current = Math.min(active, Math.max(shown.length - 1, 0));
340
+ const hereTeam = location.pathname === "/" ? parseWorkspaceSearch(location.search).team ?? agents.find((agent) => agent.id === parseWorkspaceSearch(location.search).agent)?.teamId : void 0;
235
341
  function go(destination) {
236
342
  if (!destination) return;
237
343
  onClose();
238
- if (destination.path) navigate({ to: destination.path });
344
+ if (destination.run) destination.run();
345
+ else if (destination.path) navigate({ to: destination.path });
239
346
  else navigate({
240
347
  to: "/",
241
348
  search: destination.search ?? {}
242
349
  });
243
350
  }
244
- return /* @__PURE__ */ jsx(Dialog.Root, {
351
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Dialog.Root, {
245
352
  open,
246
353
  onOpenChange: (next) => !next && onClose(),
247
354
  children: /* @__PURE__ */ jsxs(Dialog.Portal, { children: [/* @__PURE__ */ jsx(Dialog.Overlay, { className: "fixed inset-0 z-50 bg-chocolate/30 data-[state=open]:animate-in data-[state=open]:fade-in-0" }), /* @__PURE__ */ jsxs(Dialog.Content, {
@@ -250,7 +357,7 @@ function JumpPalette({ open, onClose }) {
250
357
  children: [
251
358
  /* @__PURE__ */ jsx(Dialog.Title, {
252
359
  className: "sr-only",
253
- children: "Jump to"
360
+ children: "Jump to or do anything"
254
361
  }),
255
362
  /* @__PURE__ */ jsxs("div", {
256
363
  className: "flex items-center gap-2.5 border-b border-border px-4 py-3",
@@ -261,13 +368,13 @@ function JumpPalette({ open, onClose }) {
261
368
  }),
262
369
  /* @__PURE__ */ jsx("input", {
263
370
  autoFocus: true,
264
- "aria-label": "Jump to",
371
+ "aria-label": "Jump to or do anything",
265
372
  role: "combobox",
266
373
  "aria-expanded": "true",
267
374
  "aria-controls": "jump-results",
268
375
  "aria-activedescendant": shown[current] ? `jump-${shown[current].key}` : void 0,
269
376
  value: query,
270
- placeholder: "Jump to an agent, team or page",
377
+ placeholder: "An Agent, a Team, a page, or something to do",
271
378
  onChange: (event) => {
272
379
  setQuery(event.target.value);
273
380
  setActive(0);
@@ -284,10 +391,11 @@ function JumpPalette({ open, onClose }) {
284
391
  go(shown[current]);
285
392
  }
286
393
  },
287
- className: "min-h-0 min-w-0 flex-1 border-0 bg-transparent p-0 text-[0.95rem] shadow-none outline-none focus:bg-transparent focus:shadow-none"
394
+ style: { outline: "none" },
395
+ className: "min-h-0 min-w-0 flex-1 border-0 bg-transparent p-0 text-base shadow-none focus:bg-transparent focus:shadow-none"
288
396
  }),
289
397
  /* @__PURE__ */ jsx("kbd", {
290
- className: "rounded-md border border-border bg-muted px-1.5 py-0.5 font-mono text-[0.7rem] text-muted-foreground",
398
+ className: "rounded-md border border-border bg-muted px-1.5 py-0.5 font-mono text-xs text-muted-foreground",
291
399
  children: "Esc"
292
400
  })
293
401
  ]
@@ -295,7 +403,7 @@ function JumpPalette({ open, onClose }) {
295
403
  /* @__PURE__ */ jsxs("div", {
296
404
  id: "jump-results",
297
405
  role: "listbox",
298
- "aria-label": "Destinations",
406
+ "aria-label": "Destinations and actions",
299
407
  className: "overflow-y-auto p-1.5",
300
408
  children: [shown.length === 0 && /* @__PURE__ */ jsxs("p", {
301
409
  className: "px-3 py-6 text-center text-sm text-muted-foreground",
@@ -305,7 +413,7 @@ function JumpPalette({ open, onClose }) {
305
413
  "”."
306
414
  ]
307
415
  }), shown.map((destination, index) => /* @__PURE__ */ jsxs("div", { children: [destination.group !== shown[index - 1]?.group && /* @__PURE__ */ jsx("div", {
308
- className: "px-2.5 pb-1 pt-2 text-[0.7rem] font-bold uppercase tracking-[0.08em] text-muted-foreground",
416
+ className: `px-2.5 pb-1 pt-2 text-xs font-bold uppercase tracking-[0.08em] ${destination.group === "Waiting for you" ? "text-warning" : "text-muted-foreground"}`,
309
417
  children: destination.group
310
418
  }), /* @__PURE__ */ jsxs("button", {
311
419
  type: "button",
@@ -316,16 +424,19 @@ function JumpPalette({ open, onClose }) {
316
424
  onClick: () => go(destination),
317
425
  className: `unstyled flex min-h-10 w-full items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-left text-sm ${index === current ? "bg-accent text-accent-foreground" : "text-foreground"}`,
318
426
  children: [
319
- destination.agent && /* @__PURE__ */ jsx(AgentAvatar, {
427
+ destination.agent ? /* @__PURE__ */ jsx(AgentAvatar, {
320
428
  identity: destination.agent.identity,
321
429
  size: 24
322
- }),
430
+ }) : destination.icon ? /* @__PURE__ */ jsx("span", {
431
+ className: "flex size-6 shrink-0 items-center justify-center text-mocha",
432
+ children: destination.icon
433
+ }) : null,
323
434
  /* @__PURE__ */ jsx("span", {
324
- className: "font-semibold",
435
+ className: "min-w-0 truncate font-semibold",
325
436
  children: destination.label
326
437
  }),
327
438
  /* @__PURE__ */ jsx("span", {
328
- className: "ml-auto min-w-0 truncate text-xs text-muted-foreground",
439
+ className: "ml-auto min-w-0 shrink truncate pl-3 text-xs text-muted-foreground",
329
440
  children: destination.hint
330
441
  })
331
442
  ]
@@ -333,79 +444,90 @@ function JumpPalette({ open, onClose }) {
333
444
  })
334
445
  ]
335
446
  })] })
447
+ }), spawning && /* @__PURE__ */ jsx(SpawnDialog, {
448
+ profiles,
449
+ teams,
450
+ teamId: hereTeam,
451
+ onClose: () => setSpawning(false)
452
+ })] });
453
+ }
454
+ //#endregion
455
+ //#region src/components/ShortcutsDialog.tsx
456
+ function ShortcutsDialog({ mac, onClose }) {
457
+ return /* @__PURE__ */ jsx(Dialog$1, {
458
+ title: "Keyboard shortcuts",
459
+ description: "The ones without ⌘ or Ctrl wait while you are typing in a field.",
460
+ onClose,
461
+ className: "max-w-lg",
462
+ children: /* @__PURE__ */ jsx("dl", {
463
+ className: "m-0 divide-y divide-border rounded-xl border border-border text-sm",
464
+ children: SHORTCUTS.map((shortcut) => /* @__PURE__ */ jsxs("div", {
465
+ className: "flex items-center gap-4 px-3.5 py-2.5",
466
+ children: [/* @__PURE__ */ jsx("dt", {
467
+ className: "flex shrink-0 gap-1",
468
+ children: shortcut.keys(mac).map((key) => /* @__PURE__ */ jsx("kbd", {
469
+ className: "min-w-7 rounded-md border border-border bg-muted px-1.5 py-0.5 text-center font-mono text-xs text-foreground",
470
+ children: key
471
+ }, key))
472
+ }), /* @__PURE__ */ jsxs("dd", {
473
+ className: "m-0 min-w-0 flex-1 text-foreground",
474
+ children: [shortcut.does, shortcut.where === "workspace" && /* @__PURE__ */ jsx("span", {
475
+ className: "text-muted-foreground",
476
+ children: " (in the workspace)"
477
+ })]
478
+ })]
479
+ }, shortcut.does))
480
+ })
336
481
  });
337
482
  }
338
483
  //#endregion
339
484
  //#region src/components/TopBar.tsx
340
- var MANAGE_LINKS = [
341
- {
342
- href: "/agents",
343
- label: "Agents",
344
- description: "Every Agent: archive, restore, delete.",
345
- icon: Bot
346
- },
347
- {
348
- href: "/teams",
349
- label: "Teams",
350
- description: "Register a Team or remove an empty one.",
351
- icon: UsersRound
352
- },
353
- {
354
- href: "/templates",
355
- label: "Templates",
356
- description: "Reusable Agent behavior and Team rosters.",
357
- icon: LayoutTemplate
485
+ /** The pages each place covers, for marking it as the current one. */
486
+ var MANAGE_PATHS = [
487
+ "/agents",
488
+ "/teams",
489
+ "/templates",
490
+ "/skills"
491
+ ];
492
+ var SETUP_PATHS = ["/config"];
493
+ var under = (pathname, roots) => roots.some((root) => pathname === root || pathname.startsWith(`${root}/`));
494
+ var THEME_LABELS = {
495
+ system: {
496
+ label: "Same as this computer",
497
+ icon: Monitor
358
498
  },
359
- {
360
- href: "/skills",
361
- label: "Skills",
362
- description: "Prompt skills available to your agents.",
363
- icon: Sparkles
499
+ light: {
500
+ label: "Light",
501
+ icon: Sun
364
502
  },
365
- {
366
- href: "/config",
367
- label: "Setup",
368
- description: "Models and providers, services, integrations, access.",
369
- icon: Settings2
503
+ dark: {
504
+ label: "Dark",
505
+ icon: Moon
370
506
  }
371
- ];
507
+ };
372
508
  function TopBar() {
373
509
  const pathname = useRouterState({ select: (state) => state.location.pathname });
374
- const [attention, setAttention] = useState(null);
375
- const [logoutError, setLogoutError] = useState(null);
376
510
  const [paletteOpen, setPaletteOpen] = useState(false);
511
+ const [shortcutsOpen, setShortcutsOpen] = useState(false);
377
512
  const [mac, setMac] = useState(false);
378
513
  useEffect(() => setMac(/Mac|iPhone|iPad/.test(navigator.userAgent)), []);
379
514
  const setupOnly = pathname === "/welcome";
380
- useEffect(() => {
381
- if (pathname === "/login" || pathname === "/welcome") return;
382
- const controller = new AbortController();
383
- api("/api/attention/summary", { signal: controller.signal }).then(setAttention).catch(() => {});
384
- return () => controller.abort();
385
- }, [pathname]);
515
+ const { open: openAttention } = useAttentionCount();
386
516
  useEffect(() => {
387
517
  if (setupOnly) return;
388
518
  const onKey = (event) => {
389
519
  if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k") {
390
520
  event.preventDefault();
391
521
  setPaletteOpen((open) => !open);
522
+ } else if (!event.defaultPrevented && event.key === "?" && !event.metaKey && !event.ctrlKey && !event.altKey && !isTyping(event.target) && !document.querySelector("[role=\"dialog\"]")) {
523
+ event.preventDefault();
524
+ setShortcutsOpen(true);
392
525
  }
393
526
  };
394
527
  window.addEventListener("keydown", onKey);
395
528
  return () => window.removeEventListener("keydown", onKey);
396
529
  }, [setupOnly]);
397
- const attentionActive = pathname === "/attention" || pathname.startsWith("/attention/");
398
- const openAttention = attention?.openTotal ?? 0;
399
- const manageActive = MANAGE_LINKS.some((link) => pathname === link.href || pathname.startsWith(`${link.href}/`));
400
- async function logout() {
401
- setLogoutError(null);
402
- try {
403
- await api("/api/logout", { method: "POST" });
404
- window.location.assign("/login");
405
- } catch (error) {
406
- setLogoutError(errorMessage(error));
407
- }
408
- }
530
+ const attentionActive = under(pathname, ["/attention"]);
409
531
  return /* @__PURE__ */ jsxs("nav", {
410
532
  "aria-label": "Primary navigation",
411
533
  className: "relative mx-auto flex w-full max-w-[1800px] shrink-0 flex-wrap items-center gap-x-3 gap-y-2 border-b border-frost py-2.5",
@@ -422,7 +544,8 @@ function TopBar() {
422
544
  !setupOnly && /* @__PURE__ */ jsxs("button", {
423
545
  type: "button",
424
546
  onClick: () => setPaletteOpen(true),
425
- "aria-label": "Jump to an agent, team or page",
547
+ "aria-label": "Jump to an agent, team or page, or run an action",
548
+ "aria-keyshortcuts": mac ? "Meta+K" : "Control+K",
426
549
  className: "unstyled order-last flex h-9 min-w-0 basis-full items-center gap-2 rounded-[10px] border border-border bg-muted px-2.5 text-left text-sm text-mocha transition-colors hover:border-sapphire-light sm:order-none sm:ml-3 sm:max-w-sm sm:flex-1 sm:basis-60",
427
550
  children: [
428
551
  /* @__PURE__ */ jsx(Search, {
@@ -431,10 +554,10 @@ function TopBar() {
431
554
  }),
432
555
  /* @__PURE__ */ jsx("span", {
433
556
  className: "min-w-0 flex-1 truncate",
434
- children: "Jump to an agent, team or page"
557
+ children: "Jump to or do anything"
435
558
  }),
436
559
  /* @__PURE__ */ jsx("kbd", {
437
- className: "hidden rounded-md border border-border bg-card px-1.5 py-px font-mono text-[0.7rem] sm:inline",
560
+ className: "hidden rounded-md border border-border bg-card px-1.5 py-px font-mono text-xs sm:inline",
438
561
  children: mac ? "⌘K" : "Ctrl K"
439
562
  })
440
563
  ]
@@ -442,7 +565,7 @@ function TopBar() {
442
565
  /* @__PURE__ */ jsxs("div", {
443
566
  className: "ml-auto flex items-center gap-1",
444
567
  children: [
445
- /* @__PURE__ */ jsxs(Link, {
568
+ !setupOnly && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Link, {
446
569
  to: "/attention",
447
570
  "aria-current": attentionActive ? "page" : void 0,
448
571
  className: navButtonClass(attentionActive),
@@ -468,94 +591,131 @@ function TopBar() {
468
591
  ]
469
592
  })] })
470
593
  ]
594
+ }), /* @__PURE__ */ jsx(PlaceLink, {
595
+ to: "/agents",
596
+ label: "Manage",
597
+ icon: LayoutGrid,
598
+ roots: MANAGE_PATHS
599
+ })] }),
600
+ /* @__PURE__ */ jsx(PlaceLink, {
601
+ to: "/config",
602
+ label: "Setup",
603
+ icon: Settings2,
604
+ roots: SETUP_PATHS
471
605
  }),
472
- /* @__PURE__ */ jsxs(DropdownMenu.Root, { children: [/* @__PURE__ */ jsx(DropdownMenu.Trigger, {
473
- asChild: true,
474
- children: /* @__PURE__ */ jsxs("button", {
475
- type: "button",
476
- className: navButtonClass(manageActive),
477
- "aria-label": "Manage menu",
478
- children: [
479
- /* @__PURE__ */ jsx(SlidersHorizontal, {
480
- className: "size-4 shrink-0",
481
- "aria-hidden": "true"
482
- }),
483
- /* @__PURE__ */ jsx("span", {
484
- className: "hidden sm:inline",
485
- children: "Manage"
486
- }),
487
- /* @__PURE__ */ jsx(ChevronDown, {
488
- className: "size-3 shrink-0 text-muted-foreground",
489
- "aria-hidden": "true"
490
- })
491
- ]
492
- })
493
- }), /* @__PURE__ */ jsx(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx(DropdownMenu.Content, {
494
- align: "end",
495
- sideOffset: 8,
496
- collisionPadding: 12,
497
- className: "z-50 w-[min(21rem,calc(100vw-1.5rem))] rounded-xl border border-border bg-popover p-1.5 text-popover-foreground shadow-baziu-lg outline-none data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
498
- children: MANAGE_LINKS.map((link) => {
499
- const ItemIcon = link.icon;
500
- const itemActive = pathname === link.href || pathname.startsWith(`${link.href}/`);
501
- return /* @__PURE__ */ jsx(DropdownMenu.Item, {
502
- asChild: true,
503
- children: /* @__PURE__ */ jsxs("a", {
504
- href: link.href,
505
- "aria-current": itemActive ? "page" : void 0,
506
- className: `flex cursor-pointer items-start gap-3 rounded-lg px-2.5 py-2.5 outline-none transition-colors focus:bg-accent focus:text-accent-foreground ${itemActive ? "bg-accent/70 text-accent-foreground" : "text-foreground"}`,
507
- children: [/* @__PURE__ */ jsx("span", {
508
- className: "mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground",
509
- children: /* @__PURE__ */ jsx(ItemIcon, {
510
- className: "size-3.5",
511
- "aria-hidden": "true"
512
- })
513
- }), /* @__PURE__ */ jsxs("span", {
514
- className: "min-w-0 flex-1",
515
- children: [/* @__PURE__ */ jsx("span", {
516
- className: "block text-sm font-semibold",
517
- children: link.label
518
- }), /* @__PURE__ */ jsx("span", {
519
- className: "mt-0.5 block text-xs leading-5 text-muted-foreground",
520
- children: link.description
521
- })]
522
- })]
523
- })
524
- }, link.href);
525
- })
526
- }) })] }),
527
- /* @__PURE__ */ jsx(ThemeToggle, {}),
528
- /* @__PURE__ */ jsx("button", {
529
- type: "button",
530
- onClick: () => void logout(),
531
- "aria-label": "Log out",
532
- title: "Log out",
533
- className: "unstyled inline-flex h-9 w-9 items-center justify-center rounded-lg text-mocha hover:bg-ivory hover:text-sapphire",
534
- children: /* @__PURE__ */ jsx(LogOut, {
535
- className: "h-4 w-4",
536
- "aria-hidden": "true"
537
- })
538
- })
606
+ /* @__PURE__ */ jsx(SessionMenu, {})
539
607
  ]
540
608
  }),
541
- logoutError && /* @__PURE__ */ jsx("p", {
542
- role: "alert",
543
- className: "m-0 basis-full rounded-lg bg-danger/10 px-3 py-2 text-sm text-danger",
544
- children: logoutError
545
- }),
546
609
  /* @__PURE__ */ jsx(JumpPalette, {
547
610
  open: paletteOpen,
548
- onClose: () => setPaletteOpen(false)
611
+ onClose: () => setPaletteOpen(false),
612
+ onShowShortcuts: () => setShortcutsOpen(true)
613
+ }),
614
+ shortcutsOpen && /* @__PURE__ */ jsx(ShortcutsDialog, {
615
+ mac,
616
+ onClose: () => setShortcutsOpen(false)
549
617
  })
550
618
  ]
551
619
  });
552
620
  }
621
+ function PlaceLink({ to, label, icon: Icon, roots }) {
622
+ const active = under(useRouterState({ select: (state) => state.location.pathname }), roots);
623
+ return /* @__PURE__ */ jsxs(Link, {
624
+ to,
625
+ "aria-current": active ? "page" : void 0,
626
+ "aria-label": label,
627
+ className: navButtonClass(active),
628
+ children: [/* @__PURE__ */ jsx(Icon, {
629
+ className: "size-4 shrink-0",
630
+ "aria-hidden": "true"
631
+ }), /* @__PURE__ */ jsx("span", {
632
+ className: "hidden sm:inline",
633
+ children: label
634
+ })]
635
+ });
636
+ }
637
+ /** Theme and Log out: things about this browser's session rather than places to go. */
638
+ function SessionMenu() {
639
+ const mode = useThemeMode();
640
+ const [error, setError] = useState(null);
641
+ async function logout() {
642
+ setError(null);
643
+ try {
644
+ await api("/api/logout", { method: "POST" });
645
+ window.location.assign("/login");
646
+ } catch (cause) {
647
+ setError(errorMessage(cause));
648
+ }
649
+ }
650
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(DropdownMenu.Root, { children: [/* @__PURE__ */ jsx(DropdownMenu.Trigger, {
651
+ asChild: true,
652
+ children: /* @__PURE__ */ jsx("button", {
653
+ type: "button",
654
+ "aria-label": "Theme and log out",
655
+ title: "Theme and log out",
656
+ className: "unstyled inline-flex h-9 w-9 items-center justify-center rounded-lg border border-transparent text-mocha transition-colors hover:border-frost hover:bg-ivory hover:text-sapphire data-[state=open]:border-sapphire-light data-[state=open]:bg-sapphire-glow data-[state=open]:text-sapphire",
657
+ children: /* @__PURE__ */ jsx(UserRound, {
658
+ className: "size-4",
659
+ "aria-hidden": "true"
660
+ })
661
+ })
662
+ }), /* @__PURE__ */ jsx(DropdownMenu.Portal, { children: /* @__PURE__ */ jsxs(DropdownMenu.Content, {
663
+ align: "end",
664
+ sideOffset: 8,
665
+ collisionPadding: 12,
666
+ className: "z-50 w-64 rounded-xl border border-border bg-popover p-1.5 text-popover-foreground shadow-baziu-lg outline-none data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
667
+ children: [
668
+ /* @__PURE__ */ jsx(DropdownMenu.Label, {
669
+ className: "px-2.5 pt-1.5 pb-1 text-xs font-semibold text-muted-foreground",
670
+ children: "Theme"
671
+ }),
672
+ /* @__PURE__ */ jsx(DropdownMenu.RadioGroup, {
673
+ value: mode,
674
+ onValueChange: (value) => setThemeMode(value),
675
+ children: THEME_MODES.map((option) => {
676
+ const { label, icon: Icon } = THEME_LABELS[option];
677
+ return /* @__PURE__ */ jsxs(DropdownMenu.RadioItem, {
678
+ value: option,
679
+ className: "flex cursor-pointer items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground",
680
+ children: [
681
+ /* @__PURE__ */ jsx(Icon, {
682
+ className: "size-4 text-muted-foreground",
683
+ "aria-hidden": "true"
684
+ }),
685
+ /* @__PURE__ */ jsx("span", {
686
+ className: "flex-1",
687
+ children: label
688
+ }),
689
+ /* @__PURE__ */ jsx(DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, {
690
+ className: "size-4 text-sapphire",
691
+ "aria-hidden": "true"
692
+ }) })
693
+ ]
694
+ }, option);
695
+ })
696
+ }),
697
+ /* @__PURE__ */ jsx(DropdownMenu.Separator, { className: "my-1.5 h-px bg-border" }),
698
+ /* @__PURE__ */ jsxs(DropdownMenu.Item, {
699
+ onSelect: () => void logout(),
700
+ className: "flex cursor-pointer items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground",
701
+ children: [/* @__PURE__ */ jsx(LogOut, {
702
+ className: "size-4 text-muted-foreground",
703
+ "aria-hidden": "true"
704
+ }), "Log out"]
705
+ })
706
+ ]
707
+ }) })] }), error && /* @__PURE__ */ jsxs("p", {
708
+ role: "alert",
709
+ className: "absolute top-full right-0 z-40 m-0 mt-1 rounded-lg bg-danger/10 px-3 py-2 text-sm text-danger",
710
+ children: ["Could not log out: ", error]
711
+ })] });
712
+ }
553
713
  function navButtonClass(active) {
554
714
  return `unstyled inline-flex h-9 shrink-0 items-center justify-center gap-1.5 rounded-lg border px-2 text-sm font-semibold transition-colors sm:px-2.5 ${active ? "border-sapphire-light bg-sapphire-glow text-sapphire shadow-baziu-sm" : "border-transparent text-mocha hover:border-frost hover:bg-ivory hover:text-sapphire"}`;
555
715
  }
556
716
  //#endregion
557
717
  //#region src/styles.css?url
558
- var styles_default = "/assets/styles-BviXU81u.css";
718
+ var styles_default = "/assets/styles-C3CDSGAr.css";
559
719
  //#endregion
560
720
  //#region src/routes/__root.tsx
561
721
  var THEME_INIT_SCRIPT = `(function(){try{var t=localStorage.getItem('baziu-theme');var sd=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches;var d=t==='dark'||((t===null||t==='system')&&sd);document.documentElement.classList.toggle('dark',d);}catch(e){}})();`;
@@ -629,35 +789,38 @@ function RootComponent() {
629
789
  className: "sr-only z-[100] rounded-lg bg-primary px-4 py-2 font-semibold text-primary-foreground focus:not-sr-only focus:fixed focus:left-3 focus:top-3",
630
790
  children: "Skip to main content"
631
791
  }),
632
- isLogin ? /* @__PURE__ */ jsx(Outlet, {}) : isWorkspace ? /* @__PURE__ */ jsxs("div", {
633
- className: "flex h-dvh flex-col",
634
- children: [/* @__PURE__ */ jsx("div", {
635
- className: "px-3 sm:px-5",
636
- children: /* @__PURE__ */ jsx(TopBar, {})
637
- }), /* @__PURE__ */ jsx("main", {
638
- id: "main-content",
639
- tabIndex: -1,
640
- className: "mx-auto min-h-0 w-full max-w-[1600px] flex-1 overflow-clip px-3 pb-3 sm:px-5 sm:pb-5",
641
- children: /* @__PURE__ */ jsx(Outlet, {})
642
- })]
643
- }) : /* @__PURE__ */ jsxs("div", {
644
- className: "flex min-h-dvh flex-col",
645
- children: [
646
- /* @__PURE__ */ jsx("div", {
792
+ /* @__PURE__ */ jsx(AttentionCountProvider, {
793
+ enabled: !isLogin && pathname !== "/welcome",
794
+ children: /* @__PURE__ */ jsx(PageTitleProvider, { children: isLogin ? /* @__PURE__ */ jsx(Outlet, {}) : isWorkspace ? /* @__PURE__ */ jsxs("div", {
795
+ className: "flex h-dvh flex-col",
796
+ children: [/* @__PURE__ */ jsx("div", {
647
797
  className: "px-3 sm:px-5",
648
798
  children: /* @__PURE__ */ jsx(TopBar, {})
649
- }),
650
- /* @__PURE__ */ jsx("main", {
799
+ }), /* @__PURE__ */ jsx("main", {
651
800
  id: "main-content",
652
801
  tabIndex: -1,
653
- className: "mx-auto w-full max-w-[1500px] flex-1 px-4 py-9 sm:px-6 sm:py-12",
802
+ className: "mx-auto min-h-0 w-full max-w-[1600px] flex-1 overflow-clip px-3 pb-3 sm:px-5 sm:pb-5",
654
803
  children: /* @__PURE__ */ jsx(Outlet, {})
655
- }),
656
- /* @__PURE__ */ jsx("div", {
657
- className: "px-4 sm:px-6",
658
- children: /* @__PURE__ */ jsx(Footer, {})
659
- })
660
- ]
804
+ })]
805
+ }) : /* @__PURE__ */ jsxs("div", {
806
+ className: "flex min-h-dvh flex-col",
807
+ children: [
808
+ /* @__PURE__ */ jsx("div", {
809
+ className: "px-3 sm:px-5",
810
+ children: /* @__PURE__ */ jsx(TopBar, {})
811
+ }),
812
+ /* @__PURE__ */ jsx("main", {
813
+ id: "main-content",
814
+ tabIndex: -1,
815
+ className: "mx-auto w-full max-w-[1500px] flex-1 px-4 py-9 sm:px-6 sm:py-12",
816
+ children: /* @__PURE__ */ jsx(Outlet, {})
817
+ }),
818
+ /* @__PURE__ */ jsx("div", {
819
+ className: "px-4 sm:px-6",
820
+ children: /* @__PURE__ */ jsx(Footer, {})
821
+ })
822
+ ]
823
+ }) })
661
824
  }),
662
825
  /* @__PURE__ */ jsx(Scripts, {})
663
826
  ]
@@ -761,7 +924,7 @@ var Route = createFileRoute("/api/$")({ server: { handlers: {
761
924
  } } });
762
925
  //#endregion
763
926
  //#region src/routeTree.gen.ts
764
- var WelcomeRoute = Route$4.update({
927
+ var WelcomeRoute = Route$5.update({
765
928
  id: "/welcome",
766
929
  path: "/welcome",
767
930
  getParentRoute: () => Route$2
@@ -771,7 +934,7 @@ var LoginRoute = Route$3.update({
771
934
  path: "/login",
772
935
  getParentRoute: () => Route$2
773
936
  });
774
- var IndexRoute = Route$5.update({
937
+ var IndexRoute = Route$4.update({
775
938
  id: "/",
776
939
  path: "/",
777
940
  getParentRoute: () => Route$2