@qredence/fleet 0.5.9 → 0.5.11

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 (121) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/web/client/assets/agent-activity-CwMDU7aP.js +1 -0
  3. package/dist/web/client/assets/artifacts-panel-CQmFEF_H.js +1 -0
  4. package/dist/web/client/assets/{button-BV9NafmI.js → button-BR2WWrFo.js} +1 -1
  5. package/dist/web/client/assets/{chat-command-palette-C_HgND2N.js → chat-command-palette-CmHTS3rs.js} +1 -1
  6. package/dist/web/client/assets/{chat-DdPRGn-U.js → chat-yh02zgA7.js} +2 -2
  7. package/dist/web/client/assets/{citations-BQ_pr_9_.js → citations-C_tPOJE_.js} +1 -1
  8. package/dist/web/client/assets/{command-Cx-UYeQ9.js → command-DPfiaYUL.js} +1 -1
  9. package/dist/web/client/assets/{dialog-Dh7WpGIu.js → dialog-BEZuZhzk.js} +1 -1
  10. package/dist/web/client/assets/{fleet-message-queue-DPBMIZSU.js → fleet-message-queue-DUz6Hfrf.js} +1 -1
  11. package/dist/web/client/assets/{fleet-pi-tool-renderer-DMjrKLi2.js → fleet-pi-tool-renderer-BEDIO3al.js} +4 -4
  12. package/dist/web/client/assets/fleet-reasoning-panel-CbkO7u-v.js +1 -0
  13. package/dist/web/client/assets/{fleet-subagent-list-BnRnrWKS.js → fleet-subagent-list-iKUtLJKZ.js} +1 -1
  14. package/dist/web/client/assets/fleet-tool-timeline-C8heL7ae.js +1 -0
  15. package/dist/web/client/assets/{fork-picker-dialog-CAhWx0G5.js → fork-picker-dialog-ByBOGVsa.js} +1 -1
  16. package/dist/web/client/assets/globals-B_I1Eq1u.css +2 -0
  17. package/dist/web/client/assets/horizontal-resize-qK6eRhIG.js +1 -0
  18. package/dist/web/client/assets/{index-CwtZA4hF.js → index-C1zOjrMK.js} +3 -3
  19. package/dist/web/client/assets/{input-Bol3TP4v.js → input-0wwjWjKq.js} +1 -1
  20. package/dist/web/client/assets/{input-group-D5gi9zBK.js → input-group-BFDsCVS9.js} +1 -1
  21. package/dist/web/client/assets/{ipython-tool-BrMePqD-.js → ipython-tool-ldJ9F1Cw.js} +1 -1
  22. package/dist/web/client/assets/model-selector-list-DsKTuAgS.js +1 -0
  23. package/dist/web/client/assets/{notify-BnNaNaBU.js → notify-DgMKgZZW.js} +1 -1
  24. package/dist/web/client/assets/{openui-renderer-nuOkzdau.js → openui-renderer-J3dhPpL4.js} +5 -5
  25. package/dist/web/client/assets/prompt-input-qPIXZ-Rb.js +1 -0
  26. package/dist/web/client/assets/prompt-suggestions-Cc--lSNR.js +1 -0
  27. package/dist/web/client/assets/{provider-catalog-CO1GxLYe.js → provider-catalog-D8G66gwc.js} +1 -1
  28. package/dist/web/client/assets/{provider-label-B0E-wWFV.js → provider-label-Dpr7djG9.js} +1 -1
  29. package/dist/web/client/assets/repl-panel-DsPX04Xr.js +1 -0
  30. package/dist/web/client/assets/{resources-panel-Bo8dfUdm.js → resources-panel-D867-goy.js} +1 -1
  31. package/dist/web/client/assets/right-panel-registry-DewpBWHM.js +2 -0
  32. package/dist/web/client/assets/routes-vNkVToAF.js +16 -0
  33. package/dist/web/client/assets/safe-storage-s25GrfpH.js +1 -0
  34. package/dist/web/client/assets/session-insights-panel-YnaXvTpi.js +1 -0
  35. package/dist/web/client/assets/settings-dialog-B-v4me3Y.js +1 -0
  36. package/dist/web/client/assets/skeleton-loaders-C9vHwAYV.js +1 -0
  37. package/dist/web/client/assets/{subagent-chat-panel-Ck06wcIJ.js → subagent-chat-panel-DkVUumrP.js} +1 -1
  38. package/dist/web/client/assets/subagent-transcript-D8wmQxXe.js +1 -0
  39. package/dist/web/client/assets/subagents-panel-BMp2Ego0.js +1 -0
  40. package/dist/web/client/assets/{surfaces-cW-gp56p.js → surfaces-DI-U-_2a.js} +1 -1
  41. package/dist/web/client/assets/{switch-J2Lvo_tF.js → switch-9rTeg6J6.js} +1 -1
  42. package/dist/web/client/assets/{toast-BzAKULar.js → toast-Bt9p2OL4.js} +1 -1
  43. package/dist/web/client/assets/tool-result-DfnPN0FQ.js +4 -0
  44. package/dist/web/client/assets/ui-preferences-CImQGZm_.js +1 -0
  45. package/dist/web/client/assets/virtualized-turn-list-DMJENRY0.js +6 -0
  46. package/dist/web/client/assets/{workspace-panel-DI1W3ce9.js → workspace-panel-G6yMpKJ8.js} +1 -1
  47. package/dist/web/client/bundle-budget.json +6 -6
  48. package/dist/web/server/{_tanstack-start-manifest_v-DkghjPW8-5E6WBVI6.js → _tanstack-start-manifest_v-po4woX6g-AUGCOEZ2.js} +20 -19
  49. package/dist/web/server/{agent-activity-B-JMvecd-SLE3GGY2.js → agent-activity-CS2rbF_C-A3R26CYH.js} +2 -2
  50. package/dist/web/server/{artifacts-panel-D20iI9ud-YGBYV6NF.js → artifacts-panel-8GGUCtOd-X5TNKTY2.js} +17 -17
  51. package/dist/web/server/{chat-command-palette-DmDvAEZe-CONFK6YH.js → chat-command-palette-Dgl5tqWn-72LLEWUD.js} +7 -7
  52. package/dist/web/server/{chunk-K5ESTT4A.js → chunk-7MDZVLIY.js} +11 -3
  53. package/dist/web/server/{chunk-EBCYJSBR.js → chunk-7SD2ZSEA.js} +3 -3
  54. package/dist/web/server/{chunk-BTXNB4CP.js → chunk-ABBWBBSS.js} +13 -13
  55. package/dist/web/server/{chunk-VMYYWXF4.js → chunk-AGFRJQZ7.js} +2 -2
  56. package/dist/web/server/{chunk-FZMWPQNE.js → chunk-BXWAUTTH.js} +4 -4
  57. package/dist/web/server/{chunk-54II5QXQ.js → chunk-ETTDO4UO.js} +6 -3
  58. package/dist/web/server/{chunk-EHNIN245.js → chunk-GETSIVNU.js} +5 -5
  59. package/dist/web/server/{chunk-NRDG2ISJ.js → chunk-GGT2ZKDB.js} +49 -49
  60. package/dist/web/server/{chunk-X2R5YPQZ.js → chunk-IJPCV6DH.js} +3 -2
  61. package/dist/web/server/{chunk-TFHXOWFX.js → chunk-JQDLJ7KI.js} +20 -20
  62. package/dist/web/server/{chunk-VHBFU4TG.js → chunk-JUROEEWM.js} +43 -14
  63. package/dist/web/server/{chunk-WQDG5ZM2.js → chunk-KOUEJ3NU.js} +2 -2
  64. package/dist/web/server/{chunk-JICJWC33.js → chunk-LZ4Q5KUJ.js} +10 -10
  65. package/dist/web/server/{chunk-W6IZDM2G.js → chunk-MIW4LJTV.js} +4 -4
  66. package/dist/web/server/{chunk-2TRF62K5.js → chunk-N6NOTURM.js} +3 -3
  67. package/dist/web/server/{chunk-5XX7RKJ6.js → chunk-NXJ32VFR.js} +5 -5
  68. package/dist/web/server/{chunk-EFNPNSDO.js → chunk-O4OTWWPF.js} +7 -7
  69. package/dist/web/server/{chunk-X6RKK47S.js → chunk-P6UMR32I.js} +2 -2
  70. package/dist/web/server/{chunk-QJQZLBLU.js → chunk-P7H2OPKF.js} +3 -3
  71. package/dist/web/server/{chunk-MLPLZVON.js → chunk-RNOJACWQ.js} +54 -30
  72. package/dist/web/server/chunk-SZJUXVWG.js +40 -0
  73. package/dist/web/server/{chunk-ZCJXHV2R.js → chunk-UAPNEWCA.js} +4 -4
  74. package/dist/web/server/{chunk-WVBBA2VV.js → chunk-WILCIZYU.js} +195 -11
  75. package/dist/web/server/{chunk-FED63ZHU.js → chunk-WKV2Z4KO.js} +10 -5
  76. package/dist/web/server/{chunk-TGZIE2T6.js → chunk-WM4PUT6M.js} +4 -4
  77. package/dist/web/server/{chunk-56NGD3FN.js → chunk-WYL2DW5R.js} +2 -2
  78. package/dist/web/server/{chunk-IMK45Q23.js → chunk-XKKXXG6N.js} +3 -3
  79. package/dist/web/server/{chunk-ANL4B775.js → chunk-XLNCWZMZ.js} +2 -2
  80. package/dist/web/server/{chunk-ZVL6TBG5.js → chunk-YKVGQBZA.js} +13 -9
  81. package/dist/web/server/{chunk-IFHABBJO.js → chunk-YXXRP3NS.js} +18 -10
  82. package/dist/web/server/{fleet-message-queue-BvMcWtLo-6CMMI73U.js → fleet-message-queue-j0DCU5Xy-5HKBHMPV.js} +5 -5
  83. package/dist/web/server/{fleet-pi-tool-renderer-CgbmlIoe-7MSJLEGU.js → fleet-pi-tool-renderer-umKunT3K-O4GBH35V.js} +5 -5
  84. package/dist/web/server/{fleet-reasoning-panel-D_K48UOT-GN2PA6KT.js → fleet-reasoning-panel-BxC2COxi-GPLMQSTT.js} +9 -9
  85. package/dist/web/server/{fleet-subagent-list-5luKtpds-3OTVFHJQ.js → fleet-subagent-list-CpSYzCIq-JDH2LHSS.js} +1 -1
  86. package/dist/web/server/{fleet-tool-timeline-DwRqQgOj-HUFLGMDV.js → fleet-tool-timeline-IB36_PB2-XJENTO6I.js} +1 -1
  87. package/dist/web/server/{fork-picker-dialog-DfSRzUI5-EBRK5HNO.js → fork-picker-dialog-DlINz9UQ-UWIXFDJX.js} +5 -5
  88. package/dist/web/server/{model-selector-list-wCp4_UWC-2NQUCAM3.js → model-selector-list-OYnzNbyu-HBGCNF2L.js} +10 -10
  89. package/dist/web/server/{openui-renderer-BNLpfzyj-JUPJXUWF.js → openui-renderer-Cj7kfqyL-EKJ6JTTQ.js} +9 -9
  90. package/dist/web/server/{prompt-suggestions-BOmHi4-J-C563CHFU.js → prompt-suggestions-D4AEEY7K-RZSP7PWV.js} +3 -3
  91. package/dist/web/server/{repl-panel-yyxhwe4c-7U6HXYPS.js → repl-panel-D5KsoJik-BQKO53JO.js} +9 -9
  92. package/dist/web/server/{resources-panel-j4fAIi9g-5C267IXV.js → resources-panel-CE5pD4vy-V5FXBTYC.js} +2 -2
  93. package/dist/web/server/{router-dnEmu1cU-LUH74TAC.js → router-Ci1wxI7I-E2AYMNON.js} +255 -78
  94. package/dist/web/server/{routes-Ci5_8lws-F54KB46D.js → routes-CRpm9-Sa-IYK6MUJO.js} +720 -549
  95. package/dist/web/server/server.js +2 -2
  96. package/dist/web/server/{session-insights-panel-BHZyKDTo-LRMAMA3O.js → session-insights-panel-CUhdgvRt-VB2HUCQP.js} +4 -4
  97. package/dist/web/server/{settings-dialog-CdFpyzR--JVYIS5OD.js → settings-dialog-BvkgNflv-GPJ6COQO.js} +22 -18
  98. package/dist/web/server/{subagent-chat-panel-DVgf-whR-6G2ASMGU.js → subagent-chat-panel-CMuvW9Sd-M5TEEGQW.js} +14 -14
  99. package/dist/web/server/{subagents-panel-D2CN0IYy-3L6ZNQ3Q.js → subagents-panel-DgfB6_Yy-4INEPE3Y.js} +16 -16
  100. package/dist/web/server/{workspace-panel-BOs-58Cv-SWQBMZSB.js → workspace-panel-bpwj-Veu-Q2CEJMN4.js} +4 -3
  101. package/package.json +1 -1
  102. package/dist/web/client/assets/agent-activity-CDcDNVC6.js +0 -1
  103. package/dist/web/client/assets/artifacts-panel-N4k9VcJr.js +0 -1
  104. package/dist/web/client/assets/fleet-reasoning-panel-MtbSdoCv.js +0 -1
  105. package/dist/web/client/assets/fleet-tool-timeline-COzPrwr8.js +0 -1
  106. package/dist/web/client/assets/generative-text-renderer-CzwNIs3b.js +0 -6
  107. package/dist/web/client/assets/globals-C7ovVTh2.css +0 -2
  108. package/dist/web/client/assets/horizontal-resize-Bl3AyBJg.js +0 -1
  109. package/dist/web/client/assets/model-selector-list-CJY9pyt2.js +0 -1
  110. package/dist/web/client/assets/prompt-input-BpuTiX7Z.js +0 -1
  111. package/dist/web/client/assets/prompt-suggestions-CXM6knMK.js +0 -1
  112. package/dist/web/client/assets/repl-panel-BDQ5MEgV.js +0 -1
  113. package/dist/web/client/assets/right-panel-registry-DOyEvIMD.js +0 -2
  114. package/dist/web/client/assets/routes-DkefU9yA.js +0 -16
  115. package/dist/web/client/assets/session-insights-panel-CQdT90Op.js +0 -1
  116. package/dist/web/client/assets/settings-dialog-B6rt69m_.js +0 -1
  117. package/dist/web/client/assets/skeleton-loaders-DjGv9LLA.js +0 -1
  118. package/dist/web/client/assets/subagent-transcript-BwCv3nTL.js +0 -1
  119. package/dist/web/client/assets/subagents-panel-BkOorzzy.js +0 -1
  120. package/dist/web/client/assets/tool-result-Cp13oeRn.js +0 -4
  121. package/dist/web/client/assets/ui-preferences-DUEFuJFj.js +0 -1
@@ -0,0 +1,6 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/openui-renderer-J3dhPpL4.js","assets/rolldown-runtime-hePW80VL.js","assets/bundle-mjs-DKHVkVWu.js","assets/react-dom-Bwxum3ti.js","assets/jsx-runtime-NZYk81nU.js","assets/button-BR2WWrFo.js","assets/createBaseUIEventDetails-DV0dQrBX.js","assets/utils-Eg7xtNmV.js","assets/dialog-BEZuZhzk.js","assets/useBaseUiId-CHqXB2UQ.js","assets/x-CsRC_tCI.js","assets/createLucideIcon-DwxZHm0M.js","assets/provider-catalog-D8G66gwc.js","assets/check-JjHKAZas.js","assets/chevron-down-BEVGmnSb.js","assets/useControlled-CJJ9BOQB.js","assets/input-0wwjWjKq.js","assets/chevron-up-CnSvySGH.js","assets/card-BKl76a3R.js","assets/chunk-YOKDWASO-BAf618wr.js","assets/preload-helper-Czpn1I53.js","assets/lib-ChrQ49PO.js","assets/character-entities-legacy-Wut6vMuj.js","assets/openui-utils-DawGoQNp.js","assets/safe-external-url-D3PJJIcM.js","assets/chat-yh02zgA7.js","assets/switch-9rTeg6J6.js","assets/markdown-DInPmRUG.js","assets/cn-C8c0S2mI.js","assets/dist-BPaFisIZ.js"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./react-dom-Bwxum3ti.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";import{d as i,o as a,r as o}from"./ease-u56MhKYS.js";import{n as s,t as c}from"./use-reduced-motion-eORd7fqW.js";import{t as l}from"./utils-Eg7xtNmV.js";import{t as u}from"./createLucideIcon-DwxZHm0M.js";import{a as d,o as f}from"./citations-C_tPOJE_.js";import{t as p}from"./check-JjHKAZas.js";import{t as m}from"./chevron-right-DrJxToLs.js";import{r as h}from"./action-swap-roll-BB8DFMuf.js";import{t as g}from"./file-text-T-NcAlZs.js";import{t as _}from"./image-BbPmlw-n.js";import{t as v}from"./x-CsRC_tCI.js";import{t as y}from"./preload-helper-Czpn1I53.js";import"./cn-C8c0S2mI.js";import{t as b}from"./notify-DgMKgZZW.js";import{t as x}from"./openui-utils-DawGoQNp.js";var S=u(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),C=u(`file-braces`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),w=u(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),T=e(t(),1),E=(0,T.createContext)(void 0),D=r(),O=(0,T.createContext)({animateIn:!0,variant:`soft`}),k=(0,T.createContext)(()=>{});function A(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n&&(n.current=t)}}var j={duration:.12,ease:o,delay:.04},M={type:`spring`,stiffness:520,damping:27,mass:.52};function N({variant:e=`soft`,align:t,animateIn:n=!1,className:r,children:o,initial:s,animate:u,exit:d,transition:f,layout:p,...m}){let h=c()??!1,g=(0,T.useContext)(E),_=t??g??`start`,v=(0,T.useMemo)(()=>({align:_,animateIn:n,variant:e}),[n,_,e]);return(0,D.jsx)(O.Provider,{value:v,children:(0,D.jsx)(i.div,{"data-slot":`message-bubble`,"data-align":_,"data-variant":e,layout:p,initial:s??!1,animate:u,exit:d??(h?{opacity:0}:{opacity:0,y:-3,scale:.99}),transition:f??(h?{duration:.12}:a),className:l(`group/bubble flex w-full flex-col`,_===`end`?`items-end`:`items-start`,r),...m,children:o})})}function P(e,t){return l(`relative z-0 min-w-9 max-w-[82%] rounded-2xl px-3.5 py-2.5 text-sm leading-6 text-foreground`,`[&_a]:font-medium [&_a]:underline [&_a]:underline-offset-4 [&_code]:rounded [&_code]:bg-background/60 [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.9em] [&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-5 [&_p+p]:mt-2 [&_pre]:my-2 [&_pre]:overflow-x-auto [&_pre]:rounded-xl [&_pre]:bg-background/60 [&_pre]:p-3 [&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-5`,e===`solid`&&`text-background`,e===`ghost`&&`w-full max-w-none rounded-none px-0 py-0`,e===`danger`&&`text-destructive`,t&&`cursor-pointer text-left outline-none transition-[background-color,color,transform] duration-150 hover:brightness-[0.98] focus-visible:ring-2 focus-visible:ring-ring active:scale-[0.99]`)}function F(e,t){return l(`pointer-events-none absolute inset-0 -z-10 rounded-[inherit]`,t===`end`?`origin-bottom-right`:`origin-bottom-left`,e===`solid`&&`bg-foreground`,e===`soft`&&`bg-muted`,e===`tint`&&`bg-primary/10`,e===`outline`&&`border border-border/70 bg-background`,e===`danger`&&`bg-destructive/10`)}function I({render:e,className:t,children:n,ref:r,...s}){let u=c()??!1,{align:d=`start`,animateIn:f,variant:p}=(0,T.useContext)(O),[m,h]=(0,T.useState)(0),g=(0,T.useCallback)(()=>h(e=>e+1),[]),_=e?.type===`button`||e?.type===`a`,v=l(P(p,_),t),y=(0,D.jsxs)(D.Fragment,{children:[p===`ghost`?null:(0,D.jsx)(i.span,{"aria-hidden":`true`,layout:!u&&`size`,layoutDependency:m,initial:f&&!u?{opacity:0,scale:.92}:!1,animate:{opacity:1,scale:1},transition:u?{duration:0}:{opacity:{duration:.12,ease:o},scale:M,layout:a},className:F(p,d)}),(0,D.jsx)(k.Provider,{value:g,children:(0,D.jsx)(i.div,{initial:f?{opacity:0}:!1,animate:{opacity:1},transition:u?{duration:.12,ease:o}:j,className:`relative`,children:n})})]});if(e){let t=e;return(0,T.cloneElement)(t,{...s,ref:A(t.props.ref,r),className:l(v,t.props.className),children:y,"data-slot":`message-bubble-content`})}return(0,D.jsx)(`div`,{ref:r,"data-slot":`message-bubble-content`,className:v,...s,children:y})}function ee({item:e}){return(0,D.jsxs)(`div`,{"data-slot":`preview-rail-card`,className:`rounded-2xl border border-border bg-card p-4 shadow-sm`,children:[(0,D.jsx)(`p`,{"data-slot":`preview-rail-title`,className:`font-medium text-card-foreground`,children:e.label}),e.description?(0,D.jsx)(`div`,{"data-slot":`preview-rail-description`,className:`mt-1 text-sm leading-6 text-muted-foreground`,children:e.description}):null]})}function L({items:e,label:t=`Section navigation`,orientation:n=`vertical`,activeId:r,defaultActiveId:u,onActiveChange:d,onItemSelect:p,renderPreview:m,showPreview:h=!0,previewSide:g=`after`,highlightActive:_=!1,itemSize:v=24,children:y,className:b,railClassName:x,previewContainerClassName:S,previewClassName:C}){let w=(0,T.useId)(),E=c(),O=f(),[k,A]=(0,T.useState)(u??e[0]?.id??``),[j,M]=(0,T.useState)(null),[N,P]=(0,T.useState)(null),F=r??k,I=e.some(e=>e.id===F)?F:e[0]?.id??``,L=j??N??``,R=L||(_?I:``),z=e.findIndex(e=>e.id===R),B=e.length?`repeat(${e.length}, ${v}px)`:void 0,V=n===`horizontal`,H=e=>{r===void 0&&A(e),d?.(e)};return(0,D.jsxs)(i.div,{layoutRoot:!0,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||P(null)},className:l(`isolate relative flex w-full overflow-visible`,V?`min-h-64 flex-col items-center justify-center`:`min-h-80`,b),children:[(0,D.jsx)(`nav`,{"aria-label":t,onPointerLeave:()=>M(null),style:V?{gridTemplateColumns:B}:{gridTemplateRows:B},className:l(`relative z-10 grid shrink-0`,V?`h-12 w-fit max-w-full self-center justify-center`:`w-12 content-center`,x),children:e.map((e,t)=>{let n=e.id===I,r=e.id===R,o=z<0?1/0:Math.abs(t-z),s=r?1:o===1?.68:o===2?.44:.25,c=(0,D.jsx)(D.Fragment,{children:(0,D.jsx)(i.span,{"data-slot":`preview-rail-tick`,"aria-hidden":`true`,animate:V?{scaleY:s}:{scaleX:s},transition:E?{duration:0}:a,className:l(`block bg-current`,V?`h-12 w-0.5 origin-bottom`:`h-0.5 w-12 origin-left`,r?`text-foreground`:void 0)})}),u=l(`relative flex text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,V?`h-12 w-6 items-end justify-center`:`h-6 w-12 items-center`),d=V?{width:v}:{height:v},f=()=>{O&&M(e.id)},m=t=>{t.matches(`:focus-visible`)&&P(e.id)},h=()=>{H(e.id),p?.(e)};return e.href?(0,D.jsx)(`a`,{"data-slot":`preview-rail-item`,href:e.href,target:e.target,rel:e.rel??(e.target===`_blank`?`noreferrer noopener`:void 0),"aria-label":e.ariaLabel??e.label,"aria-current":n?`page`:void 0,onPointerEnter:f,onMouseEnter:f,onPointerDown:()=>P(null),onFocus:e=>m(e.currentTarget),onClick:h,style:d,className:u,children:c},e.id):(0,D.jsx)(`button`,{"data-slot":`preview-rail-item`,type:`button`,"aria-label":e.ariaLabel??e.label,"aria-current":n?`location`:void 0,onPointerEnter:f,onMouseEnter:f,onPointerDown:()=>P(null),onFocus:e=>m(e.currentTarget),onClick:h,style:d,className:u,children:c},e.id)})}),h?(0,D.jsx)(`div`,{"aria-hidden":`true`,style:V?{gridTemplateColumns:B}:{gridTemplateRows:B},className:l(`pointer-events-none absolute z-50 grid`,V?`top-1/2 left-1/2 h-5 w-fit max-w-full -translate-x-1/2 -translate-y-1/2 justify-center`:g===`before`?`inset-y-0 right-16 left-4 content-center`:`inset-y-0 right-4 left-16 content-center`,S),children:e.map(e=>(0,D.jsx)(`div`,{style:V?{width:v}:{height:v},className:l(`relative flex items-center`,V?`justify-center`:void 0),children:(0,D.jsx)(s,{mode:`wait`,initial:!1,children:e.id===L?(0,D.jsx)(i.div,{initial:E?{opacity:0}:{opacity:0,y:4,filter:`blur(6px)`},animate:E?{opacity:1}:{opacity:1,y:0,filter:`blur(0px)`},exit:E?{opacity:0}:{opacity:0,y:-2,filter:`blur(4px)`,transition:{duration:.12,ease:o}},transition:{duration:E?0:.18,ease:o},className:l(V?`absolute bottom-12 left-1/2 w-72 -translate-x-1/2`:l(`w-full max-w-sm`,g===`before`&&`ml-auto`),C),children:(0,D.jsx)(i.div,{layoutId:`preview-rail-card-${w}`,transition:E?{duration:0}:a,children:m?m(e):(0,D.jsx)(ee,{item:e})})},e.id):null})},e.id))}):null,y?(0,D.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1`,children:y}):null]})}var R=56,z=88;function B(e,t){if(e.length<=t)return e;let n=e.slice(0,t),r=n.lastIndexOf(` `);return`${n.slice(0,r>t*.65?r:t).trim()}…`}function V(e){return((e.querySelector(`[data-slot="message-bubble-content"]`)??e.querySelector(`[data-slot="message-content"]`)??e).textContent??``).replace(/\s+/g,` `).trim()}function H(e,t){let n=V(e);if(!n)return{label:`Message`,description:void 0};if(n.length<=R){let e=t?V(t):``;return{label:n,description:e?B(e,z):void 0}}let r=n.slice(0,R).lastIndexOf(` `),i=r>R*.65?r:R,a=`${n.slice(0,i).trim()}…`,o=t?V(t):n.slice(i).trim();return{label:a,description:o?B(o,z):void 0}}function te({navigation:e,followThreshold:t,contentRef:n,viewportRef:r,reduce:i,smooth:a,scrollToEnd:o,setFollowing:s,markProgrammaticScroll:c}){let l=(0,T.useRef)(void 0),u=(0,T.useRef)(new WeakMap),d=(0,T.useRef)(0),f=(0,T.useRef)(new Map),[p,m]=(0,T.useState)([]),[h,g]=(0,T.useState)(``),[_,v]=(0,T.useState)(!1),y=(0,T.useCallback)(()=>{if(e!==`rail`)return;let n=r.current,i=[...f.current.entries()];if(!n||i.length===0)return;let a=n.getBoundingClientRect();if(n.scrollTop<=t){let e=i[0]?.[0]??``;g(t=>t===e?t:e);return}if(n.scrollHeight-n.scrollTop-n.clientHeight<=t){let e=i.at(-1)?.[0]??``;g(t=>t===e?t:e);return}let o=a.top+a.height/2,s=i[0]?.[0]??``,c=1/0;for(let[e,t]of i){let n=t.getBoundingClientRect(),r=Math.abs(n.top+n.height/2-o);r<c&&(c=r,s=e)}g(e=>e===s?e:s)},[t,e,r]),b=(0,T.useCallback)(()=>{if(e!==`rail`)return;let t=n.current,i=r.current;if(!t||!i)return;let a=Array.from(t.querySelectorAll(`[data-slot="message"]`)),o=new Map,s=a.map((e,t)=>{let n=u.current.get(e);n||(d.current+=1,n=`message-rail-${d.current}`,u.current.set(e,n)),o.set(n,e);let r=e.dataset.from??`conversation`,i=H(e,r===`user`?a.slice(t+1).find(e=>e.dataset.from===`assistant`):void 0);return{id:n,label:i.label,description:i.description,ariaLabel:`Go to ${r} message ${t+1} of ${a.length}`}});f.current=o,m(e=>e.length===s.length&&e.every((e,t)=>e.id===s[t]?.id&&e.label===s[t]?.label&&e.description===s[t]?.description&&e.ariaLabel===s[t]?.ariaLabel)?e:s),v(i.scrollHeight>i.clientHeight+1&&a.length>1)},[n,e,r]),x=(0,T.useCallback)(()=>{e===`rail`&&(l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(()=>{b(),y()}))},[e,b,y]);return(0,T.useEffect)(()=>{if(e!==`rail`){f.current.clear(),m([]),v(!1);return}let t=n.current,i=r.current;if(!t||!i)return;x();let a=typeof MutationObserver>`u`?null:new MutationObserver(x);a?.observe(t,{childList:!0,characterData:!0,subtree:!0});let o=typeof ResizeObserver>`u`?null:new ResizeObserver(x);return o?.observe(t),o?.observe(i),()=>{a?.disconnect(),o?.disconnect()}},[n,e,x,r]),(0,T.useEffect)(()=>()=>{l.current&&cancelAnimationFrame(l.current)},[]),{activeRailId:h,railItems:p,railOverflowing:_,scheduleRailSync:x,scrollToRailItem:(0,T.useCallback)(e=>{let t=r.current,n=f.current.get(e.id);if(!t||!n)return;let l=p.at(-1)?.id===e.id;if(g(e.id),l){s(!0),o(i||!a?`auto`:`smooth`);return}s(!1),c(i||!a?`auto`:`smooth`);let u=t.getBoundingClientRect(),d=n.getBoundingClientRect(),m=t.scrollTop+d.top-u.top-(t.clientHeight-d.height)/2,h=i||!a?`auto`:`smooth`;typeof t.scrollTo==`function`?t.scrollTo({top:m,behavior:h}):t.scrollTop=m},[c,p,i,o,s,a,r])}}function U({followOutput:e=!0,followThreshold:t=56,smooth:n=!0,onFollowChange:r,label:i=`Conversation`,busy:a,navigation:o,navigationLabel:s=`Message navigation`,viewportClassName:u,contentClassName:d,railClassName:f,viewportRef:p,viewportProps:m,contentProps:h,className:g,children:_,...v}){let y=c()??!1,b=(0,T.useRef)(null),x=(0,T.useRef)(null),S=(0,T.useRef)(e),C=(0,T.useRef)(!1),w=(0,T.useRef)(void 0),E=(0,T.useRef)(void 0),{onScroll:O,onWheel:k,onTouchStart:A,onKeyDown:j,...M}=m??{},N=(0,T.useCallback)(e=>{b.current=e,typeof p==`function`?p(e):p&&(p.current=e)},[p]),P=(0,T.useCallback)(e=>{S.current!==e&&(S.current=e,r?.(e))},[r]),F=(0,T.useCallback)(e=>{C.current=!0,w.current&&window.clearTimeout(w.current),w.current=window.setTimeout(()=>{C.current=!1},e===`smooth`?320:0)},[]),I=(0,T.useCallback)(e=>{let t=b.current;t&&(F(e),typeof t.scrollTo==`function`?t.scrollTo({top:t.scrollHeight,behavior:e}):t.scrollTop=t.scrollHeight)},[F]),{activeRailId:ee,railItems:R,railOverflowing:z,scheduleRailSync:B,scrollToRailItem:V}=te({navigation:o,followThreshold:t,contentRef:x,viewportRef:b,reduce:y,smooth:n,scrollToEnd:I,setFollowing:P,markProgrammaticScroll:F}),H=(0,T.useEffectEvent)(B),U=(0,T.useEffectEvent)(I),W=(0,T.useCallback)(()=>{let e=b.current;if(!e||C.current)return;let n=e.scrollHeight-e.scrollTop-e.clientHeight;P(n<=t),B()},[t,B,P]),G=(0,T.useCallback)(()=>{C.current=!1},[]);(0,T.useLayoutEffect)(()=>{if(S.current=e,e)return E.current=requestAnimationFrame(()=>U(`auto`)),()=>{E.current&&cancelAnimationFrame(E.current)}},[e]),(0,T.useEffect)(()=>{let t=x.current;if(!t||typeof ResizeObserver>`u`)return;let r=new ResizeObserver(()=>{H(),!(!e||!S.current)&&U(y||!n?`auto`:`smooth`)});return r.observe(t),()=>r.disconnect()},[e,y,n]),(0,T.useEffect)(()=>()=>{w.current&&window.clearTimeout(w.current),E.current&&cancelAnimationFrame(E.current)},[]);let K=(0,D.jsx)(`section`,{ref:N,"aria-label":i,...M,onScroll:e=>{W(),O?.(e)},onWheel:e=>{G(),k?.(e)},onTouchStart:e=>{G(),A?.(e)},onKeyDown:e=>{[`ArrowUp`,`PageUp`,`Home`].includes(e.key)&&G(),j?.(e)},className:l(`h-full overflow-y-auto overscroll-contain outline-none [overflow-anchor:none] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,o===`rail`?`[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`:`[scrollbar-gutter:stable]`,u,o===`rail`&&z&&`pr-10`),children:(0,D.jsx)(`div`,{ref:x,role:`log`,"aria-live":a?`off`:`polite`,"aria-relevant":`additions text`,"aria-busy":a,className:d,...h,children:_})});return(0,D.jsx)(`div`,{"data-slot":`message-scroller`,className:l(`min-h-0`,g),...v,children:o===`rail`?(0,D.jsx)(L,{items:z?R:[],label:s,activeId:ee,onItemSelect:V,previewSide:`before`,highlightActive:!0,itemSize:14,className:`h-full min-h-0 overflow-hidden`,previewContainerClassName:`right-8 left-3`,previewClassName:`mr-1 w-64 max-w-full [&_[data-slot=preview-rail-card]]:h-20 [&_[data-slot=preview-rail-card]]:overflow-hidden [&_[data-slot=preview-rail-card]]:p-3 [&_[data-slot=preview-rail-title]]:line-clamp-1 [&_[data-slot=preview-rail-title]]:text-xs [&_[data-slot=preview-rail-title]]:leading-4 [&_[data-slot=preview-rail-description]]:line-clamp-2 [&_[data-slot=preview-rail-description]]:text-xs [&_[data-slot=preview-rail-description]]:leading-4`,railClassName:l(`absolute inset-y-3 right-1 w-7 content-center py-1 [&_[data-slot=preview-rail-item]]:w-7 [&_[data-slot=preview-rail-item]]:justify-end [&_[data-slot=preview-rail-tick]]:h-px [&_[data-slot=preview-rail-tick]]:w-4 [&_[data-slot=preview-rail-tick]]:origin-right`,z?`pointer-events-auto opacity-100`:`pointer-events-none opacity-0`,f),children:K}):K})}var W=(0,T.createContext)({from:`assistant`}),G={type:`spring`,stiffness:480,damping:32,mass:.62};function K({from:e,animateIn:t=!1,children:n,className:r,initial:a,animate:o,transition:s,exit:u,style:d,...f}){let p=c()??!1,m=(0,T.useMemo)(()=>({from:e}),[e]);return(0,D.jsx)(E.Provider,{value:e===`user`?`end`:`start`,children:(0,D.jsx)(W.Provider,{value:m,children:(0,D.jsx)(i.article,{"data-slot":`message`,"data-from":e,"aria-label":f[`aria-label`]??`${e} message`,initial:a??(t&&!p?{opacity:0,transform:`translateY(8px) scale(0.95)`}:!1),animate:o??(t&&!p?{opacity:1,transform:`translateY(0px) scale(1)`}:{opacity:1}),exit:u??(p?{opacity:0}:{opacity:0,transform:`translateY(-3px) scale(0.99)`}),transition:s??(p?{duration:.12}:G),style:{transformOrigin:e===`user`?`100% 100%`:`0% 100%`,...d},className:l(`group/message flex w-full items-start gap-2`,e===`user`?`flex-row-reverse`:`flex-row`,r),...f,children:n})})})}function ne({className:e,...t}){let{from:n}=(0,T.useContext)(W);return(0,D.jsx)(`div`,{"data-slot":`message-content`,className:l(`flex min-w-0 flex-1 flex-col gap-1.5`,n===`user`?`items-end`:`items-start`,e),...t})}var re=e(n(),1);function ie({open:e,onClose:t,images:n,initialIndex:r=0}){let[i,a]=(0,T.useState)(r),o=n.length>1;(0,T.useEffect)(()=>{e&&a(r)},[e,r]);let s=(0,T.useCallback)(e=>{e?.stopPropagation(),a(e=>e>0?e-1:n.length-1)},[n.length]),c=(0,T.useCallback)(e=>{e?.stopPropagation(),a(e=>e<n.length-1?e+1:0)},[n.length]),u=(0,T.useEffectEvent)(e=>{switch(e.key){case`ArrowLeft`:e.preventDefault(),o&&s();break;case`ArrowRight`:e.preventDefault(),o&&c()}});(0,T.useEffect)(()=>{if(!e)return;let t=e=>u(e);return window.addEventListener(`keydown`,t,!0),()=>window.removeEventListener(`keydown`,t,!0)},[e]),(0,T.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=t}},[e]);let d=(0,T.useRef)(null),f=(0,T.useEffectEvent)(e=>{d.current&&e.target===d.current&&t()});if((0,T.useEffect)(()=>{if(!e)return;let t=d.current;if(!t)return;t.open||t.showModal();let n=e=>f(e);return t.addEventListener(`click`,n),()=>{t.removeEventListener(`click`,n),t.open&&t.close()}},[e]),typeof document>`u`||!e)return null;let p=n[i]??n[0];return p?.url?(0,re.createPortal)((0,D.jsxs)(`dialog`,{ref:d,"aria-label":`Image viewer`,onClose:()=>t(),className:`fixed inset-0 z-50 m-0 flex h-full max-h-none w-full max-w-none items-center justify-center border-0 bg-black/90 p-0 backdrop:bg-transparent`,children:[(0,D.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`Close fullscreen (Esc)`,className:`absolute top-4 right-4 z-10 inline-flex size-9 items-center justify-center rounded-full bg-black/50 text-white transition-colors hover:bg-black/70`,children:(0,D.jsx)(v,{className:`size-5`})}),o&&(0,D.jsx)(`button`,{type:`button`,onClick:s,"aria-label":`Previous image (←)`,className:`absolute top-1/2 left-4 z-10 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-full bg-black/50 text-white transition-colors hover:bg-black/70`,children:(0,D.jsx)(S,{className:`size-6`})}),(0,D.jsx)(`img`,{src:p.url,alt:p.filename??`Image preview`,className:`max-h-[85vh] max-w-[90vw] object-contain select-none`,onClick:e=>e.stopPropagation(),draggable:!1}),o&&(0,D.jsx)(`button`,{type:`button`,onClick:c,"aria-label":`Next image (→)`,className:`absolute top-1/2 right-4 z-10 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-full bg-black/50 text-white transition-colors hover:bg-black/70`,children:(0,D.jsx)(m,{className:`size-6`})}),o&&(0,D.jsxs)(`div`,{className:`absolute bottom-6 left-1/2 flex -translate-x-1/2 flex-col items-center gap-3`,children:[(0,D.jsx)(`div`,{className:`flex gap-2`,children:n.map((e,t)=>(0,D.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),a(t)},"aria-label":`Go to image ${t+1}`,className:l(`size-2 rounded-full transition-all`,t===i?`scale-125 bg-white`:`bg-white/40 hover:bg-white/60`)},e.url))}),(0,D.jsxs)(`span`,{className:`text-sm text-white/70`,children:[i+1,` / `,n.length]})]})]}),document.body):null}function ae(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function oe(e,t){if(t)return`image`;let n=e.split(`.`).pop()?.toLowerCase();return[`js`,`ts`,`jsx`,`tsx`,`py`,`rb`,`go`,`rs`,`java`,`kt`,`swift`,`c`,`cpp`,`h`,`hpp`,`cs`,`php`].includes(n||``)?`code`:[`json`,`yaml`,`yml`,`xml`].includes(n||``)?`data`:`text`}function se(e){switch(e){case`image`:return(0,D.jsx)(_,{className:`size-4 text-muted-foreground`});case`code`:return(0,D.jsx)(w,{className:`size-4 text-muted-foreground`});case`data`:return(0,D.jsx)(C,{className:`size-4 text-muted-foreground`});default:return(0,D.jsx)(g,{className:`size-4 text-muted-foreground`})}}function ce({id:e,filename:t,size:n,isImage:r,url:i,onRemove:a,className:o,display:s=`chip`,enableImagePreview:c=!0}){let[u,d]=(0,T.useState)(!1),[f,p]=(0,T.useState)(!1),m=oe(t,r),h=s===`image-only`&&r&&!!i,g=!!(c&&r&&i),_=e=>{e?.stopPropagation(),p(!0)};return(0,D.jsxs)(`div`,{className:l(`relative rounded-[calc(var(--an-input-border-radius)-var(--an-context-padding))] bg-muted/50`,h?`flex size-10 items-center justify-center`:`flex max-w-[200px] min-w-[120px] items-center gap-2 py-1 pr-2 pl-1`,o),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[h?(0,D.jsx)(`div`,{className:l(`size-8 shrink-0 overflow-hidden rounded-[calc(var(--an-input-border-radius)-var(--an-context-padding)-2px)]`,g&&`cursor-pointer`),onClick:g?_:void 0,role:g?`button`:void 0,tabIndex:g?0:void 0,"aria-label":g?`Preview ${t}`:void 0,onKeyDown:g?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),_())}:void 0,children:(0,D.jsx)(`img`,{src:i,alt:t,className:`h-full w-full object-cover`})}):(0,D.jsxs)(D.Fragment,{children:[r&&i?(0,D.jsx)(`div`,{className:l(`w-8 shrink-0 self-stretch overflow-hidden rounded-[calc(var(--an-input-border-radius)-var(--an-context-padding)-2px)]`,g&&`cursor-pointer`),onClick:g?_:void 0,role:g?`button`:void 0,tabIndex:g?0:void 0,"aria-label":g?`Preview ${t}`:void 0,onKeyDown:g?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),_())}:void 0,children:(0,D.jsx)(`img`,{src:i,alt:t,className:`aspect-square h-full w-full object-cover`})}):(0,D.jsx)(`div`,{className:`flex w-8 shrink-0 items-center justify-center self-stretch rounded-[calc(var(--an-input-border-radius)-var(--an-context-padding)-2px)] bg-muted`,children:se(m)}),(0,D.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,D.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,title:t,children:t}),n!==void 0&&(0,D.jsx)(`span`,{className:`text-[0.625rem] text-muted-foreground`,children:ae(n)})]})]}),a&&(0,D.jsx)(`button`,{onClick:e=>{e.stopPropagation(),a()},"aria-label":`Remove ${t}`,className:`absolute -top-1.5 -right-1.5 z-10 flex size-4 items-center justify-center rounded-full border border-border bg-background text-muted-foreground transition-[opacity,transform] duration-150 ease-out hover:text-foreground active:scale-[0.97] ${u?`opacity-100`:`opacity-0`}`,type:`button`,children:(0,D.jsx)(v,{className:`size-3`})}),g&&i&&(0,D.jsx)(ie,{open:f,onClose:()=>p(!1),images:[{id:e,url:i,filename:t}]})]})}function q(e){return typeof e==`object`&&!!e}function J(e){return q(e)&&e.type===`text`&&typeof e.text==`string`}function le(e){return q(e)&&e.type===`error`&&typeof e.message==`string`}function ue(e){return q(e)&&e.type===`payload`&&typeof e.kind==`string`&&typeof e.title==`string`}function Y(e){if(!q(e))return!1;let t=e.type;return t===`dynamic-tool`||typeof t==`string`&&t.startsWith(`tool-`)}function de(e,t){let n=[];for(let t of e)J(t)&&n.push(t.text);return n.join(t)}function X(e){return typeof e==`object`&&!!e}function fe(e){if(!X(e))return null;let t=e.type;if(typeof t!=`string`)return null;if(t===`image`){let t=e;return t.url??t.image??null}if(t===`data-image`)return e.data?.url??null;if(t===`file`){let t=e;if(t.mimeType?.startsWith(`image/`)){if(t.url)return t.url;if(t.data)return`data:${t.mimeType};base64,${t.data}`}}return null}function pe(e){if(!X(e)||e.type!==`file`)return null;let t=e,n=t.filename||t.name||t.fileName||`Attachment`;return t.mimeType?.startsWith(`image/`)??!1?null:{filename:n,size:t.size}}var me=(0,T.memo)(function({message:e,className:t,enableImagePreview:n=!0}){let[r,i]=(0,T.useState)(null),a=(e.parts?.filter(J)??[]).map(e=>e.text).join(``),o=[],s=[];for(let t of e.parts??[]){let e=fe(t);e&&o.push(e);let n=pe(t);n&&s.push(n)}if(X(e)&&Array.isArray(e.experimental_attachments))for(let t of e.experimental_attachments)t.contentType?.startsWith(`image/`)&&t.url&&o.push(t.url);if(!a&&o.length===0&&s.length===0)return null;let c=o.map((t,n)=>({id:`${e.id}-img-${n}`,url:t,filename:`image-${n+1}`}));return(0,D.jsxs)(`div`,{className:l(`flex flex-col items-end gap-1`,t),children:[o.length>0&&o.map((e,t)=>(0,D.jsx)(`div`,{className:l(`max-w-[200px] rounded-an-message bg-an-foreground/4 p-1.5`,n&&`cursor-pointer`),onClick:n?()=>i(t):void 0,role:n?`button`:void 0,tabIndex:n?0:void 0,onKeyDown:n?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i(t))}:void 0,children:(0,D.jsx)(`img`,{src:e,alt:`attachment`,className:`block max-h-[120px] max-w-[184px] rounded-an-message-inner object-cover`})},e)),n&&c.length>0&&(0,D.jsx)(ie,{open:r!==null,onClose:()=>i(null),images:c,initialIndex:r??0}),s.length>0&&(0,D.jsx)(`div`,{className:`flex flex-col items-end gap-2`,children:s.map((e,t)=>(0,D.jsx)(ce,{id:`${e.filename}-${t}`,filename:e.filename,size:e.size},`${e.filename}-${e.size}`))}),a&&(0,D.jsx)(`div`,{className:`ms-[70px] max-w-[calc(95%-40px)]`,children:(0,D.jsx)(`div`,{className:`rounded-an-message bg-an-user-message-bg px-3.5 py-1.5 text-sm text-an-user-message-text transition-colors`,children:(0,D.jsx)(`p`,{className:`leading-5 wrap-break-word whitespace-pre-wrap`,children:a})})})]})}),he=(0,T.memo)(function({title:e=`Something went wrong`,message:t,className:n}){return(0,D.jsx)(`div`,{className:l(`flex justify-start`,n),children:(0,D.jsxs)(`div`,{className:`rounded-[8px] border border-red-500/30 bg-red-500/10 px-4 py-2.5 text-sm text-an-foreground`,children:[(0,D.jsx)(`div`,{className:`font-medium text-an-foreground`,children:e}),(0,D.jsx)(`div`,{className:`mt-0.5 text-an-foreground-muted`,children:t})]})})});function ge(e){if(typeof e==`string`)return e;if(e===void 0)return``;try{return JSON.stringify(e,null,2)??``}catch{return String(e)}}function _e({part:e}){let t=ge(e.payload);return(0,D.jsxs)(`section`,{"data-payload-kind":e.kind,className:`w-full min-w-0 overflow-hidden rounded-xl border border-border/60 bg-muted/40 text-sm`,children:[(0,D.jsx)(`div`,{className:`border-b border-border/50 px-3 py-2 text-xs font-medium text-muted-foreground`,children:e.title}),e.text?(0,D.jsx)(`pre`,{className:`m-0 whitespace-pre-wrap break-words p-3 font-mono text-xs leading-5 text-foreground/80`,children:e.text}):null,t?(0,D.jsxs)(`details`,{open:!0,className:`border-t border-border/50 px-3 py-2`,children:[(0,D.jsx)(`summary`,{className:`cursor-pointer text-xs font-medium text-muted-foreground`,children:`Payload`}),(0,D.jsx)(`pre`,{className:`m-0 mt-2 max-w-full whitespace-pre-wrap break-words font-mono text-xs leading-5 text-foreground/70`,children:t})]}):null]})}function ve(e){return typeof e==`object`&&!!e}function Z(e){if(typeof e!=`string`)return e;let t=e.trim();if(!t)return e;try{let n=JSON.parse(t);return ve(n)||Array.isArray(n)?n:e}catch{return e}}function ye(e){if(!ve(e)||typeof e.type!=`string`||!e.type.startsWith(`tool-`))return e;let t=Z(e.input),n=Z(e.output),r=Z(e.result),i=t!==e.input,a=n!==e.output,o=r!==e.result;if(!i&&!a&&!o)return e;let s={...e};return i&&(s.input=t),a&&(s.output=n),o&&(s.result=r),s}function be(e){let t=!1,n=e.map(e=>{let n=ye(e);return n!==e&&(t=!0),n});return t?n:e}var xe=new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,minute:`2-digit`,hour12:!0}),Se=new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`});function Ce(e){let t=new Date;return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()?xe.format(e):Se.format(e)}function we({text:e,onCopied:t}){let[n,r]=(0,T.useState)(!1),i=(0,T.useRef)(null);return(0,T.useEffect)(()=>()=>{i.current&&window.clearTimeout(i.current)},[]),(0,D.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":n?`Copied`:`Copy message`,onClick:async()=>{try{await navigator.clipboard.writeText(e),r(!0),i.current&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>{r(!1),i.current=null},2e3),b.success(`Copied to clipboard`),t?.()}catch{b.error(`Failed to copy to clipboard`)}},onPointerDown:e=>{e.stopPropagation()},onMouseDown:e=>e.stopPropagation(),className:l(`flex size-6 items-center justify-center rounded-md transition-[background-color,opacity,transform] duration-150 ease-out active:scale-[0.97]`,`bg-transparent opacity-50 hover:bg-an-foreground/10 hover:opacity-100`),children:(0,D.jsxs)(`div`,{className:`relative size-3.5`,children:[(0,D.jsx)(h,{className:l(`absolute inset-0 h-3.5 w-3.5 text-an-foreground-muted transition-[opacity,transform] duration-150 ease-out`,n?`scale-50 opacity-0`:`scale-100 opacity-100`)}),(0,D.jsx)(p,{className:l(`absolute inset-0 h-3.5 w-3.5 text-an-foreground-muted transition-[opacity,transform] duration-150 ease-out`,n?`scale-100 opacity-100`:`scale-50 opacity-0`)})]})})}function Q({text:e,timestamp:t,heightClass:n,hoverClass:r,isVisible:i,alignClass:a,onCopied:o}){return(0,D.jsxs)(`div`,{className:l(`pointer-events-none flex items-center gap-1 pt-1 text-xs text-an-foreground-muted/70 opacity-0 transition-opacity duration-100`,n,a,r,i&&`pointer-events-auto opacity-100`),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:[t&&(0,D.jsx)(`span`,{children:t}),e&&(0,D.jsx)(we,{text:e,onCopied:o})]})}(0,T.memo)(function(e){let{message:t,UserMessageComponent:n,userMessageClassName:r,onCopied:i,display:a}=e,{enableImagePreview:o,showCopyToolbar:s,isMounted:c,isCopyVisible:l}=a,u=de(t.parts??[],``),d=(t.parts??[]).length>0;if(!u&&!d)return null;let f=t?.createdAt,p=`user-${t.id}`,m=c&&f?Ce(new Date(f)):void 0;return(0,D.jsxs)(`div`,{className:`group/user-message`,children:[(0,D.jsx)(n,{message:t,className:r,enableImagePreview:o}),(s&&!!u||!!m)&&(0,D.jsx)(Q,{text:s?u:``,timestamp:m,heightClass:`h-[28px]`,hoverClass:`group-hover/user-message:opacity-100 group-hover/user-message:pointer-events-auto`,isVisible:l,alignClass:`justify-end`,onCopied:()=>i(p)})]})}),(0,T.memo)(function(e){let{assistantMsgs:t,turnKey:n,ToolRendererComponent:r,TextRendererComponent:i,toolRenderers:a,onOpenUIAction:o,onOpenUIArtifactReady:s,onOpenArtifact:c,onCopied:l,stream:u,copy:d,display:f}=e,{isLast:p,isStreaming:m}=u,{enabled:h,isVisible:g}=d,{suppressQuestionTool:_}=f,v=de(t.flatMap(e=>e.parts??[]),`
3
+
4
+ `),y=m&&p,b=h&&!!v.trim()&&!y,x=`assistant-${n}-all`,S=h?v:``;return(0,D.jsxs)(`div`,{className:`group/assistant-turn`,children:[(0,D.jsx)(`div`,{className:`flex flex-col gap-3`,children:t.map((e,n)=>{let l=p&&n===t.length-1;return(0,D.jsx)(ke,{msg:e,isLast:l,isStreaming:m,suppressQuestionTool:_,ToolRendererComponent:r,TextRendererComponent:i,toolRenderers:a,onOpenUIAction:o,onOpenUIArtifactReady:s,onOpenArtifact:c},e.id)})}),(b||g)&&(0,D.jsx)(Q,{text:S,heightClass:`h-[48px] flex items-start w-full`,hoverClass:`group-hover/assistant-turn:opacity-100 group-hover/assistant-turn:pointer-events-auto`,isVisible:g,alignClass:`justify-start`,onCopied:()=>l(x)})]})});var Te=`tool-call:`,Ee=`unkeyed-tool:`;function De(e,t,n){return t.toolCallId?`${Te}${t.toolCallId}`:`${Ee}${e}:${t.type}:${n}`}function Oe(e,t){let{messageId:n,isLast:r,isStreaming:i,suppressQuestionTool:a,suppressTextWhenPlanWrite:o=!1,ToolRendererComponent:s,TextRendererComponent:c,toolRenderers:l,onOpenUIAction:u,onOpenUIArtifactReady:d,onOpenArtifact:f}=t,p=[],m=[],h=o&&e.some(e=>Y(e)&&e.type===`tool-PlanWrite`),g=new Set(e.filter(e=>Y(e)&&(e.type===`tool-Task`||e.type===`tool-Agent`)&&typeof e.toolCallId==`string`).map(e=>e.toolCallId)),_=new Map,v=new Set,y=new Map;for(let t of e){if(!Y(t)||t.type===`tool-TaskOutput`||!t.toolCallId||!t.toolCallId.includes(`:`))continue;let e=t.toolCallId.split(`:`)[0];g.has(e)&&(_.has(e)||_.set(e,[]),_.get(e).push(t),v.add(t.toolCallId))}let b=0;for(;b<e.length;){let t=e[b];if(Y(t)&&t.type===`tool-TaskOutput`){b++;continue}if(J(t)){let e=t.text;e&&!h&&m.push(e),b++;continue}if(le(t)){p.push((0,D.jsx)(he,{title:t.title,message:t.message},`${n}-error-${t.title}-${t.message}`)),b++;continue}if(ue(t)){p.push((0,D.jsx)(_e,{part:t},`${n}-payload-${b}`)),b++;continue}if(Y(t)){if(a&&t.type===`tool-Question`){b++;continue}if(t.toolCallId&&v.has(t.toolCallId)){b++;continue}let e=r&&i?`streaming`:void 0,o=t.toolCallId,c=(t.type===`tool-Task`||t.type===`tool-Agent`)&&o?_.get(o)||[]:void 0,u=t.toolCallId?0:y.get(t.type)??0;t.toolCallId||y.set(t.type,u+1),p.push((0,D.jsx)(s,{part:t,nestedTools:c,chatStatus:e,toolRenderers:l},De(n,t,u))),b++;continue}b++}let x=m.join(`
5
+
6
+ `);return x&&p.push((0,D.jsx)(`div`,{className:`group/assistant-text text-[0.875rem]`,children:(0,D.jsx)(c,{content:x,isStreaming:i,messageId:n,onOpenUIAction:u,onOpenUIArtifactReady:d,onOpenArtifact:f,className:`leading-relaxed [&_p]:leading-relaxed`})},`${n}-text-final`)),p}function ke({msg:e,isLast:t,isStreaming:n,suppressQuestionTool:r,ToolRendererComponent:i,TextRendererComponent:a,toolRenderers:o,onOpenUIAction:s,onOpenUIArtifactReady:c,onOpenArtifact:l}){let u=(0,T.useMemo)(()=>be(e.parts??[]),[e.parts]),d=(0,T.useMemo)(()=>Oe(u,{messageId:e.id,isLast:t,isStreaming:n,suppressQuestionTool:r,ToolRendererComponent:i,TextRendererComponent:a,toolRenderers:o,onOpenUIAction:s,onOpenUIArtifactReady:c,onOpenArtifact:l}),[u,e.id,t,n,r,i,a,o,s,c,l]);return d.length>1?(0,D.jsx)(`div`,{className:`group/assistant-turn flex flex-col gap-3`,children:d}):(0,D.jsx)(`div`,{className:`group/assistant-turn`,children:d})}function Ae(e){let t=[],n;for(let r of e){if(r.role===`user`){n&&t.push(n),n={user:r,assistants:[]};continue}if(r.role===`assistant`){if(!n||r.source===`local`){n&&t.push(n),n={assistants:[r]};continue}n.assistants.push(r)}}return n&&t.push(n),t}var je=(0,T.lazy)(()=>y(async()=>{let{GenerativeTextRenderer:e}=await import(`./openui-renderer-J3dhPpL4.js`).then(e=>e.n);return{GenerativeTextRenderer:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29])).then(({GenerativeTextRenderer:e})=>({default:e})));function Me({className:e,content:t}){return(0,D.jsx)(`div`,{className:e?`${e} whitespace-pre-wrap`:`whitespace-pre-wrap`,children:t})}function Ne(e){return(0,T.useMemo)(()=>x(e.content).some(e=>e.type===`openui`),[e.content])?(0,D.jsx)(T.Suspense,{fallback:(0,D.jsx)(Me,{className:e.className,content:e.content}),children:(0,D.jsx)(je,{...e})}):(0,D.jsx)(d,{className:e.className,content:e.content})}function $(e,t,n){if(n===0)return 0;let r=0,i=n;for(;r<i;){let n=Math.floor((r+i)/2);e[n]<=t?r=n+1:i=n}return Math.max(0,Math.min(n-1,r-1))}function Pe(e,t,n,r){let i=[0];for(let[a,o]of e.entries())i.push(i[i.length-1]+(t.get(o)??n)+(a<e.length-1?r:0));return i}function Fe({estimateSize:e,getItemKey:t,itemGap:n=0,items:r,overscan:i=1.5,renderItem:a,viewportRef:o}){let s=(0,T.useMemo)(()=>r.map((e,n)=>t(e,n)),[t,r]),c=r.length>=40,[l,u]=(0,T.useState)(()=>new Map),[d,f]=(0,T.useState)({height:0,scrollTop:0}),p=(0,T.useRef)(s),m=(0,T.useRef)(l),h=(0,T.useRef)(e),g=(0,T.useRef)(n),_=(0,T.useRef)([0]),v=(0,T.useRef)(0),y=(0,T.useRef)(new Map),b=(0,T.useRef)(new WeakMap),x=(0,T.useRef)(null),S=(0,T.useCallback)(()=>{let e=o.current;if(!e)return;let t={height:e.clientHeight,scrollTop:e.scrollTop};f(e=>e.height===t.height&&e.scrollTop===t.scrollTop?e:t)},[o]),C=(0,T.useCallback)((e,t)=>{let n=y.current.get(e);n&&n!==t&&(x.current?.unobserve(n),y.current.delete(e)),t&&(y.current.set(e,t),b.current.set(t,e),x.current?.observe(t))},[]),w=(0,T.useMemo)(()=>Pe(s,l,e,n),[e,n,s,l]);(0,T.useLayoutEffect)(()=>{S()},[r.length,S]),(0,T.useLayoutEffect)(()=>{p.current=s,m.current=l,h.current=e,g.current=n,_.current=w},[e,n,s,l,w]),(0,T.useEffect)(()=>{let e=o.current;if(!e)return;e.addEventListener(`scroll`,S,{passive:!0}),window.addEventListener(`resize`,S),S();let t;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(S),t.observe(e)),()=>{e.removeEventListener(`scroll`,S),window.removeEventListener(`resize`,S),t?.disconnect()}},[S,o]);let E=(0,T.useCallback)(e=>{let t=m.current,n=t;for(let r of e){let e=b.current.get(r.target),i=r.contentRect.height;!e||i<=0||t.get(e)===i||(n===t&&(n=new Map(t)),n.set(e,i))}if(n===t)return;let r=o.current,i=p.current,a=Pe(i,n,h.current,g.current);if(r&&i.length>0){let e=_.current,t=$(e,Math.max(0,r.scrollTop),i.length),n=i[t];if(n&&t>0){let r=(a[i.indexOf(n)]??0)-(e[t]??0);r!==0&&(v.current+=r)}}m.current=n,_.current=a,u(n)},[o]);if((0,T.useLayoutEffect)(()=>{if(!c||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(e=>E(e));x.current=e;for(let t of y.current.values())e.observe(t);return()=>{e.disconnect(),x.current===e&&(x.current=null)}},[c,E]),(0,T.useEffect)(()=>{let e=m.current;if(e.size===0)return;let t=new Set(s),n=new Map([...e].filter(([e])=>t.has(e)));n.size!==e.size&&(m.current=n,u(n))},[s]),(0,T.useLayoutEffect)(()=>{let e=v.current,t=o.current;!t||e===0||(t.scrollTop+=e,v.current=0,S())},[l,S,o]),!c)return(0,D.jsx)(D.Fragment,{children:r.map((e,t)=>(0,D.jsx)(T.Fragment,{children:a(e,t)},s[t]))});let O=w[w.length-1]??0,k=Math.max(e,d.height*i),A=$(w,Math.max(0,d.scrollTop-k),r.length),j=Math.min(r.length-1,$(w,d.scrollTop+d.height+k,r.length)+1);return(0,D.jsx)(`div`,{"data-rendered-turn-count":j-A+1,"data-total-turn-count":r.length,"data-virtualized-transcript":`true`,style:{height:O,position:`relative`,width:`100%`},children:r.slice(A,j+1).map((e,t)=>{let n=A+t,r=s[n];return(0,D.jsx)(`div`,{ref:e=>C(r,e),"data-virtualized-turn-index":n,style:{left:0,position:`absolute`,right:0,top:w[n]},children:a(e,n)},r)})})}export{be as a,K as c,N as d,I as f,Oe as i,ne as l,Ne as n,me as o,S as p,Ae as r,ce as s,Fe as t,U as u};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{f as r,o as i,r as a,u as o}from"./ease-u56MhKYS.js";import{n as s,t as c}from"./use-reduced-motion-eORd7fqW.js";import{t as l}from"./utils-Eg7xtNmV.js";import{t as u}from"./resource-helpers-Q2T0YCMO.js";import{t as d}from"./chevron-right-DrJxToLs.js";import{t as f}from"./circle-alert-CONlFReH.js";import{t as p}from"./file-text-T-NcAlZs.js";import{_ as m,f as h,g,n as _,o as v,r as y,t as b,v as x,y as S}from"./horizontal-resize-Bl3AyBJg.js";import{t as C}from"./folder-BC5p7qK7.js";import{t as w}from"./hard-drive-CHqgr7VQ.js";import{t as T}from"./workspace-path-nav-C0AQNZyy.js";import{t as E}from"./markdown-DInPmRUG.js";import{a as D,i as O,n as k,r as A}from"./skeleton-loaders-DjGv9LLA.js";var j=e(t(),1),M=n();function N(e){return null}function P(e){return null}var F={duration:.22,ease:a},I={duration:.3,ease:a};function L(e,t,n=0,r=null){return e.flatMap((i,a)=>{let o={item:i,depth:n,parentId:r,position:a+1,setSize:e.length};return i.type!==`folder`||!t.has(i.value)||!i.children?.length?[o]:[o,...L(i.children,t,n+1,i.value)]})}function R(e){let t=[];return j.Children.forEach(e,e=>{if((0,j.isValidElement)(e)){if(e.type===j.Fragment){let n=e.props;t.push(...R(n.children));return}if(e.type===N){let n=e.props;t.push({value:n.value,name:n.name,type:`folder`,icon:n.icon,disabled:n.disabled,className:n.className,children:R(n.children)});return}if(e.type===P){let n=e.props;t.push({value:n.value,name:n.name,type:`file`,icon:n.icon,disabled:n.disabled,className:n.className})}}}),t}function z({item:e,open:t,reduce:n}){return e.type===`file`?(0,M.jsx)(S,{className:`size-4`}):n?t?(0,M.jsx)(x,{className:`size-4`}):(0,M.jsx)(C,{className:`size-4`}):(0,M.jsx)(s,{initial:!1,mode:`popLayout`,children:(0,M.jsx)(r.span,{initial:{opacity:0,scale:.75,rotate:t?-8:8},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.75,rotate:t?8:-8},transition:o,className:`absolute inset-0 grid place-items-center`,children:t?(0,M.jsx)(x,{className:`size-4`}):(0,M.jsx)(C,{className:`size-4`})},t?`open`:`closed`)})}function B({children:e,value:t,defaultValue:n=null,onValueChange:a,expandedIds:s,defaultExpandedIds:u=[],onExpandedChange:f,ariaLabel:p=`Files`,indent:m=18,className:g,classNames:_}){let v=c()??!1,[y,b]=(0,j.useState)(n),[x,S]=(0,j.useState)(u),[C,w]=(0,j.useState)(t??n),T=(0,j.useRef)(new Map),E=t===void 0?y:t,D=s??x,O=(0,j.useMemo)(()=>new Set(D),[D]),k=(0,j.useMemo)(()=>R(e),[e]),A=(0,j.useMemo)(()=>L(k,O),[O,k]),N=C!==null&&A.some(({item:e})=>e.value===C)?C:A[0]?.item.value??null;C!==N&&w(N);let P=(0,j.useCallback)(e=>{w(e);let t=T.current.get(e);t?t.focus():requestAnimationFrame(()=>T.current.get(e)?.focus())},[]),B=(0,j.useCallback)(e=>{e.disabled||(t===void 0&&b(e.value),a?.(e.value))},[a,t]),V=(0,j.useCallback)(e=>{s===void 0&&S(e),f?.(e)},[s,f]),H=(0,j.useCallback)(e=>{let t=new Set(D);t.has(e)?t.delete(e):t.add(e),V(Array.from(t))},[D,V]),U=(0,j.useCallback)((e,t)=>{let n=A.findIndex(({item:e})=>e.value===t.item.value),r=A[n-1],i=A[n+1],a=t.item.type===`folder`&&!!t.item.children?.length,o=a&&O.has(t.item.value);if(e.key===`ArrowDown`&&i)e.preventDefault(),P(i.item.value);else if(e.key===`ArrowUp`&&r)e.preventDefault(),P(r.item.value);else if(e.key===`Home`&&A[0])e.preventDefault(),P(A[0].item.value);else if(e.key===`End`&&A.at(-1))e.preventDefault(),P(A.at(-1)?.item.value??t.item.value);else if(e.key===`ArrowRight`&&a)e.preventDefault(),!o&&!t.item.disabled?H(t.item.value):i?.parentId===t.item.value&&P(i.item.value);else if(e.key===`ArrowLeft`)e.preventDefault(),a&&o&&!t.item.disabled?H(t.item.value):t.parentId&&P(t.parentId);else if(e.key===`Enter`||e.key===` `){if(e.preventDefault(),t.item.disabled)return;B(t.item),a&&H(t.item.value)}},[O,P,A,B,H]);return(0,M.jsx)(h,{role:`tree`,"aria-label":p,"aria-multiselectable":`false`,inset:0,pillClassName:`rounded-xl bg-muted`,pillContainerClassName:`inset-y-auto top-0 h-9`,className:l(`min-w-0`,g,_?.tree),children:A.map(e=>{let t=e.item.type===`folder`,n=t&&!!e.item.children?.length,a=n&&O.has(e.item.value),s=E===e.item.value;return(0,M.jsx)(r.div,{layout:!v&&`position`,initial:!v&&{opacity:0,y:-6},animate:{opacity:e.item.disabled?.42:1,y:0,transition:v?{duration:0}:{...F,delay:Math.min(e.position*.025,.1)}},transition:v?{duration:0}:i,children:(0,M.jsxs)(`button`,{ref:t=>{t?T.current.set(e.item.value,t):T.current.delete(e.item.value)},type:`button`,role:`treeitem`,"aria-level":e.depth+1,"aria-posinset":e.position,"aria-setsize":e.setSize,"aria-selected":s,"aria-expanded":n?a:void 0,"aria-disabled":e.item.disabled||void 0,tabIndex:N===e.item.value?0:-1,onFocus:()=>w(e.item.value),onKeyDown:t=>U(t,e),onClick:()=>{e.item.disabled||(B(e.item),n&&H(e.item.value))},className:l(`group/file-tree relative flex h-9 w-full items-center gap-2 overflow-hidden rounded-lg pr-2 text-left text-sm text-muted-foreground outline-none`,`transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,`aria-disabled:cursor-not-allowed`,s&&`bg-muted font-medium text-foreground`,_?.item,e.item.className),style:{paddingLeft:8+e.depth*m},children:[e.depth>0?(0,M.jsx)(r.span,{"aria-hidden":`true`,initial:!v&&{opacity:0,scaleY:0},animate:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:0},transition:v?{duration:0}:I,className:`absolute top-0 bottom-0 w-px origin-top bg-border/70`,style:{left:16+(e.depth-1)*m}}):null,(0,M.jsx)(r.span,{"aria-hidden":`true`,animate:{rotate:a?90:0},transition:v?{duration:0}:o,className:l(`relative z-10 grid size-4 shrink-0 place-items-center`,!n&&`opacity-0`),children:(0,M.jsx)(d,{className:`size-3.5`})}),(0,M.jsx)(`span`,{"aria-hidden":`true`,className:l(`relative z-10 grid size-4 shrink-0 place-items-center text-muted-foreground transition-colors group-hover/file-tree:text-foreground`,t&&a&&`text-foreground`,_?.icon),children:e.item.icon??(0,M.jsx)(z,{item:e.item,open:a,reduce:v})}),(0,M.jsx)(`span`,{className:l(`relative z-10 min-w-0 flex-1 truncate`,_?.label),children:e.item.name})]})},e.item.value)})})}var V=`fleet-prime:v1:workspace-tree-width`,H=120,U=200,W=160,G=8;function K(e,t){let n=Math.max(H,t-W-G);return Math.min(n,Math.max(H,Math.round(e)))}function q(e){return _(V,U,t=>e===void 0?Math.max(H,Math.round(t)):K(t,e))}function J(e){y(V,e)}var Y=e=>{let t=window.matchMedia(`(min-width: 640px)`);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},X=()=>window.matchMedia(`(min-width: 640px)`).matches,Z=()=>!1;function Q(e){let[t,n]=(0,j.useState)(q),r=(0,j.useSyncExternalStore)(Y,X,Z),i=(0,j.useRef)(null),a=(0,j.useCallback)(e=>{let r=i.current?.clientWidth??0;if(r===0)return;let a=K(t,r);b({event:e,startWidth:a,getNextWidth:(e,t,n)=>K(n+(e-t),r),onWidthChange:e=>{n(e),J(e)}})},[t]);return(0,j.useEffect)(()=>{let e=i.current;if(!e)return;let t=e.clientWidth;t<640||n(e=>{let n=K(e,t);return n===e?e:(J(n),n)})},[]),{handleTreeResizeStart:a,isSplitLayout:r,splitRef:i,splitStyle:r?{gridTemplateColumns:`${t}px 8px minmax(160px, 1fr)`}:void 0}}function ee({error:e,emptyDescription:t=`agent-workspace has not been loaded yet.`,emptyTitle:n=`Workspace unavailable`,loadWorkspaceFile:r,loading:i,onSelectedPathChange:a,previewEmptyDescription:o=`Choose a workspace file to preview its Markdown.`,previewEmptyTitle:s=`Select a file`,scopePath:c,scopeLabel:l,selectedPath:d,treeTestId:p=`workspace-tree`,workspace:h}){let[_,y]=(0,j.useState)(null),b=a!==void 0,x=b?d??null:_,S=e=>{if(b){a(e);return}y(e)},[C,E]=(0,j.useState)(null),[k,N]=(0,j.useState)(null),[P,F]=(0,j.useState)(!1),I=(0,j.useRef)(null),{handleTreeResizeStart:L,splitRef:R,splitStyle:z}=Q(h),V=(0,j.useMemo)(()=>{if(!h)return{headerLabel:l??`agent-workspace`,nodes:[]};if(!c)return{headerLabel:h.root,nodes:h.nodes};let e=u(h.nodes,c);return e?e.type===`directory`?{headerLabel:l??e.name,nodes:e.children??[]}:{headerLabel:l??e.name,nodes:[e]}:{headerLabel:l??c.split(`/`).pop()??c,nodes:[]}},[l,c,h]);return(0,j.useEffect)(()=>{if(!(!h||!x)){if(c&&!T(x,c)){S(null),E(null),N(null);return}u(h.nodes,x)?.type!==`file`&&(S(null),E(null),N(null))}},[a,c,x,h]),(0,j.useEffect)(()=>{if(!x)return;let e=!1;async function t(){F(!0),N(null);try{let t=await r(x??``);e||E(t)}catch(t){e||(E(null),N(t instanceof Error?t:Error(String(t))))}finally{e||F(!1)}}return t(),()=>{e=!0}},[r,x,h]),(0,j.useEffect)(()=>{if(!x||typeof window>`u`||window.matchMedia(`(min-width: 960px)`).matches)return;let e=window.requestAnimationFrame(()=>{I.current?.scrollIntoView({block:`start`,inline:`nearest`,behavior:`auto`})});return()=>window.cancelAnimationFrame(e)},[x]),e?v(e)?(0,M.jsx)(D,{icon:f,title:`Daytona not connected`,description:`Connect a Daytona API key for your account to browse and preview your agent workspace.`}):(0,M.jsx)(D,{icon:f,title:`Unable to load workspace`,description:e.message}):i&&!h?(0,M.jsx)(A,{}):!h||c&&V.nodes.length===0?(0,M.jsx)(D,{icon:w,title:n,description:t}):(0,M.jsxs)(`div`,{ref:R,className:`relative grid h-full min-h-0 grid-cols-1 gap-2 overflow-hidden ${g}`,style:z,children:[(0,M.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden`,children:(0,M.jsxs)(`div`,{"data-testid":p,className:`min-h-0 min-w-0 flex-1 overflow-y-auto`,children:[(0,M.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,M.jsx)(w,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,M.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:V.headerLabel})]}),(0,M.jsx)(B,{ariaLabel:c?`Files in ${V.headerLabel}`:`Workspace files`,className:`gap-0.5`,classNames:{item:`h-8 gap-1.5 rounded-sm text-label font-normal text-foreground/65 hover:bg-foreground/5 hover:text-foreground/80 aria-selected:bg-foreground/8 aria-selected:text-foreground/80`,icon:`size-3.5 text-foreground/35`,label:`text-label`},value:x,onValueChange:e=>{u(h.nodes,e)?.type===`file`&&S(e)},children:V.nodes.map(e=>$(e))}),h.diagnostics.length>0&&!c&&(0,M.jsx)(`div`,{className:`mt-2 border-t border-border/60 pt-2`,children:(0,M.jsx)(O,{id:`workspace-diagnostics`,label:`Diagnostics`,icon:f,items:h.diagnostics.map((e,t)=>({name:`Diagnostic ${t+1}`,description:e}))})})]})}),(0,M.jsx)(`button`,{type:`button`,"aria-label":`Resize workspace tree`,className:`min-h-0 cursor-col-resize touch-none bg-transparent transition-colors outline-none hover:bg-foreground/10 focus-visible:bg-foreground/10 ${m}`,"data-testid":`workspace-tree-resize-handle`,onPointerDown:L}),(0,M.jsx)(te,{emptyDescription:o,emptyTitle:s,error:k,loading:P,preview:C,previewRef:I,selectedPath:x})]})}function $(e){return e.type===`directory`?(0,M.jsx)(N,{value:e.path,name:e.name,children:e.children?.map(e=>$(e))},e.path):(0,M.jsx)(P,{value:e.path,name:e.name},e.path)}function te({emptyDescription:e,emptyTitle:t,error:n,loading:r,preview:i,previewRef:a,selectedPath:o}){return(0,M.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden rounded-md border border-border/60 bg-background`,"data-testid":`workspace-preview`,ref:a,children:[(0,M.jsxs)(`div`,{className:`flex min-h-9 min-w-0 shrink-0 items-center gap-2 border-b border-border/60 px-2.5`,children:[(0,M.jsx)(p,{className:`size-3.5 shrink-0 text-foreground/35`}),(0,M.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:i?.name??o??`Preview`})]}),(0,M.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-3 py-2`,children:[!o&&(0,M.jsx)(D,{icon:p,title:t,description:e}),o&&r&&(0,M.jsx)(k,{}),o&&n&&(0,M.jsx)(D,{icon:f,title:`Unable to load preview`,description:n.message}),o&&!r&&!n&&i?.status===`too-large`&&(0,M.jsx)(D,{icon:f,title:`Preview too large`,description:`${i.name} is too large to preview safely.`}),o&&!r&&!n&&i?.status===`unsupported`&&(0,M.jsx)(D,{icon:f,title:`Unsupported preview`,description:`${i.name} is not a supported text file.`}),o&&!r&&!n&&i&&(i.status===void 0||i.status===`ok`)&&(0,M.jsx)(E,{className:`text-label leading-relaxed`,content:i.content})]})]})}export{ee as WorkspacePanelContent};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{f as r,o as i,r as a,u as o}from"./ease-u56MhKYS.js";import{n as s,t as c}from"./use-reduced-motion-eORd7fqW.js";import{t as l}from"./utils-Eg7xtNmV.js";import{t as u}from"./resource-helpers-Q2T0YCMO.js";import{t as d}from"./chevron-right-DrJxToLs.js";import{t as f}from"./circle-alert-CONlFReH.js";import{t as p}from"./file-text-T-NcAlZs.js";import{_ as m,f as h,g,n as _,o as v,r as y,t as b,v as x,y as S}from"./horizontal-resize-qK6eRhIG.js";import{t as C}from"./folder-BC5p7qK7.js";import{t as w}from"./hard-drive-CHqgr7VQ.js";import{t as T}from"./workspace-path-nav-C0AQNZyy.js";import{t as E}from"./markdown-DInPmRUG.js";import{a as D,i as O,n as k,r as A}from"./skeleton-loaders-C9vHwAYV.js";var j=e(t(),1),M=n();function N(e){return null}function P(e){return null}var F={duration:.22,ease:a},I={duration:.3,ease:a};function L(e,t,n=0,r=null){return e.flatMap((i,a)=>{let o={item:i,depth:n,parentId:r,position:a+1,setSize:e.length};return i.type!==`folder`||!t.has(i.value)||!i.children?.length?[o]:[o,...L(i.children,t,n+1,i.value)]})}function R(e){let t=[];return j.Children.forEach(e,e=>{if((0,j.isValidElement)(e)){if(e.type===j.Fragment){let n=e.props;t.push(...R(n.children));return}if(e.type===N){let n=e.props;t.push({value:n.value,name:n.name,type:`folder`,icon:n.icon,disabled:n.disabled,className:n.className,children:R(n.children)});return}if(e.type===P){let n=e.props;t.push({value:n.value,name:n.name,type:`file`,icon:n.icon,disabled:n.disabled,className:n.className})}}}),t}function z({item:e,open:t,reduce:n}){return e.type===`file`?(0,M.jsx)(S,{className:`size-4`}):n?t?(0,M.jsx)(x,{className:`size-4`}):(0,M.jsx)(C,{className:`size-4`}):(0,M.jsx)(s,{initial:!1,mode:`popLayout`,children:(0,M.jsx)(r.span,{initial:{opacity:0,scale:.75,rotate:t?-8:8},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.75,rotate:t?8:-8},transition:o,className:`absolute inset-0 grid place-items-center`,children:t?(0,M.jsx)(x,{className:`size-4`}):(0,M.jsx)(C,{className:`size-4`})},t?`open`:`closed`)})}function B({children:e,value:t,defaultValue:n=null,onValueChange:a,expandedIds:s,defaultExpandedIds:u=[],onExpandedChange:f,ariaLabel:p=`Files`,indent:m=18,className:g,classNames:_}){let v=c()??!1,[y,b]=(0,j.useState)(n),[x,S]=(0,j.useState)(u),[C,w]=(0,j.useState)(t??n),T=(0,j.useRef)(new Map),E=t===void 0?y:t,D=s??x,O=(0,j.useMemo)(()=>new Set(D),[D]),k=(0,j.useMemo)(()=>R(e),[e]),A=(0,j.useMemo)(()=>L(k,O),[O,k]),N=C!==null&&A.some(({item:e})=>e.value===C)?C:A[0]?.item.value??null;C!==N&&w(N);let P=(0,j.useCallback)(e=>{w(e);let t=T.current.get(e);t?t.focus():requestAnimationFrame(()=>T.current.get(e)?.focus())},[]),B=(0,j.useCallback)(e=>{e.disabled||(t===void 0&&b(e.value),a?.(e.value))},[a,t]),V=(0,j.useCallback)(e=>{s===void 0&&S(e),f?.(e)},[s,f]),H=(0,j.useCallback)(e=>{let t=new Set(D);t.has(e)?t.delete(e):t.add(e),V(Array.from(t))},[D,V]),U=(0,j.useCallback)((e,t)=>{let n=A.findIndex(({item:e})=>e.value===t.item.value),r=A[n-1],i=A[n+1],a=t.item.type===`folder`&&!!t.item.children?.length,o=a&&O.has(t.item.value);if(e.key===`ArrowDown`&&i)e.preventDefault(),P(i.item.value);else if(e.key===`ArrowUp`&&r)e.preventDefault(),P(r.item.value);else if(e.key===`Home`&&A[0])e.preventDefault(),P(A[0].item.value);else if(e.key===`End`&&A.at(-1))e.preventDefault(),P(A.at(-1)?.item.value??t.item.value);else if(e.key===`ArrowRight`&&a)e.preventDefault(),!o&&!t.item.disabled?H(t.item.value):i?.parentId===t.item.value&&P(i.item.value);else if(e.key===`ArrowLeft`)e.preventDefault(),a&&o&&!t.item.disabled?H(t.item.value):t.parentId&&P(t.parentId);else if(e.key===`Enter`||e.key===` `){if(e.preventDefault(),t.item.disabled)return;B(t.item),a&&H(t.item.value)}},[O,P,A,B,H]);return(0,M.jsx)(h,{role:`tree`,"aria-label":p,"aria-multiselectable":`false`,inset:0,pillClassName:`rounded-xl bg-muted`,pillContainerClassName:`inset-y-auto top-0 h-9`,className:l(`min-w-0`,g,_?.tree),children:A.map(e=>{let t=e.item.type===`folder`,n=t&&!!e.item.children?.length,a=n&&O.has(e.item.value),s=E===e.item.value;return(0,M.jsx)(r.div,{layout:!v&&`position`,initial:!v&&{opacity:0,y:-6},animate:{opacity:e.item.disabled?.42:1,y:0,transition:v?{duration:0}:{...F,delay:Math.min(e.position*.025,.1)}},transition:v?{duration:0}:i,children:(0,M.jsxs)(`button`,{ref:t=>{t?T.current.set(e.item.value,t):T.current.delete(e.item.value)},type:`button`,role:`treeitem`,"aria-level":e.depth+1,"aria-posinset":e.position,"aria-setsize":e.setSize,"aria-selected":s,"aria-expanded":n?a:void 0,"aria-disabled":e.item.disabled||void 0,tabIndex:N===e.item.value?0:-1,onFocus:()=>w(e.item.value),onKeyDown:t=>U(t,e),onClick:()=>{e.item.disabled||(B(e.item),n&&H(e.item.value))},className:l(`group/file-tree relative flex h-9 w-full items-center gap-2 overflow-hidden rounded-lg pr-2 text-left text-sm text-muted-foreground outline-none`,`transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,`aria-disabled:cursor-not-allowed`,s&&`bg-muted font-medium text-foreground`,_?.item,e.item.className),style:{paddingLeft:8+e.depth*m},children:[e.depth>0?(0,M.jsx)(r.span,{"aria-hidden":`true`,initial:!v&&{opacity:0,scaleY:0},animate:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:0},transition:v?{duration:0}:I,className:`absolute top-0 bottom-0 w-px origin-top bg-border/70`,style:{left:16+(e.depth-1)*m}}):null,(0,M.jsx)(r.span,{"aria-hidden":`true`,animate:{rotate:a?90:0},transition:v?{duration:0}:o,className:l(`relative z-10 grid size-4 shrink-0 place-items-center`,!n&&`opacity-0`),children:(0,M.jsx)(d,{className:`size-3.5`})}),(0,M.jsx)(`span`,{"aria-hidden":`true`,className:l(`relative z-10 grid size-4 shrink-0 place-items-center text-muted-foreground transition-colors group-hover/file-tree:text-foreground`,t&&a&&`text-foreground`,_?.icon),children:e.item.icon??(0,M.jsx)(z,{item:e.item,open:a,reduce:v})}),(0,M.jsx)(`span`,{className:l(`relative z-10 min-w-0 flex-1 truncate`,_?.label),children:e.item.name})]})},e.item.value)})})}var V=`fleet-prime:v1:workspace-tree-width`,H=120,U=200,W=160,G=8;function K(e,t){let n=Math.max(H,t-W-G);return Math.min(n,Math.max(H,Math.round(e)))}function q(e){return _(V,U,t=>e===void 0?Math.max(H,Math.round(t)):K(t,e))}function J(e){y(V,e)}var Y=e=>{let t=window.matchMedia(`(min-width: 640px)`);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},X=()=>window.matchMedia(`(min-width: 640px)`).matches,Z=()=>!1;function Q(e){let[t,n]=(0,j.useState)(q),r=(0,j.useSyncExternalStore)(Y,X,Z),i=(0,j.useRef)(null),a=(0,j.useCallback)(e=>{let r=i.current?.clientWidth??0;if(r===0)return;let a=K(t,r);b({event:e,startWidth:a,getNextWidth:(e,t,n)=>K(n+(e-t),r),onWidthChange:e=>{n(e),J(e)}})},[t]);return(0,j.useEffect)(()=>{let e=i.current;if(!e)return;let t=e.clientWidth;t<640||n(e=>{let n=K(e,t);return n===e?e:(J(n),n)})},[]),{handleTreeResizeStart:a,isSplitLayout:r,splitRef:i,splitStyle:r?{gridTemplateColumns:`${t}px 8px minmax(160px, 1fr)`}:void 0}}function ee({error:e,emptyDescription:t=`agent-workspace has not been loaded yet.`,emptyTitle:n=`Workspace unavailable`,loadWorkspaceFile:r,loading:i,onSelectedPathChange:a,previewEmptyDescription:o=`Choose a workspace file to preview its Markdown.`,previewEmptyTitle:s=`Select a file`,scopePath:c,scopeLabel:l,selectedPath:d,treeTestId:p=`workspace-tree`,workspace:h}){let[_,y]=(0,j.useState)(null),b=a!==void 0,x=b?d??null:_,S=e=>{if(b){a(e);return}y(e)},[C,E]=(0,j.useState)(null),[k,N]=(0,j.useState)(null),[P,F]=(0,j.useState)(!1),I=(0,j.useRef)(null),{handleTreeResizeStart:L,splitRef:R,splitStyle:z}=Q(h),V=(0,j.useMemo)(()=>{if(!h)return{headerLabel:l??`agent-workspace`,nodes:[]};if(!c)return{headerLabel:h.root,nodes:h.nodes};let e=u(h.nodes,c);return e?e.type===`directory`?{headerLabel:l??e.name,nodes:e.children??[]}:{headerLabel:l??e.name,nodes:[e]}:{headerLabel:l??c.split(`/`).pop()??c,nodes:[]}},[l,c,h]);return(0,j.useEffect)(()=>{if(!(!h||!x)){if(c&&!T(x,c)){S(null),E(null),N(null);return}u(h.nodes,x)?.type!==`file`&&(S(null),E(null),N(null))}},[a,c,x,h]),(0,j.useEffect)(()=>{if(!x)return;let e=!1;async function t(){F(!0),N(null);try{let t=await r(x??``);e||E(t)}catch(t){e||(E(null),N(t instanceof Error?t:Error(String(t))))}finally{e||F(!1)}}return t(),()=>{e=!0}},[r,x,h]),(0,j.useEffect)(()=>{if(!x||typeof window>`u`||window.matchMedia(`(min-width: 960px)`).matches)return;let e=window.requestAnimationFrame(()=>{I.current?.scrollIntoView({block:`start`,inline:`nearest`,behavior:`auto`})});return()=>window.cancelAnimationFrame(e)},[x]),e?v(e)?(0,M.jsx)(D,{icon:f,title:`Daytona not connected`,description:`Connect a Daytona API key for your account to browse and preview your agent workspace.`}):(0,M.jsx)(D,{icon:f,title:`Unable to load workspace`,description:e.message}):i&&!h?(0,M.jsx)(A,{}):!h||c&&V.nodes.length===0?(0,M.jsx)(D,{icon:w,title:n,description:t}):(0,M.jsxs)(`div`,{ref:R,className:`relative grid h-full min-h-0 grid-cols-1 gap-2 overflow-hidden ${g}`,style:z,children:[(0,M.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden`,children:(0,M.jsxs)(`div`,{"data-testid":p,className:`min-h-0 min-w-0 flex-1 overflow-y-auto`,children:[(0,M.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,M.jsx)(w,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,M.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:V.headerLabel})]}),(0,M.jsx)(B,{ariaLabel:c?`Files in ${V.headerLabel}`:`Workspace files`,className:`gap-0.5`,classNames:{item:`h-8 gap-1.5 rounded-sm text-label font-normal text-foreground/65 hover:bg-foreground/5 hover:text-foreground/80 aria-selected:bg-foreground/8 aria-selected:text-foreground/80`,icon:`size-3.5 text-foreground/35`,label:`text-label`},value:x,onValueChange:e=>{u(h.nodes,e)?.type===`file`&&S(e)},children:V.nodes.map(e=>$(e))}),h.diagnostics.length>0&&!c&&(0,M.jsx)(`div`,{className:`mt-2 border-t border-border/60 pt-2`,children:(0,M.jsx)(O,{id:`workspace-diagnostics`,label:`Diagnostics`,icon:f,items:h.diagnostics.map((e,t)=>({name:`Diagnostic ${t+1}`,description:e}))})})]})}),(0,M.jsx)(`button`,{type:`button`,"aria-label":`Resize workspace tree`,className:`min-h-0 cursor-col-resize touch-none bg-transparent transition-colors outline-none hover:bg-foreground/10 focus-visible:bg-foreground/10 ${m}`,"data-testid":`workspace-tree-resize-handle`,onPointerDown:L}),(0,M.jsx)(te,{emptyDescription:o,emptyTitle:s,error:k,loading:P,preview:C,previewRef:I,selectedPath:x})]})}function $(e){return e.type===`directory`?(0,M.jsx)(N,{value:e.path,name:e.name,children:e.children?.map(e=>$(e))},e.path):(0,M.jsx)(P,{value:e.path,name:e.name},e.path)}function te({emptyDescription:e,emptyTitle:t,error:n,loading:r,preview:i,previewRef:a,selectedPath:o}){return(0,M.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden rounded-md border border-border/60 bg-background`,"data-testid":`workspace-preview`,ref:a,children:[(0,M.jsxs)(`div`,{className:`flex min-h-9 min-w-0 shrink-0 items-center gap-2 border-b border-border/60 px-2.5`,children:[(0,M.jsx)(p,{className:`size-3.5 shrink-0 text-foreground/35`}),(0,M.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:i?.name??o??`Preview`})]}),(0,M.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-3 py-2`,children:[!o&&(0,M.jsx)(D,{icon:p,title:t,description:e}),o&&r&&(0,M.jsx)(k,{}),o&&n&&(0,M.jsx)(D,{icon:f,title:`Unable to load preview`,description:n.message}),o&&!r&&!n&&i?.status===`too-large`&&(0,M.jsx)(D,{icon:f,title:`Preview too large`,description:`${i.name} is too large to preview safely.`}),o&&!r&&!n&&i?.status===`unsupported`&&(0,M.jsx)(D,{icon:f,title:`Unsupported preview`,description:`${i.name} is not a supported text file.`}),o&&!r&&!n&&i&&(i.status===void 0||i.status===`ok`)&&(0,M.jsx)(E,{className:`text-label leading-relaxed`,content:i.content})]})]})}export{ee as WorkspacePanelContent};
@@ -1,10 +1,10 @@
1
1
  {
2
- "timestamp": "2026-09-09T03:22:20.715Z",
3
- "routeEntry": "routes-DkefU9yA.js",
4
- "routeEntryGzipBytes": 95459,
5
- "routeEntryReduction": 0.9098196184534459,
6
- "eagerFiles": 66,
7
- "eagerGzipBytes": 364230,
2
+ "timestamp": "2026-09-10T14:38:35.938Z",
3
+ "routeEntry": "routes-vNkVToAF.js",
4
+ "routeEntryGzipBytes": 96650,
5
+ "routeEntryReduction": 0.9086944774565578,
6
+ "eagerFiles": 67,
7
+ "eagerGzipBytes": 366774,
8
8
  "passed": true,
9
9
  "violations": []
10
10
  }
@@ -1,6 +1,6 @@
1
1
  import "./chunk-MLKGABMK.js";
2
2
 
3
- // web/app/dist/server/assets/_tanstack-start-manifest_v-DkghjPW8.js
3
+ // web/app/dist/server/assets/_tanstack-start-manifest_v-po4woX6g.js
4
4
  var tsrStartManifest = () => ({ routes: {
5
5
  __root__: {
6
6
  filePath: "/home/circleci/prime-agent/web/app/src/routes/__root.tsx",
@@ -15,54 +15,54 @@ var tsrStartManifest = () => ({ routes: {
15
15
  "/api/workspace/tree"
16
16
  ],
17
17
  preloads: [
18
- "/assets/index-CwtZA4hF.js",
18
+ "/assets/index-C1zOjrMK.js",
19
19
  "/assets/rolldown-runtime-hePW80VL.js",
20
20
  "/assets/bundle-mjs-DKHVkVWu.js",
21
21
  "/assets/react-dom-Bwxum3ti.js",
22
22
  "/assets/jsx-runtime-NZYk81nU.js",
23
23
  "/assets/analytics-stub-Cas1He0w.js",
24
- "/assets/button-BV9NafmI.js",
24
+ "/assets/button-BR2WWrFo.js",
25
25
  "/assets/layout-gyLzPvVv.js",
26
- "/assets/toast-BzAKULar.js",
26
+ "/assets/toast-Bt9p2OL4.js",
27
27
  "/assets/card-BKl76a3R.js",
28
- "/assets/ui-preferences-DUEFuJFj.js",
28
+ "/assets/ui-preferences-CImQGZm_.js",
29
29
  "/assets/preload-helper-Czpn1I53.js"
30
30
  ],
31
31
  scripts: [{ attrs: {
32
32
  type: "module",
33
33
  async: true,
34
- src: "/assets/index-CwtZA4hF.js"
34
+ src: "/assets/index-C1zOjrMK.js"
35
35
  } }]
36
36
  },
37
37
  "/": {
38
38
  filePath: "/home/circleci/prime-agent/web/app/src/routes/index.tsx",
39
39
  children: void 0,
40
40
  preloads: [
41
- "/assets/routes-DkefU9yA.js",
41
+ "/assets/routes-vNkVToAF.js",
42
42
  "/assets/ease-u56MhKYS.js",
43
- "/assets/prompt-input-BpuTiX7Z.js",
43
+ "/assets/prompt-input-qPIXZ-Rb.js",
44
44
  "/assets/use-reduced-motion-eORd7fqW.js",
45
45
  "/assets/createBaseUIEventDetails-DV0dQrBX.js",
46
- "/assets/dialog-Dh7WpGIu.js",
47
- "/assets/provider-catalog-CO1GxLYe.js",
46
+ "/assets/dialog-BEZuZhzk.js",
47
+ "/assets/provider-catalog-D8G66gwc.js",
48
48
  "/assets/useBaseUiId-CHqXB2UQ.js",
49
- "/assets/provider-label-B0E-wWFV.js",
49
+ "/assets/provider-label-Dpr7djG9.js",
50
50
  "/assets/utils-Eg7xtNmV.js",
51
51
  "/assets/createLucideIcon-DwxZHm0M.js",
52
- "/assets/right-panel-registry-DOyEvIMD.js",
53
- "/assets/citations-BQ_pr_9_.js",
52
+ "/assets/right-panel-registry-DewpBWHM.js",
53
+ "/assets/citations-C_tPOJE_.js",
54
54
  "/assets/resource-helpers-Q2T0YCMO.js",
55
55
  "/assets/bot-Bs7QWJ2q.js",
56
56
  "/assets/check-JjHKAZas.js",
57
57
  "/assets/chevron-down-BEVGmnSb.js",
58
- "/assets/generative-text-renderer-CzwNIs3b.js",
58
+ "/assets/virtualized-turn-list-DMJENRY0.js",
59
59
  "/assets/chevron-right-DrJxToLs.js",
60
60
  "/assets/chevron-up-CnSvySGH.js",
61
61
  "/assets/circle-alert-CONlFReH.js",
62
62
  "/assets/loader-circle-DjfHXUPB.js",
63
63
  "/assets/action-swap-roll-BB8DFMuf.js",
64
64
  "/assets/file-text-T-NcAlZs.js",
65
- "/assets/horizontal-resize-Bl3AyBJg.js",
65
+ "/assets/horizontal-resize-qK6eRhIG.js",
66
66
  "/assets/folder-BC5p7qK7.js",
67
67
  "/assets/gauge-DNpstbBn.js",
68
68
  "/assets/package-CdcJFPf2.js",
@@ -74,16 +74,17 @@ var tsrStartManifest = () => ({ routes: {
74
74
  "/assets/sparkles-DuclzqlE.js",
75
75
  "/assets/triangle-alert-CU-gd7ui.js",
76
76
  "/assets/x-CsRC_tCI.js",
77
+ "/assets/safe-storage-s25GrfpH.js",
77
78
  "/assets/cn-C8c0S2mI.js",
78
- "/assets/notify-BnNaNaBU.js",
79
+ "/assets/notify-DgMKgZZW.js",
79
80
  "/assets/workspace-path-nav-C0AQNZyy.js",
80
81
  "/assets/useControlled-CJJ9BOQB.js",
81
82
  "/assets/agent-disclosure-B8SnhQXL.js",
82
- "/assets/surfaces-cW-gp56p.js",
83
+ "/assets/surfaces-DI-U-_2a.js",
83
84
  "/assets/prime-agent-artifacts-C-g1VPiW.js",
84
- "/assets/chat-DdPRGn-U.js",
85
+ "/assets/chat-yh02zgA7.js",
85
86
  "/assets/right-panel-context-DHlNWJsF.js",
86
- "/assets/input-Bol3TP4v.js",
87
+ "/assets/input-0wwjWjKq.js",
87
88
  "/assets/artifacts-utils-N_kUFbz2.js"
88
89
  ]
89
90
  }
@@ -54,7 +54,7 @@ import {
54
54
  import "./chunk-JDCCC7A7.js";
55
55
  import "./chunk-MLKGABMK.js";
56
56
 
57
- // web/app/dist/server/assets/agent-activity-B-JMvecd.js
57
+ // web/app/dist/server/assets/agent-activity-CS2rbF_C.js
58
58
  import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
59
59
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
60
60
  var Circle = createLucideIcon("circle", [["circle", {
@@ -254,7 +254,7 @@ function ActivityAction({ action }) {
254
254
  type: "button",
255
255
  "aria-label": action.ariaLabel ?? action.label,
256
256
  onClick: action.onClick,
257
- className: "shrink-0 rounded-md px-1.5 py-1 text-[10px] font-medium text-primary outline-none hover:bg-primary/10 focus-visible:ring-2 focus-visible:ring-ring",
257
+ className: "shrink-0 rounded-md px-1.5 py-1 text-[0.625rem] font-medium text-primary outline-none hover:bg-primary/10 focus-visible:ring-2 focus-visible:ring-ring",
258
258
  children: action.label
259
259
  });
260
260
  }
@@ -9,7 +9,7 @@ import {
9
9
  FileDiff,
10
10
  ToolResult,
11
11
  ToolResultOutput
12
- } from "./chunk-IFHABBJO.js";
12
+ } from "./chunk-YXXRP3NS.js";
13
13
  import "./chunk-2ATMSG7U.js";
14
14
  import "./chunk-HFQTI7AX.js";
15
15
  import {
@@ -30,25 +30,25 @@ import "./chunk-FAGDMGLK.js";
30
30
  import {
31
31
  GenerativeTextRenderer,
32
32
  OpenUIHtmlArtifactView
33
- } from "./chunk-BTXNB4CP.js";
33
+ } from "./chunk-ABBWBBSS.js";
34
34
  import {
35
35
  UiErrorBoundary
36
- } from "./chunk-FZMWPQNE.js";
37
- import "./chunk-K5ESTT4A.js";
38
- import "./chunk-NRDG2ISJ.js";
39
- import "./chunk-ZCJXHV2R.js";
40
- import "./chunk-TGZIE2T6.js";
36
+ } from "./chunk-BXWAUTTH.js";
37
+ import "./chunk-7MDZVLIY.js";
38
+ import "./chunk-GGT2ZKDB.js";
39
+ import "./chunk-UAPNEWCA.js";
40
+ import "./chunk-WM4PUT6M.js";
41
41
  import "./chunk-RJOANOT4.js";
42
42
  import "./chunk-NFRJDPB3.js";
43
43
  import "./chunk-OZO5ARFA.js";
44
44
  import "./chunk-L46H6IDX.js";
45
45
  import "./chunk-WWJF4RO2.js";
46
46
  import "./chunk-7PQTPSEE.js";
47
- import "./chunk-X6RKK47S.js";
48
- import "./chunk-VMYYWXF4.js";
47
+ import "./chunk-P6UMR32I.js";
48
+ import "./chunk-AGFRJQZ7.js";
49
49
  import {
50
50
  Button
51
- } from "./chunk-JICJWC33.js";
51
+ } from "./chunk-LZ4Q5KUJ.js";
52
52
  import "./chunk-4QD4PCVP.js";
53
53
  import "./chunk-S3PQ6HKH.js";
54
54
  import "./chunk-7SR6WDM2.js";
@@ -71,7 +71,7 @@ import "./chunk-JDCCC7A7.js";
71
71
  import "./chunk-L547YHC4.js";
72
72
  import "./chunk-MLKGABMK.js";
73
73
 
74
- // web/app/dist/server/assets/artifacts-panel-D20iI9ud.js
74
+ // web/app/dist/server/assets/artifacts-panel-8GGUCtOd.js
75
75
  import { useEffect, useMemo, useRef, useState } from "react";
76
76
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
77
77
  var LayoutTemplate = createLucideIcon("layout-template", [
@@ -213,7 +213,7 @@ function OpenUIArtifact({ artifact, selected }) {
213
213
  children: artifact.title || "OpenUI artifact"
214
214
  }),
215
215
  /* @__PURE__ */ jsx("span", {
216
- className: "shrink-0 text-[10px] text-foreground/40",
216
+ className: "shrink-0 text-[0.625rem] text-foreground/40",
217
217
  children: artifact.status
218
218
  })
219
219
  ]
@@ -303,7 +303,7 @@ function GenerativeUiBlockRow({ block, expanded, isStreaming, onOpenUIAction, on
303
303
  children: block.component
304
304
  }),
305
305
  /* @__PURE__ */ jsxs("span", {
306
- className: "shrink-0 text-[10px] text-foreground/40",
306
+ className: "shrink-0 text-[0.625rem] text-foreground/40",
307
307
  children: ["#", block.ordinal]
308
308
  })
309
309
  ]
@@ -342,7 +342,7 @@ function ArtifactsPanelContent({ messages, onOpenUIAction, status, artifactRuns
342
342
  children: "OpenUI artifacts"
343
343
  }),
344
344
  /* @__PURE__ */ jsx("span", {
345
- className: "shrink-0 text-[10px] text-foreground/40",
345
+ className: "shrink-0 text-[0.625rem] text-foreground/40",
346
346
  children: openUIArtifacts.length
347
347
  })
348
348
  ]
@@ -365,7 +365,7 @@ function ArtifactsPanelContent({ messages, onOpenUIAction, status, artifactRuns
365
365
  children: "Technical artifacts"
366
366
  }),
367
367
  /* @__PURE__ */ jsx("span", {
368
- className: "shrink-0 text-[10px] text-foreground/40",
368
+ className: "shrink-0 text-[0.625rem] text-foreground/40",
369
369
  children: nonOpenUIArtifacts.length
370
370
  })
371
371
  ]
@@ -388,12 +388,12 @@ function ArtifactsPanelContent({ messages, onOpenUIAction, status, artifactRuns
388
388
  children: "Generative UI"
389
389
  }),
390
390
  /* @__PURE__ */ jsx("span", {
391
- className: "shrink-0 text-[10px] text-foreground/40",
391
+ className: "shrink-0 text-[0.625rem] text-foreground/40",
392
392
  children: blocks.length > 0 ? `${blocks.length}` : "none yet"
393
393
  })
394
394
  ]
395
395
  }), blocks.length === 0 ? /* @__PURE__ */ jsx("p", {
396
- className: "px-2 pb-1 text-[11px] leading-4 text-foreground/40",
396
+ className: "px-2 pb-1 text-[0.6875rem] leading-4 text-foreground/40",
397
397
  children: "OpenUI interfaces the agent generates in this session appear here, and can be re-opened without scrolling the conversation."
398
398
  }) : /* @__PURE__ */ jsx("div", {
399
399
  className: "flex min-h-0 flex-col gap-0.5 overflow-y-auto",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RIGHT_PANEL_LAUNCHER_DEFINITIONS
3
- } from "./chunk-EFNPNSDO.js";
3
+ } from "./chunk-O4OTWWPF.js";
4
4
  import {
5
5
  Keyboard,
6
6
  Monitor,
@@ -24,13 +24,13 @@ import {
24
24
  CommandItem,
25
25
  CommandList,
26
26
  CommandSeparator
27
- } from "./chunk-IMK45Q23.js";
28
- import "./chunk-QJQZLBLU.js";
27
+ } from "./chunk-XKKXXG6N.js";
28
+ import "./chunk-P7H2OPKF.js";
29
29
  import "./chunk-JIULUYHT.js";
30
30
  import "./chunk-7PQTPSEE.js";
31
- import "./chunk-X6RKK47S.js";
32
- import "./chunk-VMYYWXF4.js";
33
- import "./chunk-JICJWC33.js";
31
+ import "./chunk-P6UMR32I.js";
32
+ import "./chunk-AGFRJQZ7.js";
33
+ import "./chunk-LZ4Q5KUJ.js";
34
34
  import "./chunk-4QD4PCVP.js";
35
35
  import "./chunk-S3PQ6HKH.js";
36
36
  import "./chunk-7SR6WDM2.js";
@@ -47,7 +47,7 @@ import "./chunk-JDCCC7A7.js";
47
47
  import "./chunk-L547YHC4.js";
48
48
  import "./chunk-MLKGABMK.js";
49
49
 
50
- // web/app/dist/server/assets/chat-command-palette-DmDvAEZe.js
50
+ // web/app/dist/server/assets/chat-command-palette-Dgl5tqWn.js
51
51
  import { useState } from "react";
52
52
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
53
53
  var RotateCcwClock = createLucideIcon("rotate-ccw-clock", [
@@ -2,7 +2,7 @@ import {
2
2
  cn
3
3
  } from "./chunk-DJMHPJBP.js";
4
4
 
5
- // web/app/dist/server/assets/src-dVFP1Mkc.js
5
+ // web/app/dist/server/assets/src-V85fwVzf.js
6
6
  import "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  function Card({ className, size = "default", ...props }) {
@@ -50,7 +50,15 @@ var CSP_META_REFERENCE = /\bcontent-security-policy\b/i;
50
50
  var EVENT_HANDLER_ATTRIBUTE = /\son[a-z][\w:-]*\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/i;
51
51
  var SCRIPT_SOURCE_ATTRIBUTE = /<script\b[^>]*\bsrc\s*=/i;
52
52
  var CSS_IMPORT = /@import\b/i;
53
- var NETWORK_API = /\b(?:fetch|XMLHttpRequest|WebSocket|EventSource|sendBeacon|showModalDialog)\s*\(|\bwindow\s*\.\s*open\s*\(|\b(?:window|globalThis|document|location)\s*\.\s*(?:location|assign|replace|reload|href|pathname|host|hostname|port|protocol|search|hash)\s*=|\b(?:window|globalThis|document|location)\s*\.\s*(?:location\s*\.\s*)?(?:assign|replace|reload)\s*\(/i;
53
+ var NETWORK_API_CALL = /\b(?:fetch|XMLHttpRequest|WebSocket|EventSource|sendBeacon|showModalDialog)\s*\(/i;
54
+ var NETWORK_API_COMPUTED = /\[\s*["'`](?:fetch|XMLHttpRequest|WebSocket|EventSource|sendBeacon|showModalDialog|open)\s*["'`]\s*\]/i;
55
+ var WINDOW_OPEN_CALL = /\bwindow\s*\.\s*open\s*\(|\bwindow\?\.\s*open\s*\(|\bwindow\s+\?\s*\.\s*open\s*\(/i;
56
+ var REMOTE_IMPORT = /\bimport\s*\(\s*["'`](?:https?:\/\/|wss?:\/\/|\/\/|data:|blob:)/i;
57
+ var LOCATION_ASSIGN = /\b(?:window|globalThis|document|location)\s*\.\s*(?:location|assign|replace|reload|href|pathname|host|hostname|port|protocol|search|hash)\s*=/i;
58
+ var LOCATION_CALL = /\b(?:window|globalThis|document|location)\s*\.\s*(?:assign|replace|reload)\s*\(|\b(?:window|globalThis|document|location)\s*\.\s*location\s*\.\s*(?:assign|replace|reload)\s*\(/i;
59
+ function hasNetworkApi(document) {
60
+ return NETWORK_API_CALL.test(document) || NETWORK_API_COMPUTED.test(document) || WINDOW_OPEN_CALL.test(document) || REMOTE_IMPORT.test(document) || LOCATION_ASSIGN.test(document) || LOCATION_CALL.test(document);
61
+ }
54
62
  var RESOURCE_ATTRIBUTE = /\b(?:src|href|action|formaction|poster|cite|background|xlink:href)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/gi;
55
63
  var UNSAFE_SCHEME = /^(?:javascript|vbscript|file|blob|filesystem|about|data:text\/html|data:application\/javascript):/i;
56
64
  function byteLength(value) {
@@ -301,7 +309,7 @@ function validateAndNormalizeOpenUIHtmlArtifact(input) {
301
309
  ok: false,
302
310
  reason: "External or unsafe resource URLs are not allowed."
303
311
  };
304
- if (NETWORK_API.test(document)) return {
312
+ if (hasNetworkApi(document)) return {
305
313
  ok: false,
306
314
  reason: "Network access and pop-up APIs are not allowed."
307
315
  };
@@ -16,7 +16,7 @@ import {
16
16
  __exportAll
17
17
  } from "./chunk-L547YHC4.js";
18
18
 
19
- // web/app/dist/server/assets/fleet-subagent-list-5luKtpds.js
19
+ // web/app/dist/server/assets/fleet-subagent-list-CpSYzCIq.js
20
20
  import { useMemo, useState } from "react";
21
21
  import { jsx, jsxs } from "react/jsx-runtime";
22
22
  var fleet_subagent_list_exports = /* @__PURE__ */ __exportAll({ FleetSubagentList: () => FleetSubagentList });
@@ -62,7 +62,7 @@ function FleetSubagentList({ children, tree, className }) {
62
62
  className: "truncate text-sm text-foreground/85",
63
63
  children: child.label
64
64
  }), child.model ? /* @__PURE__ */ jsx("span", {
65
- className: "truncate font-mono text-[10px] text-muted-foreground",
65
+ className: "truncate font-mono text-[0.625rem] text-muted-foreground",
66
66
  children: child.model
67
67
  }) : null]
68
68
  }), child.answerPreview || child.activity?.toolName || child.error ? /* @__PURE__ */ jsx("p", {
@@ -71,7 +71,7 @@ function FleetSubagentList({ children, tree, className }) {
71
71
  }) : null]
72
72
  }),
73
73
  /* @__PURE__ */ jsx("span", {
74
- className: "shrink-0 text-[10px] capitalize text-muted-foreground",
74
+ className: "shrink-0 text-[0.625rem] capitalize text-muted-foreground",
75
75
  children: child.status
76
76
  })
77
77
  ]
@@ -2,7 +2,7 @@ import {
2
2
  Badge,
3
3
  UiErrorBoundary,
4
4
  encodeOpenPanelActionMessage
5
- } from "./chunk-FZMWPQNE.js";
5
+ } from "./chunk-BXWAUTTH.js";
6
6
  import {
7
7
  Card,
8
8
  CardContent,
@@ -10,7 +10,7 @@ import {
10
10
  CardHeader,
11
11
  CardTitle,
12
12
  validateAndNormalizeOpenUIHtmlArtifact
13
- } from "./chunk-K5ESTT4A.js";
13
+ } from "./chunk-7MDZVLIY.js";
14
14
  import {
15
15
  OpenPanelActionSchema,
16
16
  RightPanelIdSchema,
@@ -19,7 +19,7 @@ import {
19
19
  object,
20
20
  registry,
21
21
  toJSONSchema
22
- } from "./chunk-NRDG2ISJ.js";
22
+ } from "./chunk-GGT2ZKDB.js";
23
23
  import {
24
24
  Alert,
25
25
  AlertDescription,
@@ -28,7 +28,7 @@ import {
28
28
  FieldLabel,
29
29
  Separator,
30
30
  Switch
31
- } from "./chunk-ZCJXHV2R.js";
31
+ } from "./chunk-UAPNEWCA.js";
32
32
  import {
33
33
  Select,
34
34
  arrow$2,
@@ -41,7 +41,7 @@ import {
41
41
  shift,
42
42
  size,
43
43
  useFloating
44
- } from "./chunk-TGZIE2T6.js";
44
+ } from "./chunk-WM4PUT6M.js";
45
45
  import {
46
46
  segmentOpenUIContent
47
47
  } from "./chunk-NFRJDPB3.js";
@@ -84,18 +84,18 @@ import {
84
84
  } from "./chunk-7PQTPSEE.js";
85
85
  import {
86
86
  Input
87
- } from "./chunk-X6RKK47S.js";
87
+ } from "./chunk-P6UMR32I.js";
88
88
  import {
89
89
  Dialog,
90
90
  DialogContent,
91
91
  DialogHeader,
92
92
  DialogTitle
93
- } from "./chunk-VMYYWXF4.js";
93
+ } from "./chunk-AGFRJQZ7.js";
94
94
  import {
95
95
  Button,
96
96
  require_with_selector,
97
97
  visuallyHidden
98
- } from "./chunk-JICJWC33.js";
98
+ } from "./chunk-LZ4Q5KUJ.js";
99
99
  import {
100
100
  useBaseUiId
101
101
  } from "./chunk-7SR6WDM2.js";
@@ -134,7 +134,7 @@ import {
134
134
  __toESM
135
135
  } from "./chunk-L547YHC4.js";
136
136
 
137
- // web/app/dist/server/assets/openui-renderer-BNLpfzyj.js
137
+ // web/app/dist/server/assets/openui-renderer-Cj7kfqyL.js
138
138
  import * as React$2 from "react";
139
139
  import React, { Children, Component as Component2, Fragment as Fragment2, PureComponent, cloneElement as cloneElement2, createContext as createContext2, createElement as createElement2, forwardRef as forwardRef2, isValidElement as isValidElement2, memo as memo2, useCallback as useCallback2, useContext as useContext2, useEffect as useEffect2, useId as useId2, useImperativeHandle, useInsertionEffect, useLayoutEffect as useLayoutEffect3, useMemo as useMemo2, useRef as useRef2, useState as useState2, useSyncExternalStore } from "react";
140
140
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -47092,7 +47092,7 @@ function buildChartConfig(series) {
47092
47092
  }
47093
47093
  function EmptyChartNotice() {
47094
47094
  return /* @__PURE__ */ jsx("div", {
47095
- className: "flex min-h-[120px] w-full items-center justify-center rounded-md border border-border/50 text-[12px] text-foreground/40",
47095
+ className: "flex min-h-[120px] w-full items-center justify-center rounded-md border border-border/50 text-[0.75rem] text-foreground/40",
47096
47096
  children: "No data"
47097
47097
  });
47098
47098
  }
@@ -47345,7 +47345,7 @@ function MetricGroupComponent({ props: { metrics } }) {
47345
47345
  className: "flex flex-col gap-1 px-3",
47346
47346
  children: [
47347
47347
  /* @__PURE__ */ jsx("span", {
47348
- className: "text-[11px] font-medium text-foreground/50",
47348
+ className: "text-[0.6875rem] font-medium text-foreground/50",
47349
47349
  children: metric.label
47350
47350
  }),
47351
47351
  /* @__PURE__ */ jsxs("div", {
@@ -47354,7 +47354,7 @@ function MetricGroupComponent({ props: { metrics } }) {
47354
47354
  className: "text-lg font-semibold text-foreground",
47355
47355
  children: metric.value
47356
47356
  }), metric.delta ? /* @__PURE__ */ jsx("span", {
47357
- className: cn("rounded px-1.5 py-0.5 text-[10px] font-medium", deltaToneClasses[metric.deltaTone ?? "neutral"]),
47357
+ className: cn("rounded px-1.5 py-0.5 text-[0.625rem] font-medium", deltaToneClasses[metric.deltaTone ?? "neutral"]),
47358
47358
  children: metric.delta
47359
47359
  }) : null]
47360
47360
  }),
@@ -100517,7 +100517,7 @@ var CodeBlockDef = defineComponent$1({
100517
100517
  return /* @__PURE__ */ jsxs("pre", {
100518
100518
  className: "w-full overflow-x-auto rounded-lg bg-muted p-3 text-xs",
100519
100519
  children: [language && /* @__PURE__ */ jsx("div", {
100520
- className: "mb-2 text-[10px] text-muted-foreground uppercase",
100520
+ className: "mb-2 text-[0.625rem] text-muted-foreground uppercase",
100521
100521
  children: language
100522
100522
  }), /* @__PURE__ */ jsx("code", { children: code })]
100523
100523
  });
@@ -30,7 +30,7 @@ import {
30
30
  usePortalContext,
31
31
  useTimeout,
32
32
  webkit
33
- } from "./chunk-JICJWC33.js";
33
+ } from "./chunk-LZ4Q5KUJ.js";
34
34
  import {
35
35
  useBaseUiId,
36
36
  useTransitionStatus,
@@ -80,7 +80,7 @@ import {
80
80
  cn
81
81
  } from "./chunk-DJMHPJBP.js";
82
82
 
83
- // web/app/dist/server/assets/dialog-6pQWhLHm.js
83
+ // web/app/dist/server/assets/dialog-D2wc3OZf.js
84
84
  import * as React$1 from "react";
85
85
  import { createContext as createContext2, useContext as useContext2 } from "react";
86
86
  import { jsx, jsxs } from "react/jsx-runtime";