@qredence/fleet 0.8.0 → 0.9.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 +31 -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-CGjUBYX7.js +2 -0
  6. package/dist/web/client/assets/agents-page-CTuFJL9H.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-CfZiupub.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-CFxLqG2x.js +2 -0
  17. package/dist/web/client/assets/connectors-page-DQJdoAnl.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-DJhWyayo.css +2 -0
  22. package/dist/web/client/assets/index-C9FHZDGw.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-DEo6Kemv.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-ja_liP8Z.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-DiikSLhF.js +1 -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-B6ne-00G-OFX7UD4K.js} +44 -23
  65. package/dist/web/server/agents-BwzqhPjK-ANFHE5AG.js +22 -0
  66. package/dist/web/server/agents-page-DEqPV-eG-BR5MR74O.js +215 -0
  67. package/dist/web/server/{artifacts-panel-CqGBNU4q-UHNMC7PK.js → artifacts-panel-DLO8OfXb-B2ZWCDFP.js} +27 -17
  68. package/dist/web/server/{chat-command-palette-B94-zIEz-ES2ZB4ZF.js → chat-command-palette-CaDQAMAu-KDH7BTDS.js} +22 -13
  69. package/dist/web/server/chunk-2ETDIMNM.js +40 -0
  70. package/dist/web/server/{chunk-2VKVSL6Y.js → chunk-35RIM6VP.js} +128 -127
  71. package/dist/web/server/{chunk-SI5IQSG4.js → chunk-5IE54MRG.js} +8 -7
  72. package/dist/web/server/chunk-5MOXRFX6.js +826 -0
  73. package/dist/web/server/{chunk-FB2QLQTN.js → chunk-6AFVCERK.js} +12 -13
  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-E6T36NM5.js → chunk-B5FKCW75.js} +36 -353
  79. package/dist/web/server/chunk-BD7YKYWL.js +1007 -0
  80. package/dist/web/server/{chunk-BAHZXA4D.js → chunk-BZ2EAUZZ.js} +10 -12
  81. package/dist/web/server/chunk-CE7U5QB2.js +42 -0
  82. package/dist/web/server/{chunk-LTTBT3J7.js → chunk-FNV3WZXL.js} +5 -9
  83. package/dist/web/server/{chunk-2FHYWKDN.js → chunk-FSQWWR2M.js} +46 -16
  84. package/dist/web/server/chunk-FT7HNDR5.js +143 -0
  85. package/dist/web/server/chunk-GNXIDE26.js +44 -0
  86. package/dist/web/server/{chunk-EAKPTSWR.js → chunk-HAFELESQ.js} +5 -7
  87. package/dist/web/server/{chunk-K67IDUAI.js → chunk-HUHUPGHT.js} +42 -32
  88. package/dist/web/server/{chunk-WSK55TKE.js → chunk-KBMRRJQN.js} +96 -10
  89. package/dist/web/server/chunk-KDCSEISZ.js +6890 -0
  90. package/dist/web/server/chunk-KSGGSGOA.js +50 -0
  91. package/dist/web/server/chunk-OO7NBFQQ.js +15 -0
  92. package/dist/web/server/{chunk-EL2JCDAM.js → chunk-PQVTLG3E.js} +9 -9
  93. package/dist/web/server/{chunk-LQM6QR7S.js → chunk-Q4ECIATK.js} +61 -47
  94. package/dist/web/server/{chunk-CZLGB3NE.js → chunk-R4BS3KYI.js} +2 -4
  95. package/dist/web/server/chunk-RX2ZJARF.js +73 -0
  96. package/dist/web/server/chunk-TOJA3X5N.js +421 -0
  97. package/dist/web/server/chunk-TQ2RECTH.js +193 -0
  98. package/dist/web/server/{chunk-ABMGW6QH.js → chunk-TTNONWZZ.js} +15871 -15660
  99. package/dist/web/server/chunk-TXZDDJCT.js +5115 -0
  100. package/dist/web/server/{chunk-SGAQVAYL.js → chunk-UDUG3MYZ.js} +2 -2
  101. package/dist/web/server/{chunk-5GUEYYYO.js → chunk-V2GCVTDP.js} +4583 -13665
  102. package/dist/web/server/{chunk-OAYEN3JV.js → chunk-VDEUVEWL.js} +2253 -1
  103. package/dist/web/server/chunk-VM3U6PUU.js +769 -0
  104. package/dist/web/server/connectors-C0xm91Ss-DJVBGD73.js +22 -0
  105. package/dist/web/server/connectors-page-B6tJNZ6c-R5K4NSAT.js +66 -0
  106. package/dist/web/server/{create-project-dialog-CFPX6Ihl-EO4XTINS.js → create-project-dialog-PFPHHWIV-GH7JR5IK.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-B9D8-Av--LFZP4U5V.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-CTzOOKPz-5G6RS2D6.js} +18 -10
  116. package/dist/web/server/router-CnBux_Ld-YTVBMJFL.js +23 -0
  117. package/dist/web/server/routes-BUGzvQoO-WW43X7W2.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-f0d3fCm7-I6L5IKFQ.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-QIt_xjP0-FKJWMNHO.js} +17 -9
  122. package/dist/web/server/session-tool-renderer-Cg_ZPHxS-BNQKNJNZ.js +34 -0
  123. package/dist/web/server/{session-tree-panel-CzkE0RFB-P4KWA7S2.js → session-tree-panel-B--el8O5-NZOZJM5L.js} +18 -11
  124. package/dist/web/server/{settings-dialog-BUgVNpr1-THSYIOZL.js → settings-dialog-D_eJN2ia-W47Y474K.js} +102 -790
  125. package/dist/web/server/{subagent-chat-panel-mw3kEFfK-CDYX7LST.js → subagent-chat-panel-C9nWP21E-D5C2TTYD.js} +23 -15
  126. package/dist/web/server/{subagents-panel-2ZJfYrXG-NDJKHJHD.js → subagents-panel-fAKvBNRG-O7QHXNE2.js} +24 -17
  127. package/dist/web/server/{workspace-panel-xznrPDLt-QCJRZOF3.js → workspace-panel-CZMNMU63-SYOSM3B7.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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3643a31: Read provider credentials and auth status from `auth.json` instead of the SDK
8
+
9
+ Fleet now resolves provider credentials itself rather than through the stock
10
+ runtime's `AuthStorage` and `ModelRegistry`. Model discovery reads the stored key
11
+ from `auth.json` and falls back to the provider's environment variable in the
12
+ same order the runtime used. The provider list derives its "configured" state
13
+ from the credential file, so a key Fleet wrote a moment ago is visible
14
+ immediately instead of only after the runtime reloads its in-memory view.
15
+
16
+ This removes the SDK from the credential path. Resource discovery (skills,
17
+ prompts, themes, extensions) still uses the runtime's loader.
18
+ - 8b81e09: Run on Prime Agent's native runtime. Fleet now talks to the Prime Agent daemon directly instead of through the legacy TypeScript SDK, and reports a clear error when the installed daemon is not a compatible version. Fleet requires the Rust daemon: a TypeScript daemon that advertises the same protocol and schema revision is refused, because Fleet no longer carries a second adapter path for it.
19
+
20
+ Recover chat sessions automatically when an invalid stream event interrupts the browser stream. Replayed text and tool events now resume after a malformed reasoning frame, missing runtime reasoning indexes are normalized before they reach the browser, and steering mid-recovery no longer drops the replayed answer.
21
+
22
+ Improve Fleet's navigation for sessions, agents, and connectors, and retire legacy runtime recap and error surfaces. Keep the selected chat model across page reloads.
23
+ - 3eea057: Read MCP connections from the Prime Agent daemon, and stop calling the bundled SDK at runtime for provider and model metadata.
24
+
25
+ The MCP list now reflects whether a credential actually works, not merely whether one exists. Servers whose stored token had expired were previously shown as connected; those tokens are common, since OAuth refresh expires silently, so the pane could report a working integration that had not been usable for weeks. Fleet also now shows every server the runtime knows about, and marks which ones accept a pasted token.
26
+
27
+ Provider and thinking-level metadata come from Fleet's own catalog instead of the SDK's bundled model list, so the settings pane depends on the providers Fleet supports rather than on what that particular SDK build shipped.
28
+ - 2d0fb18: Edit Prime Agent settings and provider credentials from Fleet instead of being told to go to the terminal.
29
+
30
+ Settings and provider credentials are written to the files Prime Agent reads, using a locked atomic write that never leaves a half-written file and keeps credential files owner-only. Settings that Fleet does not model survive a save, grouped settings such as retry merge field by field, and a file Fleet cannot parse is left untouched rather than replaced. Saving a resource setting reloads the runtime; changing model routing takes effect on the next session.
31
+
32
+ Providers that only had a stored credential, with no entry in the engine catalog, were missing from Settings entirely and could not be reviewed or removed. They now appear, while MCP connections stay out of the provider list.
33
+
3
34
  ## 0.8.0
4
35
 
5
36
  ### Minor Changes
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{F as r,M as i,a,j as o,t as s}from"./useButton-CvcmqA2s.js";import{r as c,s as l,t as u,v as d,x as f}from"./createBaseUIEventDetails-DIxvaz-Y.js";import{G as p,K as m,d as h,t as g,tt as _}from"./FloatingPortal-D8-EPDs2.js";import{E as v,R as y,S as b,T as x,_ as S,b as C,f as w,g as T,m as E,n as D,p as O,s as k,t as A,v as j,w as M,x as N,y as ee,z as P}from"./useScrollLock-BcsteNzT.js";import{t as F}from"./useBaseUiId-lKfDDIcw.js";function I(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new M({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:r,inactiveTriggerProps:r,popupProps:r}}var L=e=>e.triggerIdProp??e.activeTriggerId,R=e=>e.openProp??e.open,z=e=>(e.popupElement?.id??e.floatingId)||void 0;function B(e,t){return t!==void 0&&R(e)&&L(e)===t}function te(e,t){return B(e,t)?!0:t!==void 0&&R(e)&&L(e)==null&&e.triggerCount===1}var V={open:R,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:L,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:z,isTriggerActive:(e,t)=>t!==void 0&&L(e)===t,isOpenedByTrigger:(e,t)=>B(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&L(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>te(e,t)?z(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement},H=e(t(),1),U=H.createContext(void 0);function W(e){let t=H.useContext(U);if(!e&&t===void 0)throw Error(o(27));return t}var G=H.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:o=!1,...s}=e,c=W(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`mounted`),f={open:l,transitionStatus:c.useState(`transitionStatus`)};return a(`div`,e,{state:f,ref:[c.context.backdropRef,t],stateAttributesMapping:P,props:[{role:`presentation`,hidden:!d,style:{userSelect:`none`,WebkitUserSelect:`none`}},s],enabled:o||!u})}),K=H.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:o=!1,nativeButton:l=!0,...d}=e,f=W(),p=f.useState(`open`),{getButtonProps:m,buttonRef:h}=s({disabled:o,native:l}),g={disabled:o};function _(e){p&&f.setOpen(!1,u(c,e.nativeEvent))}return a(`button`,e,{state:g,ref:[t,h],props:[{onClick:_},d,m]})}),q=H.forwardRef(function(e,t){let{render:n,className:r,style:i,id:o,...s}=e,c=W(),l=F(o);return c.useSyncedValueWithCleanup(`descriptionElementId`,l),a(`p`,e,{ref:t,props:[{id:l},s]})}),J=H.createContext(void 0);function Y(){let e=H.useContext(J);if(e===void 0)throw Error(o(26));return e}var X=`--nested-dialogs`,Z=`data-nested-dialog-open`,ne={...y,...f,nestedDialogOpen(e){return e?{[Z]:``}:null}},Q=n(),re=H.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:o,initialFocus:s,...c}=e,l=W(),u=l.useState(`descriptionElementId`),f=l.useState(`disablePointerDismissal`),p=l.useState(`floatingRootContext`),m=l.useState(`popupProps`),h=l.useState(`modal`),g=l.useState(`mounted`),_=l.useState(`nested`),y=l.useState(`nestedOpenDialogCount`),b=l.useState(`open`),x=l.useState(`openMethod`),S=l.useState(`titleElementId`),C=l.useState(`transitionStatus`),w=l.useState(`role`),E=p.useState(`floatingId`);Y(),d({open:b,ref:l.context.popupRef,onComplete(){b&&l.context.onOpenChangeComplete?.(!0)}});let D=s===void 0?T(l.context.popupRef):s,A=y>0,j=l.useStateSetter(`popupElement`),M=a(`div`,e,{state:{open:b,nested:_,transitionStatus:C,nestedDialogOpen:A},props:[m,{id:E,"aria-labelledby":S,"aria-describedby":u,role:w,...O,hidden:!g,onKeyDown(e){k.has(e.key)&&e.stopPropagation()},style:{[X]:y}},c],ref:[t,l.context.popupRef,j],stateAttributesMapping:ne});return(0,Q.jsx)(v,{context:p,openInteractionType:x,disabled:!g,closeOnFocusOut:!f,initialFocus:D,returnFocus:o,modal:h!==!1,restoreFocus:`popup`,children:M})}),ie=H.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=W(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,Q.jsx)(J.Provider,{value:n,children:(0,Q.jsxs)(g,{ref:t,...r,children:[a&&o===!0&&(0,Q.jsx)(D,{ref:i.context.internalBackdropRef,inert:h(!s)}),e.children]})}):null});function ae({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=H.useState(0),[d,f]=H.useState(0),h=l===0,g=x(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=m(t);if(h&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||p(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:h});return A(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{u(e),f(t)}),i(()=>(t?.onNestedDialogOpen&&(r?t.onNestedDialogOpen(l+1,d+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),C(e,{activeTriggerProps:g.reference,inactiveTriggerProps:g.trigger,popupProps:g.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var oe={...V,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},$=class extends _{constructor(e,t,n){let r=new w,i=se(e,r,t,n);super(i,ce(r),oe)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(S(this.state,e,t.trigger)))}};function se(e,t,n,r=!1){return{...I(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function ce(e){return{popupRef:H.createRef(),backdropRef:H.createRef(),internalBackdropRef:H.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function le(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:d,handle:f,triggerId:p,defaultTriggerId:m=null}=t,h=e===`drawer`,g=e===`alert-dialog`,_=g?!0:c,v=g||s,y=g?`alertdialog`:`dialog`,x=W(!0),S={modal:_,disablePointerDismissal:v,nested:x!=null,role:y},C=N((e,t)=>new $({open:i,openProp:r,activeTriggerId:m,triggerIdProp:p,...S},e,t),!0);C.useControlledProp(`openProp`,r),C.useControlledProp(`triggerIdProp`,p),C.useSyncedValues(S),C.useContextCallback(`onOpenChange`,a),C.useContextCallback(`onOpenChangeComplete`,o);let w=C.useState(`open`),T=C.useState(`mounted`),D=C.useState(`payload`);b(C,w),j(C);let{forceUnmount:O}=ee(w,C);H.useImperativeHandle(d,()=>({unmount:O,close:()=>C.setOpen(!1,u(l))}),[O,C]);let k=w||T;return(0,Q.jsxs)(U.Provider,{value:C,children:[f&&(0,Q.jsx)(E,{handle:f,store:C}),k&&(0,Q.jsx)(ae,{store:C,parentContext:x?.context,isDrawer:h}),typeof n==`function`?n({payload:D}):n]})}var ue=H.forwardRef(function(e,t){let{render:n,className:r,style:i,id:o,...s}=e,c=W(),l=F(o);return c.useSyncedValueWithCleanup(`titleElementId`,l),a(`h2`,e,{ref:t,props:[{id:l},s]})});export{q as a,I as c,re as i,V as l,le as n,K as o,ie as r,G as s,ue as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./react-dom-B7th3XGm.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";import{n as i,t as a}from"./with-selector-B_VDO56x.js";import{A as o,F as s,I as c,M as l,N as u,O as d,S as ee,a as f,b as p,l as m,p as h,w as g,y as _}from"./useButton-CvcmqA2s.js";import{D as v,E as y,_ as b,t as te}from"./createBaseUIEventDetails-DIxvaz-Y.js";var x=i(),S=e(a(),1),C=e(t(),1),w=[],T=void 0;function ne(){return T}function re(e){w.push(e)}function E(e){let t=(t,n)=>{let r=u(ae).current,i;try{T=r;for(let e of w)e.before(r);i=e(t,n);for(let e of w)e.after(r);r.didInitialize=!0}finally{T=void 0}return i};return t.displayName=e.displayName||e.name,t}function ie(e){return C.forwardRef(E(e))}function ae(){return{didInitialize:!1}}var oe=o(19)?ce:le;function D(e,t,n,r,i){return oe(e,t,n,r,i)}function se(e,t,n,r,i){let a=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,x.useSyncExternalStore)(e.subscribe,a,a)}re({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,x.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function ce(e,t,n,r,i){let a=ne();if(!a)return se(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function le(e,t,n,r,i){return(0,S.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var ue=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return D(this,e,t,n,r)}},de=class extends ue{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){C.useDebugValue(e);let n=this;l(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;l(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);l(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){C.useDebugValue(e);let n=this,r=t!==void 0;l(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return C.useDebugValue(e),D(this,this.selectors[e],t,n,r)}useContextCallback(e,t){C.useDebugValue(e);let n=d(t??c);this.context[e]=n}useStateSetter(e){let t=C.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},O=e(n(),1);function fe(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var k=r();function A(e){return e?.ownerDocument||document}var j=0,M=class e{static create(){return new e}currentId=j;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=j,t()},e)}isStarted(){return this.currentId!==j}clear=()=>{this.currentId!==j&&(clearTimeout(this.currentId),this.currentId=j)};disposeEffect=()=>this.clear};function pe(){let e=u(M.create).current;return v(e.disposeEffect),e}function me(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:he,platform:ge,maxTouchPoints:_e}=me(),N=he.toLowerCase(),P=ge.toLowerCase(),F=/^i(os$|p)/.test(P)||P===`macintel`&&_e>1,ve=`android`,ye=P===ve||N.includes(ve),be=!F&&P.startsWith(`mac`);P.startsWith(`win`),!ye&&/^(linux|chrome os)/.test(P);var xe=be||F,I=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!I&&N.includes(`firefox`),!I&&N.includes(`chrom`);var Se=xe,Ce=/jsdom|happydom/.test(N);function L(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function R(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&g(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function we(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var Te=`data-base-ui-focusable`,Ee=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,De=`ArrowLeft`,Oe=`ArrowRight`,ke=`ArrowUp`,Ae=`ArrowDown`,je=`data-popup-open`,Me=`data-pressed`,z=`data-trigger-disabled`;function Ne(e,t){if(!_(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(z);for(let[,e]of t.entries())if(R(e,n))return!e.hasAttribute(z);return!1}function Pe(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Fe(e){return e.matches(`html,body`)}function B(e){return p(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Ie(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ee}`)!=null}function Le(e){return e?e.getAttribute(`role`)===`combobox`&&B(e):!1}function Re(e){if(!e||Ce)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ze(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Be(e,t){return t<0||t>=e.length}function Ve(e,t){return V(e.current,{disabledIndices:t})}function He(e,t){return V(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function V(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&H(e,a,r));return a}function H(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!U(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function Ue(e){return e.visibility===`hidden`||e.visibility===`collapse`}function U(e,t=e?m(e):null){return!e||!e.isConnected||!t||Ue(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var We=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Ge(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return g(n)?n.host:null}function W(e){for(let t of Array.from(e.children))if(h(t)===`summary`)return t;return null}function Ke(e,t){let n=W(t);return!!n&&(e===n||R(n,e))}function G(e){let t=e?h(e):``;return e!=null&&e.matches(We)&&(t!==`summary`||e.parentElement!=null&&h(e.parentElement)===`details`&&W(e.parentElement)===e)&&(t!==`details`||W(e)==null)&&(t!==`input`||e.type!==`hidden`)}function K(e){if(!G(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Ge(t)){let n=t!==e,r=h(t)===`slot`;if(t.hasAttribute(`inert`)||n&&h(t)===`details`&&!t.open&&!Ke(e,t)||t.hasAttribute(`hidden`)||!r&&!qe(t,n))return!1}return!0}function qe(e,t){let n=m(e);return t?n.display!==`none`:U(e,n)}function q(e){let t=e.tabIndex;if(t<0){let t=h(e);if(t===`details`||t===`audio`||t===`video`||p(e)&&e.isContentEditable)return 0}return t}function J(e){if(h(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Je(e,t){let n=J(e);if(!n)return!0;let r=t.find(e=>{let t=J(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=J(e);return t?.name===n.name&&t.form===n.form})===n}function Y(e){if(p(e)&&h(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return p(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ye(e,t){Y(e).forEach(e=>{G(e)&&t.push(e),Ye(e,t)})}function Xe(e,t,n){Y(e).forEach(e=>{p(e)&&e.matches(t)&&n.push(e),Xe(e,t,n)})}function Ze(e){return K(e)&&q(e)>=0}function Qe(e){let t=[];return Ye(e,t),t.filter(K)}function X(e){let t=Qe(e);return t.filter(e=>q(e)>=0&&Je(e,t))}function $e(e,t){let n=X(e),r=n.length;if(r===0)return;let i=L(A(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function et(e){return $e(A(e).body,1)||e}function tt(e){return $e(A(e).body,-1)||e}function nt(e,t){if(!e)return null;let n=X(A(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function rt(e){return nt(e,1)}function it(e){return nt(e,-1)}function Z(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!R(n,r)}function at(e){X(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ot(e){let t=[];Xe(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var st={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},ct={...st,position:`fixed`,top:0,left:0},lt={...st,position:`absolute`},Q=C.forwardRef(function(e,t){let[n,r]=C.useState();l(()=>{Se&&I&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,k.jsx)(`span`,{...e,ref:t,style:ct,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function ut(e){return o(19)?e:e?`true`:void 0}var dt={style:{transition:`none`}},ft=`data-base-ui-click-trigger`,pt=`data-base-ui-swipe-ignore`,mt=`data-swipe-ignore`,ht=`[${pt}]`,gt=`[${mt}]`,_t={fallbackAxisSide:`none`},vt={fallbackAxisSide:`end`},yt={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0};function bt(e){return`data-base-ui-${e}`}var xt=C.createContext(null),$=()=>C.useContext(xt),St=bt(`portal`);function Ct(e={}){let{ref:t,container:n,componentProps:r=s,elementProps:i}=e,a=b(),o=$()?.portalNode,[c,u]=C.useState(null),[p,m]=C.useState(null),h=d(e=>{e!==null&&m(e)}),g=C.useRef(null);l(()=>{if(n===null){g.current&&(g.current=null,m(null),u(null));return}let e=(n&&(ee(n)?n:n.current))??o??document.body;if(e==null){g.current&&(g.current=null,m(null),u(null));return}g.current!==e&&(g.current=e,m(null),u(e))},[n,o]);let _=f(`div`,r,{ref:[t,h],props:[{id:a,[St]:``},i]}),v=c&&_?O.createPortal(_,c):null;return{node:p,nodeId:C.isValidElement(_)?_.props.id:void 0,subtree:v}}var wt=C.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:u,nodeId:d,subtree:ee}=Ct({container:o,ref:t,componentProps:e,elementProps:c}),f=C.useRef(null),p=C.useRef(null),m=C.useRef(null),h=C.useRef(null),[g,_]=C.useState(null),v=C.useRef(!1),b=g?.modal,x=g?.open,S=!!g&&!g.modal&&g.open&&!!u;C.useEffect(()=>{if(!u||b)return;function e(e){u&&e.relatedTarget&&Z(e)&&(e.type===`focusin`?v.current&&=(ot(u),!1):(at(u),v.current=!0))}return fe(y(u,`focusin`,e,!0),y(u,`focusout`,e,!0))},[u,b]),l(()=>{!u||x!==!0||!v.current||(ot(u),v.current=!1)},[x,u]);let w=C.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:u,setFocusManagerState:_}),[u]);return(0,k.jsxs)(C.Fragment,{children:[ee,(0,k.jsxs)(xt.Provider,{value:w,children:[S&&u&&(0,k.jsx)(Q,{"data-type":`outside`,ref:f,onFocus:e=>{Z(e,u)?m.current?.focus():tt(g?g.domReference:null)?.focus()}}),S&&u&&(0,k.jsx)(`span`,{role:s,"aria-owns":d,style:yt}),u&&O.createPortal(a,u),S&&u&&(0,k.jsx)(Q,{"data-type":`outside`,ref:p,onFocus:e=>{Z(e,u)?h.current?.focus():(et(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,te(`focus-out`,e.nativeEvent)))}})]})]})});export{A as $,Pe as A,De as B,V as C,Be as D,U as E,B as F,R as G,ke as H,Re as I,I as J,we as K,je as L,Fe as M,Ne as N,H as O,Le as P,pe as Q,Me as R,X as S,Ve as T,Te as U,Oe as V,L as W,F as X,ye as Y,M as Z,tt as _,ht as a,Z as b,_t as c,ut as d,fe as et,Q as f,et as g,Qe as h,bt as i,Ie as j,ze as k,gt as l,lt as m,Ct as n,E as nt,ft as o,ct as p,Ce as q,$ as r,ie as rt,dt as s,wt as t,de as tt,vt as u,rt as v,He as w,Ze as x,it as y,Ae as z};
@@ -0,0 +1 @@
1
+ import{t as e}from"./createLucideIcon-CQY2ECfR.js";var t={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};t.node;var n=e(t);export{n as t};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/agents-page-CTuFJL9H.js","assets/rolldown-runtime-hePW80VL.js","assets/react-Cvdyeg_0.js","assets/mutation-Da9zdeWr.js","assets/jsx-runtime-NZYk81nU.js","assets/with-selector-B_VDO56x.js","assets/chat-queries-CfZiupub.js","assets/chat-hpzV6IA6.js","assets/card-Dj1SnGUU.js","assets/utils-oBThwhjm.js","assets/createLucideIcon-CQY2ECfR.js","assets/activity-BPIKUzOU.js","assets/arrow-up-right-CG9RNk4p.js","assets/bot-DETalD3q.js","assets/clock-3-BwWCSCm_.js","assets/loader-circle-BmKYM_C4.js","assets/button-CWYjn8Zk.js","assets/useButton-CvcmqA2s.js","assets/dist-BogNzeK9.js","assets/clsx-DB0hHKMi.js","assets/product-page-header-Ck6I13CE.js","assets/alert-CzWGeumf.js","assets/badge-CzQFgmVK.js","assets/useRender-CzJUrRlB.js"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./preload-helper-BLdHbfdN.js";var i=e(t()),a=n(),o=(0,i.lazy)(()=>r(async()=>{let{AgentsPage:e}=await import(`./agents-page-CTuFJL9H.js`);return{AgentsPage:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])).then(({AgentsPage:e})=>({default:e})));function s(){return(0,a.jsx)(`main`,{className:`min-h-svh bg-background p-8`,children:(0,a.jsx)(`p`,{className:`mx-auto max-w-5xl text-sm text-muted-foreground`,children:`Loading agents…`})})}var c=()=>(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(s,{}),children:(0,a.jsx)(o,{})});export{c as component};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{O as n}from"./mutation-Da9zdeWr.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";import{O as i,o as a,v as o}from"./chat-queries-CfZiupub.js";import{a as s,i as c,n as l,r as u,t as d}from"./card-Dj1SnGUU.js";import{t as f}from"./createLucideIcon-CQY2ECfR.js";import{t as p}from"./activity-BPIKUzOU.js";import{t as m}from"./arrow-up-right-CG9RNk4p.js";import{t as h}from"./bot-DETalD3q.js";import{t as g}from"./clock-3-BwWCSCm_.js";import{t as _}from"./loader-circle-BmKYM_C4.js";import{t as v}from"./button-CWYjn8Zk.js";import{t as y}from"./product-page-header-Ck6I13CE.js";import{n as b,r as x,t as S}from"./alert-CzWGeumf.js";import{t as C}from"./badge-CzQFgmVK.js";var w={name:`calendar-clock`,size:24,node:[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]};w.node;var T=f(w),E=e(t(),1),D=r();function O(){let[e,t]=(0,E.useState)(20),r=a(),f=i({queryKey:[`chat`,`sessions`,`all`],queryFn:()=>o.listSessions()}),w=new Map((r.data?.projects??[]).map(e=>[e.projectId,e.name])),O=[...f.data??[]].sort((e,t)=>Date.parse(t.updatedAt)-Date.parse(e.updatedAt)),j=O.slice(0,e);return(0,D.jsxs)(`main`,{className:`min-h-svh bg-background`,children:[(0,D.jsx)(y,{active:`agents`}),(0,D.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-8 px-5 py-10 sm:px-8`,children:[(0,D.jsxs)(`div`,{className:`max-w-2xl`,children:[(0,D.jsx)(`div`,{className:`mb-3 flex size-10 items-center justify-center rounded-xl bg-primary/10 text-primary`,children:(0,D.jsx)(h,{className:`size-5`})}),(0,D.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Agents`}),(0,D.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-muted-foreground`,children:`Review conversations and schedules.`})]}),(0,D.jsxs)(`section`,{"aria-labelledby":`schedule-heading`,className:`space-y-3`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h2`,{id:`schedule-heading`,className:`text-base font-medium`,children:`Heartbeat and cron`}),(0,D.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Not supported in Fleet.`})]}),(0,D.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,D.jsx)(k,{icon:(0,D.jsx)(p,{className:`size-4`}),title:`Heartbeat`}),(0,D.jsx)(k,{icon:(0,D.jsx)(T,{className:`size-4`}),title:`Cron`})]})]}),(0,D.jsxs)(`section`,{"aria-labelledby":`saved-sessions-heading`,className:`space-y-3`,children:[(0,D.jsxs)(`div`,{className:`flex items-end justify-between gap-3`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h2`,{id:`saved-sessions-heading`,className:`text-base font-medium`,children:`Recent sessions`}),(0,D.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Recent conversations.`})]}),(0,D.jsx)(v,{asChild:!0,variant:`outline`,size:`compact`,children:(0,D.jsxs)(n,{to:`/`,children:[`Open sessions `,(0,D.jsx)(m,{"data-icon":`inline-end`})]})})]}),f.isLoading?(0,D.jsxs)(`div`,{className:`flex items-center gap-2 py-5 text-sm text-muted-foreground`,children:[(0,D.jsx)(_,{className:`size-4 animate-spin`}),` Loading saved sessions…`]}):f.isError?(0,D.jsxs)(S,{variant:`destructive`,children:[(0,D.jsx)(x,{children:`Could not load saved sessions`}),(0,D.jsx)(b,{children:f.error.message})]}):O.length===0?(0,D.jsx)(d,{children:(0,D.jsx)(l,{className:`py-6 text-sm text-muted-foreground`,children:`No saved sessions yet.`})}):(0,D.jsx)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:j.map(e=>{let t=e.title||e.firstMessage||`Untitled session`;return(0,D.jsxs)(d,{size:`sm`,className:`min-w-0 overflow-hidden`,children:[(0,D.jsx)(c,{className:`min-w-0`,children:(0,D.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[(0,D.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,D.jsx)(s,{className:`min-w-0 truncate`,title:t,children:t}),(0,D.jsxs)(u,{className:`mt-1 truncate`,children:[e.projectId?w.get(e.projectId)??`Project`:`Unassigned project`,`· `,e.messageCount,` `,e.messageCount===1?`message`:`messages`]})]}),(0,D.jsx)(C,{variant:`outline`,className:`capitalize`,children:e.status})]})}),(0,D.jsxs)(l,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,D.jsx)(g,{className:`size-3.5`}),`Updated `,A(e.updatedAt)]})]},e.sessionId)})}),!f.isLoading&&!f.isError&&O.length>20?(0,D.jsx)(`div`,{className:`flex justify-center`,children:(0,D.jsx)(v,{type:`button`,variant:`ghost`,size:`compact`,onClick:()=>t(e=>e>=O.length?20:e+20),children:e>=O.length?`Show fewer sessions`:`Show more sessions`})}):null]})]})]})}function k({icon:e,title:t}){return(0,D.jsxs)(d,{size:`sm`,className:`opacity-80`,children:[(0,D.jsx)(c,{children:(0,D.jsxs)(s,{className:`flex items-center gap-2`,children:[e,t]})}),(0,D.jsx)(l,{children:(0,D.jsx)(C,{variant:`outline`,children:`Unavailable`})})]})}function A(e){let t=new Date(e);return Number.isNaN(t.getTime())?`an unknown time`:t.toLocaleString()}export{O as AgentsPage};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-NZYk81nU.js";import{t}from"./utils-oBThwhjm.js";import{t as n}from"./dist-BogNzeK9.js";var r=e(),i=n(`group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function a({className:e,variant:n,...a}){return(0,r.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:t(i({variant:n}),e),...a})}function o({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`alert-title`,className:t(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,e),...n})}function s({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`alert-description`,className:t(`text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),...n})}export{s as n,o as r,a as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-NZYk81nU.js";import{t}from"./utils-oBThwhjm.js";import{a as n,i as r,n as i,o as a,r as o,s,t as c}from"./DialogTitle-BlVq-tcv.js";import{t as l}from"./button-CWYjn8Zk.js";import{c as u,s as d,t as f}from"./surfaces-BUjUJTyD.js";function p(e){return i(`alert-dialog`,e)}var m=e(),h=4;function g({...e}){return(0,m.jsx)(p,{"data-slot":`alert-dialog`,...e})}function _({...e}){return(0,m.jsx)(o,{"data-slot":`alert-dialog-portal`,...e})}function v({className:e,...n}){return(0,m.jsx)(s,{"data-slot":`alert-dialog-backdrop`,className:t(`fixed inset-0 isolate z-[60] bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...n})}function y({className:e,children:n,...i}){let a=u(),o=Math.min(a+h,8);return(0,m.jsxs)(_,{children:[(0,m.jsx)(v,{}),(0,m.jsx)(r,{"data-slot":`alert-dialog-content`,className:t(`fixed top-1/2 left-1/2 z-[60] grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-6 text-sm text-popover-foreground outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,d(o),e),...i,children:(0,m.jsx)(f,{value:o,children:n})})]})}function b({className:e,...n}){return(0,m.jsx)(c,{"data-slot":`alert-dialog-title`,className:t(`font-heading text-base leading-none font-medium`,e),...n})}function x({className:e,...r}){return(0,m.jsx)(n,{"data-slot":`alert-dialog-description`,className:t(`text-sm text-pretty text-muted-foreground`,e),...r})}function S({className:e,...n}){return(0,m.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:t(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...n})}function C({...e}){return(0,m.jsx)(a,{"data-slot":`alert-dialog-cancel`,render:(0,m.jsx)(l,{variant:`outline`}),...e})}function w({...e}){return(0,m.jsx)(a,{"data-slot":`alert-dialog-action`,render:(0,m.jsx)(l,{variant:`destructive`}),...e})}export{x as a,y as i,w as n,S as o,C as r,b as s,g as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./createLucideIcon-CQY2ECfR.js";import{a as i,i as a,n as o,t as s}from"./tool-result-7qREIVv_.js";import{i as c}from"./open-panel-action-message-SdA1VU42.js";import{t as l}from"./chevron-right-BPCB1mOg.js";import{t as u}from"./package-BkC-HSi-.js";import{t as d}from"./button-CWYjn8Zk.js";import{n as f}from"./prime-agent-artifacts-C-g1VPiW.js";import{GenerativeTextRenderer as p,t as m}from"./openui-renderer-DG-iML7M.js";import{n as h,r as g,t as _}from"./collapsible-Bk6zCsRX.js";var v={name:`layout-template`,size:24,node:[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`9`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`jqznyg`}],[`rect`,{width:`5`,height:`7`,x:`16`,y:`14`,rx:`1`,key:`q5h2i8`}]]};v.node;var y=r(v),b=e(t(),1),x=n(),S=[];function C(e){if(typeof e==`string`)return e;if(e==null)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function w(e){return e===`running`?`running`:e===`error`?`error`:e===`cancelled`?`cancelled`:`success`}function T(e){return e===`running`?`streaming`:e===`error`?`error`:e===`cancelled`?`cancelled`:`complete`}function E(e){let t=typeof e==`object`&&e?e:void 0;if(!t)return e===void 0?[]:[{label:`result`,text:C(e)}];let n=[];for(let e of[`stdout`,`stderr`,`result`,`error`])t[e]!==void 0&&t[e]!==``&&n.push({label:e,text:C(t[e])});let r=t.details??t.output??t.result;if(n.length===0&&r!==e&&n.push(...E(r)),n.length===0&&Array.isArray(t.content)){let e=t.content.flatMap(e=>typeof e==`string`?[e]:typeof e==`object`&&e&&`text`in e&&typeof e.text==`string`?[e.text]:[]).join(``);e&&n.push({label:t.isError===!0?`error`:`stdout`,text:e})}return n.length>0?n:[{label:`result`,text:C(e)}]}function D(e){let t=typeof e.input==`object`&&e.input!==null?e.input:void 0,n=t?.command??t?.code??t?.script;if(!(typeof n!=`string`||!n))return e.kind===`bash`?{code:n,language:`bash`,label:`Bash`}:e.kind===`ipython`?{code:n,language:/^\s*%%bash(?:\s|$)/im.test(n)?`bash`:`python`,label:`IPython`}:e.kind===`diff`?{code:n,language:`text`,label:`Text`}:{code:n,language:`json`,label:`JSON`}}function O(e){if(e.kind!==`openui-html`)return;let t=typeof e.output==`object`&&e.output!==null?e.output:void 0;if(typeof t?.title==`string`&&typeof t.document==`string`)return{title:t.title,document:t.document}}function k({artifact:e,selected:t}){let n=(0,b.useRef)(null);(0,b.useEffect)(()=>{t&&requestAnimationFrame(()=>{n.current?.focus({preventScroll:!0}),n.current?.scrollIntoView({block:`nearest`})})},[t]);let r=O(e);return(0,x.jsxs)(`article`,{ref:n,"data-artifact-id":e.id,tabIndex:-1,className:`min-w-0 rounded-md border border-border/60 bg-background p-2.5 outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs font-medium`,title:e.title,children:e.title||`OpenUI artifact`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:e.status})]}),r?(0,x.jsx)(m,{artifact:r}):(0,x.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-xs text-destructive`,children:[(0,x.jsx)(`p`,{children:`OpenUI artifact data is unavailable.`}),(0,x.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap break-words rounded bg-foreground/5 p-2 text-foreground/70`,children:C(e.output)})]})]})}function A({artifact:e,selected:t}){let n=(0,b.useRef)(null),r=t||e.status===`running`,[c,l]=(0,b.useState)(r);(0,b.useEffect)(()=>{t&&(l(!0),requestAnimationFrame(()=>{n.current?.focus({preventScroll:!0}),n.current?.scrollIntoView({block:`nearest`})}))},[t]);let u=D(e),d=E(e.output),p=e.kind===`diff`||e.kind===`refinement`?f(e):void 0;return(0,x.jsxs)(`article`,{ref:n,"data-artifact-id":e.id,tabIndex:-1,className:`rounded-md border border-border/60 bg-background px-2.5 py-2 outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[p?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(i,{file:p.file,lines:p.lines,status:T(e.status),defaultOpen:r,copyText:p.copyText,maxHeight:240}),d.map(e=>(0,x.jsx)(o,{label:e.label,language:`text`,children:e.text},e.label))]}):null,p?null:(0,x.jsx)(s,{tool:e.kind,title:e.title,status:w(e.status),open:c,onOpenChange:l,defaultOpen:r,kind:e.kind===`bash`||e.kind===`ipython`?`terminal`:`custom`,children:(0,x.jsxs)(`div`,{className:`space-y-3`,children:[u?(0,x.jsx)(a,{code:u.code,language:u.language,languageLabel:u.label,showStatus:!1,showLineNumbers:!1,wrap:!0}):null,d.map(e=>(0,x.jsx)(o,{label:e.label,language:`text`,children:e.text},e.label))]})})]})}function j({block:e,expanded:t,isStreaming:n,onOpenUIAction:r,onToggle:i}){return(0,x.jsxs)(_,{open:t,onOpenChange:i,children:[(0,x.jsxs)(g,{render:(0,x.jsx)(d,{variant:`ghost`,size:`compact`,className:`group w-full justify-start gap-1.5 text-left text-label font-normal text-foreground/65 transition-none hover:bg-foreground/5 hover:text-foreground/80`}),children:[(0,x.jsx)(l,{className:`size-3 shrink-0 text-foreground/35 transition-transform group-data-panel-open:rotate-90`}),(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/35`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.component,children:e.component}),(0,x.jsxs)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:[`#`,e.ordinal]})]}),(0,x.jsx)(h,{children:(0,x.jsx)(`div`,{className:`mb-1 mt-0.5 flex min-w-0 flex-col overflow-hidden rounded-md border border-border/60 bg-background px-2.5 py-2`,children:(0,x.jsx)(c,{resetKeys:[e.content],children:(0,x.jsx)(p,{content:e.content,isStreaming:n,messageId:e.blockId,onOpenUIAction:r})})})})]})}function M({openUIBlocks:e=[],onOpenUIAction:t,status:n,artifactRuns:r=S,selectedArtifactId:i}){let a=e,[o,s]=(0,b.useState)(null),c=n===`streaming`?a.at(-1)?.blockId:void 0,l=(0,b.useMemo)(()=>r.flatMap(e=>e.artifacts).filter(e=>e.kind!==`recap`),[r]),d=(0,b.useMemo)(()=>l.filter(e=>e.kind===`openui-html`),[l]),f=(0,b.useMemo)(()=>l.filter(e=>e.kind!==`openui-html`&&e.kind!==`ipython`),[l]);return(0,x.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-2 overflow-hidden`,children:[d.length>0?(0,x.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`OpenUI artifacts`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:d.length})]}),(0,x.jsx)(`div`,{className:`space-y-1`,children:d.map(e=>(0,x.jsx)(k,{artifact:e,selected:e.id===i},e.id))})]}):null,f.length>0?(0,x.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(u,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`Technical artifacts`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:f.length})]}),(0,x.jsx)(`div`,{className:`space-y-1`,children:f.map(e=>(0,x.jsx)(A,{artifact:e,selected:e.id===i},e.id))})]}):null,(0,x.jsxs)(`div`,{className:`flex min-h-0 flex-col`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`Generative UI`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:a.length>0?`${a.length}`:`none yet`})]}),a.length===0?(0,x.jsx)(`p`,{className:`px-2 pb-1 text-caption leading-4 text-foreground/40`,children:`OpenUI interfaces the agent generates in this session appear here, and can be re-opened without scrolling the conversation.`}):(0,x.jsx)(`div`,{className:`flex min-h-0 flex-col gap-0.5 overflow-y-auto`,children:a.map(e=>(0,x.jsx)(j,{block:e,expanded:e.blockId===o,isStreaming:e.blockId===c,onOpenUIAction:t,onToggle:()=>s(t=>t===e.blockId?null:e.blockId)},e.blockId))})]})]})}export{M as ArtifactsPanelContent};
@@ -0,0 +1 @@
1
+ import{t as e}from"./utils-oBThwhjm.js";import{o as t}from"./useButton-CvcmqA2s.js";import{t as n}from"./dist-BogNzeK9.js";import{t as r}from"./useRender-CzJUrRlB.js";var i=n(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function a({className:n,variant:a=`default`,render:o,...s}){return r({defaultTagName:`span`,props:t({className:e(i({variant:a}),n)},s),render:o,state:{slot:`badge`,variant:a}})}export{a as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./createLucideIcon-CQY2ECfR.js";import{i,n as a,r as o,t as s}from"./sun-C7zg8Oas.js";import{t as c}from"./right-panel-registry-BAJ6TuEY.js";import{t as l}from"./plus-DUP2JPVG.js";import{t as u}from"./square-BbTF3gLc.js";import{a as d,c as f,i as p,n as m,o as h,r as g,s as _}from"./command-xo-NK4xO.js";var v={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};v.node;var y=r(v),b=e(t(),1),x=n();function S({open:e,onOpenChange:t,onNewSession:n,onStop:r,onResumeSession:v,onSetRightPanel:S,onThemeChange:C,sessions:w,isStreaming:T,themePreference:E}){let[D,O]=(0,b.useState)(``),[k,A]=(0,b.useState)(e);e!==k&&(A(e),e&&O(``));let j=e=>{e(),t(!1)};return(0,x.jsxs)(m,{open:e,onOpenChange:t,children:[(0,x.jsx)(d,{placeholder:`Type a command or search…`,value:D,onValueChange:O}),(0,x.jsxs)(_,{children:[(0,x.jsx)(g,{children:`No commands found.`}),(0,x.jsxs)(p,{heading:`Actions`,children:[(0,x.jsxs)(h,{onSelect:()=>j(n),keywords:[`new`,`session`,`chat`],children:[(0,x.jsx)(l,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{children:`New session`})]}),T&&(0,x.jsxs)(h,{onSelect:()=>j(r),keywords:[`stop`,`abort`,`cancel`],children:[(0,x.jsx)(u,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{children:`Stop generation`})]})]}),(0,x.jsx)(f,{}),(0,x.jsx)(p,{heading:`Panels`,children:c.map(e=>{let t=e.icon;return(0,x.jsxs)(h,{onSelect:()=>j(()=>S(e.id)),keywords:e.commandKeywords,children:[(0,x.jsx)(t,{}),(0,x.jsx)(`span`,{children:e.commandLabel})]},e.id)})}),w.length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(f,{}),(0,x.jsx)(p,{heading:`Sessions`,children:w.map(e=>{let t=e.title;return(0,x.jsxs)(h,{onSelect:()=>j(()=>v(e)),keywords:[`session`,t],children:[(0,x.jsx)(y,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{className:`truncate`,children:t})]},e.sessionId)})})]}),(0,x.jsx)(f,{}),(0,x.jsxs)(p,{heading:`Theme`,children:[(0,x.jsxs)(h,{onSelect:()=>j(()=>C(`light`)),keywords:[`theme`,`light`],children:[(0,x.jsx)(s,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{children:`Light`}),E===`light`&&(0,x.jsx)(i,{className:`ml-auto size-3 opacity-50`})]}),(0,x.jsxs)(h,{onSelect:()=>j(()=>C(`dark`)),keywords:[`theme`,`dark`],children:[(0,x.jsx)(a,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{children:`Dark`}),E===`dark`&&(0,x.jsx)(i,{className:`ml-auto size-3 opacity-50`})]}),(0,x.jsxs)(h,{onSelect:()=>j(()=>C(`system`)),keywords:[`theme`,`system`],children:[(0,x.jsx)(o,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{children:`System`}),E===`system`&&(0,x.jsx)(i,{className:`ml-auto size-3 opacity-50`})]})]})]})]})}export{S as ChatCommandPalette};