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