@qredence/fleet 0.8.0 → 0.10.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 (165) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/dist/web/client/assets/DialogTitle-BlVq-tcv.js +1 -0
  3. package/dist/web/client/assets/FloatingPortal-D8-EPDs2.js +1 -0
  4. package/dist/web/client/assets/activity-BPIKUzOU.js +1 -0
  5. package/dist/web/client/assets/agents-BMQXA18L.js +2 -0
  6. package/dist/web/client/assets/agents-page-D2soW46O.js +1 -0
  7. package/dist/web/client/assets/alert-CzWGeumf.js +1 -0
  8. package/dist/web/client/assets/alert-dialog-D-e1Pr4q.js +1 -0
  9. package/dist/web/client/assets/artifacts-panel-6JEdy6jU.js +1 -0
  10. package/dist/web/client/assets/badge-CzQFgmVK.js +1 -0
  11. package/dist/web/client/assets/chat-command-palette-Bxr5EkO6.js +1 -0
  12. package/dist/web/client/assets/chat-hpzV6IA6.js +57 -0
  13. package/dist/web/client/assets/chat-queries-ty76G6rK.js +3 -0
  14. package/dist/web/client/assets/clock-3-BwWCSCm_.js +1 -0
  15. package/dist/web/client/assets/{command-imgUMV3r.js → command-xo-NK4xO.js} +1 -1
  16. package/dist/web/client/assets/connectors-E4KW6hBL.js +2 -0
  17. package/dist/web/client/assets/connectors-page-CDzzjCIJ.js +1 -0
  18. package/dist/web/client/assets/create-project-dialog-Db-WhUmP.js +1 -0
  19. package/dist/web/client/assets/dialog-CK8dym6z.js +1 -0
  20. package/dist/web/client/assets/{fork-picker-dialog-Cgi48NnT.js → fork-picker-dialog-DSaFeUii.js} +1 -1
  21. package/dist/web/client/assets/globals-DDDleTbS.css +2 -0
  22. package/dist/web/client/assets/index-Cf8tRpHL.js +13 -0
  23. package/dist/web/client/assets/{input-7g8_nw-Z.js → input-CBoTMPC_.js} +1 -1
  24. package/dist/web/client/assets/{input-group-Nq03Qums.js → input-group-BFubAtz9.js} +1 -1
  25. package/dist/web/client/assets/mcp-connections-section-BsNhp1b2.js +2 -0
  26. package/dist/web/client/assets/message-queue-Btjt9wK2.js +1 -0
  27. package/dist/web/client/assets/{model-selector-list-Cp687pdm.js → model-selector-list-CbDAT0Rw.js} +1 -1
  28. package/dist/web/client/assets/mutation-Da9zdeWr.js +1 -0
  29. package/dist/web/client/assets/notify-BIL0-CGy.js +1 -0
  30. package/dist/web/client/assets/open-panel-action-message-SdA1VU42.js +1 -0
  31. package/dist/web/client/assets/openui-renderer-DG-iML7M.js +291 -0
  32. package/dist/web/client/assets/pencil-Cbgq3ybX.js +1 -0
  33. package/dist/web/client/assets/plus-DUP2JPVG.js +1 -0
  34. package/dist/web/client/assets/product-page-header-Ck6I13CE.js +1 -0
  35. package/dist/web/client/assets/provider-catalog-CLEDlH_v.js +1 -0
  36. package/dist/web/client/assets/provider-label-BItazQ6H.js +1 -0
  37. package/dist/web/client/assets/right-panel-context-CjX-HkDO.js +1 -0
  38. package/dist/web/client/assets/right-panel-registry-BAJ6TuEY.js +2 -0
  39. package/dist/web/client/assets/rotate-ccw-DLkfsmG9.js +1 -0
  40. package/dist/web/client/assets/routes--tnF7d6H.js +14 -0
  41. package/dist/web/client/assets/select-DYh951qi.js +1 -0
  42. package/dist/web/client/assets/{session-activity-panel-Bc4-HSfb.js → session-activity-panel-DwaXiSrS.js} +1 -1
  43. package/dist/web/client/assets/{session-insights-panel-D0v_DKcb.js → session-insights-panel-BXEmuJKf.js} +1 -1
  44. package/dist/web/client/assets/{session-tool-renderer-C7mYeUOs.js → session-tool-renderer-DEABxZG3.js} +25 -25
  45. package/dist/web/client/assets/{session-tree-panel-By9m9tGB.js → session-tree-panel-5QgMvXoX.js} +1 -1
  46. package/dist/web/client/assets/settings-dialog-BomLOETY.js +3 -0
  47. package/dist/web/client/assets/sparkles-CASAe1AI.js +1 -0
  48. package/dist/web/client/assets/{subagent-chat-panel-DsPmLZSf.js → subagent-chat-panel-R2RoX1Yt.js} +1 -1
  49. package/dist/web/client/assets/subagent-transcript-DVZhMo7a.js +1 -0
  50. package/dist/web/client/assets/{subagents-panel-gQ9BLfV3.js → subagents-panel-CMMRUP8F.js} +1 -1
  51. package/dist/web/client/assets/switch-BrxDfsX6.js +1 -0
  52. package/dist/web/client/assets/toast-BNWkgZ0u.js +1 -0
  53. package/dist/web/client/assets/{tool-output-normalizer-CADgEiI4.js → tool-output-normalizer-DDU09Zc6.js} +1 -1
  54. package/dist/web/client/assets/tool-part-normalizer-CF6bmJ0s.js +4 -0
  55. package/dist/web/client/assets/tool-result-7qREIVv_.js +5 -0
  56. package/dist/web/client/assets/tool-timeline-CGhwMeNl.js +2 -0
  57. package/dist/web/client/assets/trash-sm2UyOxe.js +1 -0
  58. package/dist/web/client/assets/types-gIgIxnnG.js +1 -0
  59. package/dist/web/client/assets/useNavigate-CVhM7pag.js +1 -0
  60. package/dist/web/client/assets/useRender-CzJUrRlB.js +1 -0
  61. package/dist/web/client/assets/useScrollLock-BcsteNzT.js +1 -0
  62. package/dist/web/client/assets/with-selector-B_VDO56x.js +1 -0
  63. package/dist/web/client/bundle-budget.json +6 -6
  64. package/dist/web/server/{_tanstack-start-manifest_v-BiNPG4xt-BZTMSM2I.js → _tanstack-start-manifest_v-Io433TLr-YWPNQWQI.js} +44 -23
  65. package/dist/web/server/agents-DOgCHixY-KUZP2VDO.js +22 -0
  66. package/dist/web/server/agents-page-BdiR9H8w-M6X6SXMF.js +215 -0
  67. package/dist/web/server/{artifacts-panel-CqGBNU4q-UHNMC7PK.js → artifacts-panel-cYqS54cM-K6SF3K6W.js} +27 -17
  68. package/dist/web/server/{chat-command-palette-B94-zIEz-ES2ZB4ZF.js → chat-command-palette-BDnwcymZ-DSTFIAOD.js} +22 -13
  69. package/dist/web/server/chunk-2ETDIMNM.js +40 -0
  70. package/dist/web/server/{chunk-K67IDUAI.js → chunk-2OC2FKHR.js} +42 -32
  71. package/dist/web/server/{chunk-2VKVSL6Y.js → chunk-35RIM6VP.js} +128 -127
  72. package/dist/web/server/{chunk-5GUEYYYO.js → chunk-37EK2TYH.js} +4591 -13688
  73. package/dist/web/server/chunk-5MOXRFX6.js +826 -0
  74. package/dist/web/server/chunk-6GYLXDX3.js +588 -0
  75. package/dist/web/server/chunk-7DQQMT5V.js +8993 -0
  76. package/dist/web/server/chunk-APOS34PW.js +8965 -0
  77. package/dist/web/server/{chunk-YQO36OP6.js → chunk-AXN2OBPF.js} +2 -4
  78. package/dist/web/server/chunk-BD7YKYWL.js +1007 -0
  79. package/dist/web/server/chunk-BLGKLQJG.js +432 -0
  80. package/dist/web/server/{chunk-BAHZXA4D.js → chunk-BZ2EAUZZ.js} +10 -12
  81. package/dist/web/server/chunk-C5XHGLET.js +193 -0
  82. package/dist/web/server/chunk-CE7U5QB2.js +42 -0
  83. package/dist/web/server/{chunk-E6T36NM5.js → chunk-FI3UF2GW.js} +36 -353
  84. package/dist/web/server/{chunk-LTTBT3J7.js → chunk-FNV3WZXL.js} +5 -9
  85. package/dist/web/server/{chunk-2FHYWKDN.js → chunk-FSQWWR2M.js} +46 -16
  86. package/dist/web/server/chunk-FT7HNDR5.js +143 -0
  87. package/dist/web/server/chunk-GNXIDE26.js +44 -0
  88. package/dist/web/server/{chunk-EAKPTSWR.js → chunk-HAFELESQ.js} +5 -7
  89. package/dist/web/server/{chunk-WSK55TKE.js → chunk-KBMRRJQN.js} +96 -10
  90. package/dist/web/server/chunk-KSGGSGOA.js +50 -0
  91. package/dist/web/server/{chunk-SGAQVAYL.js → chunk-NSFKPEFI.js} +2 -2
  92. package/dist/web/server/chunk-NZCEQWK2.js +6891 -0
  93. package/dist/web/server/chunk-OO7NBFQQ.js +15 -0
  94. package/dist/web/server/{chunk-EL2JCDAM.js → chunk-PQVTLG3E.js} +9 -9
  95. package/dist/web/server/{chunk-LQM6QR7S.js → chunk-Q4ECIATK.js} +61 -47
  96. package/dist/web/server/chunk-QOZCYKMA.js +769 -0
  97. package/dist/web/server/{chunk-CZLGB3NE.js → chunk-R4BS3KYI.js} +2 -4
  98. package/dist/web/server/{chunk-FB2QLQTN.js → chunk-RHJEOG37.js} +12 -13
  99. package/dist/web/server/chunk-RX2ZJARF.js +73 -0
  100. package/dist/web/server/chunk-TXZDDJCT.js +5115 -0
  101. package/dist/web/server/{chunk-OAYEN3JV.js → chunk-VDEUVEWL.js} +2253 -1
  102. package/dist/web/server/{chunk-ABMGW6QH.js → chunk-W2GI7NRX.js} +16140 -15708
  103. package/dist/web/server/{chunk-SI5IQSG4.js → chunk-W7GGECTL.js} +8 -7
  104. package/dist/web/server/connectors-Dv_uPdv0-2X5VWQXK.js +22 -0
  105. package/dist/web/server/connectors-page-DW75T-uH-EKRHUZ6K.js +66 -0
  106. package/dist/web/server/{create-project-dialog-CFPX6Ihl-EO4XTINS.js → create-project-dialog-BS5Sva46-BO4RLW2Q.js} +25 -14
  107. package/dist/web/server/{fork-picker-dialog-B2RBFzoZ-R6GXPSPL.js → fork-picker-dialog-DFpKOdAw-JPLJSYYU.js} +7 -10
  108. package/dist/web/server/{markdown-BvCfOB26-VDH4YOQD.js → markdown-Cc8V9dOF-JTNTJKQU.js} +5 -6
  109. package/dist/web/server/{markdown-code-SYc-BQvp-MR4FXT5C.js → markdown-code-gaRnbgNM-V5LIRYCD.js} +7 -8
  110. package/dist/web/server/{message-queue-D32rLiJo-HEBRGH5B.js → message-queue-nQ2_kU82-KKSLYR4S.js} +7 -14
  111. package/dist/web/server/{model-selector-list-DKzt_xEN-5ZPU6XDY.js → model-selector-list-By_G7_Hr-GXT27BZO.js} +12 -14
  112. package/dist/web/server/{openui-renderer-CeVtOdYl-PY37PCJI.js → openui-renderer-Q31y65CQ-QNVSP4NN.js} +20 -13
  113. package/dist/web/server/{prompt-suggestions-CpTK_fHV-Q4ILLZKC.js → prompt-suggestions-B67Uy5Rk-5SMTSIFQ.js} +5 -4
  114. package/dist/web/server/{repl-panel-1kSS1UGd-DDM5ADGZ.js → repl-panel-1kSS1UGd-POXRYDDJ.js} +2 -3
  115. package/dist/web/server/{resources-panel-S4NHlpz7-NF7WYYSR.js → resources-panel-CH8sG0Od-4BZN6SLY.js} +18 -10
  116. package/dist/web/server/router-8EzTM9Eq-COVGJKKX.js +23 -0
  117. package/dist/web/server/routes-88H0fiN3-WIAZJ3RT.js +124 -0
  118. package/dist/web/server/server.js +3 -3
  119. package/dist/web/server/{session-activity-panel-Bz2GrdMk-PCOXG46X.js → session-activity-panel-CgSOde03-B5RCAGB4.js} +18 -10
  120. package/dist/web/server/{session-insights-panel-CfMX2NRu-6HWZTTAC.js → session-insights-panel-BiVObm_6-AP4FITT7.js} +2 -12
  121. package/dist/web/server/{session-reasoning-panel-CpiTdyQz-O3B5CDKS.js → session-reasoning-panel-Dmny6YTk-D3HQV2YB.js} +17 -9
  122. package/dist/web/server/session-tool-renderer-BrnTO2w3-V6EE6AB2.js +34 -0
  123. package/dist/web/server/{session-tree-panel-CzkE0RFB-P4KWA7S2.js → session-tree-panel-BEqR_cAJ-TZS7VRCB.js} +18 -11
  124. package/dist/web/server/{settings-dialog-BUgVNpr1-THSYIOZL.js → settings-dialog-DkesVBrS-BAAA3YNU.js} +238 -847
  125. package/dist/web/server/{subagent-chat-panel-mw3kEFfK-CDYX7LST.js → subagent-chat-panel-Bfmt1bCE-DKDVH3NJ.js} +23 -15
  126. package/dist/web/server/{subagents-panel-2ZJfYrXG-NDJKHJHD.js → subagents-panel-ChJDDvad-GNCHDTPB.js} +24 -17
  127. package/dist/web/server/{workspace-panel-xznrPDLt-QCJRZOF3.js → workspace-panel-Cij_JylD-WPYSV5FA.js} +23 -15
  128. package/package.json +1 -1
  129. package/dist/web/client/assets/DialogTitle-RY2UDuCY.js +0 -1
  130. package/dist/web/client/assets/FloatingPortal-XC0MCNnD.js +0 -1
  131. package/dist/web/client/assets/action-swap-BWRUNKQA.js +0 -1
  132. package/dist/web/client/assets/alert-dialog-DGNvg0B1.js +0 -1
  133. package/dist/web/client/assets/artifacts-panel-BGXpKRJ7.js +0 -1
  134. package/dist/web/client/assets/badge-DM06QVqB.js +0 -57
  135. package/dist/web/client/assets/chat-command-palette-PenyaZBw.js +0 -1
  136. package/dist/web/client/assets/create-project-dialog-C00d5yCq.js +0 -1
  137. package/dist/web/client/assets/dialog-zCNOQI63.js +0 -1
  138. package/dist/web/client/assets/globals-BuMuB_ea.css +0 -2
  139. package/dist/web/client/assets/index-BqBdQGWs.js +0 -13
  140. package/dist/web/client/assets/message-queue-sSljtjYz.js +0 -1
  141. package/dist/web/client/assets/mutation-DOi2Qgfa.js +0 -1
  142. package/dist/web/client/assets/notify-Cqdu6EV8.js +0 -1
  143. package/dist/web/client/assets/openui-renderer-BdYTcn-_.js +0 -291
  144. package/dist/web/client/assets/provider-label-QrVOwKBO.js +0 -1
  145. package/dist/web/client/assets/right-panel-context-DHKWoetk.js +0 -1
  146. package/dist/web/client/assets/right-panel-registry-BaLZiKny.js +0 -2
  147. package/dist/web/client/assets/routes-BkFkhfO3.js +0 -16
  148. package/dist/web/client/assets/select-BhV4ikeN.js +0 -1
  149. package/dist/web/client/assets/settings-dialog-Dpt4Ha_m.js +0 -2
  150. package/dist/web/client/assets/sparkles-BwVa9zQJ.js +0 -1
  151. package/dist/web/client/assets/subagent-transcript-CNQ9wGk2.js +0 -1
  152. package/dist/web/client/assets/switch-C7Myu-Dt.js +0 -1
  153. package/dist/web/client/assets/toast-DlbKi6K-.js +0 -1
  154. package/dist/web/client/assets/tool-part-normalizer-CYK62WZM.js +0 -4
  155. package/dist/web/client/assets/tool-result-bjAGZ2qm.js +0 -5
  156. package/dist/web/client/assets/tool-timeline-eNqH1zj7.js +0 -2
  157. package/dist/web/client/assets/types-D5hZ8IyV.js +0 -1
  158. package/dist/web/client/assets/useRender-Bbk_fl72.js +0 -1
  159. package/dist/web/server/chunk-2PAW6K4Q.js +0 -56
  160. package/dist/web/server/chunk-7L5PCCYR.js +0 -2287
  161. package/dist/web/server/chunk-FB3UHLLN.js +0 -49
  162. package/dist/web/server/chunk-OSPDNT7S.js +0 -25404
  163. package/dist/web/server/router-DVKxZik_-254GZAJW.js +0 -30
  164. package/dist/web/server/routes-BTxAklRp-UM7ZTLLP.js +0 -140
  165. package/dist/web/server/session-tool-renderer-BZiOxtt1-T3ZGAQKX.js +0 -26
@@ -0,0 +1,432 @@
1
+ import {
2
+ Spinner
3
+ } from "./chunk-AXN2OBPF.js";
4
+ import {
5
+ Field,
6
+ FieldDescription,
7
+ FieldLabel,
8
+ Switch$1
9
+ } from "./chunk-Q4ECIATK.js";
10
+ import {
11
+ Alert,
12
+ AlertDescription
13
+ } from "./chunk-GNXIDE26.js";
14
+ import {
15
+ COMPACT_ACTION_BUTTON_CLASS,
16
+ Input$1,
17
+ Select$1,
18
+ notify,
19
+ rowSurface
20
+ } from "./chunk-TXZDDJCT.js";
21
+ import {
22
+ Button$1
23
+ } from "./chunk-FSQWWR2M.js";
24
+ import {
25
+ LoaderCircle,
26
+ Plug,
27
+ Plus,
28
+ RotateCcw,
29
+ Save,
30
+ Trash,
31
+ cn
32
+ } from "./chunk-VDEUVEWL.js";
33
+
34
+ // web/app/dist/server/assets/mcp-connections-section-BSzomlDa.js
35
+ import { useState } from "react";
36
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
37
+ function RowSurface({ className, interactive, padding, tone, ...props }) {
38
+ return /* @__PURE__ */ jsx("div", {
39
+ className: cn(rowSurface({
40
+ interactive,
41
+ padding,
42
+ tone
43
+ }), className),
44
+ ...props
45
+ });
46
+ }
47
+ function ItemRow({ icon, title, subtitle, trailing, className, interactive = true, tone = "default", truncateSubtitle = true, truncateTitle = true }) {
48
+ return /* @__PURE__ */ jsxs(RowSurface, {
49
+ tone,
50
+ padding: "md",
51
+ interactive,
52
+ className: cn("items-center gap-3", className),
53
+ children: [
54
+ icon ? /* @__PURE__ */ jsx("div", {
55
+ className: "flex size-8 shrink-0 items-center justify-center rounded-md border border-border/40 bg-background/60 text-foreground/70",
56
+ children: icon
57
+ }) : null,
58
+ /* @__PURE__ */ jsxs("div", {
59
+ className: "min-w-0 flex-1",
60
+ children: [/* @__PURE__ */ jsx("div", {
61
+ className: cn("text-sm font-medium text-foreground", truncateTitle && "truncate"),
62
+ children: title
63
+ }), subtitle ? /* @__PURE__ */ jsx("div", {
64
+ className: cn("mt-0.5 text-xs text-muted-foreground", truncateSubtitle ? "truncate" : "leading-normal"),
65
+ children: subtitle
66
+ }) : null]
67
+ }),
68
+ trailing ? /* @__PURE__ */ jsx("div", {
69
+ className: "flex shrink-0 items-center gap-1.5",
70
+ children: trailing
71
+ }) : null
72
+ ]
73
+ });
74
+ }
75
+ function SettingsPane({ actions, children, description, title }) {
76
+ return /* @__PURE__ */ jsxs("div", {
77
+ className: "flex min-w-0 max-w-full flex-col gap-4 [overflow-wrap:anywhere]",
78
+ children: [/* @__PURE__ */ jsxs("div", {
79
+ className: "flex items-start justify-between gap-3",
80
+ children: [/* @__PURE__ */ jsxs("div", {
81
+ className: "min-w-0 flex-1",
82
+ children: [/* @__PURE__ */ jsx("h3", {
83
+ className: "text-lg font-medium text-balance",
84
+ children: title
85
+ }), /* @__PURE__ */ jsx("p", {
86
+ className: "mt-1 text-sm text-pretty text-muted-foreground",
87
+ children: description
88
+ })]
89
+ }), actions ? /* @__PURE__ */ jsx("div", {
90
+ className: "flex shrink-0 items-center gap-1.5 pt-0.5",
91
+ children: actions
92
+ }) : null]
93
+ }), /* @__PURE__ */ jsx("div", {
94
+ className: "flex flex-col gap-3",
95
+ children
96
+ })]
97
+ });
98
+ }
99
+ function SettingsCommitActions({ dirty, disabled, onRevert, onSave, saving }) {
100
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [dirty ? /* @__PURE__ */ jsx(Button$1, {
101
+ type: "button",
102
+ variant: "ghost",
103
+ size: "icon-compact",
104
+ className: "text-muted-foreground transition-transform active:scale-[0.96]",
105
+ disabled: disabled || saving,
106
+ onClick: onRevert,
107
+ "aria-label": "Revert changes",
108
+ children: /* @__PURE__ */ jsx(RotateCcw, {})
109
+ }) : null, /* @__PURE__ */ jsxs(Button$1, {
110
+ type: "button",
111
+ variant: "outline",
112
+ size: "compact",
113
+ className: cn(COMPACT_ACTION_BUTTON_CLASS, "transition-transform active:scale-[0.96]", dirty && "border-primary/30 text-primary"),
114
+ disabled: !dirty || disabled || saving,
115
+ onClick: onSave,
116
+ children: [saving ? /* @__PURE__ */ jsx(LoaderCircle, {
117
+ className: "animate-spin",
118
+ "data-icon": "inline-start"
119
+ }) : /* @__PURE__ */ jsx(Save, { "data-icon": "inline-start" }), "Commit"]
120
+ })] });
121
+ }
122
+ function Textarea({ className, ...props }) {
123
+ return /* @__PURE__ */ jsx("textarea", {
124
+ "data-slot": "textarea",
125
+ className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
126
+ ...props
127
+ });
128
+ }
129
+ function statusLabel(connection) {
130
+ switch (connection.status) {
131
+ case "connected":
132
+ return "Connected";
133
+ case "anonymous":
134
+ return "Available without sign-in";
135
+ case "needs_auth":
136
+ return "Sign-in required";
137
+ case "disabled":
138
+ return "Disabled";
139
+ default:
140
+ return connection.status;
141
+ }
142
+ }
143
+ function connectionSubtitle(connection) {
144
+ const details = connection.transport === "http" ? connection.url : connection.commandPreview;
145
+ return [
146
+ connection.source === "builtin" ? "Built-in" : "User",
147
+ connection.transport === "http" ? "HTTP" : "stdio",
148
+ statusLabel(connection),
149
+ details
150
+ ].filter((part) => Boolean(part)).join(" \xB7 ");
151
+ }
152
+ function McpConnectionsSection({ connections, description = "Connect built-in and user MCP servers. Tokens stay on the server; this list only shows status and environment-variable names.", isLoading, isPending, onOAuth, onRemove, onUpsert, title = "MCP" }) {
153
+ const [adding, setAdding] = useState(false);
154
+ const [transport, setTransport] = useState("http");
155
+ const [name, setName] = useState("");
156
+ const [url, setUrl] = useState("");
157
+ const [oauth, setOauth] = useState(true);
158
+ const [bearerTokenEnvVar, setBearerTokenEnvVar] = useState("");
159
+ const [command, setCommand] = useState("");
160
+ const [args, setArgs] = useState("");
161
+ const [cwd, setCwd] = useState("");
162
+ const [envLines, setEnvLines] = useState("");
163
+ const [confirmRemove, setConfirmRemove] = useState(null);
164
+ const resetAddForm = () => {
165
+ setName("");
166
+ setUrl("");
167
+ setOauth(true);
168
+ setBearerTokenEnvVar("");
169
+ setCommand("");
170
+ setArgs("");
171
+ setCwd("");
172
+ setEnvLines("");
173
+ setTransport("http");
174
+ setAdding(false);
175
+ };
176
+ const handleAdd = async () => {
177
+ if (!onUpsert) return;
178
+ const trimmedName = name.trim();
179
+ try {
180
+ if (transport === "http") await onUpsert({
181
+ name: trimmedName,
182
+ transport: "http",
183
+ url: url.trim(),
184
+ ...!oauth && bearerTokenEnvVar.trim() ? { bearerTokenEnvVar: bearerTokenEnvVar.trim() } : { oauth: true },
185
+ force: true
186
+ });
187
+ else {
188
+ const parsedArgs = args.split(/\s+/).map((part) => part.trim()).filter(Boolean);
189
+ const env = envLines.split("\n").map((line) => line.trim()).filter(Boolean).flatMap((line) => {
190
+ const equals = line.indexOf("=");
191
+ if (equals <= 0) return [];
192
+ const child = line.slice(0, equals).trim();
193
+ const source = line.slice(equals + 1).trim();
194
+ if (!child || !source) return [];
195
+ return [{
196
+ child,
197
+ source
198
+ }];
199
+ });
200
+ await onUpsert({
201
+ name: trimmedName,
202
+ transport: "stdio",
203
+ command: command.trim(),
204
+ ...parsedArgs.length > 0 ? { args: parsedArgs } : {},
205
+ ...cwd.trim() ? { cwd: cwd.trim() } : {},
206
+ ...env.length > 0 ? { env } : {},
207
+ force: true
208
+ });
209
+ }
210
+ notify.success("MCP connection saved");
211
+ resetAddForm();
212
+ } catch (error) {
213
+ notify.error(error instanceof Error ? error.message : "Could not save MCP connection");
214
+ }
215
+ };
216
+ const handleRemove = async (connectionName) => {
217
+ if (!onRemove) return;
218
+ try {
219
+ await onRemove({ name: connectionName });
220
+ notify.success(`Removed ${connectionName}`);
221
+ setConfirmRemove(null);
222
+ } catch (error) {
223
+ notify.error(error instanceof Error ? error.message : "Could not remove MCP connection");
224
+ }
225
+ };
226
+ const handleLogout = async (connectionName) => {
227
+ if (!onOAuth) return;
228
+ try {
229
+ await onOAuth({
230
+ name: connectionName,
231
+ action: "logout"
232
+ });
233
+ notify.success(`Signed out of ${connectionName}`);
234
+ } catch (error) {
235
+ notify.error(error instanceof Error ? error.message : "Could not sign out");
236
+ }
237
+ };
238
+ return /* @__PURE__ */ jsxs(SettingsPane, {
239
+ title,
240
+ description,
241
+ actions: /* @__PURE__ */ jsxs(Button$1, {
242
+ type: "button",
243
+ size: "compact",
244
+ variant: "outline",
245
+ disabled: isPending || adding,
246
+ onClick: () => setAdding(true),
247
+ children: [/* @__PURE__ */ jsx(Plus, { "data-icon": "inline-start" }), "Add server"]
248
+ }),
249
+ children: [
250
+ isLoading ? /* @__PURE__ */ jsxs("div", {
251
+ className: "flex items-center gap-2 text-sm text-muted-foreground",
252
+ children: [/* @__PURE__ */ jsx(Spinner, { className: "size-3.5" }), "Loading MCP connections\u2026"]
253
+ }) : null,
254
+ adding ? /* @__PURE__ */ jsxs("div", {
255
+ className: "flex flex-col gap-3 rounded-xl border p-4",
256
+ children: [
257
+ /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "Name" }), /* @__PURE__ */ jsx(Input$1, {
258
+ value: name,
259
+ onChange: (event) => setName(event.target.value),
260
+ "aria-label": "MCP server name"
261
+ })] }),
262
+ /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "Transport" }), /* @__PURE__ */ jsx(Select$1, {
263
+ value: transport,
264
+ onValueChange: (value) => setTransport(value),
265
+ options: [{
266
+ label: "HTTP",
267
+ value: "http"
268
+ }, {
269
+ label: "stdio",
270
+ value: "stdio"
271
+ }]
272
+ })] }),
273
+ transport === "http" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
274
+ /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "URL" }), /* @__PURE__ */ jsx(Input$1, {
275
+ value: url,
276
+ onChange: (event) => setUrl(event.target.value),
277
+ "aria-label": "MCP server URL"
278
+ })] }),
279
+ /* @__PURE__ */ jsxs(Field, {
280
+ orientation: "horizontal",
281
+ className: "items-center justify-between",
282
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "OAuth" }), /* @__PURE__ */ jsx(FieldDescription, { children: "Sign in from Prime Agent's terminal after saving this server." })] }), /* @__PURE__ */ jsx(Switch$1, {
283
+ checked: oauth,
284
+ onCheckedChange: (checked) => {
285
+ setOauth(checked);
286
+ if (checked) setBearerTokenEnvVar("");
287
+ },
288
+ "aria-label": "Use OAuth"
289
+ })]
290
+ }),
291
+ !oauth ? /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "Bearer token environment variable" }), /* @__PURE__ */ jsx(Input$1, {
292
+ value: bearerTokenEnvVar,
293
+ onChange: (event) => setBearerTokenEnvVar(event.target.value),
294
+ "aria-label": "Bearer token environment variable",
295
+ placeholder: "MCP_BEARER_TOKEN"
296
+ })] }) : null
297
+ ] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
298
+ /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "Command" }), /* @__PURE__ */ jsx(Input$1, {
299
+ value: command,
300
+ onChange: (event) => setCommand(event.target.value),
301
+ "aria-label": "MCP command"
302
+ })] }),
303
+ /* @__PURE__ */ jsxs(Field, { children: [/* @__PURE__ */ jsx(FieldLabel, { children: "Arguments" }), /* @__PURE__ */ jsx(Input$1, {
304
+ value: args,
305
+ onChange: (event) => setArgs(event.target.value),
306
+ "aria-label": "MCP command arguments"
307
+ })] }),
308
+ /* @__PURE__ */ jsxs(Field, { children: [
309
+ /* @__PURE__ */ jsx(FieldLabel, { children: "Working directory" }),
310
+ /* @__PURE__ */ jsx(Input$1, {
311
+ value: cwd,
312
+ onChange: (event) => setCwd(event.target.value),
313
+ "aria-label": "MCP working directory"
314
+ }),
315
+ /* @__PURE__ */ jsx(FieldDescription, { children: "Must stay inside the current workspace." })
316
+ ] }),
317
+ /* @__PURE__ */ jsxs(Field, { children: [
318
+ /* @__PURE__ */ jsx(FieldLabel, { children: "Environment mappings" }),
319
+ /* @__PURE__ */ jsx(Textarea, {
320
+ value: envLines,
321
+ onChange: (event) => setEnvLines(event.target.value),
322
+ "aria-label": "MCP environment mappings",
323
+ placeholder: "CHILD=SOURCE"
324
+ }),
325
+ /* @__PURE__ */ jsx(FieldDescription, { children: "One CHILD=SOURCE pair per line. Only variable names are stored." })
326
+ ] })
327
+ ] }),
328
+ /* @__PURE__ */ jsxs("div", {
329
+ className: "flex justify-end gap-2",
330
+ children: [/* @__PURE__ */ jsx(Button$1, {
331
+ type: "button",
332
+ size: "compact",
333
+ variant: "ghost",
334
+ onClick: resetAddForm,
335
+ children: "Cancel"
336
+ }), /* @__PURE__ */ jsxs(Button$1, {
337
+ type: "button",
338
+ size: "compact",
339
+ disabled: isPending || !name.trim(),
340
+ onClick: () => void handleAdd(),
341
+ children: [isPending ? /* @__PURE__ */ jsx(Spinner, { "data-icon": "inline-start" }) : null, "Save"]
342
+ })]
343
+ })
344
+ ]
345
+ }) : null,
346
+ !isLoading && connections.length === 0 && !adding ? /* @__PURE__ */ jsx("p", {
347
+ className: "text-sm text-muted-foreground",
348
+ children: "No MCP connections yet."
349
+ }) : null,
350
+ /* @__PURE__ */ jsx("div", {
351
+ className: "flex flex-col gap-2",
352
+ children: connections.map((connection) => /* @__PURE__ */ jsxs("div", {
353
+ className: "flex flex-col gap-2",
354
+ children: [
355
+ /* @__PURE__ */ jsx(ItemRow, {
356
+ icon: /* @__PURE__ */ jsx(Plug, { className: "size-4" }),
357
+ title: connection.label,
358
+ subtitle: connectionSubtitle(connection),
359
+ trailing: /* @__PURE__ */ jsxs("div", {
360
+ className: "flex items-center gap-1.5",
361
+ children: [connection.usesOAuth && connection.status !== "needs_auth" ? /* @__PURE__ */ jsx(Button$1, {
362
+ type: "button",
363
+ size: "compact",
364
+ variant: "ghost",
365
+ disabled: isPending || !onOAuth,
366
+ onClick: () => {
367
+ handleLogout(connection.name);
368
+ },
369
+ children: "Sign out"
370
+ }) : null, connection.source === "user" ? confirmRemove === connection.name ? /* @__PURE__ */ jsx(Button$1, {
371
+ type: "button",
372
+ size: "compact",
373
+ variant: "destructive",
374
+ disabled: isPending,
375
+ onClick: () => {
376
+ handleRemove(connection.name);
377
+ },
378
+ children: "Confirm remove"
379
+ }) : /* @__PURE__ */ jsx(Button$1, {
380
+ type: "button",
381
+ size: "compact",
382
+ variant: "ghost",
383
+ disabled: isPending || !onRemove,
384
+ "aria-label": `Remove ${connection.name}`,
385
+ onClick: () => setConfirmRemove(connection.name),
386
+ children: /* @__PURE__ */ jsx(Trash, { className: "size-3.5" })
387
+ }) : null]
388
+ })
389
+ }),
390
+ connection.error ? /* @__PURE__ */ jsx(Alert, {
391
+ className: "px-3 py-2",
392
+ children: /* @__PURE__ */ jsx(AlertDescription, {
393
+ className: "text-xs text-pretty",
394
+ children: connection.error
395
+ })
396
+ }) : null,
397
+ connection.usesOAuth && connection.status === "needs_auth" ? /* @__PURE__ */ jsx(Alert, {
398
+ className: "px-3 py-2",
399
+ children: /* @__PURE__ */ jsxs(AlertDescription, {
400
+ className: "text-xs text-pretty",
401
+ children: [
402
+ "Sign-in has to run inside Prime Agent. In a terminal, start Prime Agent against the same account as Fleet, then run",
403
+ " ",
404
+ /* @__PURE__ */ jsxs("code", {
405
+ className: "rounded bg-muted px-1 py-0.5 font-mono text-caption text-foreground",
406
+ children: ["/mcp login ", connection.name]
407
+ }),
408
+ ". Fleet picks the credential up on its next refresh, so a restart is not needed. If Fleet uses a non-default account directory, start Prime Agent with the same",
409
+ " ",
410
+ /* @__PURE__ */ jsx("code", {
411
+ className: "rounded bg-muted px-1 py-0.5 font-mono text-caption text-foreground",
412
+ children: "PRIME_AGENT_CODING_AGENT_DIR"
413
+ }),
414
+ " ",
415
+ "it uses."
416
+ ]
417
+ })
418
+ }) : null
419
+ ]
420
+ }, `${connection.source}:${connection.name}`))
421
+ })
422
+ ]
423
+ });
424
+ }
425
+
426
+ export {
427
+ RowSurface,
428
+ ItemRow,
429
+ SettingsPane,
430
+ SettingsCommitActions,
431
+ McpConnectionsSection
432
+ };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  InputGroup,
3
3
  InputGroupAddon
4
- } from "./chunk-EAKPTSWR.js";
4
+ } from "./chunk-HAFELESQ.js";
5
5
  import {
6
6
  Dialog,
7
- DialogContent,
7
+ DialogContent as DialogContent2,
8
8
  DialogOverlay,
9
9
  DialogPortal,
10
10
  Primitive,
@@ -13,20 +13,18 @@ import {
13
13
  } from "./chunk-BC4GIC2P.js";
14
14
  import {
15
15
  Dialog$1,
16
- DialogContent as DialogContent2,
16
+ DialogContent,
17
17
  DialogDescription,
18
18
  DialogHeader,
19
19
  DialogTitle
20
- } from "./chunk-5GUEYYYO.js";
20
+ } from "./chunk-FT7HNDR5.js";
21
21
  import {
22
22
  Check,
23
- Search
24
- } from "./chunk-7L5PCCYR.js";
25
- import {
23
+ Search,
26
24
  cn
27
- } from "./chunk-OAYEN3JV.js";
25
+ } from "./chunk-VDEUVEWL.js";
28
26
 
29
- // web/app/dist/server/assets/command-usXLjCHI.js
27
+ // web/app/dist/server/assets/command-Ds-1cBIq.js
30
28
  import { jsx, jsxs } from "react/jsx-runtime";
31
29
 
32
30
  // node_modules/.pnpm/cmdk@1.1.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
@@ -305,7 +303,7 @@ var Ce = t.forwardRef((r, o) => {
305
303
  });
306
304
  var xe = t.forwardRef((r, o) => {
307
305
  let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r;
308
- return t.createElement(Dialog, { open: n, onOpenChange: u2 }, t.createElement(DialogPortal, { container: f }, t.createElement(DialogOverlay, { "cmdk-overlay": "", className: c }), t.createElement(DialogContent, { "aria-label": r.label, "cmdk-dialog": "", className: d }, t.createElement(me, { ref: o, ...p2 }))));
306
+ return t.createElement(Dialog, { open: n, onOpenChange: u2 }, t.createElement(DialogPortal, { container: f }, t.createElement(DialogOverlay, { "cmdk-overlay": "", className: c }), t.createElement(DialogContent2, { "aria-label": r.label, "cmdk-dialog": "", className: d }, t.createElement(me, { ref: o, ...p2 }))));
309
307
  });
310
308
  var Ie = t.forwardRef((r, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive.div, { ref: o, ...r, "cmdk-empty": "", role: "presentation" }) : null);
311
309
  var Pe = t.forwardRef((r, o) => {
@@ -373,7 +371,7 @@ function B2({ asChild: r, children: o }, n) {
373
371
  }
374
372
  var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
375
373
 
376
- // web/app/dist/server/assets/command-usXLjCHI.js
374
+ // web/app/dist/server/assets/command-Ds-1cBIq.js
377
375
  function Command$2({ className, ...props }) {
378
376
  return /* @__PURE__ */ jsx(_e, {
379
377
  "data-slot": "command",
@@ -384,7 +382,7 @@ function Command$2({ className, ...props }) {
384
382
  function CommandDialog({ title = "Command Palette", description = "Search for a command to run\u2026", children, className, showCloseButton = false, ...props }) {
385
383
  return /* @__PURE__ */ jsx(Dialog$1, {
386
384
  ...props,
387
- children: /* @__PURE__ */ jsxs(DialogContent2, {
385
+ children: /* @__PURE__ */ jsxs(DialogContent, {
388
386
  className: cn("top-1/3 translate-y-0 overflow-hidden !rounded-xl p-0", className),
389
387
  showCloseButton,
390
388
  children: [/* @__PURE__ */ jsxs(DialogHeader, {
@@ -0,0 +1,193 @@
1
+ import {
2
+ OpenPanelActionSchema
3
+ } from "./chunk-NZCEQWK2.js";
4
+
5
+ // web/app/dist/server/assets/open-panel-action-message-BwUMd9G_.js
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+
8
+ // node_modules/.pnpm/react-error-boundary@6.1.6_@types+react@19.3.0_react@19.3.0/node_modules/react-error-boundary/dist/react-error-boundary.js
9
+ import { createContext as l, useMemo as h, createElement as i, Component as y, useContext as p, useState as E, forwardRef as B } from "react";
10
+ var f = l(null);
11
+ function m({
12
+ children: r,
13
+ didCatch: e,
14
+ error: t,
15
+ resetErrorBoundary: o
16
+ }) {
17
+ const n = h(
18
+ () => ({ didCatch: e, error: t, resetErrorBoundary: o }),
19
+ [e, t, o]
20
+ );
21
+ return i(f.Provider, { value: n }, r);
22
+ }
23
+ var d = {
24
+ didCatch: false,
25
+ error: null
26
+ };
27
+ var C = class extends y {
28
+ constructor(e) {
29
+ super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = d;
30
+ }
31
+ static getDerivedStateFromError(e) {
32
+ return { didCatch: true, error: e };
33
+ }
34
+ resetErrorBoundary(...e) {
35
+ const { didCatch: t } = this.state;
36
+ t && (this.props.onReset?.({
37
+ args: e,
38
+ reason: "imperative-api"
39
+ }), this.setState(d));
40
+ }
41
+ componentDidCatch(e, t) {
42
+ this.props.onError?.(e, t);
43
+ }
44
+ componentDidUpdate(e, t) {
45
+ const { didCatch: o } = this.state, { resetKeys: n } = this.props;
46
+ o && t.didCatch && g(e.resetKeys, n) && (this.props.onReset?.({
47
+ next: n,
48
+ prev: e.resetKeys,
49
+ reason: "keys"
50
+ }), this.setState(d));
51
+ }
52
+ render() {
53
+ const { children: e, fallbackRender: t, FallbackComponent: o, fallback: n } = this.props, { didCatch: s, error: a } = this.state;
54
+ let c = e;
55
+ if (s) {
56
+ const u = {
57
+ error: a,
58
+ resetErrorBoundary: this.resetErrorBoundary
59
+ };
60
+ if (typeof t == "function")
61
+ c = t(u);
62
+ else if (o)
63
+ c = i(o, u);
64
+ else if ("fallback" in this.props)
65
+ c = n;
66
+ else
67
+ throw a;
68
+ }
69
+ return i(
70
+ m,
71
+ {
72
+ didCatch: s,
73
+ error: a,
74
+ resetErrorBoundary: this.resetErrorBoundary
75
+ },
76
+ c
77
+ );
78
+ }
79
+ };
80
+ function g(r = [], e = []) {
81
+ return r.length !== e.length || r.some((t, o) => !Object.is(t, e[o]));
82
+ }
83
+
84
+ // web/app/dist/server/assets/open-panel-action-message-BwUMd9G_.js
85
+ function DefaultFallback({ error, resetErrorBoundary }) {
86
+ const message = error instanceof Error ? error.message : String(error);
87
+ return /* @__PURE__ */ jsxs("div", {
88
+ className: "flex flex-col items-center justify-center gap-2 rounded-lg border border-destructive/20 bg-destructive/5 p-4 text-sm text-destructive",
89
+ children: [
90
+ /* @__PURE__ */ jsx("p", {
91
+ className: "font-medium",
92
+ children: "Unable to render this view"
93
+ }),
94
+ /* @__PURE__ */ jsx("p", {
95
+ className: "text-xs opacity-70",
96
+ children: message
97
+ }),
98
+ /* @__PURE__ */ jsx("button", {
99
+ type: "button",
100
+ onClick: resetErrorBoundary,
101
+ className: "text-destructive-foreground mt-1 rounded-md bg-destructive px-3 py-1 text-xs font-medium transition-opacity hover:opacity-90",
102
+ children: "Retry"
103
+ })
104
+ ]
105
+ });
106
+ }
107
+ function UiErrorBoundary({ children, fallback, onReset, resetKeys }) {
108
+ return /* @__PURE__ */ jsx(C, {
109
+ FallbackComponent: fallback ? () => fallback : DefaultFallback,
110
+ onReset,
111
+ resetKeys,
112
+ children
113
+ });
114
+ }
115
+ var OPEN_PANEL_ACTION_PREFIX = "fleet-prime:open-panel:";
116
+ function encodeOpenPanelActionMessage(action) {
117
+ return `${OPEN_PANEL_ACTION_PREFIX}${JSON.stringify(action)}`;
118
+ }
119
+ function decodeOpenPanelActionMessage(message) {
120
+ if (!message.startsWith(OPEN_PANEL_ACTION_PREFIX)) return void 0;
121
+ try {
122
+ return OpenPanelActionSchema.parse(JSON.parse(message.slice(23)));
123
+ } catch {
124
+ return;
125
+ }
126
+ }
127
+
128
+ // web/app/dist/server/assets/safe-external-url-Dd4WdO3j.js
129
+ function isSafeExternalUrl(value) {
130
+ try {
131
+ const url = new URL(value);
132
+ return url.protocol === "http:" || url.protocol === "https:";
133
+ } catch {
134
+ return false;
135
+ }
136
+ }
137
+
138
+ // web/app/dist/server/assets/openui-utils-CJM45X5h.js
139
+ var OPENUI_FENCE_PATTERN = /```(?:openui|openui-lang)(?:[ \t]*\r?\n|[ \t]+)([\s\S]*?)```/gi;
140
+ function appendSegment(segments, ordinals, type, content) {
141
+ const ordinal = ordinals[type];
142
+ ordinals[type] += 1;
143
+ segments.push({
144
+ content,
145
+ id: `${type}-${ordinal}`,
146
+ type
147
+ });
148
+ }
149
+ function stripOpenUIWrapper(content) {
150
+ const cleaned = content.trim();
151
+ const fences = Array.from(cleaned.matchAll(OPENUI_FENCE_PATTERN));
152
+ const onlyFence = fences[0];
153
+ if (fences.length === 1 && onlyFence?.index === 0 && onlyFence[0].length === cleaned.length) return onlyFence[1].trim();
154
+ return cleaned;
155
+ }
156
+ function isOpenUIProgram(content) {
157
+ return stripOpenUIWrapper(content).startsWith("root =");
158
+ }
159
+ function segmentOpenUIContent(content) {
160
+ const segments = [];
161
+ const ordinals = {
162
+ markdown: 0,
163
+ openui: 0
164
+ };
165
+ const stripped = stripOpenUIWrapper(content);
166
+ if (stripped.startsWith("root =")) {
167
+ appendSegment(segments, ordinals, "openui", stripped);
168
+ return segments;
169
+ }
170
+ let lastIndex = 0;
171
+ for (const match of content.matchAll(OPENUI_FENCE_PATTERN)) {
172
+ const index = match.index;
173
+ const markdown = content.slice(lastIndex, index);
174
+ if (markdown.trim()) appendSegment(segments, ordinals, "markdown", markdown);
175
+ const openUI = match[1].trim();
176
+ const isOpenUI = isOpenUIProgram(openUI);
177
+ appendSegment(segments, ordinals, isOpenUI ? "openui" : "markdown", isOpenUI ? openUI : match[0]);
178
+ lastIndex = index + match[0].length;
179
+ }
180
+ const trailingMarkdown = content.slice(lastIndex);
181
+ if (trailingMarkdown.trim()) appendSegment(segments, ordinals, "markdown", trailingMarkdown);
182
+ if (segments.length > 0) return segments;
183
+ appendSegment(segments, ordinals, "markdown", content);
184
+ return segments;
185
+ }
186
+
187
+ export {
188
+ UiErrorBoundary,
189
+ encodeOpenPanelActionMessage,
190
+ decodeOpenPanelActionMessage,
191
+ isSafeExternalUrl,
192
+ segmentOpenUIContent
193
+ };