bazilion 0.54.0 → 0.56.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 (188) hide show
  1. package/dist/cli.js +201 -41
  2. package/dist/cli.js.map +1 -1
  3. package/dist/daemon.js +1561 -522
  4. package/dist/daemon.js.map +1 -1
  5. package/dist/web/client/assets/AddProviderDialog-DZ9mXFdq.js +1 -0
  6. package/dist/web/client/assets/AgentTemplateParts-BfG3a-ri.js +1 -0
  7. package/dist/web/client/assets/{Button-UiegBKOK.js → Button-CoKQRO-s.js} +1 -1
  8. package/dist/web/client/assets/ConfigPage-Ch-DSJUO.js +1 -0
  9. package/dist/web/client/assets/ConfirmDialog-B_jXAPmh.js +1 -0
  10. package/dist/web/client/assets/ConnectionsView-D1Liebtf.js +1 -0
  11. package/dist/web/client/assets/ManagePage-kd7iWYEL.js +1 -0
  12. package/dist/web/client/assets/SectionTabs-Dc0bNn-J.js +1 -0
  13. package/dist/web/client/assets/{Segmented-MYKKTuZO.js → Segmented-iylzLwE6.js} +1 -1
  14. package/dist/web/client/assets/SkillsParts-C5T7sYDA.js +1 -0
  15. package/dist/web/client/assets/{SpawnTeamModal-DG5UbJNK.js → SpawnTeamModal-DatFF4f_.js} +1 -1
  16. package/dist/web/client/assets/{TeamForm-DGlxWv4e.js → TeamForm-l-N_PYeE.js} +1 -1
  17. package/dist/web/client/assets/TeamThread-BWmIQiAh.js +1 -0
  18. package/dist/web/client/assets/{UnsavedChangesGuard-BmdwLH99.js → UnsavedChangesGuard-vQBdMl8h.js} +1 -1
  19. package/dist/web/client/assets/_id-C6SADaiD.js +1 -0
  20. package/dist/web/client/assets/_id-CC9r0qsr.js +1 -0
  21. package/dist/web/client/assets/{access-C8d8vaQ6.js → access-BbQFbTPh.js} +1 -1
  22. package/dist/web/client/assets/{agent-actions-BgE9fKHH.js → agent-actions-B-9KIwn6.js} +1 -1
  23. package/dist/web/client/assets/agents-BXwzmHu8.js +1 -0
  24. package/dist/web/client/assets/agents-BtETzVIY.js +1 -0
  25. package/dist/web/client/assets/arrow-right-BqqfPqVi.js +1 -0
  26. package/dist/web/client/assets/attention-BMrZJ9ui.js +1 -0
  27. package/dist/web/client/assets/{bot-Bb--PFVU.js → bot-BHky7KAX.js} +1 -1
  28. package/dist/web/client/assets/chart-column-DTsDbzL0.js +1 -0
  29. package/dist/web/client/assets/chevron-right-D1shxvdo.js +1 -0
  30. package/dist/web/client/assets/config-B2ZDYo52.js +1 -0
  31. package/dist/web/client/assets/createLucideIcon-CZHSSDYA.js +1 -0
  32. package/dist/web/client/assets/{download-C4t9l5wR.js → download-Dr0PgyMr.js} +1 -1
  33. package/dist/web/client/assets/es2015-D1pnOGPG.js +41 -0
  34. package/dist/web/client/assets/{file-text-DzbjpYrV.js → file-text-D6OTHixJ.js} +1 -1
  35. package/dist/web/client/assets/{images-DSYgPKM7.js → images-BULrW-FC.js} +1 -1
  36. package/dist/web/client/assets/index-B-N6NIX4.js +14 -0
  37. package/dist/web/client/assets/{key-round-BpK4-E3T.js → key-round-DmSZN0Kq.js} +1 -1
  38. package/dist/web/client/assets/{list-checks-JNXcmws9.js → list-checks-DdTdAQXS.js} +1 -1
  39. package/dist/web/client/assets/login-DM3q-V4R.js +1 -0
  40. package/dist/web/client/assets/{manage-SRGSx8n2.js → manage-R57MUzsY.js} +1 -1
  41. package/dist/web/client/assets/{mcp-BUWu4TvS.js → mcp-CSHrVH1t.js} +1 -1
  42. package/dist/web/client/assets/{message-square-DM2MP9vF.js → message-square-B_pULba_.js} +1 -1
  43. package/dist/web/client/assets/{network-BJ4iPjQO.js → network-BqmVqC4_.js} +1 -1
  44. package/dist/web/client/assets/parts-68zf8Fgw.js +1 -0
  45. package/dist/web/client/assets/plus-CEKaHPBw.js +1 -0
  46. package/dist/web/client/assets/preload-helper-CZOd_z6l.js +1 -0
  47. package/dist/web/client/assets/routes-DOoeKVwr.js +85 -0
  48. package/dist/web/client/assets/skills-CPZftp9O.js +1 -0
  49. package/dist/web/client/assets/{square-terminal-Dmm6cV-G.js → square-terminal-CYfGBHPC.js} +1 -1
  50. package/dist/web/client/assets/{style-CA2GAk9b.js → style-Bm9QsFpy.js} +1 -1
  51. package/dist/web/client/assets/styles-B-kTTvCo.css +2 -0
  52. package/dist/web/client/assets/{system-zQ0NnQML.js → system-Dd2P9eqE.js} +1 -1
  53. package/dist/web/client/assets/teams-7FEpSZg1.js +1 -0
  54. package/dist/web/client/assets/teams-ClirFbDV.js +1 -0
  55. package/dist/web/client/assets/telegram-BJnT5THs.js +1 -0
  56. package/dist/web/client/assets/tools-DqNXLMpc.js +1 -0
  57. package/dist/web/client/assets/usage-BC_TStVj.js +1 -0
  58. package/dist/web/client/assets/{use-resource-CQaIZbpy.js → use-resource-Bn0Sx7r6.js} +1 -1
  59. package/dist/web/client/assets/{users-round-BJrym3FG.js → users-round-cxQ5HF-C.js} +1 -1
  60. package/dist/web/client/assets/welcome-g8wtn_or.js +1 -0
  61. package/dist/web/client/assets/{wrench-GbE1M1RJ.js → wrench-BLEJjETg.js} +1 -1
  62. package/dist/web/server/assets/{AddProviderDialog-Nc5mc_P6.js → AddProviderDialog-DtkjBMv4.js} +5 -2
  63. package/dist/web/server/assets/AgentAvatar-8gTAy_tP.js +37 -0
  64. package/dist/web/server/assets/{AgentTemplateParts-DZK_r3nQ.js → AgentTemplateParts-CxWyovvM.js} +6 -2
  65. package/dist/web/server/assets/Button-Dsnw22OF.js +17 -0
  66. package/dist/web/server/assets/{ConfigPage-CxzL-gTm.js → ConfigPage-usZi48Zr.js} +2 -2
  67. package/dist/web/server/assets/{ConfirmDialog-4xeCXKHe.js → ConfirmDialog-DAcSBHkT.js} +3 -1
  68. package/dist/web/server/assets/{ConnectionsView-B02FjNsM.js → ConnectionsView-Dy6uYSRI.js} +9 -7
  69. package/dist/web/server/assets/Dialog-DTeF-nOZ.js +85 -0
  70. package/dist/web/server/assets/{ManagePage-BfCWE8Lj.js → ManagePage-Dy1EdovO.js} +2 -2
  71. package/dist/web/server/assets/{SectionTabs-CWQ5orUW.js → SectionTabs-BVrMn76H.js} +2 -1
  72. package/dist/web/server/assets/{SkillsParts-D58l8voo.js → SkillsParts-Cw05b3al.js} +6 -2
  73. package/dist/web/server/assets/SpawnDialog-BAE8W91z.js +125 -0
  74. package/dist/web/server/assets/{SpawnTeamModal-RjzAeX_Q.js → SpawnTeamModal-CgBY0HuN.js} +6 -2
  75. package/dist/web/server/assets/{TeamForm-DdOgIMiV.js → TeamForm-JyO5xJXX.js} +6 -2
  76. package/dist/web/server/assets/{TeamThread-D-PvO3fu.js → TeamThread-5o48EbXL.js} +52 -4
  77. package/dist/web/server/assets/{UnsavedChangesGuard-Bb5frygQ.js → UnsavedChangesGuard-CJQGu45L.js} +1 -1
  78. package/dist/web/server/assets/{_id-C1_l6oSR.js → _id-BE_RSvuN.js} +14 -9
  79. package/dist/web/server/assets/{_id-CHvYQhWt.js → _id-BNvm89oJ.js} +2 -2
  80. package/dist/web/server/assets/{_id-De3Bm0SG.js → _id-BW6sVrvw.js} +1 -1
  81. package/dist/web/server/assets/{_id-BPjVkcNb.js → _id-BfjTS4JO.js} +15 -9
  82. package/dist/web/server/assets/{_id-BKzOw78O.js → _id-BpumuCYL.js} +1 -1
  83. package/dist/web/server/assets/{_id-BUfy-GwH.js → _id-C54t_nX6.js} +2 -2
  84. package/dist/web/server/assets/_tanstack-start-manifest_v-BPwQX_5b.js +275 -0
  85. package/dist/web/server/assets/{access-CNfvQ3NB.js → access-6FWih7nC.js} +7 -4
  86. package/dist/web/server/assets/{access-WWspT0v4.js → access-BhAMfi7U.js} +1 -1
  87. package/dist/web/server/assets/{access-Cm_izIIC.js → access-DEyq3uP_.js} +2 -2
  88. package/dist/web/server/assets/activity-Czfq-5_F.js +471 -0
  89. package/dist/web/server/assets/{agent-actions-COnfW5AU.js → agent-actions-ChH7Mne4.js} +1 -1
  90. package/dist/web/server/assets/{agents-CRtMfKqX.js → agents-3hBjrd8B.js} +1 -1
  91. package/dist/web/server/assets/{agents-NOkh61dV.js → agents-BXuglv4G.js} +12 -6
  92. package/dist/web/server/assets/{agents-C7UmTjfO.js → agents-DhenbitX.js} +2 -2
  93. package/dist/web/server/assets/{agents-D0hfGIMK.js → agents-KJcDMj0Y.js} +9 -6
  94. package/dist/web/server/assets/{agents-DzpqlIuJ.js → agents-ncyhVx-T.js} +2 -2
  95. package/dist/web/server/assets/{agents-DQowl6Ly.js → agents-rTDlRZa5.js} +1 -1
  96. package/dist/web/server/assets/{attention-Cx9ZWPOO.js → attention-CDdOCOio.js} +3 -2
  97. package/dist/web/server/assets/{attention-CRvxt22X.js → attention-DM__BzWY.js} +24 -9
  98. package/dist/web/server/assets/{attention-CgWhXjX7.js → attention-X0U6ZmiA.js} +2 -1
  99. package/dist/web/server/assets/{auth-dJnrFW6y.js → auth-BexhV8Yq.js} +1 -1
  100. package/dist/web/server/assets/{config-B5CS8juO.js → config-Cld8Q8N7.js} +2 -2
  101. package/dist/web/server/assets/{config-X7qWbbpH.js → config-Cx5ri2DL2.js} +1 -1
  102. package/dist/web/server/assets/{config-D117117T.js → config-DpgYAXQ3.js} +9 -6
  103. package/dist/web/server/assets/createSsrRpc-6LHNEsSK.js +16 -0
  104. package/dist/web/server/assets/{daemon-client-B_ZRIIrT.js → daemon-client-RxAllljf.js} +1 -1
  105. package/dist/web/server/assets/form-BEjeiSy3.js +416 -0
  106. package/dist/web/server/assets/live-DbJeq6KP.js +263 -0
  107. package/dist/web/server/assets/{login-va4EtvA8.js → login-BJdJ219n.js} +1 -1
  108. package/dist/web/server/assets/{login-IF0Gbsuq.js → login-C4lL4AxI.js} +2 -2
  109. package/dist/web/server/assets/{manage-Ce6cI4eW.js → manage-C6ucNYZW.js} +2 -1
  110. package/dist/web/server/assets/{mcp-C96PBxpb.js → mcp-BXnWQOwM.js} +7 -4
  111. package/dist/web/server/assets/{mcp-C97uAZe1.js → mcp-C8VLspco.js} +1 -1
  112. package/dist/web/server/assets/{mcp-Bm9U6x7N.js → mcp-DwCzj7eO.js} +2 -2
  113. package/dist/web/server/assets/open-groups-BMGYUTtY.js +12 -0
  114. package/dist/web/server/assets/{page-title-CwcbXMhx.js → page-title-PTpFHXWo.js} +6 -3
  115. package/dist/web/server/assets/parts-k9M-atPa.js +436 -0
  116. package/dist/web/server/assets/{router-8Iq19GOz.js → router-BttfLktO.js} +354 -114
  117. package/dist/web/server/assets/{routes-Kwam6JmS.js → routes-A7UcreVX.js} +9 -6
  118. package/dist/web/server/assets/{routes-BLo-fWbQ.js → routes-B9jw-MJ8.js} +1286 -331
  119. package/dist/web/server/assets/{routes-BXvYYFrN.js → routes-BX2FV8rS.js} +3 -3
  120. package/dist/web/server/assets/{skills-DSezIdDc.js → skills-BVAH93cd.js} +8 -6
  121. package/dist/web/server/assets/{skills-DWzlT_hC.js → skills-Cd5Cfdaz.js} +1 -1
  122. package/dist/web/server/assets/{skills-BqCnA-74.js → skills-y3GsyKce.js} +2 -2
  123. package/dist/web/server/assets/src-vrZVrV9u.js +103 -0
  124. package/dist/web/server/assets/{start-DhW7sy23.js → start-Dl8gQ-95.js} +1 -1
  125. package/dist/web/server/assets/{style-C2hIPY_Y.js → style-BQ3H9I7Y.js} +1 -1
  126. package/dist/web/server/assets/{system-CcLCmkIC.js → system-BJPKqM6b.js} +2 -2
  127. package/dist/web/server/assets/{system-E0VePdzO.js → system-C7mejQSc.js} +3 -3
  128. package/dist/web/server/assets/{system-D3th6n2E.js → system-LsLcuVzY.js} +1 -1
  129. package/dist/web/server/assets/{teams-CdCmBJIj.js → teams-B6gbflsZ.js} +10 -6
  130. package/dist/web/server/assets/{teams-CQVV18D3.js → teams-C7kXMNgc.js} +10 -6
  131. package/dist/web/server/assets/{teams-BopOP4x7.js → teams-CPXoTggb.js} +1 -1
  132. package/dist/web/server/assets/{teams-70u1XQTr.js → teams-CeLLd2Mf.js} +1 -1
  133. package/dist/web/server/assets/{teams-DScFp8mK.js → teams-CiX8LUQo.js} +2 -2
  134. package/dist/web/server/assets/{teams-DxA-vnzY.js → teams-D-XdIkCr.js} +2 -2
  135. package/dist/web/server/assets/{telegram-CGol0CKX2.js → telegram-D7TW3LNZ.js} +1 -1
  136. package/dist/web/server/assets/{telegram-DJ8s_91Y.js → telegram-D8_V7_sW.js} +286 -272
  137. package/dist/web/server/assets/{telegram-DR7xijeS.js → telegram-DA2dwLID.js} +2 -2
  138. package/dist/web/server/assets/{tools-V6kezUpL.js → tools-CckcG9Jl.js} +5 -3
  139. package/dist/web/server/assets/{tools-CsH9DI-4.js → tools-CluiJywK.js} +2 -2
  140. package/dist/web/server/assets/{tools-C-wwWjLI.js → tools-D1BBVkRh.js} +1 -1
  141. package/dist/web/server/assets/usage-CrYyvPgf.js +46 -0
  142. package/dist/web/server/assets/usage-PNNb3pPj.js +465 -0
  143. package/dist/web/server/assets/{use-resource-CjcJwn7F.js → use-resource-BUA9qGGY.js} +1 -1
  144. package/dist/web/server/assets/{welcome-CxXMI4HI.js → welcome-CUTYf8UG.js} +1 -1
  145. package/dist/web/server/assets/{welcome-Ya8TkL4v.js → welcome-CYhh3iUU.js} +8 -6
  146. package/dist/web/server/assets/{welcome-BpmcD-ia.js → welcome-CwzLt6Rp.js} +2 -2
  147. package/dist/web/server/assets/workspace-0XPILV1W.js +82 -0
  148. package/dist/web/server/server.js +20 -20
  149. package/dist/web-server.js +4 -0
  150. package/dist/web-server.js.map +1 -1
  151. package/dist/worker.js +40 -15
  152. package/dist/worker.js.map +1 -1
  153. package/package.json +4 -4
  154. package/dist/web/client/assets/AddProviderDialog-CkwSq3C7.js +0 -1
  155. package/dist/web/client/assets/AgentTemplateParts-CEn_4qVs.js +0 -1
  156. package/dist/web/client/assets/ConfigPage-CUbHBhzx.js +0 -1
  157. package/dist/web/client/assets/ConfirmDialog-VqBOFZEp.js +0 -1
  158. package/dist/web/client/assets/ConnectionsView-ByARMcWP.js +0 -1
  159. package/dist/web/client/assets/ManagePage-BJWZd1ts.js +0 -1
  160. package/dist/web/client/assets/SectionTabs-ViZKm3-B.js +0 -1
  161. package/dist/web/client/assets/SkillsParts-UvNK5SYP.js +0 -1
  162. package/dist/web/client/assets/TeamThread-mkwODO0S.js +0 -1
  163. package/dist/web/client/assets/_id-CvcxNmBH.js +0 -1
  164. package/dist/web/client/assets/_id-UyBk7gRl.js +0 -1
  165. package/dist/web/client/assets/agents-CgtzqBpD.js +0 -1
  166. package/dist/web/client/assets/agents-D7W4BT8r.js +0 -1
  167. package/dist/web/client/assets/arrow-right-D0HKRb7U.js +0 -1
  168. package/dist/web/client/assets/attention-D9mQWoKt.js +0 -1
  169. package/dist/web/client/assets/chevron-right-bs0TUSl2.js +0 -1
  170. package/dist/web/client/assets/config-Dw6GWf38.js +0 -1
  171. package/dist/web/client/assets/createLucideIcon-DkniuEtD.js +0 -1
  172. package/dist/web/client/assets/index-YW0gXPfk.js +0 -14
  173. package/dist/web/client/assets/login-DcQJk5-U.js +0 -1
  174. package/dist/web/client/assets/parts-LZxl9Gvc.js +0 -41
  175. package/dist/web/client/assets/plus-CLGNN5QX.js +0 -1
  176. package/dist/web/client/assets/routes-BxIIyGho.js +0 -85
  177. package/dist/web/client/assets/skills-C7DzIwFJ.js +0 -1
  178. package/dist/web/client/assets/styles-C3CDSGAr.css +0 -2
  179. package/dist/web/client/assets/teams-BEIJHObN.js +0 -1
  180. package/dist/web/client/assets/teams-DlOc7Ods.js +0 -1
  181. package/dist/web/client/assets/telegram-DKHq5DpE.js +0 -1
  182. package/dist/web/client/assets/tools-BKIpLaiC.js +0 -1
  183. package/dist/web/client/assets/welcome-CyS4Hrd-.js +0 -1
  184. package/dist/web/server/assets/Rail-3gbidhyv.js +0 -605
  185. package/dist/web/server/assets/SpawnDialog-MJWwppgC.js +0 -1648
  186. package/dist/web/server/assets/_tanstack-start-manifest_v-CR3jm1nY.js +0 -256
  187. package/dist/web/server/assets/createSsrRpc-CwTd0zrB.js +0 -72
  188. package/dist/web/server/assets/public-origin-BpDkdS5Q.js +0 -34
@@ -1,9 +1,12 @@
1
- import { C as CheckList, E as Facts, K as Button, M as SetupCard, O as ListRow, P as Waiting, S as CheckItem, T as Fact, a as Problem, b as CardRow, dt as errorMessage, f as TextField, g as CardBody, k as Notice, lt as api, m as Banner, n as CheckboxRow, o as SaveBar, p as saveStatus, s as SecretField, u as SwitchRow, v as CardForm, w as Chip, y as CardList } from "./SpawnDialog-MJWwppgC.js";
2
- import { r as useResource } from "./use-resource-CjcJwn7F.js";
1
+ import { i as api, o as errorMessage } from "./live-DbJeq6KP.js";
2
+ import { r as useResource } from "./use-resource-BUA9qGGY.js";
3
+ import { t as Button } from "./Button-Dsnw22OF.js";
3
4
  import { r as ago } from "./ModelMenu-D-hTgYOO.js";
4
- import { t as ConfirmDialog } from "./ConfirmDialog-4xeCXKHe.js";
5
- import { t as Route } from "./telegram-DR7xijeS.js";
6
- import { t as ConfigPage } from "./ConfigPage-CxzL-gTm.js";
5
+ import { t as ConfirmDialog } from "./ConfirmDialog-DAcSBHkT.js";
6
+ import { a as CardForm, d as Chip, f as Fact, g as Notice, h as ListRow, l as CheckItem, o as CardList, p as Facts, r as CardBody, s as CardRow, t as Banner, u as CheckList, x as Waiting, y as SetupCard } from "./parts-k9M-atPa.js";
7
+ import { a as SaveBar, d as TextField, f as saveStatus, i as Problem, l as SwitchRow, o as SecretField, t as CheckboxRow } from "./form-BEjeiSy3.js";
8
+ import { t as Route } from "./telegram-DA2dwLID.js";
9
+ import { t as ConfigPage } from "./ConfigPage-usZi48Zr.js";
7
10
  import { useEffect, useState } from "react";
8
11
  import { useRouter } from "@tanstack/react-router";
9
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -235,7 +238,8 @@ var KINDS = {
235
238
  review_failure: "Review failures",
236
239
  trigger_failure: "Scheduled trigger failures",
237
240
  agent_loop_break: "Agent message loop breaks",
238
- queue_interrupted: "Queues paused after restart"
241
+ queue_interrupted: "Queues paused after restart",
242
+ turn_failure: "Failed background turns"
239
243
  };
240
244
  function browserZone() {
241
245
  try {
@@ -387,7 +391,7 @@ function NotificationsForm({ settings, justSaved, onSaved }) {
387
391
  });
388
392
  }
389
393
  //#endregion
390
- //#region src/components/setup/TelegramCards.tsx
394
+ //#region src/components/setup/telegram/parts.tsx
391
395
  var TELEGRAM_PATH = "/api/config/telegram";
392
396
  function StateChip({ state }) {
393
397
  return state && /* @__PURE__ */ jsx(Chip, {
@@ -395,51 +399,137 @@ function StateChip({ state }) {
395
399
  children: state.label
396
400
  });
397
401
  }
398
- /** Telegram moved the group to a new id, and the bot still points at the old one. */
399
- function MigrationBanner({ toChatId, onReconnected }) {
402
+ //#endregion
403
+ //#region src/components/setup/telegram/AllowedUsersCard.tsx
404
+ /** The Telegram users who may use the bot besides its owner. */
405
+ function AllowedUsersCard() {
406
+ const [users, setUsers] = useState(null);
407
+ const [userId, setUserId] = useState("");
408
+ const [label, setLabel] = useState("");
400
409
  const [busy, setBusy] = useState(false);
401
410
  const [error, setError] = useState(null);
402
- async function reconnect() {
411
+ const [removing, setRemoving] = useState(null);
412
+ const path = `${TELEGRAM_PATH}/acl`;
413
+ const load = async () => setUsers(await api(path));
414
+ useEffect(() => {
415
+ load().catch((cause) => setError(errorMessage(cause)));
416
+ }, []);
417
+ const id = userId.trim();
418
+ const idProblem = id !== "" && !/^\d+$/.test(id) ? "A Telegram user id is a number, like 123456789." : void 0;
419
+ async function add(event) {
420
+ event.preventDefault();
421
+ if (id === "" || idProblem || busy) return;
403
422
  setBusy(true);
404
423
  setError(null);
405
424
  try {
406
- await api(`${TELEGRAM_PATH}/reconnect`, { method: "POST" });
407
- await onReconnected();
425
+ await api(path, { body: {
426
+ userId: Number(id),
427
+ label: label.trim() || null
428
+ } });
429
+ setUserId("");
430
+ setLabel("");
431
+ await load();
408
432
  } catch (cause) {
409
433
  setError(errorMessage(cause));
410
434
  } finally {
411
435
  setBusy(false);
412
436
  }
413
437
  }
414
- return /* @__PURE__ */ jsxs("div", {
415
- className: "grid gap-2",
416
- children: [/* @__PURE__ */ jsxs(Banner, {
417
- tone: "warning",
418
- lead: /* @__PURE__ */ jsxs(Fragment$1, { children: [
419
- "Telegram moved this group to a new chat id, ",
420
- /* @__PURE__ */ jsx("code", { children: toChatId }),
421
- "."
422
- ] }),
423
- action: /* @__PURE__ */ jsx(Button, {
424
- variant: "primary",
425
- disabled: busy,
426
- onClick: () => void reconnect(),
427
- children: busy ? "Reconnecting…" : "Reconnect"
438
+ return /* @__PURE__ */ jsxs(SetupCard, {
439
+ labelledBy: "telegram-allowed",
440
+ icon: /* @__PURE__ */ jsx(Users, { className: "size-5" }),
441
+ title: "Allowed users",
442
+ description: /* @__PURE__ */ jsxs(Fragment$1, { children: [
443
+ "The Telegram users who can use the bot, for commands and chat. Anyone finds their id by sending ",
444
+ /* @__PURE__ */ jsx("code", { children: "/whoami" }),
445
+ "."
446
+ ] }),
447
+ action: /* @__PURE__ */ jsx(StateChip, { state: allowedState(users) }),
448
+ children: [
449
+ users === null && !error && /* @__PURE__ */ jsx(CardRow, {
450
+ className: "py-4",
451
+ children: /* @__PURE__ */ jsx(Waiting, { children: "Loading…" })
428
452
  }),
429
- children: [
430
- "The bot still points at the old id. Reconnecting moves it over and creates the",
431
- " ",
432
- /* @__PURE__ */ jsx("code", { children: "⚙ bazilion" }),
433
- " service topic again in the new group; each Agent’s topic follows when it is next used."
434
- ]
435
- }), error && /* @__PURE__ */ jsx(Banner, {
436
- tone: "warning",
437
- role: "alert",
438
- lead: "The bot was not reconnected.",
439
- children: error
440
- })]
453
+ users && !hasOwner(users) && /* @__PURE__ */ jsx(CardRow, {
454
+ className: "py-4 text-sm text-muted-foreground",
455
+ children: "Closed: the bot has no owner yet. Others can be added once the owner is paired above."
456
+ }),
457
+ users && users.length > 0 && /* @__PURE__ */ jsx(CardList, { children: users.map((user) => {
458
+ const name = allowedName(user);
459
+ return /* @__PURE__ */ jsx(ListRow, {
460
+ title: name,
461
+ meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", { children: user.role === "owner" ? "Owner" : "Member" }), name !== String(user.userId) && /* @__PURE__ */ jsx("code", { children: user.userId })] }),
462
+ actions: user.role !== "owner" && /* @__PURE__ */ jsx(Button, {
463
+ variant: "danger",
464
+ disabled: busy,
465
+ "aria-label": `Remove ${name}`,
466
+ onClick: () => setRemoving(user),
467
+ children: "Remove"
468
+ })
469
+ }, user.userId);
470
+ }) }),
471
+ users && hasOwner(users) && /* @__PURE__ */ jsxs(CardForm, {
472
+ onSubmit: add,
473
+ children: [/* @__PURE__ */ jsxs("div", {
474
+ className: "grid items-start gap-x-3 gap-y-4 sm:grid-cols-[minmax(0,14rem)_minmax(0,18rem)]",
475
+ children: [/* @__PURE__ */ jsx(TextField, {
476
+ label: "Telegram user ID",
477
+ value: userId,
478
+ disabled: busy,
479
+ placeholder: "123456789",
480
+ mono: true,
481
+ inputMode: "numeric",
482
+ problem: idProblem,
483
+ onChange: setUserId
484
+ }), /* @__PURE__ */ jsx(TextField, {
485
+ label: "Label (optional)",
486
+ value: label,
487
+ disabled: busy,
488
+ placeholder: "e.g. Pat",
489
+ onChange: setLabel
490
+ })]
491
+ }), /* @__PURE__ */ jsx("div", {
492
+ className: "flex flex-wrap items-center gap-x-4 gap-y-2",
493
+ children: /* @__PURE__ */ jsx(Button, {
494
+ variant: "primary",
495
+ type: "submit",
496
+ disabled: busy || id === "" || idProblem !== void 0,
497
+ children: busy ? "Adding…" : "Add user"
498
+ })
499
+ })]
500
+ }),
501
+ error && /* @__PURE__ */ jsx(CardBody, { children: /* @__PURE__ */ jsx(Notice, {
502
+ tone: "warning",
503
+ role: "alert",
504
+ title: "That did not work.",
505
+ children: error
506
+ }) }),
507
+ /* @__PURE__ */ jsx(ConfirmDialog, {
508
+ open: removing !== null,
509
+ onOpenChange: (open) => {
510
+ if (!open) setRemoving(null);
511
+ },
512
+ title: `Remove ${removing ? allowedName(removing) : ""}?`,
513
+ description: /* @__PURE__ */ jsxs("p", {
514
+ className: "m-0",
515
+ children: [
516
+ "Telegram user ",
517
+ /* @__PURE__ */ jsx("code", { children: removing?.userId }),
518
+ " immediately loses command and chat access. Their Telegram account is not changed, and they can be allowed again later."
519
+ ]
520
+ }),
521
+ confirmLabel: "Remove Telegram access",
522
+ onConfirm: async () => {
523
+ if (!removing) return;
524
+ await api(`${path}/${removing.userId}`, { method: "DELETE" });
525
+ await load();
526
+ }
527
+ })
528
+ ]
441
529
  });
442
530
  }
531
+ //#endregion
532
+ //#region src/components/setup/telegram/BotCard.tsx
443
533
  /** The bot's token and the group it works in, saved together. */
444
534
  function BotCard({ stored, state, justSaved, onSaved, onDisconnected }) {
445
535
  const [draft, setDraft] = useState({
@@ -563,128 +653,55 @@ function BotCard({ stored, state, justSaved, onSaved, onDisconnected }) {
563
653
  ]
564
654
  });
565
655
  }
566
- /** What Telegram answers about the bot and its group, and how the running bot is doing. */
567
- function PreflightCard({ configured, health, working, note, error, now, onRun, onRestart }) {
568
- return /* @__PURE__ */ jsxs(SetupCard, {
569
- labelledBy: "telegram-preflight",
570
- icon: /* @__PURE__ */ jsx(ListChecks, { className: "size-5" }),
571
- title: "Preflight checks",
572
- description: "Asks Telegram whether the bot and its group are set up the way Bazilion needs.",
573
- action: /* @__PURE__ */ jsx(StateChip, { state: preflightState(health) }),
574
- children: [/* @__PURE__ */ jsxs(CardBody, { children: [
575
- configured ? /* @__PURE__ */ jsxs("div", {
576
- className: "flex flex-wrap items-center gap-2",
577
- children: [/* @__PURE__ */ jsx(Button, {
578
- variant: "primary",
579
- disabled: working !== null,
580
- onClick: onRun,
581
- children: working === "check" ? "Checking…" : "Run preflight"
582
- }), /* @__PURE__ */ jsx(Button, {
583
- variant: "ghost",
584
- disabled: working !== null,
585
- onClick: onRestart,
586
- children: working === "restart" ? "Restarting…" : "Restart bot"
587
- })]
588
- }) : /* @__PURE__ */ jsx("p", {
589
- className: "m-0 text-sm text-muted-foreground",
590
- children: "Save the bot’s credentials above first."
591
- }),
592
- working === "check" && /* @__PURE__ */ jsx(Waiting, { children: "Asking Telegram…" }),
593
- note && /* @__PURE__ */ jsx(Notice, {
594
- tone: "neutral",
595
- children: note
596
- }),
597
- error && /* @__PURE__ */ jsx(Notice, {
598
- tone: "warning",
599
- role: "alert",
600
- title: "That did not work.",
601
- children: error
602
- }),
603
- health?.error && /* @__PURE__ */ jsxs(Notice, {
604
- tone: "warning",
605
- role: "alert",
606
- title: /* @__PURE__ */ jsxs(Fragment$1, { children: ["Failed at ", /* @__PURE__ */ jsx("code", { children: health.error.step })] }),
607
- children: [/* @__PURE__ */ jsx("p", {
608
- className: "m-0",
609
- children: health.error.message
610
- }), /* @__PURE__ */ jsx("p", {
611
- className: "m-0 mt-1 text-muted-foreground",
612
- children: preflightHint(health.error.step)
613
- })]
614
- }),
615
- health?.preflight && /* @__PURE__ */ jsxs("div", {
616
- role: "status",
617
- "aria-live": "polite",
618
- "aria-atomic": "true",
619
- className: "grid gap-3",
620
- children: [/* @__PURE__ */ jsx(CheckList, { children: preflightChecks(health.preflight).map((check) => /* @__PURE__ */ jsx(CheckItem, {
621
- ok: check.ok,
622
- label: check.label,
623
- children: check.detail
624
- }, check.label)) }), /* @__PURE__ */ jsxs("p", {
625
- className: "m-0 text-sm text-muted-foreground",
626
- children: [
627
- "Group members: ",
628
- health.preflight.memberCount ?? "unknown",
629
- ". Everyone in the group can read the Agents’ replies."
630
- ]
631
- })]
632
- }),
633
- health && !health.error && !health.preflight && /* @__PURE__ */ jsx("p", {
634
- role: "status",
635
- className: "m-0 text-sm text-muted-foreground",
636
- children: "No preflight data."
637
- })
638
- ] }), health?.polling && /* @__PURE__ */ jsx(PollingFacts, {
639
- polling: health.polling,
640
- now
641
- })]
642
- });
643
- }
644
- function PollingFacts({ polling, now }) {
645
- const moment = (at) => /* @__PURE__ */ jsx("time", {
646
- dateTime: new Date(at).toISOString(),
647
- children: ago(at, now)
648
- });
649
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CardRow, {
650
- className: "bg-muted/50 py-2 text-xs font-bold uppercase tracking-[0.08em] text-muted-foreground",
651
- children: "The running bot"
652
- }), /* @__PURE__ */ jsxs(Facts, {
653
- className: "border-t-0",
654
- children: [
655
- /* @__PURE__ */ jsx(Fact, {
656
- label: "Polling",
657
- tone: polling.running ? "success" : "warning",
658
- children: polling.running ? "Running" : "Stopped"
659
- }),
660
- /* @__PURE__ */ jsx(Fact, {
661
- label: "Group setup",
662
- tone: polling.activated ? "success" : "warning",
663
- children: polling.activated ? "Activated" : "Awaiting activation"
664
- }),
665
- polling.startedAt !== null && /* @__PURE__ */ jsx(Fact, {
666
- label: "Started",
667
- children: moment(polling.startedAt)
668
- }),
669
- polling.lastSuccessfulPollAt !== null && /* @__PURE__ */ jsx(Fact, {
670
- label: "Last poll",
671
- children: moment(polling.lastSuccessfulPollAt)
672
- }),
673
- polling.lastUpdateId !== null && /* @__PURE__ */ jsx(Fact, {
674
- label: "Last update",
675
- children: /* @__PURE__ */ jsx("span", {
676
- className: "font-mono text-[0.9em]",
677
- children: polling.lastUpdateId
678
- })
656
+ //#endregion
657
+ //#region src/components/setup/telegram/MigrationBanner.tsx
658
+ /** Telegram moved the group to a new id, and the bot still points at the old one. */
659
+ function MigrationBanner({ toChatId, onReconnected }) {
660
+ const [busy, setBusy] = useState(false);
661
+ const [error, setError] = useState(null);
662
+ async function reconnect() {
663
+ setBusy(true);
664
+ setError(null);
665
+ try {
666
+ await api(`${TELEGRAM_PATH}/reconnect`, { method: "POST" });
667
+ await onReconnected();
668
+ } catch (cause) {
669
+ setError(errorMessage(cause));
670
+ } finally {
671
+ setBusy(false);
672
+ }
673
+ }
674
+ return /* @__PURE__ */ jsxs("div", {
675
+ className: "grid gap-2",
676
+ children: [/* @__PURE__ */ jsxs(Banner, {
677
+ tone: "warning",
678
+ lead: /* @__PURE__ */ jsxs(Fragment$1, { children: [
679
+ "Telegram moved this group to a new chat id, ",
680
+ /* @__PURE__ */ jsx("code", { children: toChatId }),
681
+ "."
682
+ ] }),
683
+ action: /* @__PURE__ */ jsx(Button, {
684
+ variant: "primary",
685
+ disabled: busy,
686
+ onClick: () => void reconnect(),
687
+ children: busy ? "Reconnecting…" : "Reconnect"
679
688
  }),
680
- polling.error && /* @__PURE__ */ jsx(Fact, {
681
- label: "Error",
682
- tone: "warning",
683
- children: polling.error
684
- })
685
- ]
686
- })] });
689
+ children: [
690
+ "The bot still points at the old id. Reconnecting moves it over and creates the",
691
+ " ",
692
+ /* @__PURE__ */ jsx("code", { children: "⚙ bazilion" }),
693
+ " service topic again in the new group; each Agent’s topic follows when it is next used."
694
+ ]
695
+ }), error && /* @__PURE__ */ jsx(Banner, {
696
+ tone: "warning",
697
+ role: "alert",
698
+ lead: "The bot was not reconnected.",
699
+ children: error
700
+ })]
701
+ });
687
702
  }
703
+ //#endregion
704
+ //#region src/components/setup/telegram/PairingCard.tsx
688
705
  /** The one person the bot belongs to: paired with a code sent in the group. */
689
706
  function PairingCard({ onOwnerChange }) {
690
707
  const [status, setStatus] = useState(null);
@@ -819,132 +836,129 @@ function PairingCard({ onOwnerChange }) {
819
836
  })]
820
837
  });
821
838
  }
822
- /** The Telegram users who may use the bot besides its owner. */
823
- function AllowedUsersCard() {
824
- const [users, setUsers] = useState(null);
825
- const [userId, setUserId] = useState("");
826
- const [label, setLabel] = useState("");
827
- const [busy, setBusy] = useState(false);
828
- const [error, setError] = useState(null);
829
- const [removing, setRemoving] = useState(null);
830
- const path = `${TELEGRAM_PATH}/acl`;
831
- const load = async () => setUsers(await api(path));
832
- useEffect(() => {
833
- load().catch((cause) => setError(errorMessage(cause)));
834
- }, []);
835
- const id = userId.trim();
836
- const idProblem = id !== "" && !/^\d+$/.test(id) ? "A Telegram user id is a number, like 123456789." : void 0;
837
- async function add(event) {
838
- event.preventDefault();
839
- if (id === "" || idProblem || busy) return;
840
- setBusy(true);
841
- setError(null);
842
- try {
843
- await api(path, { body: {
844
- userId: Number(id),
845
- label: label.trim() || null
846
- } });
847
- setUserId("");
848
- setLabel("");
849
- await load();
850
- } catch (cause) {
851
- setError(errorMessage(cause));
852
- } finally {
853
- setBusy(false);
854
- }
855
- }
839
+ //#endregion
840
+ //#region src/components/setup/telegram/PreflightCard.tsx
841
+ /** What Telegram answers about the bot and its group, and how the running bot is doing. */
842
+ function PreflightCard({ configured, health, working, note, error, now, onRun, onRestart }) {
856
843
  return /* @__PURE__ */ jsxs(SetupCard, {
857
- labelledBy: "telegram-allowed",
858
- icon: /* @__PURE__ */ jsx(Users, { className: "size-5" }),
859
- title: "Allowed users",
860
- description: /* @__PURE__ */ jsxs(Fragment$1, { children: [
861
- "The Telegram users who can use the bot, for commands and chat. Anyone finds their id by sending ",
862
- /* @__PURE__ */ jsx("code", { children: "/whoami" }),
863
- "."
864
- ] }),
865
- action: /* @__PURE__ */ jsx(StateChip, { state: allowedState(users) }),
866
- children: [
867
- users === null && !error && /* @__PURE__ */ jsx(CardRow, {
868
- className: "py-4",
869
- children: /* @__PURE__ */ jsx(Waiting, { children: "Loading…" })
870
- }),
871
- users && !hasOwner(users) && /* @__PURE__ */ jsx(CardRow, {
872
- className: "py-4 text-sm text-muted-foreground",
873
- children: "Closed: the bot has no owner yet. Others can be added once the owner is paired above."
874
- }),
875
- users && users.length > 0 && /* @__PURE__ */ jsx(CardList, { children: users.map((user) => {
876
- const name = allowedName(user);
877
- return /* @__PURE__ */ jsx(ListRow, {
878
- title: name,
879
- meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", { children: user.role === "owner" ? "Owner" : "Member" }), name !== String(user.userId) && /* @__PURE__ */ jsx("code", { children: user.userId })] }),
880
- actions: user.role !== "owner" && /* @__PURE__ */ jsx(Button, {
881
- variant: "danger",
882
- disabled: busy,
883
- "aria-label": `Remove ${name}`,
884
- onClick: () => setRemoving(user),
885
- children: "Remove"
886
- })
887
- }, user.userId);
888
- }) }),
889
- users && hasOwner(users) && /* @__PURE__ */ jsxs(CardForm, {
890
- onSubmit: add,
891
- children: [/* @__PURE__ */ jsxs("div", {
892
- className: "grid items-start gap-x-3 gap-y-4 sm:grid-cols-[minmax(0,14rem)_minmax(0,18rem)]",
893
- children: [/* @__PURE__ */ jsx(TextField, {
894
- label: "Telegram user ID",
895
- value: userId,
896
- disabled: busy,
897
- placeholder: "123456789",
898
- mono: true,
899
- inputMode: "numeric",
900
- problem: idProblem,
901
- onChange: setUserId
902
- }), /* @__PURE__ */ jsx(TextField, {
903
- label: "Label (optional)",
904
- value: label,
905
- disabled: busy,
906
- placeholder: "e.g. Pat",
907
- onChange: setLabel
908
- })]
909
- }), /* @__PURE__ */ jsx("div", {
910
- className: "flex flex-wrap items-center gap-x-4 gap-y-2",
911
- children: /* @__PURE__ */ jsx(Button, {
912
- variant: "primary",
913
- type: "submit",
914
- disabled: busy || id === "" || idProblem !== void 0,
915
- children: busy ? "Adding…" : "Add user"
916
- })
844
+ labelledBy: "telegram-preflight",
845
+ icon: /* @__PURE__ */ jsx(ListChecks, { className: "size-5" }),
846
+ title: "Preflight checks",
847
+ description: "Asks Telegram whether the bot and its group are set up the way Bazilion needs.",
848
+ action: /* @__PURE__ */ jsx(StateChip, { state: preflightState(health) }),
849
+ children: [/* @__PURE__ */ jsxs(CardBody, { children: [
850
+ configured ? /* @__PURE__ */ jsxs("div", {
851
+ className: "flex flex-wrap items-center gap-2",
852
+ children: [/* @__PURE__ */ jsx(Button, {
853
+ variant: "primary",
854
+ disabled: working !== null,
855
+ onClick: onRun,
856
+ children: working === "check" ? "Checking…" : "Run preflight"
857
+ }), /* @__PURE__ */ jsx(Button, {
858
+ variant: "ghost",
859
+ disabled: working !== null,
860
+ onClick: onRestart,
861
+ children: working === "restart" ? "Restarting…" : "Restart bot"
917
862
  })]
863
+ }) : /* @__PURE__ */ jsx("p", {
864
+ className: "m-0 text-sm text-muted-foreground",
865
+ children: "Save the bot’s credentials above first."
918
866
  }),
919
- error && /* @__PURE__ */ jsx(CardBody, { children: /* @__PURE__ */ jsx(Notice, {
867
+ working === "check" && /* @__PURE__ */ jsx(Waiting, { children: "Asking Telegram…" }),
868
+ note && /* @__PURE__ */ jsx(Notice, {
869
+ tone: "neutral",
870
+ children: note
871
+ }),
872
+ error && /* @__PURE__ */ jsx(Notice, {
920
873
  tone: "warning",
921
874
  role: "alert",
922
875
  title: "That did not work.",
923
876
  children: error
924
- }) }),
925
- /* @__PURE__ */ jsx(ConfirmDialog, {
926
- open: removing !== null,
927
- onOpenChange: (open) => {
928
- if (!open) setRemoving(null);
929
- },
930
- title: `Remove ${removing ? allowedName(removing) : ""}?`,
931
- description: /* @__PURE__ */ jsxs("p", {
877
+ }),
878
+ health?.error && /* @__PURE__ */ jsxs(Notice, {
879
+ tone: "warning",
880
+ role: "alert",
881
+ title: /* @__PURE__ */ jsxs(Fragment$1, { children: ["Failed at ", /* @__PURE__ */ jsx("code", { children: health.error.step })] }),
882
+ children: [/* @__PURE__ */ jsx("p", {
932
883
  className: "m-0",
884
+ children: health.error.message
885
+ }), /* @__PURE__ */ jsx("p", {
886
+ className: "m-0 mt-1 text-muted-foreground",
887
+ children: preflightHint(health.error.step)
888
+ })]
889
+ }),
890
+ health?.preflight && /* @__PURE__ */ jsxs("div", {
891
+ role: "status",
892
+ "aria-live": "polite",
893
+ "aria-atomic": "true",
894
+ className: "grid gap-3",
895
+ children: [/* @__PURE__ */ jsx(CheckList, { children: preflightChecks(health.preflight).map((check) => /* @__PURE__ */ jsx(CheckItem, {
896
+ ok: check.ok,
897
+ label: check.label,
898
+ children: check.detail
899
+ }, check.label)) }), /* @__PURE__ */ jsxs("p", {
900
+ className: "m-0 text-sm text-muted-foreground",
933
901
  children: [
934
- "Telegram user ",
935
- /* @__PURE__ */ jsx("code", { children: removing?.userId }),
936
- " immediately loses command and chat access. Their Telegram account is not changed, and they can be allowed again later."
902
+ "Group members: ",
903
+ health.preflight.memberCount ?? "unknown",
904
+ ". Everyone in the group can read the Agents’ replies."
937
905
  ]
938
- }),
939
- confirmLabel: "Remove Telegram access",
940
- onConfirm: async () => {
941
- if (!removing) return;
942
- await api(`${path}/${removing.userId}`, { method: "DELETE" });
943
- await load();
944
- }
906
+ })]
907
+ }),
908
+ health && !health.error && !health.preflight && /* @__PURE__ */ jsx("p", {
909
+ role: "status",
910
+ className: "m-0 text-sm text-muted-foreground",
911
+ children: "No preflight data."
945
912
  })
946
- ]
913
+ ] }), health?.polling && /* @__PURE__ */ jsx(PollingFacts, {
914
+ polling: health.polling,
915
+ now
916
+ })]
917
+ });
918
+ }
919
+ function PollingFacts({ polling, now }) {
920
+ const moment = (at) => /* @__PURE__ */ jsx("time", {
921
+ dateTime: new Date(at).toISOString(),
922
+ children: ago(at, now)
947
923
  });
924
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CardRow, {
925
+ className: "bg-muted/50 py-2 text-xs font-bold uppercase tracking-[0.08em] text-muted-foreground",
926
+ children: "The running bot"
927
+ }), /* @__PURE__ */ jsxs(Facts, {
928
+ className: "border-t-0",
929
+ children: [
930
+ /* @__PURE__ */ jsx(Fact, {
931
+ label: "Polling",
932
+ tone: polling.running ? "success" : "warning",
933
+ children: polling.running ? "Running" : "Stopped"
934
+ }),
935
+ /* @__PURE__ */ jsx(Fact, {
936
+ label: "Group setup",
937
+ tone: polling.activated ? "success" : "warning",
938
+ children: polling.activated ? "Activated" : "Awaiting activation"
939
+ }),
940
+ polling.startedAt !== null && /* @__PURE__ */ jsx(Fact, {
941
+ label: "Started",
942
+ children: moment(polling.startedAt)
943
+ }),
944
+ polling.lastSuccessfulPollAt !== null && /* @__PURE__ */ jsx(Fact, {
945
+ label: "Last poll",
946
+ children: moment(polling.lastSuccessfulPollAt)
947
+ }),
948
+ polling.lastUpdateId !== null && /* @__PURE__ */ jsx(Fact, {
949
+ label: "Last update",
950
+ children: /* @__PURE__ */ jsx("span", {
951
+ className: "font-mono text-[0.9em]",
952
+ children: polling.lastUpdateId
953
+ })
954
+ }),
955
+ polling.error && /* @__PURE__ */ jsx(Fact, {
956
+ label: "Error",
957
+ tone: "warning",
958
+ children: polling.error
959
+ })
960
+ ]
961
+ })] });
948
962
  }
949
963
  //#endregion
950
964
  //#region src/routes/config/telegram.tsx?tsr-split=component
@@ -1,8 +1,8 @@
1
1
  import { n as createServerFn } from "../server.js";
2
- import { t as createSsrRpc } from "./createSsrRpc-CwTd0zrB.js";
2
+ import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
3
3
  import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
4
4
  //#region src/routes/config/telegram.tsx
5
- var $$splitComponentImporter = () => import("./telegram-DJ8s_91Y.js");
5
+ var $$splitComponentImporter = () => import("./telegram-D8_V7_sW.js");
6
6
  var fetchTelegramConfig = createServerFn({ method: "GET" }).handler(createSsrRpc("9252e07d6f45cb1c4543c2ca6f1b0c4c7697c249f3e6c94fda53b8a603929a92"));
7
7
  var Route = createFileRoute("/config/telegram")({
8
8
  loader: () => fetchTelegramConfig(),
@@ -1,7 +1,9 @@
1
- import { M as SetupCard, a as Problem, ct as ApiError, dt as errorMessage, f as TextField, k as Notice, lt as api, o as SaveBar, p as saveStatus, r as ChoiceCards, s as SecretField, u as SwitchRow, v as CardForm, w as Chip } from "./SpawnDialog-MJWwppgC.js";
1
+ import { i as api, o as errorMessage, r as ApiError } from "./live-DbJeq6KP.js";
2
2
  import { p as cn } from "./ModelMenu-D-hTgYOO.js";
3
- import { t as Route } from "./tools-CsH9DI-4.js";
4
- import { t as ConfigPage } from "./ConfigPage-CxzL-gTm.js";
3
+ import { a as CardForm, d as Chip, g as Notice, y as SetupCard } from "./parts-k9M-atPa.js";
4
+ import { a as SaveBar, d as TextField, f as saveStatus, i as Problem, l as SwitchRow, n as ChoiceCards, o as SecretField } from "./form-BEjeiSy3.js";
5
+ import { t as Route } from "./tools-CluiJywK.js";
6
+ import { t as ConfigPage } from "./ConfigPage-usZi48Zr.js";
5
7
  import { useId, useState } from "react";
6
8
  import { useRouter } from "@tanstack/react-router";
7
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";