bazilion 0.51.0 → 0.53.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 (205) hide show
  1. package/dist/cli.js +74 -28
  2. package/dist/cli.js.map +1 -1
  3. package/dist/daemon.js +547 -187
  4. package/dist/daemon.js.map +1 -1
  5. package/dist/web/client/assets/AddProviderDialog-CO_uijWF.js +1 -0
  6. package/dist/web/client/assets/AgentTemplateParts-Dl35c-Ux.js +1 -0
  7. package/dist/web/client/assets/ConfigPage-DiQiJXP6.js +1 -0
  8. package/dist/web/client/assets/ConfirmDialog-BVytx3kN.js +1 -0
  9. package/dist/web/client/assets/ConnectionsView-DDrBaiLg.js +1 -0
  10. package/dist/web/client/assets/Dialog-BTDzv3J5.js +1 -0
  11. package/dist/web/client/assets/ManagePage-xlePXXx5.js +1 -0
  12. package/dist/web/client/assets/SectionTabs-BMiRKFfb.js +1 -0
  13. package/dist/web/client/assets/Segmented-Co4n2C5X.js +1 -0
  14. package/dist/web/client/assets/SpawnDialog-ejwXnyxy.js +1 -0
  15. package/dist/web/client/assets/SpawnTeamModal-Cp-nAvIC.js +1 -0
  16. package/dist/web/client/assets/TeamForm-Cz9uDVvb.js +1 -0
  17. package/dist/web/client/assets/TeamThread-D8xqE_gb.js +1 -0
  18. package/dist/web/client/assets/UnsavedChangesGuard-DmT4nBQU.js +1 -0
  19. package/dist/web/client/assets/_id-DEQxwq2v.js +1 -0
  20. package/dist/web/client/assets/_id-DSRgpxEc.js +1 -0
  21. package/dist/web/client/assets/access-34_ShgHU.js +1 -0
  22. package/dist/web/client/assets/agent-actions--EO4yJ4Q.js +1 -0
  23. package/dist/web/client/assets/agents-C87yBHaR.js +1 -0
  24. package/dist/web/client/assets/agents-DvCSl1Ro.js +1 -0
  25. package/dist/web/client/assets/api-CoLs57oO.js +1 -0
  26. package/dist/web/client/assets/arrow-right-BhTWtC9z.js +1 -0
  27. package/dist/web/client/assets/attention-CteEeRvX.js +1 -0
  28. package/dist/web/client/assets/chevron-right-BqOIX9UM.js +1 -0
  29. package/dist/web/client/assets/config-XJuQeEP4.js +1 -0
  30. package/dist/web/client/assets/createLucideIcon-dN8ooBD1.js +1 -0
  31. package/dist/web/client/assets/download-Dj-1ltZb.js +1 -0
  32. package/dist/web/client/assets/file-text-DiP-LaEg.js +1 -0
  33. package/dist/web/client/assets/form-Bvr_f9lR.js +1 -0
  34. package/dist/web/client/assets/images-BKjyhYUc.js +1 -0
  35. package/dist/web/client/assets/index-J_Uqj4md.js +54 -0
  36. package/dist/web/client/assets/key-round-QpqZklz6.js +1 -0
  37. package/dist/web/client/assets/list-checks-BeyG5SVQ.js +1 -0
  38. package/dist/web/client/assets/login-076Bc601.js +1 -0
  39. package/dist/web/client/assets/manage-CsrV2hhK.js +1 -0
  40. package/dist/web/client/assets/mcp-8N0BqZ0G.js +1 -0
  41. package/dist/web/client/assets/message-square-DnpSOYv4.js +1 -0
  42. package/dist/web/client/assets/model-facts-DoB6QD5y.js +1 -0
  43. package/dist/web/client/assets/network-BC7rNaOC.js +1 -0
  44. package/dist/web/client/assets/parts-B0JBolvG.js +1 -0
  45. package/dist/web/client/assets/plus-DZ3KVo7E.js +1 -0
  46. package/dist/web/client/assets/routes-3HkZZOOe.js +76 -0
  47. package/dist/web/client/assets/skills-DiaqZRXT.js +1 -0
  48. package/dist/web/client/assets/square-terminal-hQZ6pexU.js +1 -0
  49. package/dist/web/client/assets/style-BtcFIkOS.js +7 -0
  50. package/dist/web/client/assets/styles-C7Ztw15K.css +2 -0
  51. package/dist/web/client/assets/system-YWlJ8ogO.js +1 -0
  52. package/dist/web/client/assets/teams-DQwceMvk.js +1 -0
  53. package/dist/web/client/assets/teams-DTC3plIH.js +1 -0
  54. package/dist/web/client/assets/telegram-D4wINntt.js +1 -0
  55. package/dist/web/client/assets/tools-CZeQ9pDx.js +1 -0
  56. package/dist/web/client/assets/use-resource-BaTkTGvG.js +1 -0
  57. package/dist/web/client/assets/welcome-CnxP_RCk.js +1 -0
  58. package/dist/web/client/assets/wrench-BrwBswfo.js +1 -0
  59. package/dist/web/server/assets/{AddProviderDialog-CR6TRYdZ.js → AddProviderDialog-Di5crZUB.js} +9 -205
  60. package/dist/web/server/assets/AgentTemplateParts-Cqy7kSzx.js +269 -0
  61. package/dist/web/server/assets/{ConfigPage-CIh3ohea.js → ConfigPage-oXM3wyOU.js} +2 -2
  62. package/dist/web/server/assets/{ConfirmDialog-B79K2KEW.js → ConfirmDialog-DfaJ--A6.js} +2 -2
  63. package/dist/web/server/assets/{ConnectionsView-BIMYdp9C.js → ConnectionsView-DZrLoNoW.js} +7 -7
  64. package/dist/web/server/assets/{Dialog-CVqpXxuN.js → Dialog-aup_yJv5.js} +1 -1
  65. package/dist/web/server/assets/ManagePage-0LKHEcT_.js +29 -0
  66. package/dist/web/server/assets/ModelMenu-BAZeARx6.js +138 -0
  67. package/dist/web/server/assets/{Rail-Cg-efcpA.js → Rail-7JU6ly2O.js} +17 -107
  68. package/dist/web/server/assets/{SectionTabs-DrcgVeZd.js → SectionTabs-CWQ5orUW.js} +12 -5
  69. package/dist/web/server/assets/SpawnDialog-CYkwzETs.js +124 -0
  70. package/dist/web/server/assets/SpawnTeamModal-CCe6P82H.js +127 -0
  71. package/dist/web/server/assets/TeamForm-BzQmdhVi.js +141 -0
  72. package/dist/web/server/assets/{TeamThread-5CjVPcDr.js → TeamThread-SyQpUvz5.js} +3 -3
  73. package/dist/web/server/assets/{UnsavedChangesGuard-CyF2Z9p1.js → UnsavedChangesGuard-DrOvPV14.js} +1 -1
  74. package/dist/web/server/assets/_id-AcyGvFrE.js +400 -0
  75. package/dist/web/server/assets/{_id-8bsYEcGg.js → _id-BGTgqsWm.js} +8 -4
  76. package/dist/web/server/assets/{_id-TVruGcOd.js → _id-BKzOw78O.js} +11 -3
  77. package/dist/web/server/assets/{_id-0fEWiVZX.js → _id-DPGzfmjG.js} +258 -206
  78. package/dist/web/server/assets/_id-DXm9W55C.js +16 -0
  79. package/dist/web/server/assets/_id-DojvxRZn.js +39 -0
  80. package/dist/web/server/assets/_tanstack-start-manifest_v-D7RvKGRH.js +285 -0
  81. package/dist/web/server/assets/{tokens-C-oDTqnp.js → access-BJe-NduL.js} +5 -5
  82. package/dist/web/server/assets/access-CKSW7MFH.js +297 -0
  83. package/dist/web/server/assets/{tokens-CEdl8puR.js → access-WWspT0v4.js} +5 -4
  84. package/dist/web/server/assets/agent-actions-CUDMCG0F.js +20 -0
  85. package/dist/web/server/assets/agents-1sjSvp5p.js +12 -0
  86. package/dist/web/server/assets/{agents-BnWgFo6o.js → agents-6d9WxbYF.js} +9 -6
  87. package/dist/web/server/assets/agents-DKVGUwD1.js +31 -0
  88. package/dist/web/server/assets/agents-DUI4Yjtg.js +13 -0
  89. package/dist/web/server/assets/agents-DsHeRaLq.js +327 -0
  90. package/dist/web/server/assets/agents-DtLDoZ_u.js +136 -0
  91. package/dist/web/server/assets/{attention-Cr7puThv.js → attention-B6sSDR_4.js} +2 -1
  92. package/dist/web/server/assets/{attention-CHQEQiZl.js → attention-DefKwvgm.js} +2 -2
  93. package/dist/web/server/assets/attention-johfkM0_.js +203 -0
  94. package/dist/web/server/assets/{config-DOp28gcy.js → config-Clz57LuN.js} +186 -87
  95. package/dist/web/server/assets/{config-DzgkbBoD.js → config-DYAaaE9Z.js} +2 -2
  96. package/dist/web/server/assets/{createSsrRpc-CcLbajrF.js → createSsrRpc-BijMHgqE.js} +2 -46
  97. package/dist/web/server/assets/form-BRQAsKKq.js +319 -0
  98. package/dist/web/server/assets/manage-Ppyi3Y5y.js +230 -0
  99. package/dist/web/server/assets/mcp-Ce6O8Qs2.js +378 -0
  100. package/dist/web/server/assets/{mcp-D3OCoHtO.js → mcp-DB38leWS.js} +2 -2
  101. package/dist/web/server/assets/model-facts-mrfrWQne.js +136 -0
  102. package/dist/web/server/assets/parts-mabERIJZ.js +380 -0
  103. package/dist/web/server/assets/{router-Cs2Ak4II.js → router-C97bwlXi.js} +55 -50
  104. package/dist/web/server/assets/{routes-BSNOKE-C.js → routes-C4aGqXfr.js} +65 -17
  105. package/dist/web/server/assets/{routes-CO4l-GJ0.js → routes-DuOShl4q.js} +2 -2
  106. package/dist/web/server/assets/{routes-BVwqgZGI.js → routes-IHMVKpDK.js} +3 -3
  107. package/dist/web/server/assets/{skills-CggQJk6a.js → skills-B7sg0QKS.js} +2 -2
  108. package/dist/web/server/assets/{skills-h5aHa7Q8.js → skills-DWzlT_hC.js} +9 -1
  109. package/dist/web/server/assets/skills-hfTSwqsG.js +353 -0
  110. package/dist/web/server/assets/{style-GYDODk2F.js → style-BR7ufS6Z.js} +1 -1
  111. package/dist/web/server/assets/system-CNQpt3JB.js +145 -0
  112. package/dist/web/server/assets/{system-DtswhLW62.js → system-D3th6n2E.js} +4 -2
  113. package/dist/web/server/assets/{system-DsJfpBPl.js → system-DaP0ol67.js} +2 -2
  114. package/dist/web/server/assets/{teams-B6lBhvdL.js → teams-4cEZ4_rw.js} +4 -2
  115. package/dist/web/server/assets/{teams-BxnvFTyn.js → teams-70u1XQTr.js} +1 -3
  116. package/dist/web/server/assets/teams-BKHe67f3.js +176 -0
  117. package/dist/web/server/assets/{teams-YrmyutM4.js → teams-BopOP4x7.js} +8 -1
  118. package/dist/web/server/assets/teams-C3xwTz8-.js +219 -0
  119. package/dist/web/server/assets/{teams-Bp2tERZe.js → teams-CuKE5iAK.js} +2 -2
  120. package/dist/web/server/assets/{telegram-D2RZriz_.js → telegram-BnQADwnj.js} +5 -5
  121. package/dist/web/server/assets/telegram-BpmK-HHV.js +1059 -0
  122. package/dist/web/server/assets/{telegram-Gy7_9yih.js → telegram-CGol0CKX.js} +3 -3
  123. package/dist/web/server/assets/tools-BQeWn7Tj.js +12 -0
  124. package/dist/web/server/assets/tools-C-wwWjLI.js +12 -0
  125. package/dist/web/server/assets/tools-CURTfG2q.js +341 -0
  126. package/dist/web/server/assets/{use-resource-ChQozXVI.js → use-resource-DVzK0toP.js} +1 -1
  127. package/dist/web/server/assets/utils-C_uf36nf.js +8 -0
  128. package/dist/web/server/assets/{welcome-BLw1G6SS.js → welcome-OiZCAIHZ.js} +5 -5
  129. package/dist/web/server/assets/{welcome-ByAkvHSP.js → welcome-SNsE49JO.js} +2 -2
  130. package/dist/web/server/assets/{workspace-DeEYMPDX.js → workspace-DaitCM0t.js} +1 -8
  131. package/dist/web/server/server.js +30 -30
  132. package/dist/worker.js +202 -120
  133. package/dist/worker.js.map +1 -1
  134. package/package.json +1 -1
  135. package/dist/web/client/assets/AddProviderDialog-Diic36c_.js +0 -1
  136. package/dist/web/client/assets/ConfigPage-pupvtSCX.js +0 -1
  137. package/dist/web/client/assets/ConfirmDialog-GFDcHI1L.js +0 -1
  138. package/dist/web/client/assets/ConnectionsView-y1CeY-6U.js +0 -1
  139. package/dist/web/client/assets/Dialog-bg86_x4v.js +0 -1
  140. package/dist/web/client/assets/FieldRow-B8eIni5r.js +0 -1
  141. package/dist/web/client/assets/ModelSelect-DvCLUmkW.js +0 -1
  142. package/dist/web/client/assets/SectionTabs-D4ezA6U4.js +0 -1
  143. package/dist/web/client/assets/Segmented-Dh77vmpp.js +0 -1
  144. package/dist/web/client/assets/SkillFindings-BzLO1lNA.js +0 -1
  145. package/dist/web/client/assets/SkillsPicker-hI3YXvib.js +0 -1
  146. package/dist/web/client/assets/SpawnDialog-YJX6UMBC.js +0 -1
  147. package/dist/web/client/assets/Tabs-f6bHvCGn.js +0 -1
  148. package/dist/web/client/assets/TeamForm-kda1HYZG.js +0 -1
  149. package/dist/web/client/assets/TeamThread-DFvbakHo.js +0 -1
  150. package/dist/web/client/assets/UnsavedChangesGuard-DBJikVgc.js +0 -1
  151. package/dist/web/client/assets/_id-BjNtLwak.js +0 -1
  152. package/dist/web/client/assets/_id-BklaQf3z.js +0 -1
  153. package/dist/web/client/assets/agents-D9cUF2d9.js +0 -1
  154. package/dist/web/client/assets/agents-wuBlzx4e.js +0 -1
  155. package/dist/web/client/assets/api-HC_YzjBy.js +0 -1
  156. package/dist/web/client/assets/arrow-right-Gm_FDWJ_.js +0 -1
  157. package/dist/web/client/assets/attention-8ZkSLl2e.js +0 -1
  158. package/dist/web/client/assets/check-BjgKoGvU.js +0 -1
  159. package/dist/web/client/assets/config-Con_BbSh.js +0 -1
  160. package/dist/web/client/assets/createLucideIcon-C6gOo8sD.js +0 -1
  161. package/dist/web/client/assets/index-Br9qkGM-.js +0 -54
  162. package/dist/web/client/assets/link-Cbztlp_R.js +0 -1
  163. package/dist/web/client/assets/login-llnOKSJc.js +0 -1
  164. package/dist/web/client/assets/mcp-zIUguMSI.js +0 -1
  165. package/dist/web/client/assets/plus-CWrKMtvA.js +0 -1
  166. package/dist/web/client/assets/routes-BY5uqJ2n.js +0 -76
  167. package/dist/web/client/assets/save-f9O-CQia.js +0 -1
  168. package/dist/web/client/assets/services-esLrcTwe.js +0 -1
  169. package/dist/web/client/assets/skills-DzYXksM0.js +0 -1
  170. package/dist/web/client/assets/style-Cdzqt_TJ.js +0 -7
  171. package/dist/web/client/assets/styles-BRSS6yrm.css +0 -2
  172. package/dist/web/client/assets/system-CsI66nyZ.js +0 -1
  173. package/dist/web/client/assets/teams-CHE_zpxS.js +0 -1
  174. package/dist/web/client/assets/teams-dxG9OESG.js +0 -1
  175. package/dist/web/client/assets/telegram-C3dGndJV.js +0 -1
  176. package/dist/web/client/assets/tokens-CNNH-Wr9.js +0 -1
  177. package/dist/web/client/assets/use-resource-BjnxgGvh.js +0 -1
  178. package/dist/web/client/assets/welcome-C8EOtc8P.js +0 -1
  179. package/dist/web/server/assets/FieldRow-CHVhX2rS.js +0 -173
  180. package/dist/web/server/assets/ModelSelect-DrZrdndo.js +0 -43
  181. package/dist/web/server/assets/SkillFindings-DSDiL6hn.js +0 -46
  182. package/dist/web/server/assets/SkillsPicker-DlqEfRWh.js +0 -67
  183. package/dist/web/server/assets/SpawnDialog-BUUlLxE9.js +0 -129
  184. package/dist/web/server/assets/Tabs-BhF41MfQ.js +0 -20
  185. package/dist/web/server/assets/TeamForm-CvQAs2FA.js +0 -96
  186. package/dist/web/server/assets/_id-BvAaRSUW.js +0 -18
  187. package/dist/web/server/assets/_id-Dg6M_qfr.js +0 -383
  188. package/dist/web/server/assets/_id-Dji7xr9C.js +0 -28
  189. package/dist/web/server/assets/_tanstack-start-manifest_v-sxiIH4M7.js +0 -214
  190. package/dist/web/server/assets/agents-BDA5yYZ2.js +0 -130
  191. package/dist/web/server/assets/agents-BTDxmp-F.js +0 -12
  192. package/dist/web/server/assets/agents-DM7guWF2.js +0 -14
  193. package/dist/web/server/assets/agents-DktqUffG.js +0 -327
  194. package/dist/web/server/assets/agents-xgZ9rsac.js +0 -27
  195. package/dist/web/server/assets/attention-De3-ehuf.js +0 -216
  196. package/dist/web/server/assets/mcp-CO_tycXU.js +0 -250
  197. package/dist/web/server/assets/services-DZLxUSG8.js +0 -13
  198. package/dist/web/server/assets/services-DsHRLL8q.js +0 -12
  199. package/dist/web/server/assets/services-DsvpaF3L.js +0 -74
  200. package/dist/web/server/assets/skills-DKYV7PTk.js +0 -275
  201. package/dist/web/server/assets/system-CZ2qzBz3.js +0 -138
  202. package/dist/web/server/assets/teams-B6PzNcoy.js +0 -88
  203. package/dist/web/server/assets/teams-C-8iz-uV.js +0 -108
  204. package/dist/web/server/assets/telegram-CXrP3hMp.js +0 -984
  205. package/dist/web/server/assets/tokens-DSLwQ1Pw.js +0 -232
@@ -0,0 +1,203 @@
1
+ import { C as api, T as errorMessage, u as Button } from "./workspace-DaitCM0t.js";
2
+ import { t as Segmented } from "./Segmented-3ZLdqa5U.js";
3
+ import { t as ago } from "./model-facts-mrfrWQne.js";
4
+ import { c as CardToolbar, d as Chip, g as Notice, h as ListRow, i as CardEmpty, o as CardList, r as CardBody, t as Banner, y as SetupCard } from "./parts-mabERIJZ.js";
5
+ import { r as FilterSelect } from "./form-BRQAsKKq.js";
6
+ import { a as attentionSource, m as severityLabel, o as attentionSummary, t as ATTENTION_KINDS } from "./manage-Ppyi3Y5y.js";
7
+ import { a as PageShell, i as PageHeader } from "./createSsrRpc-BijMHgqE.js";
8
+ import { t as Route } from "./attention-DefKwvgm.js";
9
+ import { useState } from "react";
10
+ import { Link } from "@tanstack/react-router";
11
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
+ import { BellRing } from "lucide-react";
13
+ //#region src/routes/attention/index.tsx?tsr-split=component
14
+ var LIST_PATH = "/api/attention?state=all&limit=200";
15
+ var SUMMARY_PATH = "/api/attention/summary";
16
+ function AttentionCenter() {
17
+ const initial = Route.useLoaderData();
18
+ const [list, setList] = useState(initial.list);
19
+ const [summary, setSummary] = useState(initial.summary);
20
+ const [now, setNow] = useState(initial.now);
21
+ const [state, setState] = useState("open");
22
+ const [kind, setKind] = useState("all");
23
+ const [severity, setSeverity] = useState("all");
24
+ const [busy, setBusy] = useState(null);
25
+ const [notice, setNotice] = useState(null);
26
+ const visible = list.items.filter((item) => (state === "all" || (state === "open" ? item.acknowledgedAt === null : item.acknowledgedAt !== null)) && (kind === "all" || item.kind === kind) && (severity === "all" || item.severity === severity));
27
+ const openCount = list.items.filter((item) => item.acknowledgedAt === null).length;
28
+ const acknowledgeable = list.items.filter((item) => item.acknowledgeable && item.acknowledgedAt === null).length;
29
+ const degraded = [...new Set([...list.degraded, ...summary.degraded].map((entry) => entry.kind))];
30
+ const line = attentionSummary(summary);
31
+ async function refresh() {
32
+ const [nextList, nextSummary] = await Promise.all([api(LIST_PATH), api(SUMMARY_PATH)]);
33
+ setList(nextList);
34
+ setSummary(nextSummary);
35
+ setNow(Date.now());
36
+ }
37
+ async function run(key, request) {
38
+ setBusy(key);
39
+ setNotice(null);
40
+ try {
41
+ const text = await request();
42
+ if (text) setNotice({
43
+ text,
44
+ failed: false
45
+ });
46
+ } catch (cause) {
47
+ setNotice({
48
+ text: errorMessage(cause),
49
+ failed: true
50
+ });
51
+ } finally {
52
+ await refresh().catch(() => {});
53
+ setBusy(null);
54
+ }
55
+ }
56
+ const acknowledge = (item, value) => run(item.key, async () => {
57
+ const path = `/api/attention/${encodeURIComponent(item.key)}`;
58
+ await api(value ? `${path}/acknowledge` : `${path}/acknowledgement`, { method: value ? "POST" : "DELETE" });
59
+ return null;
60
+ });
61
+ const acknowledgeAll = () => run("all", async () => {
62
+ const { acknowledged } = await api("/api/attention/acknowledge-all", { method: "POST" });
63
+ return `Acknowledged ${acknowledged === 1 ? "1 item" : `${acknowledged} items`}. Lesson proposals and paused queues stay open until they are dealt with.`;
64
+ });
65
+ return /* @__PURE__ */ jsxs(PageShell, { children: [
66
+ /* @__PURE__ */ jsx(PageHeader, {
67
+ title: "Attention",
68
+ description: "Decisions waiting for you and failures worth a look, from every Agent. Act on an item where it comes from; acknowledge the ones that only inform."
69
+ }),
70
+ /* @__PURE__ */ jsx(Banner, {
71
+ tone: line.tone,
72
+ lead: line.lead,
73
+ children: line.rest
74
+ }),
75
+ degraded.length > 0 && /* @__PURE__ */ jsxs(Banner, {
76
+ tone: "warning",
77
+ role: "alert",
78
+ lead: "Some items could not be loaded.",
79
+ children: [degraded.map((entry) => ATTENTION_KINDS[entry]).join(", "), " are missing from the list."]
80
+ }),
81
+ /* @__PURE__ */ jsxs(SetupCard, {
82
+ labelledBy: "attention-items",
83
+ icon: /* @__PURE__ */ jsx(BellRing, { className: "size-5" }),
84
+ title: "Items",
85
+ description: "Open items need you; history keeps the ones you acknowledged.",
86
+ action: acknowledgeable > 0 && /* @__PURE__ */ jsxs(Button, {
87
+ variant: "ghost",
88
+ disabled: busy !== null,
89
+ onClick: () => void acknowledgeAll(),
90
+ children: ["Acknowledge ", acknowledgeable === 1 ? "the informational one" : "informational ones"]
91
+ }),
92
+ children: [
93
+ /* @__PURE__ */ jsxs(CardToolbar, { children: [
94
+ /* @__PURE__ */ jsx(Segmented, {
95
+ label: "Which items",
96
+ value: state,
97
+ onChange: setState,
98
+ options: [
99
+ {
100
+ id: "open",
101
+ label: `Open ${openCount}`
102
+ },
103
+ {
104
+ id: "acknowledged",
105
+ label: "History"
106
+ },
107
+ {
108
+ id: "all",
109
+ label: "All"
110
+ }
111
+ ]
112
+ }),
113
+ /* @__PURE__ */ jsx(FilterSelect, {
114
+ label: "Kind",
115
+ value: kind,
116
+ onChange: setKind,
117
+ options: [{
118
+ value: "all",
119
+ label: "All kinds"
120
+ }, ...Object.entries(ATTENTION_KINDS).map(([value, label]) => ({
121
+ value,
122
+ label
123
+ }))]
124
+ }),
125
+ /* @__PURE__ */ jsx(FilterSelect, {
126
+ label: "Severity",
127
+ value: severity,
128
+ onChange: setSeverity,
129
+ options: [
130
+ {
131
+ value: "all",
132
+ label: "Any severity"
133
+ },
134
+ {
135
+ value: "action_required",
136
+ label: "Needs you"
137
+ },
138
+ {
139
+ value: "error",
140
+ label: "Errors"
141
+ },
142
+ {
143
+ value: "warning",
144
+ label: "Warnings"
145
+ }
146
+ ]
147
+ })
148
+ ] }),
149
+ notice && /* @__PURE__ */ jsx(CardBody, {
150
+ className: "py-3",
151
+ children: /* @__PURE__ */ jsx(Notice, {
152
+ tone: notice.failed ? "warning" : "success",
153
+ role: notice.failed ? "alert" : "status",
154
+ children: notice.text
155
+ })
156
+ }),
157
+ visible.length === 0 ? /* @__PURE__ */ jsx(CardEmpty, {
158
+ icon: /* @__PURE__ */ jsx(BellRing, { className: "size-5" }),
159
+ title: state === "open" && kind === "all" && severity === "all" ? "Nothing needs you" : "No item matches",
160
+ children: "Items come from learning reviews, schedules, follow-up queues and message loops."
161
+ }) : /* @__PURE__ */ jsx(CardList, { children: visible.map((item) => {
162
+ const label = severityLabel(item.severity);
163
+ const acknowledged = item.acknowledgedAt !== null;
164
+ return /* @__PURE__ */ jsx(ListRow, {
165
+ title: item.title,
166
+ chip: acknowledged ? /* @__PURE__ */ jsx(Chip, {
167
+ tone: "neutral",
168
+ children: "Acknowledged"
169
+ }) : /* @__PURE__ */ jsx(Chip, {
170
+ tone: label.tone,
171
+ children: label.label
172
+ }),
173
+ meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
174
+ /* @__PURE__ */ jsx("span", { children: ATTENTION_KINDS[item.kind] }),
175
+ /* @__PURE__ */ jsx("span", { children: attentionSource(item) }),
176
+ /* @__PURE__ */ jsx("time", {
177
+ dateTime: new Date(item.occurredAt).toISOString(),
178
+ title: new Date(item.occurredAt).toISOString().slice(0, 16).replace("T", " "),
179
+ children: ago(item.occurredAt, now)
180
+ })
181
+ ] }),
182
+ actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Link, {
183
+ to: item.href,
184
+ className: "ghost-btn no-underline",
185
+ children: item.kind === "lesson_proposal" ? "Review lesson" : "Open"
186
+ }), item.acknowledgeable && /* @__PURE__ */ jsx(Button, {
187
+ variant: "ghost",
188
+ disabled: busy !== null,
189
+ onClick: () => void acknowledge(item, !acknowledged),
190
+ children: acknowledged ? "Back to open" : "Acknowledge"
191
+ })] }),
192
+ children: /* @__PURE__ */ jsx("p", {
193
+ className: "m-0 text-sm text-muted-foreground",
194
+ children: item.diagnostic
195
+ })
196
+ }, item.key);
197
+ }) })
198
+ ]
199
+ })
200
+ ] });
201
+ }
202
+ //#endregion
203
+ export { AttentionCenter as component };
@@ -1,16 +1,17 @@
1
- import { E as errorMessage, d as Button, w as api } from "./workspace-DeEYMPDX.js";
2
- import { r as useResource } from "./use-resource-ChQozXVI.js";
3
- import { t as Dialog } from "./Dialog-CVqpXxuN.js";
4
- import { t as ConfirmDialog } from "./ConfirmDialog-B79K2KEW.js";
1
+ import { C as api, T as errorMessage, u as Button } from "./workspace-DaitCM0t.js";
2
+ import { r as useResource } from "./use-resource-DVzK0toP.js";
3
+ import { t as Dialog } from "./Dialog-aup_yJv5.js";
4
+ import { t as ConfirmDialog } from "./ConfirmDialog-DfaJ--A6.js";
5
5
  import { t as Segmented } from "./Segmented-3ZLdqa5U.js";
6
- import { t as Route } from "./config-DzgkbBoD.js";
7
- import { t as ConfigPage } from "./ConfigPage-CIh3ohea.js";
8
- import { S as usedByLine, _ as factsLine, b as priceLine, c as ModelRow, d as SetupCard, f as StateChip, g as credentialLine, h as ago, l as ProviderAvatar, m as Waiting, o as Chip, p as Switch, s as FailureBox, t as AddProviderDialog, u as SearchField, v as matchesModel, x as providerStatus, y as modelName } from "./AddProviderDialog-CR6TRYdZ.js";
9
- import { t as FieldRow } from "./FieldRow-CHVhX2rS.js";
10
- import { useMemo, useState } from "react";
6
+ import { d as providerStatus, f as usedByLine, i as factsLine, l as modelName, o as matchesModel, r as credentialLine, t as ago, u as priceLine } from "./model-facts-mrfrWQne.js";
7
+ import { b as Switch, d as Chip, n as CARD_ROW, t as Banner, v as SearchField, x as Waiting, y as SetupCard } from "./parts-mabERIJZ.js";
8
+ import { t as Route } from "./config-DYAaaE9Z.js";
9
+ import { t as ConfigPage } from "./ConfigPage-oXM3wyOU.js";
10
+ import { c as ProviderAvatar, l as StateChip, o as FailureBox, s as ModelRow, t as AddProviderDialog } from "./AddProviderDialog-Di5crZUB.js";
11
+ import { useId, useMemo, useState } from "react";
11
12
  import { useRouter } from "@tanstack/react-router";
12
13
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
- import { AlertTriangle, Check, ChevronRight, Images, MessageSquare, Plug, Plus, X } from "lucide-react";
14
+ import { Check, ChevronRight, Images, MessageSquare, Plug, Plus, X } from "lucide-react";
14
15
  //#region src/components/setup/ModelPicker.tsx
15
16
  var FILTERS = [
16
17
  {
@@ -236,7 +237,6 @@ function ModelPicker({ providers, chat, onClose, onSaved, onAddProvider }) {
236
237
  }
237
238
  //#endregion
238
239
  //#region src/components/setup/ModelsCards.tsx
239
- var ROW = "flex flex-wrap items-center gap-x-4 gap-y-1 border-t border-border px-4 sm:px-5";
240
240
  /** The line above the cards: whether everything Agents rely on answers, and what does not. */
241
241
  function StatusLine({ providers, chat, now, onOpen, onTestAll, testing }) {
242
242
  const on = providers.filter((provider) => provider.enabled);
@@ -248,89 +248,41 @@ function StatusLine({ providers, chat, now, onOpen, onTestAll, testing }) {
248
248
  children: broken.map((provider) => {
249
249
  const models = chat.filter((model) => model.provider === provider.id);
250
250
  const agents = models.reduce((sum, model) => sum + model.usedBy.agents, 0);
251
- return /* @__PURE__ */ jsxs("div", {
252
- role: "status",
253
- className: "flex flex-wrap items-center gap-3 rounded-2xl border border-warning/35 bg-warning/10 px-4 py-3 text-sm",
254
- children: [/* @__PURE__ */ jsxs("div", {
255
- className: "flex min-w-0 flex-1 basis-64 items-start gap-3",
256
- children: [/* @__PURE__ */ jsx(AlertTriangle, {
257
- className: "mt-0.5 size-5 shrink-0 text-warning",
258
- "aria-hidden": "true"
259
- }), /* @__PURE__ */ jsxs("div", {
260
- className: "min-w-0",
261
- children: [
262
- /* @__PURE__ */ jsxs("span", {
263
- className: "font-semibold text-foreground",
264
- children: [provider.check?.failure?.title ?? `${provider.displayName}: ${providerStatus(provider, now).label.toLowerCase()}`, "."]
265
- }),
266
- " ",
267
- /* @__PURE__ */ jsx("span", {
268
- className: "text-muted-foreground",
269
- children: models.length === 0 ? "No chat model runs on it." : `${models.length === 1 ? "1 chat model runs" : `${models.length} chat models run`} on it${agents === 0 ? "" : `, used by ${agents === 1 ? "1 Agent" : `${agents} Agents`}`}.`
270
- })
271
- ]
272
- })]
273
- }), /* @__PURE__ */ jsxs(Button, {
251
+ return /* @__PURE__ */ jsx(Banner, {
252
+ tone: "warning",
253
+ lead: /* @__PURE__ */ jsxs(Fragment$1, { children: [provider.check?.failure?.title ?? `${provider.displayName}: ${providerStatus(provider, now).label.toLowerCase()}`, "."] }),
254
+ action: /* @__PURE__ */ jsxs(Button, {
274
255
  variant: "ghost",
275
256
  onClick: () => onOpen(provider.id),
276
257
  children: ["Open ", provider.displayName]
277
- })]
258
+ }),
259
+ children: models.length === 0 ? "No chat model runs on it." : `${models.length === 1 ? "1 chat model runs" : `${models.length} chat models run`} on it${agents === 0 ? "" : `, used by ${agents === 1 ? "1 Agent" : `${agents} Agents`}`}.`
278
260
  }, provider.id);
279
261
  })
280
262
  });
281
- if (untested.length > 0) return /* @__PURE__ */ jsxs("div", {
282
- role: "status",
283
- className: "flex flex-wrap items-center gap-3 rounded-2xl border border-border bg-card px-4 py-3 text-sm shadow-baziu-sm",
284
- children: [/* @__PURE__ */ jsxs("div", {
285
- className: "min-w-0 flex-1 basis-72",
286
- children: [
287
- /* @__PURE__ */ jsx("span", {
288
- className: "font-semibold text-foreground",
289
- children: untested.length === 1 ? `${untested[0]?.displayName} has not been tested.` : `${untested.length} providers have not been tested.`
290
- }),
291
- " ",
292
- /* @__PURE__ */ jsx("span", {
293
- className: "text-muted-foreground",
294
- children: "A test sends one short message to the cheapest model of each."
295
- })
296
- ]
297
- }), /* @__PURE__ */ jsx(Button, {
263
+ if (untested.length > 0) return /* @__PURE__ */ jsx(Banner, {
264
+ tone: "neutral",
265
+ lead: untested.length === 1 ? `${untested[0]?.displayName} has not been tested.` : `${untested.length} providers have not been tested.`,
266
+ action: /* @__PURE__ */ jsx(Button, {
298
267
  variant: "ghost",
299
268
  disabled: testing,
300
269
  onClick: onTestAll,
301
270
  children: testing ? "Testing…" : untested.length === 1 ? "Test it" : "Test them"
302
- })]
271
+ }),
272
+ children: "A test sends one short message to the cheapest model of each."
303
273
  });
304
274
  const working = on.filter((provider) => provider.state === "working");
305
275
  if (working.length === 0) return null;
306
- return /* @__PURE__ */ jsxs("div", {
307
- role: "status",
308
- className: "flex flex-wrap items-center gap-3 rounded-2xl border border-success/30 bg-success/10 px-4 py-3 text-sm",
309
- children: [/* @__PURE__ */ jsxs("div", {
310
- className: "flex min-w-0 flex-1 basis-64 items-start gap-3",
311
- children: [/* @__PURE__ */ jsx(Check, {
312
- className: "mt-0.5 size-5 shrink-0 text-success",
313
- "aria-hidden": "true"
314
- }), /* @__PURE__ */ jsxs("div", {
315
- className: "min-w-0",
316
- children: [
317
- /* @__PURE__ */ jsx("span", {
318
- className: "font-semibold text-foreground",
319
- children: working.length === 1 ? "Your provider answers." : "Every provider answers."
320
- }),
321
- " ",
322
- /* @__PURE__ */ jsxs("span", {
323
- className: "text-muted-foreground",
324
- children: [chat.length === 1 ? "1 chat model" : `${chat.length} chat models`, " for your Agents."]
325
- })
326
- ]
327
- })]
328
- }), /* @__PURE__ */ jsx(Button, {
276
+ return /* @__PURE__ */ jsxs(Banner, {
277
+ tone: "success",
278
+ lead: working.length === 1 ? "Your provider answers." : "Every provider answers.",
279
+ action: /* @__PURE__ */ jsx(Button, {
329
280
  variant: "ghost",
330
281
  disabled: testing,
331
282
  onClick: onTestAll,
332
283
  children: testing ? "Testing…" : "Test again"
333
- })]
284
+ }),
285
+ children: [chat.length === 1 ? "1 chat model" : `${chat.length} chat models`, " for your Agents."]
334
286
  });
335
287
  }
336
288
  /** Chat: the models Agents think with, each with what it can do, its price and who uses it. */
@@ -367,7 +319,7 @@ function ChatModelsCard({ chat, hasProviders, onPick, onChanged }) {
367
319
  children: [
368
320
  chat.length > 0 && /* @__PURE__ */ jsxs("div", {
369
321
  "aria-hidden": "true",
370
- className: `${ROW} hidden bg-muted/50 py-2 text-[0.7rem] font-bold uppercase tracking-[0.08em] text-muted-foreground lg:flex`,
322
+ className: `flex flex-wrap items-center gap-x-4 gap-y-1 border-t border-border px-4 sm:px-5 hidden bg-muted/50 py-2 text-[0.7rem] font-bold uppercase tracking-[0.08em] text-muted-foreground lg:flex`,
371
323
  children: [
372
324
  /* @__PURE__ */ jsx("span", {
373
325
  className: "min-w-0 flex-[2.2] basis-52",
@@ -395,7 +347,7 @@ function ChatModelsCard({ chat, hasProviders, onPick, onChanged }) {
395
347
  chat.map((model) => {
396
348
  const down = model.providerState === "failing" || model.providerState === "incomplete";
397
349
  return /* @__PURE__ */ jsxs("div", {
398
- className: `${ROW} min-h-16 py-2.5`,
350
+ className: `${CARD_ROW} min-h-16 py-2.5`,
399
351
  children: [
400
352
  /* @__PURE__ */ jsxs("div", {
401
353
  className: "min-w-0 flex-[2.2] basis-52",
@@ -437,12 +389,12 @@ function ChatModelsCard({ chat, hasProviders, onPick, onChanged }) {
437
389
  }, model.value);
438
390
  }),
439
391
  chat.length === 0 && /* @__PURE__ */ jsx("div", {
440
- className: `${ROW} py-5 text-sm text-muted-foreground`,
392
+ className: `flex flex-wrap items-center gap-x-4 gap-y-1 border-t border-border px-4 sm:px-5 py-5 text-sm text-muted-foreground`,
441
393
  children: hasProviders ? "No chat model yet. Agents cannot answer until one is added." : "No chat model yet. Add a provider below, and its models appear here."
442
394
  }),
443
395
  error && /* @__PURE__ */ jsx("div", {
444
396
  role: "alert",
445
- className: `${ROW} py-3 text-sm text-danger`,
397
+ className: `flex flex-wrap items-center gap-x-4 gap-y-1 border-t border-border px-4 sm:px-5 py-3 text-sm text-danger`,
446
398
  children: error
447
399
  }),
448
400
  /* @__PURE__ */ jsx(ConfirmDialog, {
@@ -493,7 +445,7 @@ function ImagesCard({ images, onConnect, onChanged }) {
493
445
  }
494
446
  }
495
447
  const row = (id, body, ready, tail) => /* @__PURE__ */ jsxs("label", {
496
- className: `${ROW} m-0 min-h-[3.25rem] py-2 ${ready ? "cursor-pointer" : ""} ${shown === id ? "bg-accent/40" : ""}`,
448
+ className: `${CARD_ROW} m-0 min-h-[3.25rem] py-2 ${ready ? "cursor-pointer" : ""} ${shown === id ? "bg-accent/40" : ""}`,
497
449
  children: [
498
450
  /* @__PURE__ */ jsx("input", {
499
451
  type: "radio",
@@ -553,7 +505,7 @@ function ImagesCard({ images, onConnect, onChanged }) {
553
505
  })] }), true, null),
554
506
  images.selected !== "off" && !selected && /* @__PURE__ */ jsxs("div", {
555
507
  role: "alert",
556
- className: `${ROW} py-3 text-sm text-warning`,
508
+ className: `flex flex-wrap items-center gap-x-4 gap-y-1 border-t border-border px-4 sm:px-5 py-3 text-sm text-warning`,
557
509
  children: [
558
510
  "BAZILION_IMAGE_MODEL is set to “",
559
511
  images.selected,
@@ -562,7 +514,7 @@ function ImagesCard({ images, onConnect, onChanged }) {
562
514
  }),
563
515
  error && /* @__PURE__ */ jsx("div", {
564
516
  role: "alert",
565
- className: `${ROW} py-3 text-sm text-danger`,
517
+ className: `flex flex-wrap items-center gap-x-4 gap-y-1 border-t border-border px-4 sm:px-5 py-3 text-sm text-danger`,
566
518
  children: error
567
519
  })
568
520
  ]
@@ -592,7 +544,7 @@ function ProvidersCard({ providers, total, images, now, onOpen, onAdd }) {
592
544
  return /* @__PURE__ */ jsxs("button", {
593
545
  type: "button",
594
546
  onClick: () => onOpen(provider.id),
595
- className: `${ROW} min-h-[4.25rem] w-full py-3 text-left transition-colors hover:bg-accent/30`,
547
+ className: `${CARD_ROW} min-h-[4.25rem] w-full py-3 text-left transition-colors hover:bg-accent/30`,
596
548
  children: [
597
549
  /* @__PURE__ */ jsx(ProviderAvatar, {
598
550
  name: provider.displayName,
@@ -624,17 +576,164 @@ function ProvidersCard({ providers, total, images, now, onOpen, onAdd }) {
624
576
  }, provider.id);
625
577
  }),
626
578
  providers.length === 0 && /* @__PURE__ */ jsx("div", {
627
- className: `${ROW} py-5 text-sm text-muted-foreground`,
579
+ className: `flex flex-wrap items-center gap-x-4 gap-y-1 border-t border-border px-4 sm:px-5 py-5 text-sm text-muted-foreground`,
628
580
  children: "No provider yet. Add one to give your Agents a model."
629
581
  }),
630
582
  /* @__PURE__ */ jsxs("div", {
631
- className: `${ROW} bg-muted/50 py-3 text-[0.82rem] text-muted-foreground`,
583
+ className: `${CARD_ROW} bg-muted/50 py-3 text-[0.82rem] text-muted-foreground`,
632
584
  children: [total - providers.length, " more can be added: a ChatGPT plan, API keys from OpenAI, Anthropic, Google and many others, or a model server on this computer."]
633
585
  })
634
586
  ]
635
587
  });
636
588
  }
637
589
  //#endregion
590
+ //#region src/components/FieldRow.tsx
591
+ /** One provider setting, saved on its own (secrets are stored encrypted). */
592
+ function FieldRow({ field }) {
593
+ const router = useRouter();
594
+ const path = `/api/config/fields/${encodeURIComponent(field.envVar)}`;
595
+ const inputId = useId();
596
+ const descriptionId = `${inputId}-description`;
597
+ const [value, setValue] = useState(field.kind === "config" ? field.value ?? "" : "");
598
+ const [busy, setBusy] = useState(false);
599
+ const [err, setErr] = useState(null);
600
+ const [savedAt, setSavedAt] = useState(null);
601
+ const [confirmRemove, setConfirmRemove] = useState(false);
602
+ const secretBlank = field.kind === "secret" && value.trim().length === 0;
603
+ async function save(e) {
604
+ e.preventDefault();
605
+ if (secretBlank) {
606
+ setErr(field.set ? "Paste a replacement value, or use remove credential to explicitly clear the stored secret." : "A secret value is required.");
607
+ return;
608
+ }
609
+ setBusy(true);
610
+ setErr(null);
611
+ try {
612
+ await api(path, {
613
+ method: "PUT",
614
+ body: { value }
615
+ });
616
+ setSavedAt(Date.now());
617
+ if (field.kind === "secret") setValue("");
618
+ await router.invalidate();
619
+ } catch (e) {
620
+ setErr(errorMessage(e));
621
+ } finally {
622
+ setBusy(false);
623
+ }
624
+ }
625
+ async function removeSecret() {
626
+ await api(path, { method: "DELETE" });
627
+ setValue("");
628
+ setErr(null);
629
+ setSavedAt(Date.now());
630
+ await router.invalidate();
631
+ }
632
+ return /* @__PURE__ */ jsxs("form", {
633
+ onSubmit: save,
634
+ className: "grid grid-cols-1 gap-2 border-b py-3 last:border-0 md:grid-cols-[12rem_minmax(0,1fr)_auto_auto] md:items-center",
635
+ children: [
636
+ /* @__PURE__ */ jsxs("div", {
637
+ className: "min-w-0",
638
+ children: [
639
+ /* @__PURE__ */ jsx("label", {
640
+ htmlFor: inputId,
641
+ className: "text-sm font-medium text-foreground",
642
+ children: field.label
643
+ }),
644
+ field.description && /* @__PURE__ */ jsx("div", {
645
+ id: descriptionId,
646
+ className: "text-xs text-muted-foreground mt-0.5",
647
+ children: field.description
648
+ }),
649
+ /* @__PURE__ */ jsxs("details", {
650
+ className: "mt-1 text-xs text-muted-foreground",
651
+ children: [/* @__PURE__ */ jsx("summary", {
652
+ className: "cursor-pointer",
653
+ children: "Advanced identifier"
654
+ }), /* @__PURE__ */ jsx("code", {
655
+ className: "mt-1 inline-block break-all font-mono",
656
+ children: field.envVar
657
+ })]
658
+ })
659
+ ]
660
+ }),
661
+ /* @__PURE__ */ jsx("div", {
662
+ className: "min-w-0",
663
+ children: field.kind === "config" ? /* @__PURE__ */ jsx("input", {
664
+ id: inputId,
665
+ type: "text",
666
+ "aria-describedby": field.description ? descriptionId : void 0,
667
+ value,
668
+ onChange: (e) => setValue(e.target.value),
669
+ placeholder: field.placeholder ?? "",
670
+ className: "w-full rounded-md border bg-background px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring/30"
671
+ }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("input", {
672
+ id: inputId,
673
+ type: "password",
674
+ "aria-describedby": field.description ? descriptionId : void 0,
675
+ value,
676
+ onChange: (e) => setValue(e.target.value),
677
+ placeholder: field.set ? "(paste to replace stored value)" : field.placeholder ?? "paste key…",
678
+ autoComplete: "off",
679
+ className: "w-full rounded-md border bg-background px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring/30"
680
+ }), field.set && /* @__PURE__ */ jsx("p", {
681
+ className: "mt-1 text-xs text-muted-foreground",
682
+ children: "Blank keeps the current credential. Removal is a separate explicit action."
683
+ })] })
684
+ }),
685
+ /* @__PURE__ */ jsxs("span", {
686
+ className: "text-xs",
687
+ children: [field.kind === "secret" && field.set && /* @__PURE__ */ jsx("span", {
688
+ className: "rounded-full bg-success/10 text-success px-1.5 py-0.5",
689
+ title: `preview: ${field.preview ?? ""}`,
690
+ children: "set"
691
+ }), savedAt && Date.now() - savedAt < 2e3 && /* @__PURE__ */ jsx("span", {
692
+ role: "status",
693
+ className: "text-success ml-2",
694
+ children: "saved ✓"
695
+ })]
696
+ }),
697
+ /* @__PURE__ */ jsxs("div", {
698
+ className: "flex flex-wrap gap-2 md:justify-self-end",
699
+ children: [/* @__PURE__ */ jsx(Button, {
700
+ variant: "ghost",
701
+ type: "submit",
702
+ disabled: busy || secretBlank,
703
+ className: "text-xs",
704
+ children: "save"
705
+ }), field.kind === "secret" && field.set && /* @__PURE__ */ jsx(Button, {
706
+ variant: "danger",
707
+ className: "text-xs",
708
+ onClick: () => setConfirmRemove(true),
709
+ children: "remove"
710
+ })]
711
+ }),
712
+ err && /* @__PURE__ */ jsx("p", {
713
+ role: "alert",
714
+ className: "text-xs text-danger md:col-span-4",
715
+ children: err
716
+ }),
717
+ /* @__PURE__ */ jsx(ConfirmDialog, {
718
+ open: confirmRemove,
719
+ title: `Remove ${field.label}?`,
720
+ description: /* @__PURE__ */ jsxs("p", { children: [
721
+ "This permanently deletes the stored ",
722
+ /* @__PURE__ */ jsx("code", {
723
+ className: "font-mono",
724
+ children: field.envVar
725
+ }),
726
+ " ",
727
+ "credential. Features that use it will fail until you save a replacement."
728
+ ] }),
729
+ confirmLabel: "remove stored credential",
730
+ onConfirm: removeSecret,
731
+ onOpenChange: setConfirmRemove
732
+ })
733
+ ]
734
+ });
735
+ }
736
+ //#endregion
638
737
  //#region src/components/setup/ProviderSheet.tsx
639
738
  var HEADING = "m-0 font-body text-[0.72rem] font-bold uppercase tracking-[0.08em] text-muted-foreground";
640
739
  /**
@@ -1,8 +1,8 @@
1
1
  import { n as createServerFn } from "../server.js";
2
- import { t as createSsrRpc } from "./createSsrRpc-CcLbajrF.js";
2
+ import { t as createSsrRpc } from "./createSsrRpc-BijMHgqE.js";
3
3
  import { createFileRoute, lazyRouteComponent } from "@tanstack/react-router";
4
4
  //#region src/routes/config/index.tsx
5
- var $$splitComponentImporter = () => import("./config-DOp28gcy.js");
5
+ var $$splitComponentImporter = () => import("./config-Clz57LuN.js");
6
6
  var fetchModelsPage = createServerFn({ method: "GET" }).handler(createSsrRpc("71b6b12251ac92cf4ee888c1d2b6eba3beaac079f9c39eaed95fafcd15908731"));
7
7
  var Route = createFileRoute("/config/")({
8
8
  validateSearch: (search) => ({
@@ -1,5 +1,5 @@
1
1
  import { i as getServerFnById, r as TSS_SERVER_FUNCTION } from "../server.js";
2
- import { u as cn } from "./workspace-DeEYMPDX.js";
2
+ import { t as cn } from "./utils-C_uf36nf.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/components/Page.tsx
5
5
  var PAGE_SIZE_CLASS = {
@@ -65,30 +65,6 @@ function SectionCard({ title, description, actions, children, className, ...prop
65
65
  })]
66
66
  });
67
67
  }
68
- function EmptyState({ title, description, icon, actions, className, ...props }) {
69
- return /* @__PURE__ */ jsxs("div", {
70
- className: cn("flex min-h-40 flex-col items-center justify-center rounded-2xl border border-dashed border-border bg-muted/30 px-6 py-10 text-center", className),
71
- ...props,
72
- children: [
73
- icon && /* @__PURE__ */ jsx("div", {
74
- className: "mb-3 flex size-10 items-center justify-center rounded-full bg-accent text-accent-foreground",
75
- children: icon
76
- }),
77
- /* @__PURE__ */ jsx("h2", {
78
- className: "m-0 font-body text-base font-semibold text-foreground",
79
- children: title
80
- }),
81
- description && /* @__PURE__ */ jsx("div", {
82
- className: "mt-1 max-w-lg text-sm leading-6 text-muted-foreground",
83
- children: description
84
- }),
85
- actions && /* @__PURE__ */ jsx("div", {
86
- className: "mt-4 flex flex-wrap items-center justify-center gap-2",
87
- children: actions
88
- })
89
- ]
90
- });
91
- }
92
68
  var STATUS_BADGE_CLASS = {
93
69
  neutral: "border-border bg-muted text-muted-foreground",
94
70
  info: "border-primary/20 bg-accent text-accent-foreground",
@@ -131,26 +107,6 @@ function ItemRow({ title, meta, actions, children, className }) {
131
107
  })]
132
108
  });
133
109
  }
134
- /** A labelled number tile. */
135
- function Stat({ label, value, detail }) {
136
- return /* @__PURE__ */ jsxs("div", {
137
- className: "min-w-0 rounded-2xl border border-border bg-card p-4 shadow-baziu-sm",
138
- children: [
139
- /* @__PURE__ */ jsx("div", {
140
- className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground",
141
- children: label
142
- }),
143
- /* @__PURE__ */ jsx("div", {
144
- className: "mt-1 text-2xl font-semibold text-foreground",
145
- children: value
146
- }),
147
- detail && /* @__PURE__ */ jsx("div", {
148
- className: "mt-0.5 text-xs leading-5 text-muted-foreground",
149
- children: detail
150
- })
151
- ]
152
- });
153
- }
154
110
  //#endregion
155
111
  //#region ../../node_modules/.pnpm/@tanstack+start-server-core@1.169.17/node_modules/@tanstack/start-server-core/dist/esm/createSsrRpc.js
156
112
  var createSsrRpc = (functionId) => {
@@ -166,4 +122,4 @@ var createSsrRpc = (functionId) => {
166
122
  });
167
123
  };
168
124
  //#endregion
169
- export { PageHeader as a, Stat as c, ItemRow as i, StatusBadge as l, EmptyState as n, PageShell as o, ItemList as r, SectionCard as s, createSsrRpc as t };
125
+ export { PageShell as a, PageHeader as i, ItemList as n, SectionCard as o, ItemRow as r, StatusBadge as s, createSsrRpc as t };