@qredence/fleet 0.6.1 → 0.6.2

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 (271) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/web/client/assets/agent-disclosure-CMrxF7L-.js +1 -0
  3. package/dist/web/client/assets/analytics-stub-C2vgmGm_.js +1 -0
  4. package/dist/web/client/assets/artifacts-panel-DmQghvw8.js +1 -0
  5. package/dist/web/client/assets/{bot-Bs7QWJ2q.js → bot-DbB9BKL0.js} +1 -1
  6. package/dist/web/client/assets/bundle-mjs-cJTHqqzI.js +1 -0
  7. package/dist/web/client/assets/button-Dl0ce3Y5.js +1 -0
  8. package/dist/web/client/assets/{card-DA3Vnqay.js → card-DCEnYd2G.js} +1 -1
  9. package/dist/web/client/assets/chat-C24kD2SP.js +52 -0
  10. package/dist/web/client/assets/chat-command-palette-BIwjhE6s.js +1 -0
  11. package/dist/web/client/assets/check-B3LlvM65.js +1 -0
  12. package/dist/web/client/assets/{chevron-down-BEVGmnSb.js → chevron-down-DUUprRP5.js} +1 -1
  13. package/dist/web/client/assets/chevron-right-NVqQIoiO.js +1 -0
  14. package/dist/web/client/assets/{chunk-YOKDWASO-BAf618wr.js → chunk-YOKDWASO-Bte3iwlH.js} +6 -6
  15. package/dist/web/client/assets/citations-BUvM92nt.js +1 -0
  16. package/dist/web/client/assets/collapsible-CUxOjhDJ.js +1 -0
  17. package/dist/web/client/assets/command-Dv96gATQ.js +1 -0
  18. package/dist/web/client/assets/createBaseUIEventDetails-B58Jldei.js +1 -0
  19. package/dist/web/client/assets/createLucideIcon-_dfI7Arx.js +1 -0
  20. package/dist/web/client/assets/dialog-BCb4rQh0.js +1 -0
  21. package/dist/web/client/assets/dist-52wg4XPY.js +1 -0
  22. package/dist/web/client/assets/dist-DbHxXSgQ.js +41 -0
  23. package/dist/web/client/assets/ease-CMumuPlX.js +1 -0
  24. package/dist/web/client/assets/{eye-B0DFz5hL.js → eye-CDHqtVoE.js} +1 -1
  25. package/dist/web/client/assets/file-text-TmalmYrb.js +1 -0
  26. package/dist/web/client/assets/{folder-BC5p7qK7.js → folder-vuNT4shY.js} +1 -1
  27. package/dist/web/client/assets/{fork-picker-dialog-B7NNpVmW.js → fork-picker-dialog-CpwEwsxA.js} +1 -1
  28. package/dist/web/client/assets/gauge-BsDqNM1A.js +1 -0
  29. package/dist/web/client/assets/globals-DCtBkCSD.css +2 -0
  30. package/dist/web/client/assets/{hard-drive-CHqgr7VQ.js → hard-drive-BT7UxHQu.js} +1 -1
  31. package/dist/web/client/assets/highlighted-body-KPVGNVTW-CgT7gqvs.js +1 -0
  32. package/dist/web/client/assets/horizontal-resize-VLjLByUV.js +1 -0
  33. package/dist/web/client/assets/index-BGnQeUYE.js +12 -0
  34. package/dist/web/client/assets/input-CxZp56Im.js +1 -0
  35. package/dist/web/client/assets/input-group-D7lAfKHR.js +1 -0
  36. package/dist/web/client/assets/ipython-tool-CkHaO3PW.js +3 -0
  37. package/dist/web/client/assets/is-ref-object-BcRWZ4l7.js +1 -0
  38. package/dist/web/client/assets/{loader-circle-DjfHXUPB.js → loader-circle-B5GIZGxd.js} +1 -1
  39. package/dist/web/client/assets/markdown-BHkByC9K.js +2 -0
  40. package/dist/web/client/assets/{markdown-code-xNyjdZ4g.js → markdown-code-CDTRq-HZ.js} +1 -1
  41. package/dist/web/client/assets/mermaid-HWGCJPDP-CY3N5ECk.js +1 -0
  42. package/dist/web/client/assets/message-queue-Dl8wbCOu.js +1 -0
  43. package/dist/web/client/assets/model-selector-list-CRZCXeBf.js +1 -0
  44. package/dist/web/client/assets/{notify-DxL0VD7Z.js → notify-DjVixft7.js} +1 -1
  45. package/dist/web/client/assets/{openui-renderer-TLNe5e_Q.js → openui-renderer-Bkkx5kmA.js} +37 -37
  46. package/dist/web/client/assets/{package-CdcJFPf2.js → package-BKBPgwMP.js} +1 -1
  47. package/dist/web/client/assets/{pencil-DcUwsKLn.js → pencil-CdO6qfv3.js} +1 -1
  48. package/dist/web/client/assets/{plug-Dt6VN0zF.js → plug-BRROUIw-.js} +1 -1
  49. package/dist/web/client/assets/prompt-input-WaGSKZCU.js +1 -0
  50. package/dist/web/client/assets/prompt-suggestions-BNyTcyWg.js +1 -0
  51. package/dist/web/client/assets/provider-catalog-C0XBIasJ.js +1 -0
  52. package/dist/web/client/assets/provider-label-Cka0ep0S.js +1 -0
  53. package/dist/web/client/assets/react-CwJFpaho.js +1 -0
  54. package/dist/web/client/assets/react-dom-DX3XddaT.js +1 -0
  55. package/dist/web/client/assets/{refresh-cw-IThTJ3j-.js → refresh-cw-l9WPHRkq.js} +1 -1
  56. package/dist/web/client/assets/repl-panel-L9dmPqio.js +1 -0
  57. package/dist/web/client/assets/{resource-helpers-Q2T0YCMO.js → resource-helpers-BuWybA8l.js} +1 -1
  58. package/dist/web/client/assets/resources-panel-mT-aMCvV.js +1 -0
  59. package/dist/web/client/assets/right-panel-context-CS8tJMzE.js +1 -0
  60. package/dist/web/client/assets/right-panel-registry-BCW7fQTG.js +2 -0
  61. package/dist/web/client/assets/{rotate-ccw-WNFNkKQD.js → rotate-ccw-CfGhzOv7.js} +1 -1
  62. package/dist/web/client/assets/routes-BWe5Iz-2.js +16 -0
  63. package/dist/web/client/assets/safe-external-url-BbAom7Bm.js +1 -0
  64. package/dist/web/client/assets/search-BjcXAUrI.js +1 -0
  65. package/dist/web/client/assets/session-insights-panel-B0rl37lo.js +1 -0
  66. package/dist/web/client/assets/session-reasoning-panel-8D2P7iaJ.js +1 -0
  67. package/dist/web/client/assets/session-tool-renderer-3E3cv8D0.js +1395 -0
  68. package/dist/web/client/assets/settings-dialog-B8lHq2tT.js +2 -0
  69. package/dist/web/client/assets/{skeleton-CkR2VmWc.js → skeleton-C3mo31Qu.js} +1 -1
  70. package/dist/web/client/assets/skeleton-loaders-BMa_G4yX.js +1 -0
  71. package/dist/web/client/assets/{shield-check-CkA2viVW.js → sparkles-D8XIY8pN.js} +1 -1
  72. package/dist/web/client/assets/square-DQaQu9bp.js +1 -0
  73. package/dist/web/client/assets/{square-terminal-BYTN_I86.js → square-terminal-BsopiuN7.js} +1 -1
  74. package/dist/web/client/assets/{subagent-chat-panel-oeLDPDAK.js → subagent-chat-panel-C5ukYiUx.js} +1 -1
  75. package/dist/web/client/assets/subagent-transcript-lqNcSVbH.js +1 -0
  76. package/dist/web/client/assets/subagents-panel-SJKhaVTr.js +1 -0
  77. package/dist/web/client/assets/{sun-BWiZFty0.js → sun-D0llhiMU.js} +1 -1
  78. package/dist/web/client/assets/surfaces-CpfsGAIA.js +1 -0
  79. package/dist/web/client/assets/switch-D3FhZU-S.js +1 -0
  80. package/dist/web/client/assets/terminal-BQAKkBY6.js +1 -0
  81. package/dist/web/client/assets/toast-lnCWGgSE.js +1 -0
  82. package/dist/web/client/assets/tokens-Ch5WqXC_.js +1 -0
  83. package/dist/web/client/assets/tool-result-B_yb2JoE.js +4 -0
  84. package/dist/web/client/assets/tool-timeline-VnMRQoLS.js +1 -0
  85. package/dist/web/client/assets/{triangle-alert-CU-gd7ui.js → triangle-alert-GAYh_5d3.js} +1 -1
  86. package/dist/web/client/assets/ui-preferences-aG2U2jjW.js +1 -0
  87. package/dist/web/client/assets/use-presence-7I2qv4qI.js +1 -0
  88. package/dist/web/client/assets/use-reduced-motion-BOcG709U.js +9 -0
  89. package/dist/web/client/assets/useBaseUiId-D9ZGPZ6f.js +1 -0
  90. package/dist/web/client/assets/useControlled-CgAAWIy9.js +1 -0
  91. package/dist/web/client/assets/utils-Brtgag-m.js +1 -0
  92. package/dist/web/client/assets/virtualized-turn-list-BgUgX6tM.js +6 -0
  93. package/dist/web/client/assets/workspace-panel-CKF5JQl2.js +1 -0
  94. package/dist/web/client/assets/workspace-path-nav-DqPbETfJ.js +2 -0
  95. package/dist/web/client/assets/{wrench-BJNNe07k.js → wrench-Myc12BTA.js} +1 -1
  96. package/dist/web/client/assets/x-BGsDD848.js +1 -0
  97. package/dist/web/client/bundle-budget.json +6 -6
  98. package/dist/web/server/_tanstack-start-manifest_v-BDPifIFN-DTSNCHBX.js +91 -0
  99. package/dist/web/server/{artifacts-panel-D3ySO--V-XSL53CXL.js → artifacts-panel-BN3DgqfV-N73J6N5Y.js} +39 -44
  100. package/dist/web/server/{chat-command-palette-kAbXhWVg-TJWXH2WW.js → chat-command-palette-G8awyZRw-2QE7FXGT.js} +18 -18
  101. package/dist/web/server/{chunk-SALXCFVO.js → chunk-33QA7BQJ.js} +19 -1
  102. package/dist/web/server/{chunk-5UCAJBAH.js → chunk-43S5N7SH.js} +80 -47
  103. package/dist/web/server/chunk-4EBSM4JR.js +74 -0
  104. package/dist/web/server/{chunk-ZIFSJ3HQ.js → chunk-4OTHKQMG.js} +185 -109
  105. package/dist/web/server/{chunk-NNKJTKOQ.js → chunk-6SOMNRAX.js} +309 -279
  106. package/dist/web/server/chunk-7E76R7MB.js +2138 -0
  107. package/dist/web/server/{chunk-EBG3XFGQ.js → chunk-7FK6YEMA.js} +49 -44
  108. package/dist/web/server/chunk-7HXCGBUP.js +56 -0
  109. package/dist/web/server/{chunk-P66QQWUM.js → chunk-7NZ3FJDA.js} +14 -1
  110. package/dist/web/server/{chunk-HF7DG7PC.js → chunk-7UTDOTOU.js} +80 -78
  111. package/dist/web/server/{chunk-OZO5ARFA.js → chunk-BQROC4PL.js} +11 -2
  112. package/dist/web/server/{chunk-JTCCQZLN.js → chunk-BUXJSBE3.js} +2 -2
  113. package/dist/web/server/{chunk-NIZBFVJF.js → chunk-CAPTFJOC.js} +9 -7
  114. package/dist/web/server/{chunk-YGYOBX7G.js → chunk-CCYLHNZJ.js} +1767 -52
  115. package/dist/web/server/{chunk-DJMHPJBP.js → chunk-CHEC7TWB.js} +3 -1
  116. package/dist/web/server/{chunk-NJ4QEZHK.js → chunk-CW6KZUKT.js} +7 -5
  117. package/dist/web/server/chunk-DLA5TLKX.js +164 -0
  118. package/dist/web/server/{chunk-MNBGB2SP.js → chunk-E5HALE4M.js} +4 -4
  119. package/dist/web/server/{chunk-D27LRYVT.js → chunk-EDAWH2MT.js} +10 -9
  120. package/dist/web/server/{chunk-NGCQJ33Y.js → chunk-ENGEUJIH.js} +1494 -1644
  121. package/dist/web/server/{chunk-RIP3PBWT.js → chunk-ESM7OCRL.js} +4 -4
  122. package/dist/web/server/{chunk-O3HDELZ2.js → chunk-FT74GAAH.js} +676 -670
  123. package/dist/web/server/{chunk-WNCAL4HN.js → chunk-HQ5TEXHT.js} +132 -152
  124. package/dist/web/server/{chunk-YOM42BKD.js → chunk-IPV4GLJL.js} +16 -16
  125. package/dist/web/server/{chunk-UL2725KQ.js → chunk-IXGLKAPN.js} +54 -46
  126. package/dist/web/server/{chunk-3TIMGWWI.js → chunk-JPDRUSUD.js} +2 -2
  127. package/dist/web/server/{chunk-4WBFCB4O.js → chunk-JVOW2NWC.js} +179 -177
  128. package/dist/web/server/chunk-K6PTNSCW.js +31 -0
  129. package/dist/web/server/{chunk-AR7O7JXD.js → chunk-KBWUBWVJ.js} +24 -1
  130. package/dist/web/server/{chunk-QIULBRTU.js → chunk-MJXXVQNA.js} +79 -84
  131. package/dist/web/server/{chunk-NWDI3OWB.js → chunk-NCK2FJAD.js} +30 -26
  132. package/dist/web/server/{chunk-QFRCJWQQ.js → chunk-NMBH57JT.js} +94 -33
  133. package/dist/web/server/{chunk-EAJTWMK5.js → chunk-NZ6KQT2X.js} +2 -2
  134. package/dist/web/server/{chunk-2DDWXTVG.js → chunk-O2UYZT3Z.js} +11 -11
  135. package/dist/web/server/{chunk-DLUZFOG3.js → chunk-OMEDERPG.js} +21 -25
  136. package/dist/web/server/{chunk-BLSX7WHW.js → chunk-OSMP55KI.js} +23 -2
  137. package/dist/web/server/{chunk-S3PQ6HKH.js → chunk-OVJYUWSQ.js} +2 -2
  138. package/dist/web/server/{chunk-UCUFC553.js → chunk-RXUMFFUV.js} +3 -3
  139. package/dist/web/server/{chunk-DO2O27B2.js → chunk-SDV3P3IW.js} +2 -2
  140. package/dist/web/server/chunk-TLNZNR7C.js +46 -0
  141. package/dist/web/server/{chunk-FYDQK6UX.js → chunk-UDD5W4CR.js} +32 -10
  142. package/dist/web/server/{chunk-MNPHMZU7.js → chunk-UE32PAV2.js} +47 -57
  143. package/dist/web/server/{chunk-KP2PNDGL.js → chunk-WB2LJC3R.js} +29 -32
  144. package/dist/web/server/{chunk-ETTDO4UO.js → chunk-WTYNN6EV.js} +1 -26
  145. package/dist/web/server/{chunk-EJEPDVK6.js → chunk-WU6X3GPJ.js} +48 -5
  146. package/dist/web/server/{chunk-XIB6XNUX.js → chunk-XJ6TGSUB.js} +425 -404
  147. package/dist/web/server/{chunk-PLYZ7P2Y.js → chunk-YMPJMHXZ.js} +41 -4
  148. package/dist/web/server/{chunk-GETSIVNU.js → chunk-YVGCPUAW.js} +7 -7
  149. package/dist/web/server/{chunk-4UBOIY2S.js → chunk-ZNFXBGLK.js} +1 -1
  150. package/dist/web/server/chunk-ZOVXMNJM.js +477 -0
  151. package/dist/web/server/{fork-picker-dialog-Ds6Tgtu3-DIBWN7MV.js → fork-picker-dialog-YKlapaxN-DR5L74ST.js} +9 -8
  152. package/dist/web/server/{markdown-DTnMbD87-FXGGAPJD.js → markdown-BzNejPoZ-6ITTDAV6.js} +2 -3
  153. package/dist/web/server/{markdown-code-BStjFfsy-SSLWUT4S.js → markdown-code-DAwXuW6m-HHVELO6I.js} +3 -4
  154. package/dist/web/server/{fleet-message-queue-D_w8lSeY-T3HB7HVQ.js → message-queue-Demph1x4-RBJUC3AT.js} +14 -10
  155. package/dist/web/server/{model-selector-list-DxeGZoD2-P6S6FSJH.js → model-selector-list-BmzLiCx9-TK6JGGKU.js} +20 -19
  156. package/dist/web/server/{openui-renderer-MKFv6LlH-MDRSVFEY.js → openui-renderer-moJGf0LA-QCU3PI6H.js} +17 -18
  157. package/dist/web/server/{prompt-suggestions-BOItmGnD-YQA7RHLG.js → prompt-suggestions-yPZqX__K-3VGJC4IF.js} +7 -6
  158. package/dist/web/server/{repl-panel-CuyF8wt5-CHDT2Q3N.js → repl-panel-CgUF1qUw-3DFD2V53.js} +10 -11
  159. package/dist/web/server/{resources-panel-CE5pD4vy-V5FXBTYC.js → resources-panel-ChUliWV--JITAGS6Q.js} +6 -7
  160. package/dist/web/server/{router-Dg72SESP-PCWKLFRG.js → router-CPdFlpbe-LAD4MNZB.js} +3111 -235
  161. package/dist/web/server/{routes-BGrVtPYF-SURPAJN6.js → routes-hkom6S6L-DUPPQHPY.js} +5045 -4285
  162. package/dist/web/server/server.js +2 -2
  163. package/dist/web/server/{session-insights-panel-CUhdgvRt-VB2HUCQP.js → session-insights-panel-xgrkX1Rp-FDNURBXZ.js} +9 -9
  164. package/dist/web/server/{fleet-reasoning-panel-DG_vuvv0-NCZWEEIT.js → session-reasoning-panel-m1RgcIph-NUXGXVKE.js} +21 -22
  165. package/dist/web/server/session-tool-renderer-CglQ2ky7-2JVYNZG2.js +45 -0
  166. package/dist/web/server/{settings-dialog-CK0FJlTg-HZRBAXDZ.js → settings-dialog-BCEfmgtP-T3WQEZHB.js} +175 -1373
  167. package/dist/web/server/{subagent-chat-panel-gzamnTgK-PQ2TLLJF.js → subagent-chat-panel-BTwI1kdB-LKBWA4GD.js} +32 -41
  168. package/dist/web/server/{subagents-panel-Berjd7HJ-EI5ZKC6V.js → subagents-panel-8Z9_csoV-HYMEEBHB.js} +37 -45
  169. package/dist/web/server/{fleet-tool-timeline-D6yM4ZMz-ZSFVRRRI.js → tool-timeline-QL9k5dzA-RLU26HXT.js} +6 -6
  170. package/dist/web/server/{workspace-panel-CBBa_3UO-B4PPFPMA.js → workspace-panel-BHEB9nRM-TS62SYBA.js} +24 -31
  171. package/package.json +1 -1
  172. package/dist/web/client/assets/action-swap-roll-COzQ86wm.js +0 -1
  173. package/dist/web/client/assets/agent-activity-svETLf_5.js +0 -1
  174. package/dist/web/client/assets/agent-disclosure-DAMuuGcM.js +0 -1
  175. package/dist/web/client/assets/analytics-stub-B6zGMuSV.js +0 -1
  176. package/dist/web/client/assets/artifacts-panel-HVjqBMyx.js +0 -1
  177. package/dist/web/client/assets/artifacts-utils-N_kUFbz2.js +0 -1
  178. package/dist/web/client/assets/bundle-mjs-DKHVkVWu.js +0 -1
  179. package/dist/web/client/assets/button-C5wFDY5_.js +0 -1
  180. package/dist/web/client/assets/chat-BhYseKd6.js +0 -52
  181. package/dist/web/client/assets/chat-command-palette-LILDO_vG.js +0 -1
  182. package/dist/web/client/assets/check-JjHKAZas.js +0 -1
  183. package/dist/web/client/assets/chevron-right-DrJxToLs.js +0 -1
  184. package/dist/web/client/assets/chevron-up-CnSvySGH.js +0 -1
  185. package/dist/web/client/assets/circle-alert-CONlFReH.js +0 -1
  186. package/dist/web/client/assets/circle-x-CkKCB__4.js +0 -1
  187. package/dist/web/client/assets/citations-BPv8HIpf.js +0 -2
  188. package/dist/web/client/assets/cn-C8c0S2mI.js +0 -1
  189. package/dist/web/client/assets/collapsible-BoXtZZWN.js +0 -1
  190. package/dist/web/client/assets/command-PhicLCoO.js +0 -1
  191. package/dist/web/client/assets/createBaseUIEventDetails-DV0dQrBX.js +0 -1
  192. package/dist/web/client/assets/createLucideIcon-DwxZHm0M.js +0 -1
  193. package/dist/web/client/assets/dialog-pBGUjAQ7.js +0 -1
  194. package/dist/web/client/assets/dist-BPaFisIZ.js +0 -41
  195. package/dist/web/client/assets/earth-DGZXAN5r.js +0 -1
  196. package/dist/web/client/assets/ease-u56MhKYS.js +0 -1
  197. package/dist/web/client/assets/file-text-T-NcAlZs.js +0 -1
  198. package/dist/web/client/assets/fleet-message-queue-fbYYwMj0.js +0 -1
  199. package/dist/web/client/assets/fleet-pi-tool-renderer-BRgNnmaJ.js +0 -1395
  200. package/dist/web/client/assets/fleet-reasoning-panel-CjA2dwUJ.js +0 -1
  201. package/dist/web/client/assets/fleet-subagent-list-iKUtLJKZ.js +0 -1
  202. package/dist/web/client/assets/fleet-tool-timeline-C8heL7ae.js +0 -1
  203. package/dist/web/client/assets/gauge-DNpstbBn.js +0 -1
  204. package/dist/web/client/assets/globals-CuIiqOTg.css +0 -2
  205. package/dist/web/client/assets/highlighted-body-KPVGNVTW-sUCZ1fHv.js +0 -1
  206. package/dist/web/client/assets/horizontal-resize-Cp3iHMH7.js +0 -1
  207. package/dist/web/client/assets/image-BbPmlw-n.js +0 -1
  208. package/dist/web/client/assets/index-CSGplyr_.js +0 -12
  209. package/dist/web/client/assets/input-PcdubeKn.js +0 -1
  210. package/dist/web/client/assets/input-group-C2HJEZvl.js +0 -1
  211. package/dist/web/client/assets/ipython-tool-CyuMOxz1.js +0 -3
  212. package/dist/web/client/assets/layout-gyLzPvVv.js +0 -1
  213. package/dist/web/client/assets/markdown-lvexwooo.js +0 -2
  214. package/dist/web/client/assets/mermaid-HWGCJPDP-Bm7CuruA.js +0 -1
  215. package/dist/web/client/assets/message-square-hbDao-A1.js +0 -1
  216. package/dist/web/client/assets/model-selector-list-CoXX358G.js +0 -1
  217. package/dist/web/client/assets/plus-DXN1Bg_z.js +0 -1
  218. package/dist/web/client/assets/prompt-input-fwP8TsgQ.js +0 -1
  219. package/dist/web/client/assets/prompt-suggestions-BlGXmWS7.js +0 -1
  220. package/dist/web/client/assets/provider-catalog-DYMFdbKc.js +0 -1
  221. package/dist/web/client/assets/provider-label-B4q5mI65.js +0 -1
  222. package/dist/web/client/assets/react-dom-Bwxum3ti.js +0 -1
  223. package/dist/web/client/assets/repl-panel-C5om8MGU.js +0 -1
  224. package/dist/web/client/assets/resources-panel-D867-goy.js +0 -1
  225. package/dist/web/client/assets/right-panel-context-DHlNWJsF.js +0 -1
  226. package/dist/web/client/assets/right-panel-registry-BBlxLxnx.js +0 -2
  227. package/dist/web/client/assets/routes-XGsAIqBJ.js +0 -16
  228. package/dist/web/client/assets/safe-external-url-D3PJJIcM.js +0 -1
  229. package/dist/web/client/assets/search-eWVnAJsb.js +0 -1
  230. package/dist/web/client/assets/session-insights-panel-YnaXvTpi.js +0 -1
  231. package/dist/web/client/assets/settings-dialog-BSBasR3o.js +0 -2
  232. package/dist/web/client/assets/skeleton-loaders-C9vHwAYV.js +0 -1
  233. package/dist/web/client/assets/sparkles-DuclzqlE.js +0 -1
  234. package/dist/web/client/assets/square-Bhn8gjr0.js +0 -1
  235. package/dist/web/client/assets/subagent-transcript-DaVHjNUH.js +0 -1
  236. package/dist/web/client/assets/subagent-utils-DDH5qm9Z.js +0 -1
  237. package/dist/web/client/assets/subagents-panel-D_aVgSCi.js +0 -1
  238. package/dist/web/client/assets/surfaces-BhAXz9So.js +0 -1
  239. package/dist/web/client/assets/switch-WhXeJNNY.js +0 -1
  240. package/dist/web/client/assets/terminal-DOS1s1gm.js +0 -1
  241. package/dist/web/client/assets/toast-D3c9XeGe.js +0 -1
  242. package/dist/web/client/assets/tool-result-Cki8WUNc.js +0 -4
  243. package/dist/web/client/assets/ui-preferences-CImQGZm_.js +0 -1
  244. package/dist/web/client/assets/use-reduced-motion-eORd7fqW.js +0 -9
  245. package/dist/web/client/assets/useBaseUiId-CHqXB2UQ.js +0 -1
  246. package/dist/web/client/assets/useControlled-CJJ9BOQB.js +0 -1
  247. package/dist/web/client/assets/utils-Eg7xtNmV.js +0 -1
  248. package/dist/web/client/assets/virtualized-turn-list-CdMa-ydT.js +0 -6
  249. package/dist/web/client/assets/workspace-panel-77bDbprs.js +0 -1
  250. package/dist/web/client/assets/workspace-path-nav-C0AQNZyy.js +0 -1
  251. package/dist/web/client/assets/x-CsRC_tCI.js +0 -1
  252. package/dist/web/server/_tanstack-start-manifest_v-0L7fqnH4-KMVGUFE4.js +0 -95
  253. package/dist/web/server/agent-activity-BuEE6iVw-CDZLK4D2.js +0 -514
  254. package/dist/web/server/chunk-2JHTYWD5.js +0 -1196
  255. package/dist/web/server/chunk-3JMESBAT.js +0 -35
  256. package/dist/web/server/chunk-42XU6WV7.js +0 -56
  257. package/dist/web/server/chunk-AQ66E5OW.js +0 -33
  258. package/dist/web/server/chunk-BYXBJQAS.js +0 -0
  259. package/dist/web/server/chunk-FAGDMGLK.js +0 -6589
  260. package/dist/web/server/chunk-FJV6EQDW.js +0 -36
  261. package/dist/web/server/chunk-GL6HWDJB.js +0 -19
  262. package/dist/web/server/chunk-L46H6IDX.js +0 -13
  263. package/dist/web/server/chunk-NIDBN7BQ.js +0 -86
  264. package/dist/web/server/chunk-ON33WDZX.js +0 -31
  265. package/dist/web/server/chunk-PVJCTQFK.js +0 -22
  266. package/dist/web/server/chunk-QPNUGF3V.js +0 -35
  267. package/dist/web/server/chunk-S5LFXXDY.js +0 -1265
  268. package/dist/web/server/chunk-VPKX7QRU.js +0 -42
  269. package/dist/web/server/chunk-ZCVWADNW.js +0 -37
  270. package/dist/web/server/fleet-pi-tool-renderer-qwc-qZFq-4U556N5Q.js +0 -51
  271. package/dist/web/server/fleet-subagent-list-BGb0PjhF-2X67FMUV.js +0 -18
@@ -1,1265 +0,0 @@
1
- import {
2
- Square
3
- } from "./chunk-7CNGNFFK.js";
4
- import {
5
- Plus
6
- } from "./chunk-PVJCTQFK.js";
7
- import {
8
- useHoverCapable
9
- } from "./chunk-NWDI3OWB.js";
10
- import {
11
- elevatedMenu
12
- } from "./chunk-UCUFC553.js";
13
- import {
14
- LoaderCircle
15
- } from "./chunk-TNL4YV63.js";
16
- import {
17
- AnimatePresence,
18
- useReducedMotion
19
- } from "./chunk-NIZBFVJF.js";
20
- import {
21
- EASE_OUT,
22
- MotionConfigContext,
23
- SPRING_MOUSE,
24
- SPRING_PANEL,
25
- SPRING_PRESS,
26
- SPRING_SWAP,
27
- m,
28
- useConstant,
29
- useIsomorphicLayoutEffect
30
- } from "./chunk-EBG3XFGQ.js";
31
- import {
32
- JSAnimation,
33
- cancelFrame,
34
- collectMotionValues,
35
- frame,
36
- interpolate,
37
- isMotionValue,
38
- motionValue
39
- } from "./chunk-FAGDMGLK.js";
40
- import {
41
- ChevronDown
42
- } from "./chunk-WWJF4RO2.js";
43
- import {
44
- Check
45
- } from "./chunk-4QD4PCVP.js";
46
- import {
47
- X
48
- } from "./chunk-JBLHIEVG.js";
49
- import {
50
- createLucideIcon
51
- } from "./chunk-4ZIEVI5O.js";
52
- import {
53
- cn
54
- } from "./chunk-DJMHPJBP.js";
55
-
56
- // web/app/dist/server/assets/prompt-input-BhmLC9Jj.js
57
- import { cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useEffect, useEffectEvent, useId, useInsertionEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
58
- import { jsx, jsxs } from "react/jsx-runtime";
59
- import { createPortal } from "react-dom";
60
- var ArrowUp = createLucideIcon("arrow-up", [["path", {
61
- d: "m5 12 7-7 7 7",
62
- key: "hav0vg"
63
- }], ["path", {
64
- d: "M12 19V5",
65
- key: "x0mq9r"
66
- }]]);
67
- function transform(...args) {
68
- const useImmediate = !Array.isArray(args[0]);
69
- const argOffset = useImmediate ? 0 : -1;
70
- const inputValue = args[0 + argOffset];
71
- const inputRange = args[1 + argOffset];
72
- const outputRange = args[2 + argOffset];
73
- const options = args[3 + argOffset];
74
- const interpolator = interpolate(inputRange, outputRange, options);
75
- return useImmediate ? interpolator(inputValue) : interpolator;
76
- }
77
- function attachFollow(value, source, options = {}) {
78
- const initialValue = value.get();
79
- let activeAnimation = null;
80
- let latestValue = initialValue;
81
- let latestSetter;
82
- const unit = typeof initialValue === "string" ? initialValue.replace(/[\d.-]/g, "") : void 0;
83
- const stopAnimation = () => {
84
- if (activeAnimation) {
85
- activeAnimation.stop();
86
- activeAnimation = null;
87
- }
88
- value.animation = void 0;
89
- };
90
- const startAnimation = () => {
91
- const currentValue = asNumber(value.get());
92
- const targetValue = asNumber(latestValue);
93
- if (currentValue === targetValue) {
94
- stopAnimation();
95
- return;
96
- }
97
- const velocity = activeAnimation ? activeAnimation.getGeneratorVelocity() : value.getVelocity();
98
- stopAnimation();
99
- activeAnimation = new JSAnimation({
100
- keyframes: [currentValue, targetValue],
101
- velocity,
102
- type: "spring",
103
- restDelta: 1e-3,
104
- restSpeed: 0.01,
105
- ...options,
106
- onUpdate: latestSetter
107
- });
108
- };
109
- const scheduleAnimation = () => {
110
- startAnimation();
111
- value.animation = activeAnimation ?? void 0;
112
- value["events"].animationStart?.notify();
113
- activeAnimation?.then(() => {
114
- value.animation = void 0;
115
- value["events"].animationComplete?.notify();
116
- });
117
- };
118
- value.attach((v, set) => {
119
- latestValue = v;
120
- latestSetter = (latest) => set(parseValue(latest, unit));
121
- frame.postRender(scheduleAnimation);
122
- }, stopAnimation);
123
- if (isMotionValue(source)) {
124
- let skipNextAnimation = options.skipInitialAnimation === true;
125
- const removeSourceOnChange = source.on("change", (v) => {
126
- if (skipNextAnimation) {
127
- skipNextAnimation = false;
128
- value.jump(parseValue(v, unit), false);
129
- } else value.set(parseValue(v, unit));
130
- });
131
- const removeValueOnDestroy = value.on("destroy", removeSourceOnChange);
132
- return () => {
133
- removeSourceOnChange();
134
- removeValueOnDestroy();
135
- };
136
- }
137
- return stopAnimation;
138
- }
139
- function parseValue(v, unit) {
140
- return unit ? v + unit : v;
141
- }
142
- function asNumber(v) {
143
- return typeof v === "number" ? v : parseFloat(v);
144
- }
145
- function useMotionValue(initial) {
146
- const value = useConstant(() => motionValue(initial));
147
- const { isStatic } = useContext(MotionConfigContext);
148
- if (isStatic) {
149
- const [, setLatest] = useState(initial);
150
- useEffect(() => value.on("change", setLatest), []);
151
- }
152
- return value;
153
- }
154
- function useCombineMotionValues(values, combineValues) {
155
- const value = useMotionValue(combineValues());
156
- const updateValue = () => value.set(combineValues());
157
- updateValue();
158
- useIsomorphicLayoutEffect(() => {
159
- const scheduleUpdate = () => frame.preRender(updateValue, false, true);
160
- const subscriptions = values.map((v) => v.on("change", scheduleUpdate));
161
- return () => {
162
- subscriptions.forEach((unsubscribe) => unsubscribe());
163
- cancelFrame(updateValue);
164
- };
165
- });
166
- return value;
167
- }
168
- function useComputed(compute) {
169
- collectMotionValues.current = [];
170
- compute();
171
- const value = useCombineMotionValues(collectMotionValues.current, compute);
172
- collectMotionValues.current = void 0;
173
- return value;
174
- }
175
- function useTransform(input, inputRangeOrTransformer, outputRangeOrMap, options) {
176
- if (typeof input === "function") return useComputed(input);
177
- if (outputRangeOrMap !== void 0 && !Array.isArray(outputRangeOrMap) && typeof inputRangeOrTransformer !== "function") return useMapTransform(input, inputRangeOrTransformer, outputRangeOrMap, options);
178
- const transformer = typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : transform(inputRangeOrTransformer, outputRangeOrMap, options);
179
- const result = Array.isArray(input) ? useListTransform(input, transformer) : useListTransform([input], ([latest]) => transformer(latest));
180
- const inputAccelerate = !Array.isArray(input) ? input.accelerate : void 0;
181
- if (inputAccelerate && !inputAccelerate.isTransformed && typeof inputRangeOrTransformer !== "function" && Array.isArray(outputRangeOrMap) && options?.clamp !== false) result.accelerate = {
182
- ...inputAccelerate,
183
- times: inputRangeOrTransformer,
184
- keyframes: outputRangeOrMap,
185
- isTransformed: true,
186
- ...options?.ease ? { ease: options.ease } : {}
187
- };
188
- return result;
189
- }
190
- function useListTransform(values, transformer) {
191
- const latest = useConstant(() => []);
192
- return useCombineMotionValues(values, () => {
193
- latest.length = 0;
194
- const numValues = values.length;
195
- for (let i = 0; i < numValues; i++) latest[i] = values[i].get();
196
- return transformer(latest);
197
- });
198
- }
199
- function useMapTransform(inputValue, inputRange, outputMap, options) {
200
- const keys = useConstant(() => Object.keys(outputMap));
201
- const output = useConstant(() => ({}));
202
- for (const key of keys) output[key] = useTransform(inputValue, inputRange, outputMap[key], options);
203
- return output;
204
- }
205
- function useFollowValue(source, options = {}) {
206
- const { isStatic } = useContext(MotionConfigContext);
207
- const getFromSource = () => isMotionValue(source) ? source.get() : source;
208
- if (isStatic) return useTransform(getFromSource);
209
- const value = useMotionValue(getFromSource());
210
- useInsertionEffect(() => {
211
- return attachFollow(value, source, options);
212
- }, [value, JSON.stringify(options)]);
213
- return value;
214
- }
215
- function useSpring(source, options = {}) {
216
- return useFollowValue(source, {
217
- type: "spring",
218
- ...options
219
- });
220
- }
221
- var INSTANT_TRANSITION = { duration: 0 };
222
- var CHEVRON_TRANSITION = {
223
- type: "spring",
224
- duration: 0.4,
225
- bounce: 0.3
226
- };
227
- var LIST_VARIANTS = {
228
- hidden: {},
229
- show: { transition: {
230
- staggerChildren: 0.035,
231
- delayChildren: 0.05
232
- } }
233
- };
234
- var ITEM_VARIANTS = {
235
- hidden: {
236
- opacity: 0,
237
- y: -6,
238
- filter: "blur(3px)"
239
- },
240
- show: {
241
- opacity: 1,
242
- y: 0,
243
- filter: "blur(0px)"
244
- }
245
- };
246
- var AnimatedSelectContext = createContext(null);
247
- function useAnimatedSelectContext(component) {
248
- const ctx = useContext(AnimatedSelectContext);
249
- if (!ctx) throw new Error(`${component} must be used within <AnimatedSelect>`);
250
- return ctx;
251
- }
252
- function AnimatedSelect({ value, defaultValue, onValueChange, disabled = false, className, children }) {
253
- const reduce = useReducedMotion() ?? false;
254
- const baseId = useId();
255
- const rootRef = useRef(null);
256
- const [open, setOpen] = useState(false);
257
- const [internal, setInternal] = useState(defaultValue);
258
- const [labels, setLabels] = useState(/* @__PURE__ */ new Map());
259
- const [placement, setPlacement] = useState("bottom");
260
- const controlled = value !== void 0;
261
- const current = controlled ? value : internal;
262
- const select = useCallback((next) => {
263
- if (!controlled) setInternal(next);
264
- onValueChange?.(next);
265
- setOpen(false);
266
- }, [controlled, onValueChange]);
267
- const register = useCallback((v, label) => {
268
- setLabels((m2) => m2.get(v) === label ? m2 : new Map(m2).set(v, label));
269
- }, []);
270
- const unregister = useCallback((v) => {
271
- setLabels((m2) => {
272
- if (!m2.has(v)) return m2;
273
- const next = new Map(m2);
274
- next.delete(v);
275
- return next;
276
- });
277
- }, []);
278
- useEffect(() => {
279
- if (!open) return;
280
- const onKey = (e) => e.key === "Escape" && setOpen(false);
281
- const onPointer = (e) => {
282
- if (rootRef.current && !rootRef.current.contains(e.target)) setOpen(false);
283
- };
284
- window.addEventListener("keydown", onKey);
285
- window.addEventListener("pointerdown", onPointer);
286
- return () => {
287
- window.removeEventListener("keydown", onKey);
288
- window.removeEventListener("pointerdown", onPointer);
289
- };
290
- }, [open]);
291
- const ctx = useMemo(() => ({
292
- value: current,
293
- open,
294
- setOpen,
295
- select,
296
- register,
297
- unregister,
298
- labelFor: (v) => v === void 0 ? void 0 : labels.get(v),
299
- reduce,
300
- triggerId: `${baseId}-trigger`,
301
- listId: `${baseId}-list`,
302
- disabled,
303
- placement,
304
- setPlacement
305
- }), [
306
- current,
307
- open,
308
- select,
309
- register,
310
- unregister,
311
- labels,
312
- reduce,
313
- baseId,
314
- disabled,
315
- placement
316
- ]);
317
- return /* @__PURE__ */ jsx(AnimatedSelectContext.Provider, {
318
- value: ctx,
319
- children: /* @__PURE__ */ jsx("div", {
320
- ref: rootRef,
321
- className: cn("relative", className),
322
- children
323
- })
324
- });
325
- }
326
- function AnimatedSelectTrigger({ className, children }) {
327
- const ctx = useAnimatedSelectContext("AnimatedSelectTrigger");
328
- const isTop = ctx.placement === "top";
329
- const kf = ctx.open ? [
330
- 0,
331
- 0,
332
- 12
333
- ] : [
334
- 12,
335
- 0,
336
- 12
337
- ];
338
- const kfT = ctx.reduce ? { duration: 0 } : ctx.open ? {
339
- duration: 0.6,
340
- times: [
341
- 0,
342
- 0.4,
343
- 1
344
- ],
345
- ease: EASE_OUT
346
- } : {
347
- duration: 0.42,
348
- times: [
349
- 0,
350
- 0.5,
351
- 1
352
- ],
353
- ease: EASE_OUT
354
- };
355
- return /* @__PURE__ */ jsxs(m.button, {
356
- type: "button",
357
- id: ctx.triggerId,
358
- disabled: ctx.disabled,
359
- "aria-haspopup": "listbox",
360
- "aria-expanded": ctx.open,
361
- "aria-controls": ctx.listId,
362
- onClick: () => ctx.setOpen(!ctx.open),
363
- initial: false,
364
- animate: {
365
- borderTopLeftRadius: isTop ? kf : 12,
366
- borderTopRightRadius: isTop ? kf : 12,
367
- borderBottomLeftRadius: isTop ? 12 : kf,
368
- borderBottomRightRadius: isTop ? 12 : kf
369
- },
370
- transition: {
371
- borderTopLeftRadius: isTop ? kfT : INSTANT_TRANSITION,
372
- borderTopRightRadius: isTop ? kfT : INSTANT_TRANSITION,
373
- borderBottomLeftRadius: isTop ? INSTANT_TRANSITION : kfT,
374
- borderBottomRightRadius: isTop ? INSTANT_TRANSITION : kfT
375
- },
376
- className: cn("relative z-10 flex w-full items-center justify-between gap-2 rounded-xl border border-border bg-background px-3 py-2 text-sm text-foreground outline-none transition-colors", "hover:border-(--color-border-strong) focus-visible:ring-2 focus-visible:ring-foreground/20", "disabled:pointer-events-none disabled:opacity-50", className),
377
- children: [children, /* @__PURE__ */ jsx(m.span, {
378
- "aria-hidden": true,
379
- animate: { rotate: ctx.open ? 180 : 0 },
380
- transition: ctx.reduce ? { duration: 0 } : CHEVRON_TRANSITION,
381
- className: "text-muted-foreground",
382
- children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" })
383
- })]
384
- });
385
- }
386
- function AnimatedSelectContent({ className, children }) {
387
- const ctx = useAnimatedSelectContext("AnimatedSelectContent");
388
- const innerRef = useRef(null);
389
- const [height, setHeight] = useState(0);
390
- const open = ctx.open;
391
- const { setPlacement } = ctx;
392
- useLayoutEffect(() => {
393
- const node = innerRef.current;
394
- if (!node) return;
395
- const measure = () => setHeight(node.offsetHeight);
396
- measure();
397
- const observer = new ResizeObserver(measure);
398
- observer.observe(node);
399
- return () => observer.disconnect();
400
- });
401
- useLayoutEffect(() => {
402
- if (!open) return;
403
- const trigger = document.getElementById(ctx.triggerId);
404
- const node = innerRef.current;
405
- if (!trigger || !node) return;
406
- const rect = trigger.getBoundingClientRect();
407
- const h = node.offsetHeight;
408
- const below = window.innerHeight - rect.bottom;
409
- const above = rect.top;
410
- setPlacement(below < h + 16 && above > below ? "top" : "bottom");
411
- }, [
412
- open,
413
- ctx.triggerId,
414
- setPlacement
415
- ]);
416
- const isTop = ctx.placement === "top";
417
- const nearGap = open ? 8 : 0;
418
- const nearRadius = open ? 12 : 0;
419
- const gapT = open ? {
420
- type: "spring",
421
- duration: 0.6,
422
- bounce: 0.5,
423
- delay: 0.12
424
- } : {
425
- type: "spring",
426
- duration: 0.3,
427
- bounce: 0.1
428
- };
429
- const radiusT = open ? {
430
- duration: 0.3,
431
- ease: EASE_OUT,
432
- delay: 0.14
433
- } : {
434
- duration: 0.16,
435
- ease: EASE_OUT
436
- };
437
- return /* @__PURE__ */ jsx(m.div, {
438
- id: ctx.listId,
439
- role: "listbox",
440
- "aria-labelledby": ctx.triggerId,
441
- "aria-hidden": !open,
442
- inert: !open,
443
- initial: false,
444
- animate: ctx.reduce ? {
445
- opacity: open ? 1 : 0,
446
- height: open ? height : 0
447
- } : {
448
- opacity: open ? 1 : 0,
449
- height: open ? height : 0,
450
- marginTop: isTop ? 0 : nearGap,
451
- marginBottom: isTop ? nearGap : 0,
452
- borderTopLeftRadius: isTop ? 12 : nearRadius,
453
- borderTopRightRadius: isTop ? 12 : nearRadius,
454
- borderBottomLeftRadius: isTop ? nearRadius : 12,
455
- borderBottomRightRadius: isTop ? nearRadius : 12
456
- },
457
- transition: ctx.reduce ? { duration: 0.12 } : {
458
- opacity: open ? { duration: 0.18 } : {
459
- duration: 0.16,
460
- delay: 0.12
461
- },
462
- height: open ? {
463
- type: "spring",
464
- duration: 0.42,
465
- bounce: 0.14
466
- } : {
467
- duration: 0.26,
468
- ease: EASE_OUT,
469
- delay: 0.14
470
- },
471
- marginTop: isTop ? INSTANT_TRANSITION : gapT,
472
- marginBottom: isTop ? gapT : INSTANT_TRANSITION,
473
- borderTopLeftRadius: isTop ? INSTANT_TRANSITION : radiusT,
474
- borderTopRightRadius: isTop ? INSTANT_TRANSITION : radiusT,
475
- borderBottomLeftRadius: isTop ? radiusT : INSTANT_TRANSITION,
476
- borderBottomRightRadius: isTop ? radiusT : INSTANT_TRANSITION
477
- },
478
- style: {
479
- transformOrigin: isTop ? "bottom" : "top",
480
- overflow: "hidden",
481
- pointerEvents: open ? "auto" : "none"
482
- },
483
- className: cn("absolute left-0 right-0 z-20 rounded-xl border border-border bg-background shadow-lg", isTop ? "bottom-full" : "top-full", className),
484
- children: /* @__PURE__ */ jsx(m.div, {
485
- ref: innerRef,
486
- variants: ctx.reduce ? void 0 : LIST_VARIANTS,
487
- initial: false,
488
- animate: open ? "show" : "hidden",
489
- className: "p-1",
490
- children
491
- })
492
- });
493
- }
494
- function AnimatedSelectItem({ value, disabled = false, className, children }) {
495
- const ctx = useAnimatedSelectContext("AnimatedSelectItem");
496
- const selected = ctx.value === value;
497
- const label = typeof children === "string" ? children : value;
498
- useLayoutEffect(() => {
499
- ctx.register(value, label);
500
- return () => ctx.unregister(value);
501
- }, [
502
- ctx.register,
503
- ctx.unregister,
504
- value,
505
- label
506
- ]);
507
- return /* @__PURE__ */ jsx(m.li, {
508
- variants: ctx.reduce ? void 0 : ITEM_VARIANTS,
509
- children: /* @__PURE__ */ jsxs("button", {
510
- type: "button",
511
- role: "option",
512
- "aria-selected": selected,
513
- disabled,
514
- onClick: () => ctx.select(value),
515
- className: cn("flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm outline-none transition-colors", selected ? "bg-muted text-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:bg-muted", "disabled:pointer-events-none disabled:opacity-50", className),
516
- children: [children, selected ? /* @__PURE__ */ jsx(Check, { className: "size-3.5 shrink-0" }) : null]
517
- })
518
- });
519
- }
520
- var VARIANT_CLASS = {
521
- primary: "bg-primary text-primary-foreground hover:bg-primary/90",
522
- secondary: "border border-border bg-card text-foreground hover:border-border",
523
- ghost: "text-muted-foreground hover:text-foreground hover:bg-primary/5",
524
- outline: "border border-border bg-transparent text-foreground hover:bg-primary/5"
525
- };
526
- var SIZE_CLASS = {
527
- sm: "h-8 px-3 text-xs gap-1.5 rounded-full",
528
- md: "h-10 px-5 text-sm gap-2 rounded-full",
529
- lg: "h-12 px-6 text-base gap-2 rounded-full",
530
- icon: "h-8 w-8 rounded-lg"
531
- };
532
- var Button = forwardRef(function Button2({ variant = "primary", size = "md", pressScale = 0.93, ripple = false, className, children, onPointerDown, ...rest }, ref) {
533
- const reduce = useReducedMotion();
534
- const canHover = useHoverCapable();
535
- const [ripples, setRipples] = useState([]);
536
- const nextId = useRef(0);
537
- const handlePointerDown = useCallback((event) => {
538
- if (ripple && !reduce) {
539
- const rect = event.currentTarget.getBoundingClientRect();
540
- const size2 = Math.max(rect.width, rect.height) * 2;
541
- const id = nextId.current++;
542
- setRipples((prev) => [...prev, {
543
- id,
544
- x: event.clientX - rect.left,
545
- y: event.clientY - rect.top,
546
- size: size2
547
- }]);
548
- }
549
- onPointerDown?.(event);
550
- }, [
551
- ripple,
552
- reduce,
553
- onPointerDown
554
- ]);
555
- return /* @__PURE__ */ jsxs(m.button, {
556
- ref,
557
- type: "button",
558
- whileTap: reduce ? void 0 : { scale: pressScale },
559
- whileHover: reduce || !canHover ? void 0 : { scale: 1.02 },
560
- transition: SPRING_PRESS,
561
- onPointerDown: handlePointerDown,
562
- className: cn("inline-flex items-center justify-center font-medium select-none", "transition-colors", "disabled:pointer-events-none disabled:opacity-50", ripple && "relative overflow-hidden", VARIANT_CLASS[variant], SIZE_CLASS[size], className),
563
- ...rest,
564
- children: [/* @__PURE__ */ jsx("span", {
565
- className: cn("pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]", !ripple && "hidden"),
566
- children: /* @__PURE__ */ jsx(AnimatePresence, { children: ripple && !reduce ? ripples.map((r) => /* @__PURE__ */ jsx(m.span, {
567
- className: "absolute rounded-full bg-current",
568
- style: {
569
- left: r.x,
570
- top: r.y,
571
- width: r.size,
572
- height: r.size,
573
- x: "-50%",
574
- y: "-50%"
575
- },
576
- initial: {
577
- scale: 0.05,
578
- opacity: 0.3
579
- },
580
- animate: {
581
- scale: 1,
582
- opacity: 0
583
- },
584
- exit: { opacity: 0 },
585
- transition: {
586
- duration: 1.6,
587
- ease: EASE_OUT
588
- },
589
- onAnimationComplete: () => setRipples((prev) => prev.filter((x) => x.id !== r.id))
590
- }, r.id)) : null })
591
- }), children]
592
- });
593
- });
594
- forwardRef(function ButtonLink({ variant = "primary", size = "md", pressScale = 0.93, className, children, ...rest }, ref) {
595
- const reduce = useReducedMotion();
596
- const canHover = useHoverCapable();
597
- return /* @__PURE__ */ jsx(m.a, {
598
- ref,
599
- whileTap: reduce ? void 0 : { scale: pressScale },
600
- whileHover: reduce || !canHover ? void 0 : { scale: 1.02 },
601
- transition: SPRING_PRESS,
602
- className: cn("inline-flex items-center justify-center font-medium select-none", "transition-colors", VARIANT_CLASS[variant], SIZE_CLASS[size], className),
603
- ...rest,
604
- children
605
- });
606
- });
607
- function Magnetic({ children, strength = 0.35, className }) {
608
- const ref = useRef(null);
609
- const reduce = useReducedMotion();
610
- const canHover = useHoverCapable();
611
- const enabled = !reduce && canHover;
612
- const x = useMotionValue(0);
613
- const y = useMotionValue(0);
614
- const sx = useSpring(x, SPRING_MOUSE);
615
- const sy = useSpring(y, SPRING_MOUSE);
616
- const onMove = (e) => {
617
- const el = ref.current;
618
- if (!el || !enabled) return;
619
- const rect = el.getBoundingClientRect();
620
- x.set((e.clientX - rect.left - rect.width / 2) * strength);
621
- y.set((e.clientY - rect.top - rect.height / 2) * strength);
622
- };
623
- const onLeave = () => {
624
- x.set(0);
625
- y.set(0);
626
- };
627
- return /* @__PURE__ */ jsx(m.div, {
628
- ref,
629
- onMouseMove: onMove,
630
- onMouseLeave: onLeave,
631
- style: {
632
- x: sx,
633
- y: sy
634
- },
635
- className: cn("inline-block", className),
636
- children
637
- });
638
- }
639
- forwardRef(function MagneticButton({ strength = 0.25, magneticClassName, children, ...rest }, ref) {
640
- return /* @__PURE__ */ jsx(Magnetic, {
641
- strength,
642
- className: magneticClassName,
643
- children: /* @__PURE__ */ jsx(Button, {
644
- ref,
645
- ...rest,
646
- children
647
- })
648
- });
649
- });
650
- var CASCADE_STAGGER = 0.025;
651
- var ROLL_BLUR = "blur(6px)";
652
- var CASCADE_LETTER_VARIANTS = {
653
- initial: {
654
- opacity: 0,
655
- y: "105%",
656
- filter: ROLL_BLUR
657
- },
658
- animate: (delay = 0) => ({
659
- opacity: 1,
660
- y: "0%",
661
- filter: "blur(0px)",
662
- transition: {
663
- ...SPRING_SWAP,
664
- delay
665
- }
666
- }),
667
- exit: (delay = 0) => ({
668
- opacity: 0,
669
- y: "-105%",
670
- filter: ROLL_BLUR,
671
- transition: {
672
- duration: 0.16,
673
- ease: EASE_OUT,
674
- delay: delay * 0.5
675
- }
676
- })
677
- };
678
- var ICON_VARIANTS = {
679
- initial: {
680
- opacity: 0,
681
- width: 0,
682
- scale: 0.7,
683
- filter: ROLL_BLUR
684
- },
685
- animate: {
686
- opacity: 1,
687
- width: "1.5rem",
688
- scale: 1,
689
- filter: "blur(0px)",
690
- transition: SPRING_SWAP
691
- },
692
- exit: {
693
- opacity: 0,
694
- width: 0,
695
- scale: 0.7,
696
- filter: ROLL_BLUR,
697
- transition: {
698
- duration: 0.16,
699
- ease: EASE_OUT
700
- }
701
- }
702
- };
703
- function IconSlot({ keyId, children }) {
704
- const reduce = useReducedMotion();
705
- return /* @__PURE__ */ jsx(m.span, {
706
- variants: ICON_VARIANTS,
707
- initial: reduce ? { opacity: 0 } : "initial",
708
- animate: reduce ? { opacity: 1 } : "animate",
709
- exit: reduce ? { opacity: 0 } : "exit",
710
- transition: reduce ? { duration: 0.15 } : void 0,
711
- className: "inline-grid shrink-0 place-items-center overflow-hidden",
712
- children
713
- }, keyId);
714
- }
715
- function TextSlot({ value, children }) {
716
- const reduce = useReducedMotion();
717
- const measureRef = useRef(null);
718
- const [width, setWidth] = useState();
719
- const label = typeof children === "string" ? children : null;
720
- const cascade = label !== null && !reduce;
721
- useLayoutEffect(() => {
722
- const nextWidth = measureRef.current?.offsetWidth;
723
- if (!nextWidth) return;
724
- setWidth((current) => current === nextWidth ? current : nextWidth);
725
- });
726
- return /* @__PURE__ */ jsxs(m.span, {
727
- initial: false,
728
- layout: "size",
729
- style: { width },
730
- transition: reduce ? { duration: 0 } : SPRING_SWAP,
731
- className: "relative inline-block overflow-hidden whitespace-nowrap align-bottom",
732
- children: [
733
- /* @__PURE__ */ jsx("span", {
734
- ref: measureRef,
735
- "aria-hidden": true,
736
- className: "invisible inline-block whitespace-nowrap",
737
- children: cascade ? label.split("").map((char, index) => /* @__PURE__ */ jsx("span", {
738
- className: "inline-block whitespace-pre",
739
- children: char
740
- }, index)) : children
741
- }),
742
- cascade ? /* @__PURE__ */ jsx("span", {
743
- className: "sr-only",
744
- children: label
745
- }) : null,
746
- /* @__PURE__ */ jsx(AnimatePresence, {
747
- initial: false,
748
- children: cascade ? /* @__PURE__ */ jsx(m.span, {
749
- "aria-hidden": true,
750
- initial: "initial",
751
- animate: "animate",
752
- exit: "exit",
753
- className: "absolute left-0 top-0 inline-block whitespace-pre",
754
- children: label.split("").map((char, index) => /* @__PURE__ */ jsx(m.span, {
755
- custom: index * CASCADE_STAGGER,
756
- variants: CASCADE_LETTER_VARIANTS,
757
- className: "inline-block whitespace-pre",
758
- children: char
759
- }, index))
760
- }, `cascade-${value}`) : /* @__PURE__ */ jsx(m.span, {
761
- initial: reduce ? { opacity: 0 } : {
762
- opacity: 0,
763
- y: 14,
764
- filter: ROLL_BLUR
765
- },
766
- animate: reduce ? { opacity: 1 } : {
767
- opacity: 1,
768
- y: 0,
769
- filter: "blur(0px)"
770
- },
771
- exit: reduce ? { opacity: 0 } : {
772
- opacity: 0,
773
- y: -14,
774
- filter: ROLL_BLUR
775
- },
776
- transition: reduce ? { duration: 0.15 } : SPRING_SWAP,
777
- className: "absolute left-0 top-0 inline-block",
778
- children
779
- }, `text-${value}`)
780
- })
781
- ]
782
- });
783
- }
784
- forwardRef(function StatefulButton({ state = "idle", children, loadingText = "Loading", successText = "Done", errorText = "Try again", icon, disabled, ...rest }, ref) {
785
- const isBusy = state === "loading";
786
- const stateText = state === "loading" ? loadingText : state === "success" ? successText : state === "error" ? errorText : children;
787
- const textKey = typeof stateText === "string" ? `${state}-${stateText}` : state;
788
- return /* @__PURE__ */ jsx(Button, {
789
- ref,
790
- disabled: disabled || isBusy,
791
- "aria-busy": isBusy,
792
- whileHover: void 0,
793
- ...rest,
794
- children: /* @__PURE__ */ jsxs("span", {
795
- "aria-live": "polite",
796
- className: "relative inline-flex items-center justify-center overflow-hidden",
797
- children: [
798
- /* @__PURE__ */ jsxs(AnimatePresence, {
799
- initial: false,
800
- children: [
801
- state === "loading" ? /* @__PURE__ */ jsx(IconSlot, {
802
- keyId: "loading-icon",
803
- children: /* @__PURE__ */ jsx(LoaderCircle, { className: "size-4 animate-spin" })
804
- }) : null,
805
- state === "success" ? /* @__PURE__ */ jsx(IconSlot, {
806
- keyId: "success-icon",
807
- children: /* @__PURE__ */ jsx(Check, { className: "size-4" })
808
- }) : null,
809
- state === "error" ? /* @__PURE__ */ jsx(IconSlot, {
810
- keyId: "error-icon",
811
- children: /* @__PURE__ */ jsx(X, { className: "size-4" })
812
- }) : null
813
- ]
814
- }),
815
- /* @__PURE__ */ jsx(TextSlot, {
816
- value: textKey,
817
- children: stateText
818
- }),
819
- /* @__PURE__ */ jsx(AnimatePresence, {
820
- initial: false,
821
- children: state === "idle" && icon ? /* @__PURE__ */ jsx(IconSlot, {
822
- keyId: "idle-icon",
823
- children: icon
824
- }) : null
825
- })
826
- ]
827
- })
828
- });
829
- });
830
- function sameLayout(a, b) {
831
- return a?.trigger.left === b.trigger.left && a.trigger.top === b.trigger.top && a.trigger.width === b.trigger.width && a.trigger.height === b.trigger.height && a.content.width === b.content.width && a.content.height === b.content.height;
832
- }
833
- function usePopoverPortalPosition(triggerRef, contentRef, active) {
834
- const [layout, setLayout] = useState(null);
835
- const update = useCallback(() => {
836
- const trigger = triggerRef.current;
837
- const content = contentRef.current;
838
- if (!trigger || !content) return;
839
- const rect = trigger.getBoundingClientRect();
840
- const next = {
841
- trigger: {
842
- left: rect.left,
843
- top: rect.top,
844
- width: rect.width,
845
- height: rect.height
846
- },
847
- content: {
848
- width: content.offsetWidth,
849
- height: content.offsetHeight
850
- }
851
- };
852
- setLayout((current) => sameLayout(current, next) ? current : next);
853
- }, [contentRef, triggerRef]);
854
- useLayoutEffect(() => {
855
- update();
856
- if (!active) return;
857
- const trigger = triggerRef.current;
858
- const content = contentRef.current;
859
- const observer = new ResizeObserver(update);
860
- if (trigger) observer.observe(trigger);
861
- if (content) observer.observe(content);
862
- window.addEventListener("scroll", update, true);
863
- window.addEventListener("resize", update);
864
- return () => {
865
- observer.disconnect();
866
- window.removeEventListener("scroll", update, true);
867
- window.removeEventListener("resize", update);
868
- };
869
- }, [
870
- active,
871
- contentRef,
872
- triggerRef,
873
- update
874
- ]);
875
- return layout;
876
- }
877
- function subscribe() {
878
- return () => {
879
- };
880
- }
881
- function getSnapshot() {
882
- return true;
883
- }
884
- function getServerSnapshot() {
885
- return false;
886
- }
887
- function useHydrated() {
888
- return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
889
- }
890
- var MorphContext = createContext(null);
891
- function useMorphContext(component) {
892
- const ctx = useContext(MorphContext);
893
- if (!ctx) throw new Error(`${component} must be used within <MorphPopover>`);
894
- return ctx;
895
- }
896
- function MorphPopover({ children, open: controlledOpen, defaultOpen = false, onOpenChange, className }) {
897
- const baseId = useId();
898
- const rootRef = useRef(null);
899
- const triggerRef = useRef(null);
900
- const contentRef = useRef(null);
901
- const [internalOpen, setInternalOpen] = useState(defaultOpen);
902
- const controlled = controlledOpen !== void 0;
903
- const open = controlled ? controlledOpen : internalOpen;
904
- const setOpen = useCallback((next) => {
905
- if (!controlled) setInternalOpen(next);
906
- onOpenChange?.(next);
907
- }, [controlled, onOpenChange]);
908
- const toggle = useCallback(() => setOpen(!open), [setOpen, open]);
909
- const setOpenEvent = useEffectEvent(setOpen);
910
- useEffect(() => {
911
- if (!open) return;
912
- const onKey = (e) => e.key === "Escape" && setOpenEvent(false);
913
- const onPointer = (e) => {
914
- const target = e.target;
915
- if (rootRef.current && !rootRef.current.contains(target) && !contentRef.current?.contains(target)) setOpenEvent(false);
916
- };
917
- window.addEventListener("keydown", onKey);
918
- window.addEventListener("pointerdown", onPointer);
919
- return () => {
920
- window.removeEventListener("keydown", onKey);
921
- window.removeEventListener("pointerdown", onPointer);
922
- };
923
- }, [open]);
924
- const ctx = useMemo(() => ({
925
- open,
926
- setOpen,
927
- toggle,
928
- triggerId: `${baseId}-trigger`,
929
- contentId: `${baseId}-content`,
930
- triggerRef,
931
- contentRef
932
- }), [
933
- open,
934
- setOpen,
935
- toggle,
936
- baseId
937
- ]);
938
- return /* @__PURE__ */ jsx(MorphContext.Provider, {
939
- value: ctx,
940
- children: /* @__PURE__ */ jsx("div", {
941
- ref: rootRef,
942
- className: cn("relative inline-flex", className),
943
- children
944
- })
945
- });
946
- }
947
- function mergeRefs(...refs) {
948
- return (node) => {
949
- for (const ref of refs) if (typeof ref === "function") ref(node);
950
- else if (ref && typeof ref === "object") ref.current = node;
951
- };
952
- }
953
- function MorphPopoverTrigger({ children }) {
954
- const ctx = useMorphContext("MorphPopoverTrigger");
955
- if (!isValidElement(children)) return children;
956
- const child = children;
957
- const childOnClick = child.props.onClick;
958
- const childRef = child.props.ref;
959
- return cloneElement(child, {
960
- id: ctx.triggerId,
961
- ref: mergeRefs(childRef, (node) => {
962
- ctx.triggerRef.current = node;
963
- }),
964
- onClick: (e) => {
965
- childOnClick?.(e);
966
- ctx.toggle();
967
- },
968
- "aria-haspopup": "dialog",
969
- "aria-expanded": ctx.open,
970
- "aria-controls": ctx.open ? ctx.contentId : void 0
971
- });
972
- }
973
- var originFor = (side, align) => `${side === "bottom" ? "top" : "bottom"} ${align === "end" ? "right" : "left"}`;
974
- function clipHidden(side, align, radius) {
975
- return `inset(${side === "bottom" ? "0%" : "92%"} ${align === "end" ? "0%" : "92%"} ${side === "bottom" ? "92%" : "0%"} ${align === "end" ? "92%" : "0%"} round ${radius}px)`;
976
- }
977
- var clipShown = (radius) => `inset(0% 0% 0% 0% round ${radius}px)`;
978
- var MORPH_CLIP_TRANSITION = {
979
- duration: 0.32,
980
- ease: EASE_OUT
981
- };
982
- function MorphPopoverContent({ children, side = "bottom", align = "end", sideOffset = 8, radius = 16, className }) {
983
- const ctx = useMorphContext("MorphPopoverContent");
984
- const reduce = useReducedMotion() ?? false;
985
- const portalReady = useHydrated();
986
- const layout = usePopoverPortalPosition(ctx.triggerRef, ctx.contentRef, portalReady && ctx.open);
987
- const left = layout ? align === "end" ? layout.trigger.left + layout.trigger.width - layout.content.width : layout.trigger.left : 0;
988
- const top = layout ? side === "bottom" ? layout.trigger.top + layout.trigger.height + sideOffset : layout.trigger.top - layout.content.height - sideOffset : 0;
989
- const wrap = reduce ? void 0 : {
990
- hidden: {
991
- opacity: 0,
992
- scale: 0.96,
993
- transition: SPRING_PANEL
994
- },
995
- show: {
996
- opacity: 1,
997
- scale: 1,
998
- transition: SPRING_PANEL
999
- }
1000
- };
1001
- const clip = reduce ? void 0 : {
1002
- hidden: {
1003
- clipPath: clipHidden(side, align, radius),
1004
- transition: MORPH_CLIP_TRANSITION
1005
- },
1006
- show: {
1007
- clipPath: clipShown(radius),
1008
- transition: MORPH_CLIP_TRANSITION
1009
- }
1010
- };
1011
- if (!portalReady) return null;
1012
- return createPortal(/* @__PURE__ */ jsx(AnimatePresence, { children: ctx.open ? /* @__PURE__ */ jsx(m.div, {
1013
- "data-morph-popover-portal": "",
1014
- variants: wrap,
1015
- initial: reduce ? { opacity: 0 } : "hidden",
1016
- animate: reduce ? { opacity: 1 } : "show",
1017
- exit: reduce ? { opacity: 0 } : "hidden",
1018
- transition: reduce ? { duration: 0.12 } : void 0,
1019
- style: {
1020
- left,
1021
- top,
1022
- visibility: layout ? "visible" : "hidden",
1023
- transformOrigin: originFor(side, align)
1024
- },
1025
- className: "fixed z-[9999] [filter:drop-shadow(0_10px_18px_rgba(0,0,0,0.14))]",
1026
- children: /* @__PURE__ */ jsx(m.div, {
1027
- ref: ctx.contentRef,
1028
- id: ctx.contentId,
1029
- role: "dialog",
1030
- "aria-labelledby": ctx.triggerId,
1031
- variants: clip,
1032
- style: { borderRadius: radius },
1033
- className: cn("overflow-hidden", elevatedMenu, className),
1034
- children
1035
- })
1036
- }) : null }), document.body);
1037
- }
1038
- function PromptInput({ value, defaultValue = "", onValueChange, models = [], model, defaultModel, onModelChange, actions = [], onAction, onSubmit, loading = false, submitWhileLoading = false, onStop, minRows = 2, maxRows = 8, leadingAction, className, disabled, placeholder = "Ask the agent to do something\u2026", "aria-label": ariaLabel = "Prompt", onKeyDown, ...textareaProps }) {
1039
- const reduce = useReducedMotion() ?? false;
1040
- const textareaRef = useRef(null);
1041
- const measurementRef = useRef(null);
1042
- const [internalValue, setInternalValue] = useState(defaultValue);
1043
- const [internalModel, setInternalModel] = useState(defaultModel ?? models[0]?.value);
1044
- const [actionsOpen, setActionsOpen] = useState(false);
1045
- const currentValue = value ?? internalValue;
1046
- const currentModelValue = model ?? internalModel;
1047
- const currentModel = models.find((option) => option.value === currentModelValue);
1048
- const canSubmit = Boolean(currentValue.trim()) && !disabled && (!loading || submitWhileLoading);
1049
- const resizeTextarea = useCallback(() => {
1050
- const textarea = textareaRef.current;
1051
- const measurement = measurementRef.current;
1052
- if (!textarea || !measurement || textarea.value !== currentValue) return;
1053
- const lineHeight = 24;
1054
- const height = `${Math.min(Math.max(measurement.scrollHeight, minRows * lineHeight), maxRows * lineHeight)}px`;
1055
- if (textarea.style.height !== height) textarea.style.height = height;
1056
- }, [
1057
- currentValue,
1058
- maxRows,
1059
- minRows
1060
- ]);
1061
- useLayoutEffect(() => {
1062
- resizeTextarea();
1063
- }, [resizeTextarea]);
1064
- const resizeRef = useRef(resizeTextarea);
1065
- useEffect(() => {
1066
- resizeRef.current = resizeTextarea;
1067
- });
1068
- useEffect(() => {
1069
- const textarea = textareaRef.current;
1070
- if (!textarea || typeof ResizeObserver === "undefined") return;
1071
- const observer = new ResizeObserver(() => resizeRef.current());
1072
- observer.observe(textarea);
1073
- return () => observer.disconnect();
1074
- }, []);
1075
- const setValue = (next) => {
1076
- if (value === void 0) setInternalValue(next);
1077
- onValueChange?.(next);
1078
- };
1079
- const setModel = (next) => {
1080
- if (model === void 0) setInternalModel(next);
1081
- onModelChange?.(next);
1082
- };
1083
- const submit = (event) => {
1084
- event?.preventDefault();
1085
- const prompt = currentValue.trim();
1086
- if (!prompt || disabled || loading && !submitWhileLoading) return;
1087
- onSubmit?.(prompt, currentModelValue);
1088
- if (value === void 0) setInternalValue("");
1089
- textareaRef.current?.focus({ preventScroll: true });
1090
- };
1091
- const handleKeyDown = (event) => {
1092
- onKeyDown?.(event);
1093
- if (event.defaultPrevented || event.key !== "Enter" || event.shiftKey || event.nativeEvent.isComposing) return;
1094
- event.preventDefault();
1095
- submit();
1096
- };
1097
- return /* @__PURE__ */ jsxs("form", {
1098
- onSubmit: submit,
1099
- className: cn("relative w-full rounded-[24px] border border-border/70 bg-sidebar p-2 text-[color:var(--foreground)] shadow-sm transition-[border-color,box-shadow] focus-within:border-foreground/25 focus-within:ring-1 focus-within:ring-ring/20", disabled && "opacity-60", className),
1100
- children: [
1101
- /* @__PURE__ */ jsx("div", {
1102
- ref: measurementRef,
1103
- "aria-hidden": "true",
1104
- className: "pointer-events-none invisible absolute inset-x-2 top-0 whitespace-pre-wrap px-2 text-sm leading-6 [overflow-wrap:break-word]",
1105
- children: `${currentValue}\u200B`
1106
- }),
1107
- /* @__PURE__ */ jsx("textarea", {
1108
- ref: textareaRef,
1109
- value: currentValue,
1110
- disabled,
1111
- placeholder,
1112
- "aria-label": ariaLabel,
1113
- rows: minRows,
1114
- ...textareaProps,
1115
- onChange: (event) => setValue(event.target.value),
1116
- onKeyDown: handleKeyDown,
1117
- className: "scrollbar-hide block w-full resize-none overflow-y-auto bg-transparent px-2 pt-1.5 text-sm leading-6 text-foreground outline-none placeholder:text-foreground/55"
1118
- }),
1119
- /* @__PURE__ */ jsxs("div", {
1120
- className: "mt-1 flex min-h-8 items-center gap-1",
1121
- children: [
1122
- actions.length ? /* @__PURE__ */ jsxs(MorphPopover, {
1123
- open: actionsOpen,
1124
- onOpenChange: setActionsOpen,
1125
- children: [/* @__PURE__ */ jsx(MorphPopoverTrigger, { children: /* @__PURE__ */ jsx(Button, {
1126
- type: "button",
1127
- variant: "ghost",
1128
- size: "icon",
1129
- disabled: disabled || loading,
1130
- "aria-label": "Add to prompt",
1131
- className: "size-8 rounded-full text-foreground/70 hover:text-foreground",
1132
- children: /* @__PURE__ */ jsx(m.span, {
1133
- "aria-hidden": "true",
1134
- animate: { rotate: actionsOpen ? 45 : 0 },
1135
- transition: reduce ? { duration: 0 } : SPRING_SWAP,
1136
- children: /* @__PURE__ */ jsx(Plus, { className: "size-4" })
1137
- })
1138
- }) }), /* @__PURE__ */ jsx(MorphPopoverContent, {
1139
- side: "top",
1140
- align: "start",
1141
- sideOffset: 8,
1142
- radius: 12,
1143
- className: "w-56 p-1.5",
1144
- children: actions.map((action) => /* @__PURE__ */ jsxs("button", {
1145
- type: "button",
1146
- disabled: action.disabled,
1147
- onClick: () => {
1148
- onAction?.(action.value);
1149
- setActionsOpen(false);
1150
- },
1151
- className: "flex w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left outline-none transition-colors hover:bg-muted focus-visible:bg-muted disabled:pointer-events-none disabled:opacity-50",
1152
- children: [action.icon ? /* @__PURE__ */ jsx("span", {
1153
- className: "mt-0.5 grid size-5 shrink-0 place-items-center text-foreground/70 [&_svg]:size-4",
1154
- children: action.icon
1155
- }) : null, /* @__PURE__ */ jsxs("span", {
1156
- className: "min-w-0",
1157
- children: [/* @__PURE__ */ jsx("span", {
1158
- className: "block text-sm text-foreground",
1159
- children: action.label
1160
- }), action.description ? /* @__PURE__ */ jsx("span", {
1161
- className: "mt-0.5 block text-xs leading-4 text-foreground/60",
1162
- children: action.description
1163
- }) : null]
1164
- })]
1165
- }, action.value))
1166
- })]
1167
- }) : null,
1168
- leadingAction,
1169
- models.length ? /* @__PURE__ */ jsxs(AnimatedSelect, {
1170
- value: currentModelValue,
1171
- onValueChange: setModel,
1172
- disabled: disabled || loading,
1173
- className: "min-w-0",
1174
- children: [/* @__PURE__ */ jsx(AnimatedSelectTrigger, {
1175
- className: "h-8 w-auto max-w-52 rounded-xl border-0 bg-transparent px-2 py-0 text-xs hover:bg-muted focus-visible:ring-2",
1176
- children: /* @__PURE__ */ jsxs("span", {
1177
- className: "flex min-w-0 items-center gap-1.5",
1178
- children: [currentModel?.icon ? /* @__PURE__ */ jsx("span", {
1179
- className: "grid size-4 shrink-0 place-items-center text-foreground/70 [&_svg]:size-3.5",
1180
- children: currentModel.icon
1181
- }) : null, /* @__PURE__ */ jsx("span", {
1182
- className: "truncate text-foreground/70",
1183
- children: currentModel?.label ?? "Choose model"
1184
- })]
1185
- })
1186
- }), /* @__PURE__ */ jsx(AnimatedSelectContent, {
1187
- className: "right-auto w-52 shadow-none",
1188
- children: models.map((option) => /* @__PURE__ */ jsx(AnimatedSelectItem, {
1189
- value: option.value,
1190
- disabled: option.disabled,
1191
- className: "py-2",
1192
- children: /* @__PURE__ */ jsxs("span", {
1193
- className: "flex min-w-0 items-center gap-2",
1194
- children: [option.icon ? /* @__PURE__ */ jsx("span", {
1195
- className: "grid size-5 shrink-0 place-items-center text-muted-foreground [&_svg]:size-4",
1196
- children: option.icon
1197
- }) : null, /* @__PURE__ */ jsx("span", {
1198
- className: "min-w-0 truncate text-sm text-foreground",
1199
- children: option.label
1200
- })]
1201
- })
1202
- }, option.value))
1203
- })]
1204
- }) : null,
1205
- loading && onStop ? /* @__PURE__ */ jsx(Button, {
1206
- type: "button",
1207
- size: "icon",
1208
- "aria-label": "Stop generating",
1209
- onClick: onStop,
1210
- className: "ml-auto size-8 rounded-full",
1211
- children: /* @__PURE__ */ jsx(Square, { className: "size-3 fill-current" })
1212
- }) : null,
1213
- !loading || canSubmit ? /* @__PURE__ */ jsx(Button, {
1214
- type: "submit",
1215
- size: "icon",
1216
- disabled: !canSubmit,
1217
- "aria-label": loading ? "Steer current run" : "Send prompt",
1218
- className: cn("size-8 rounded-full", !loading && "ml-auto"),
1219
- children: /* @__PURE__ */ jsx(AnimatePresence, {
1220
- initial: false,
1221
- mode: "popLayout",
1222
- children: /* @__PURE__ */ jsx(m.span, {
1223
- initial: reduce ? { opacity: 1 } : {
1224
- opacity: 0,
1225
- y: 3,
1226
- scale: 0.8
1227
- },
1228
- animate: {
1229
- opacity: 1,
1230
- y: 0,
1231
- scale: 1
1232
- },
1233
- exit: reduce ? { opacity: 0 } : {
1234
- opacity: 0,
1235
- y: -3,
1236
- scale: 0.8
1237
- },
1238
- transition: reduce ? { duration: 0 } : SPRING_SWAP,
1239
- className: "grid place-items-center",
1240
- children: /* @__PURE__ */ jsx(ArrowUp, { className: "size-4" })
1241
- }, "send")
1242
- })
1243
- }) : null
1244
- ]
1245
- })
1246
- ]
1247
- });
1248
- }
1249
-
1250
- export {
1251
- ArrowUp,
1252
- Button,
1253
- usePopoverPortalPosition,
1254
- useHydrated,
1255
- MorphPopover,
1256
- MorphPopoverTrigger,
1257
- MorphPopoverContent,
1258
- PromptInput
1259
- };
1260
- /**
1261
- * @license lucide-react v1.38.0 - ISC
1262
- *
1263
- * This source code is licensed under the ISC license.
1264
- * See the LICENSE file in the root directory of this source tree.
1265
- */