@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 786027b: React health triage, streaming correctness and trust-boundary hardening, design hygiene, and measured perf fixes across the Fleet Prime web app.
8
+ - 786027b: Improve chat-workspace reliability, loading performance, and project safety:
9
+
10
+ - Keep verified uploaded raster images renderable in previews while preserving forced downloads for other attachments.
11
+ - Defer Settings and Fork dialogs until they are first opened, so their lazy chunks stay off the cold-load path.
12
+ - Preserve staged attachments when direct or queued sends fail, and reconcile duplicate streamed question frames so answered questions close correctly.
13
+ - Ignore stale session-resume failures before recovery can replace a newer session.
14
+ - Prevent projects from targeting GitHub CLI credential directories, including relocated XDG configuration paths.
15
+ - Keep existing settings with more than 100 resource entries readable while enforcing bounded update requests.
16
+ - Allow JSONL exports to create nested directories within the active project without weakening path confinement.
17
+
18
+ ## 0.5.10
19
+
20
+ ### Patch Changes
21
+
22
+ - bfb0429: Improve Fleet Prime development startup, orb setup, and UI responsiveness with faster Vite loading and more stable chat controls.
23
+
3
24
  ## 0.5.9
4
25
 
5
26
  ### Patch Changes
@@ -0,0 +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{d 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"./createLucideIcon-DwxZHm0M.js";import{t as d}from"./check-JjHKAZas.js";import{t as f}from"./chevron-down-BEVGmnSb.js";import{t as p}from"./earth-DGZXAN5r.js";import{t as m}from"./file-text-T-NcAlZs.js";import{t as h}from"./image-BbPmlw-n.js";import{t as g}from"./message-square-hbDao-A1.js";import{t as _}from"./search-eWVnAJsb.js";import{t as v}from"./sparkles-DuclzqlE.js";import{t as y}from"./square-terminal-BYTN_I86.js";import{t as b}from"./wrench-BJNNe07k.js";import{t as x}from"./agent-disclosure-B8SnhQXL.js";import{t as S}from"./safe-external-url-D3PJJIcM.js";var C=u(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),w=u(`pencil-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),T=e(t(),1),E=`@keyframes beui-text-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion: reduce){.beui-text-shimmer{animation:none !important}}`,D=`beui-text-shimmer bg-[length:200%_100%] bg-clip-text text-transparent bg-[linear-gradient(110deg,var(--muted-foreground)_30%,var(--foreground)_50%,var(--muted-foreground)_70%)]`;function O(e){return{animation:`beui-text-shimmer ${e}s linear infinite`}}var k=n();function A({children:e,as:t=`span`,duration:n=2.5,className:r}){return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`style`,{children:E}),(0,k.jsx)(t,{style:O(n),className:l(`inline-block`,D,r),children:e})]})}function j({children:e=`Thinking…`,duration:t=1.8,className:n}){return(0,k.jsx)(A,{as:`span`,duration:t,className:l(`font-medium`,n),children:e})}function M({item:e}){let t=e.status??`complete`;return(0,k.jsxs)(`div`,{className:`flex min-h-7 items-start gap-2.5 rounded-md px-1.5 py-1`,children:[(0,k.jsx)(`span`,{"aria-hidden":`true`,className:`mt-0.5 grid size-4 shrink-0 place-items-center text-muted-foreground/70`,children:t===`complete`?(0,k.jsx)(d,{className:`size-4`,strokeWidth:1.8}):t===`active`?(0,k.jsxs)(`span`,{className:`relative grid size-3 place-items-center`,children:[(0,k.jsx)(r.span,{className:`absolute inset-0 rounded-full bg-foreground/10`,animate:{opacity:[.35,.8,.35]},transition:{duration:1.5,repeat:1/0}}),(0,k.jsx)(`span`,{className:`size-1.5 rounded-full bg-foreground/60`})]}):(0,k.jsx)(C,{className:`size-3`,strokeWidth:1.5})}),(0,k.jsx)(`span`,{className:l(`min-w-0 flex-1 leading-5`,t===`pending`?`text-muted-foreground/55`:`text-foreground/90`),children:e.label}),e.meta?(0,k.jsx)(`span`,{className:`shrink-0 leading-5 text-muted-foreground/55`,children:e.meta}):null]})}function N({item:e}){return(0,k.jsx)(`div`,{className:`rounded-md px-1.5 py-1 leading-5 text-muted-foreground`,children:e.content})}function P({result:e}){let t=e.url&&S(e.url)?e.url:void 0,n=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{"aria-hidden":`true`,className:`grid size-5 shrink-0 place-items-center text-muted-foreground`,children:e.icon??(0,k.jsx)(p,{className:`size-3`,strokeWidth:2})}),(0,k.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground/90`,children:e.title}),e.domain?(0,k.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground/55`,children:e.domain}):null]}),r=l(`flex min-h-7 items-center gap-2 rounded-md px-1.5 py-1 text-left outline-none transition-colors`,t&&`focus-visible:ring-2 focus-visible:ring-ring`);return t?(0,k.jsx)(`a`,{href:t,className:r,children:n}):(0,k.jsx)(`div`,{className:r,children:n})}function F({item:e}){let t=c()??!1,n=t?{opacity:1}:{opacity:0,y:6},o={opacity:1,y:0},l=t?{opacity:0}:{opacity:0,y:-3},u=t?{duration:0}:{opacity:{duration:.18,ease:a},y:i,layout:i};return(0,k.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,k.jsxs)(`div`,{className:`flex min-h-7 items-center gap-2.5 rounded-md px-1.5 py-1 text-muted-foreground`,children:[(0,k.jsx)(_,{"aria-hidden":`true`,className:`size-4 shrink-0`,strokeWidth:1.7}),(0,k.jsx)(`span`,{className:`min-w-0 truncate`,children:e.query})]}),e.results?.length?(0,k.jsx)(`div`,{className:`space-y-0.5 pl-4`,children:(0,k.jsx)(s,{initial:!0,mode:`popLayout`,children:e.results.map(e=>(0,k.jsx)(r.div,{layout:`position`,initial:n,animate:o,exit:l,transition:u,children:(0,k.jsx)(P,{result:e})},e.id))})}):null,(0,k.jsx)(s,{initial:!0,children:e.moreCount?(0,k.jsxs)(r.div,{initial:n,animate:o,exit:l,transition:u,className:`px-1.5 py-1 pl-8 text-muted-foreground/55`,children:[`+`,e.moreCount,` more`]},`more-results`):null})]})}function I({action:e}){return e===`read`?(0,k.jsx)(m,{className:`size-4`}):e===`edit`||e===`write`?(0,k.jsx)(w,{className:`size-4`}):e===`run`?(0,k.jsx)(y,{className:`size-4`}):(0,k.jsx)(b,{className:`size-4`})}function L({action:e}){return(0,k.jsx)(`button`,{type:`button`,"aria-label":e.ariaLabel??e.label,onClick:e.onClick,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`,children:e.label})}function R({item:e}){let t=e.action.charAt(0).toUpperCase()+e.action.slice(1),n=typeof e.additions==`number`||typeof e.deletions==`number`;return(0,k.jsxs)(`div`,{className:`grid min-h-8 min-w-0 grid-cols-[1rem_auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md px-1.5 py-0.5 leading-5`,children:[(0,k.jsx)(`span`,{"aria-hidden":`true`,className:`grid size-4 shrink-0 place-items-center text-muted-foreground/70`,children:(0,k.jsx)(I,{action:e.action})}),(0,k.jsx)(`span`,{className:`shrink-0 font-medium text-foreground/90`,children:t}),(0,k.jsx)(`span`,{className:`min-w-0 flex-1 truncate rounded-lg bg-muted/80 px-2.5 py-1 font-mono text-xs text-muted-foreground/70`,children:e.target}),n||e.openAction?(0,k.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[n?(0,k.jsxs)(`span`,{className:`flex items-center gap-2 font-mono tabular-nums`,children:[typeof e.additions==`number`?(0,k.jsxs)(`span`,{className:`text-emerald-500`,children:[`+`,e.additions]}):null,typeof e.deletions==`number`?(0,k.jsxs)(`span`,{className:`text-rose-500`,children:[`−`,e.deletions]}):null]}):null,e.openAction?(0,k.jsx)(L,{action:e.openAction}):null]}):null]})}function z({kind:e}){return e===`thinking`?(0,k.jsx)(v,{className:`size-4`}):e===`message`?(0,k.jsx)(g,{className:`size-4`}):e===`write`?(0,k.jsx)(w,{className:`size-4`}):e===`run`?(0,k.jsx)(y,{className:`size-4`}):e===`read`?(0,k.jsx)(h,{className:`size-4`}):(0,k.jsx)(b,{className:`size-4`})}function B({item:e}){let t=e.kind===`thinking`;return(0,k.jsxs)(`div`,{className:l(`grid min-h-8 grid-cols-[1rem_auto_minmax(0,1fr)_auto] gap-2.5 rounded-md px-1.5 py-0.5`,t?`items-start`:`items-center`),children:[(0,k.jsx)(`span`,{"aria-hidden":`true`,className:`grid size-4 place-items-center text-muted-foreground/70`,children:e.icon??(0,k.jsx)(z,{kind:e.kind})}),(0,k.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground/90`,children:e.label}),e.detail?(0,k.jsx)(`span`,{className:l(`min-w-0 rounded-lg bg-muted/80 px-2.5 py-1 font-mono text-xs text-muted-foreground/70`,t?`max-h-40 overflow-y-auto whitespace-pre-wrap break-words`:`truncate`),children:e.detail}):(0,k.jsx)(`span`,{}),e.action?(0,k.jsx)(L,{action:e.action}):null]})}function V({item:e}){return e.type===`text`?(0,k.jsx)(N,{item:e}):e.type===`search`?(0,k.jsx)(F,{item:e}):e.type===`tool`?(0,k.jsx)(R,{item:e}):e.type===`trace`?(0,k.jsx)(B,{item:e}):(0,k.jsx)(M,{item:e})}function H(e){let t=Math.max(0,Math.round(e));if(t<60)return`${t}s`;let n=Math.floor(t/60),r=t%60;return r===0?`${n}m`:`${n}m ${r}s`}function U({open:e,defaultOpen:t,onOpenChange:n}){let[r,i]=(0,T.useState)(t),a=e!==void 0;return[e??r,(0,T.useCallback)(e=>{a||i(e),n?.(e)},[a,n])]}function W(e){let t=e[0]?.type;return t&&e.every(e=>e.type===t)?t:`mixed`}function G(e){return e===`search`?`Searching the web…`:e===`tool`?`Running tools…`:e===`trace`?`Working through the run…`:e===`mixed`?`Working through it…`:`Thinking…`}function K(e,t,n){if(e===`step`||e===`text`)return(0,k.jsxs)(k.Fragment,{children:[`Thought for `,(0,k.jsx)(`span`,{className:`tabular-nums`,children:H(n)})]});if(e===`search`)return`Searched the web`;if(e===`tool`)return`Ran ${t.length} ${t.length===1?`tool`:`tools`}`;if(e===`trace`){let e=t.filter(e=>e.type===`trace`&&(e.kind===`thinking`||e.kind===`message`)).length,n=t.length-e;return`${n} ${n===1?`tool call`:`tool calls`}, ${e} ${e===1?`message`:`messages`}`}return`Completed ${t.length} ${t.length===1?`step`:`steps`}`}function q({items:e,contentType:t,status:n=`working`,duration:u=0,open:d,defaultOpen:p=!1,onOpenChange:m,collapseOnComplete:h=!0,activeLabel:g,summary:_,renderWorkingStatus:v,renderCompletedStatus:y,maxHeight:b=208,className:S,contentClassName:C}){let w=c()??!1,E=(0,T.useId)(),D=`${E}-trigger`,O=`${E}-content`,A=(0,T.useRef)(null),M=(0,T.useRef)(null),N=(0,T.useRef)(n),[P,F]=(0,T.useState)(0),[I,L]=U({open:d,defaultOpen:p,onOpenChange:m}),R=n===`working`,z=R||I,B=e.length?W(e):t??`mixed`,H=R?Math.max(0,b):Math.min(P,Math.max(0,b)),q=P>b,J=R?Math.min(0,H-P):0;(0,T.useLayoutEffect)(()=>{let e=A.current;if(!e)return;let t=()=>F(e.offsetHeight);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,T.useEffect)(()=>{N.current===`working`&&n===`complete`&&L(!h),N.current=n},[h,L,n]);let Y=()=>{let e=!I;L(e),e&&requestAnimationFrame(()=>M.current?.scrollTo({top:0}))},X=g??G(B),Z=_??K(B,e,u),Q=q?R?`linear-gradient(to bottom, transparent, black 12px)`:`linear-gradient(to bottom, transparent, black 12px, black calc(100% - 12px), transparent)`:void 0;return(0,k.jsxs)(`div`,{"data-state":R?`working`:z?`open`:`closed`,"data-content":B,"aria-busy":R,className:l(`w-full text-sm`,S),children:[R?(0,k.jsx)(`div`,{id:D,role:`status`,className:`flex h-7 min-w-0 items-center text-muted-foreground`,children:v?v({label:X,duration:u}):(0,k.jsx)(j,{children:X})}):(0,k.jsxs)(`button`,{id:D,type:`button`,"aria-expanded":z,"aria-controls":O,onClick:Y,className:`group flex h-7 min-w-0 items-center gap-1.5 rounded-md text-left font-medium text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,children:[(0,k.jsx)(`span`,{className:`truncate`,children:y?y({summary:Z,duration:u}):Z}),(0,k.jsx)(r.span,{"aria-hidden":`true`,animate:{rotate:z?180:0},transition:w?{duration:0}:o,className:`inline-flex shrink-0 text-muted-foreground/70 group-hover:text-foreground`,children:(0,k.jsx)(f,{className:`size-3.5`})})]}),(0,k.jsx)(x,{id:O,role:`region`,"aria-labelledby":D,open:z,openHeight:H,children:(0,k.jsx)(`div`,{ref:M,className:l(`scrollbar-hide pr-1`,q&&z&&!R?`overflow-y-auto`:`overflow-y-hidden`),style:{height:H,maskImage:Q,WebkitMaskImage:Q},children:(0,k.jsx)(r.div,{ref:A,role:`list`,initial:!1,animate:{y:J},transition:w?{duration:0}:i,className:l(`space-y-0.5 py-2`,C),children:(0,k.jsx)(s,{mode:`popLayout`,children:e.map(e=>(0,k.jsx)(r.div,{layout:`position`,role:`listitem`,initial:w?{opacity:1}:{opacity:0,y:6},animate:{opacity:1,y:0},exit:w?{opacity:0}:{opacity:0,y:-3},transition:w?{duration:0}:{opacity:{duration:.18,ease:a},y:i,layout:i},children:(0,k.jsx)(V,{item:e})},e.id))})})})})]})}export{q as AgentActivity};
@@ -0,0 +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{t as r}from"./button-BR2WWrFo.js";import{t as i}from"./createLucideIcon-DwxZHm0M.js";import{i as a,n as o,r as s,t as c}from"./tool-result-DfnPN0FQ.js";import{t as l}from"./chevron-right-DrJxToLs.js";import{t as u}from"./package-CdcJFPf2.js";import{r as d,t as f}from"./openui-renderer-J3dhPpL4.js";import{n as p,r as m,t as h}from"./collapsible-BoXtZZWN.js";import{n as g}from"./prime-agent-artifacts-C-g1VPiW.js";import{q as _}from"./chat-yh02zgA7.js";import{t as v}from"./artifacts-utils-N_kUFbz2.js";var y=i(`layout-template`,[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`9`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`jqznyg`}],[`rect`,{width:`5`,height:`7`,x:`16`,y:`14`,rx:`1`,key:`q5h2i8`}]]),b=e(t(),1),x=n(),S=[];function C(e){if(typeof e==`string`)return e;if(e==null)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function w(e){return e===`running`?`running`:e===`error`?`error`:e===`cancelled`?`cancelled`:`success`}function T(e){return e===`running`?`streaming`:e===`error`?`error`:e===`cancelled`?`cancelled`:`complete`}function E(e){let t=typeof e==`object`&&e?e:void 0;if(!t)return e===void 0?[]:[{label:`result`,text:C(e)}];let n=[];for(let e of[`stdout`,`stderr`,`result`,`error`])t[e]!==void 0&&t[e]!==``&&n.push({label:e,text:C(t[e])});let r=t.details??t.output??t.result;if(n.length===0&&r!==e&&n.push(...E(r)),n.length===0&&Array.isArray(t.content)){let e=t.content.flatMap(e=>typeof e==`string`?[e]:typeof e==`object`&&e&&`text`in e&&typeof e.text==`string`?[e.text]:[]).join(``);e&&n.push({label:t.isError===!0?`error`:`stdout`,text:e})}return n.length>0?n:[{label:`result`,text:C(e)}]}function D(e){let t=typeof e.input==`object`&&e.input!==null?e.input:void 0,n=t?.command??t?.code??t?.script;if(!(typeof n!=`string`||!n))return e.kind===`bash`?{code:n,language:`bash`,label:`Bash`}:e.kind===`ipython`?{code:n,language:/^\s*%%bash(?:\s|$)/im.test(n)?`bash`:`python`,label:`IPython`}:e.kind===`diff`?{code:n,language:`text`,label:`Text`}:{code:n,language:`json`,label:`JSON`}}function O(e){if(e.kind!==`openui-html`)return;let t=typeof e.output==`object`&&e.output!==null?e.output:void 0;if(typeof t?.title==`string`&&typeof t.document==`string`)return{title:t.title,document:t.document}}function k({artifact:e,selected:t}){let n=(0,b.useRef)(null);(0,b.useEffect)(()=>{t&&requestAnimationFrame(()=>{n.current?.focus({preventScroll:!0}),n.current?.scrollIntoView({block:`nearest`})})},[t]);let r=O(e);return(0,x.jsxs)(`article`,{ref:n,"data-artifact-id":e.id,tabIndex:-1,className:`min-w-0 rounded-md border border-border/60 bg-background p-2.5 outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs font-medium`,title:e.title,children:e.title||`OpenUI artifact`}),(0,x.jsx)(`span`,{className:`shrink-0 text-[0.625rem] text-foreground/40`,children:e.status})]}),r?(0,x.jsx)(d,{artifact:r}):(0,x.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-xs text-destructive`,children:[(0,x.jsx)(`p`,{children:`OpenUI artifact data is unavailable.`}),(0,x.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap break-words rounded bg-foreground/5 p-2 text-foreground/70`,children:C(e.output)})]})]})}function A({artifact:e,selected:t}){let n=(0,b.useRef)(null),r=t||e.status===`running`,[i,l]=(0,b.useState)(r);(0,b.useEffect)(()=>{t&&(l(!0),requestAnimationFrame(()=>{n.current?.focus({preventScroll:!0}),n.current?.scrollIntoView({block:`nearest`})}))},[t]);let u=D(e),d=E(e.output),f=e.kind===`diff`||e.kind===`refinement`?g(e):void 0;return(0,x.jsxs)(`article`,{ref:n,"data-artifact-id":e.id,tabIndex:-1,className:`rounded-md border border-border/60 bg-background px-2.5 py-2 outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[f?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s,{file:f.file,lines:f.lines,status:T(e.status),defaultOpen:r,copyText:f.copyText,maxHeight:240}),d.map(e=>(0,x.jsx)(o,{label:e.label,language:`text`,children:e.text},e.label))]}):null,f?null:(0,x.jsx)(c,{tool:e.kind,title:e.title,status:w(e.status),open:i,onOpenChange:l,defaultOpen:r,kind:e.kind===`bash`||e.kind===`ipython`?`terminal`:`custom`,children:(0,x.jsxs)(`div`,{className:`space-y-3`,children:[u?(0,x.jsx)(a,{code:u.code,language:u.language,languageLabel:u.label,showStatus:!1,showLineNumbers:!1,wrap:!0}):null,d.map(e=>(0,x.jsx)(o,{label:e.label,language:`text`,children:e.text},e.label))]})})]})}function j({block:e,expanded:t,isStreaming:n,onOpenUIAction:i,onToggle:a}){return(0,x.jsxs)(h,{open:t,onOpenChange:a,children:[(0,x.jsxs)(m,{render:(0,x.jsx)(r,{variant:`ghost`,size:`sm`,className:`group w-full justify-start gap-1.5 text-left text-label font-normal text-foreground/65 transition-none hover:bg-foreground/5 hover:text-foreground/80`}),children:[(0,x.jsx)(l,{className:`size-3 shrink-0 text-foreground/35 transition-transform group-data-panel-open:rotate-90`}),(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/35`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.component,children:e.component}),(0,x.jsxs)(`span`,{className:`shrink-0 text-[0.625rem] text-foreground/40`,children:[`#`,e.ordinal]})]}),(0,x.jsx)(p,{children:(0,x.jsx)(`div`,{className:`mb-1 mt-0.5 flex min-w-0 flex-col overflow-hidden rounded-md border border-border/60 bg-background px-2.5 py-2`,children:(0,x.jsx)(_,{resetKeys:[e.content],children:(0,x.jsx)(f,{content:e.content,isStreaming:n,messageId:e.blockId,onOpenUIAction:i})})})})]})}function M({messages:e,onOpenUIAction:t,status:n,artifactRuns:r=S,selectedArtifactId:i}){let a=(0,b.useMemo)(()=>v(e),[e]),[o,s]=(0,b.useState)(null),c=n===`streaming`?a.at(-1)?.blockId:void 0,l=(0,b.useMemo)(()=>r.flatMap(e=>e.artifacts),[r]),d=(0,b.useMemo)(()=>l.filter(e=>e.kind===`openui-html`),[l]),f=(0,b.useMemo)(()=>l.filter(e=>e.kind!==`openui-html`&&e.kind!==`ipython`),[l]);return(0,x.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-2 overflow-hidden`,children:[d.length>0?(0,x.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`OpenUI artifacts`}),(0,x.jsx)(`span`,{className:`shrink-0 text-[0.625rem] text-foreground/40`,children:d.length})]}),(0,x.jsx)(`div`,{className:`space-y-1`,children:d.map(e=>(0,x.jsx)(k,{artifact:e,selected:e.id===i},e.id))})]}):null,f.length>0?(0,x.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(u,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`Technical artifacts`}),(0,x.jsx)(`span`,{className:`shrink-0 text-[0.625rem] text-foreground/40`,children:f.length})]}),(0,x.jsx)(`div`,{className:`space-y-1`,children:f.map(e=>(0,x.jsx)(A,{artifact:e,selected:e.id===i},e.id))})]}):null,(0,x.jsxs)(`div`,{className:`flex min-h-0 flex-col`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`Generative UI`}),(0,x.jsx)(`span`,{className:`shrink-0 text-[0.625rem] text-foreground/40`,children:a.length>0?`${a.length}`:`none yet`})]}),a.length===0?(0,x.jsx)(`p`,{className:`px-2 pb-1 text-[0.6875rem] leading-4 text-foreground/40`,children:`OpenUI interfaces the agent generates in this session appear here, and can be re-opened without scrolling the conversation.`}):(0,x.jsx)(`div`,{className:`flex min-h-0 flex-col gap-0.5 overflow-y-auto`,children:a.map(e=>(0,x.jsx)(j,{block:e,expanded:e.blockId===o,isStreaming:e.blockId===c,onOpenUIAction:t,onToggle:()=>s(t=>t===e.blockId?null:e.blockId)},e.blockId))})]})]})}export{M as ArtifactsPanelContent};
@@ -1 +1 @@
1
- import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{i as n,r}from"./bundle-mjs-DKHVkVWu.js";import{t as i}from"./react-dom-Bwxum3ti.js";import{t as a}from"./jsx-runtime-NZYk81nU.js";import{F as o,G as s,J as c,K as l,O as u,P as d,S as f,X as p,at as m,ct as h,et as g,it as _,rt as v,st as y,t as ee,tt as b,v as x,z as S}from"./createBaseUIEventDetails-DV0dQrBX.js";import{t as C}from"./utils-Eg7xtNmV.js";var te=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),w=t(((e,t)=>{t.exports=te()})),ne=t((e=>{var t=n(),r=w();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),T=t(((e,t)=>{t.exports=ne()})),E=w(),re=e(T(),1),D=e(n(),1),O=[],k=void 0;function ie(){return k}function ae(e){O.push(e)}function oe(e){let t=(t,n)=>{let r=_(ce).current,i;try{k=r;for(let e of O)e.before(r);i=e(t,n);for(let e of O)e.after(r);r.didInitialize=!0}finally{k=void 0}return i};return t.displayName=e.displayName||e.name,t}function se(e){return D.forwardRef(oe(e))}function ce(){return{didInitialize:!1}}var le=b(19)?de:fe;function A(e,t,n,r,i){return le(e,t,n,r,i)}function ue(e,t,n,r,i){let a=D.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,E.useSyncExternalStore)(e.subscribe,a,a)}ae({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,E.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function de(e,t,n,r,i){let a=ie();if(!a)return ue(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function fe(e,t,n,r,i){return(0,re.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var pe=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return A(this,e,t,n,r)}},me=class extends pe{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){D.useDebugValue(e);let n=this;v(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;v(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);v(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){D.useDebugValue(e);let n=this,r=t!==void 0;v(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return D.useDebugValue(e),A(this,this.selectors[e],t,n,r)}useContextCallback(e,t){D.useDebugValue(e);let n=g(t??h);this.context[e]=n}useStateSetter(e){let t=D.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},he=e(i(),1);function j(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var M=a();function N(e){return e?.ownerDocument||document}var P=0,ge=class e{static create(){return new e}currentId=P;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=P,t()},e)}isStarted(){return this.currentId!==P}clear=()=>{this.currentId!==P&&(clearTimeout(this.currentId),this.currentId=P)};disposeEffect=()=>this.clear};function _e(){let e=_(ge.create).current;return m(e.disposeEffect),e}function ve(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:ye,platform:be,maxTouchPoints:xe}=ve(),F=ye.toLowerCase(),I=be.toLowerCase(),L=/^i(os$|p)/.test(I)||I===`macintel`&&xe>1,R=`android`,Se=I===R||F.includes(R),Ce=!L&&I.startsWith(`mac`);I.startsWith(`win`),!Se&&/^(linux|chrome os)/.test(I);var we=Ce||L,z=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!z&&F.includes(`firefox`),!z&&F.includes(`chrom`);var Te=we,B=/jsdom|happydom/.test(F),Ee=`data-base-ui-focusable`,De=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Oe=`ArrowLeft`,ke=`ArrowRight`,Ae=`ArrowUp`,je=`ArrowDown`;function V(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function H(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&p(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Me(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Ne(e,t){if(!s(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(H(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function Pe(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Fe(e){return e.matches(`html,body`)}function U(e){return l(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Ie(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${De}`)!=null}function Le(e){return e?e.getAttribute(`role`)===`combobox`&&U(e):!1}function Re(e){if(!e||B)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ze(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Be(e,t){return t<0||t>=e.length}function Ve(e,t){return W(e.current,{disabledIndices:t})}function He(e,t){return W(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function W(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&G(e,a,r));return a}function G(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!K(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function Ue(e){return e.visibility===`hidden`||e.visibility===`collapse`}function K(e,t=e?o(e):null){return!e||!e.isConnected||!t||Ue(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var We=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Ge(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return p(n)?n.host:null}function q(e){for(let t of Array.from(e.children))if(S(t)===`summary`)return t;return null}function Ke(e,t){let n=q(t);return!!n&&(e===n||H(n,e))}function J(e){let t=e?S(e):``;return e!=null&&e.matches(We)&&(t!==`summary`||e.parentElement!=null&&S(e.parentElement)===`details`&&q(e.parentElement)===e)&&(t!==`details`||q(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Y(e){if(!J(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Ge(t)){let n=t!==e,r=S(t)===`slot`;if(t.hasAttribute(`inert`)||n&&S(t)===`details`&&!t.open&&!Ke(e,t)||t.hasAttribute(`hidden`)||!r&&!qe(t,n))return!1}return!0}function qe(e,t){let n=o(e);return t?n.display!==`none`:K(e,n)}function Je(e){let t=e.tabIndex;if(t<0){let t=S(e);if(t===`details`||t===`audio`||t===`video`||l(e)&&e.isContentEditable)return 0}return t}function X(e){if(S(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Ye(e,t){let n=X(e);if(!n)return!0;let r=t.find(e=>{let t=X(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=X(e);return t?.name===n.name&&t.form===n.form})===n}function Xe(e){if(l(e)&&S(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return l(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ze(e,t){Xe(e).forEach(e=>{J(e)&&t.push(e),Ze(e,t)})}function Qe(e,t,n){Xe(e).forEach(e=>{l(e)&&e.matches(t)&&n.push(e),Qe(e,t,n)})}function $e(e){return Y(e)&&Je(e)>=0}function et(e){let t=[];return Ze(e,t),t.filter(Y)}function Z(e){let t=et(e);return t.filter(e=>Je(e)>=0&&Ye(e,t))}function tt(e,t){let n=Z(e),r=n.length;if(r===0)return;let i=V(N(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function nt(e){return tt(N(e).body,1)||e}function rt(e){return tt(N(e).body,-1)||e}function it(e,t){if(!e)return null;let n=Z(N(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function at(e){return it(e,1)}function ot(e){return it(e,-1)}function Q(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!H(n,r)}function st(e){Z(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ct(e){let t=[];Qe(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var lt={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},ut={...lt,position:`fixed`,top:0,left:0},dt={...lt,position:`absolute`},$=D.forwardRef(function(e,t){let[n,r]=D.useState();v(()=>{Te&&z&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,M.jsx)(`span`,{...e,ref:t,style:ut,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function ft(e){return b(19)?e:e?`true`:void 0}var pt={style:{transition:`none`}},mt=`data-base-ui-click-trigger`,ht=`data-base-ui-swipe-ignore`,gt=`data-swipe-ignore`,_t=`[${ht}]`,vt=`[${gt}]`,yt={fallbackAxisSide:`none`},bt={fallbackAxisSide:`end`},xt={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0};function St(e){return`data-base-ui-${e}`}var Ct=D.createContext(null),wt=()=>D.useContext(Ct),Tt=St(`portal`);function Et(e={}){let{ref:t,container:n,componentProps:r=y,elementProps:i}=e,a=f(),o=wt()?.portalNode,[s,l]=D.useState(null),[d,p]=D.useState(null),m=g(e=>{e!==null&&p(e)}),h=D.useRef(null);v(()=>{if(n===null){h.current&&(h.current=null,p(null),l(null));return}let e=(n&&(c(n)?n:n.current))??o??document.body;if(e==null){h.current&&(h.current=null,p(null),l(null));return}h.current!==e&&(h.current=e,p(null),l(e))},[n,o]);let _=u(`div`,r,{ref:[t,m],props:[{id:a,[Tt]:``},i]}),ee=s&&_?he.createPortal(_,s):null;return{node:d,nodeId:D.isValidElement(_)?_.props.id:void 0,subtree:ee}}var Dt=D.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,...s}=e,{node:c,nodeId:l,subtree:u}=Et({container:o,ref:t,componentProps:e,elementProps:s}),f=D.useRef(null),p=D.useRef(null),m=D.useRef(null),h=D.useRef(null),[g,_]=D.useState(null),y=D.useRef(!1),b=g?.modal,x=g?.open,S=!!g&&!g.modal&&g.open&&!!c;D.useEffect(()=>{if(!c||b)return;function e(e){c&&e.relatedTarget&&Q(e)&&(e.type===`focusin`?y.current&&=(ct(c),!1):(st(c),y.current=!0))}return j(d(c,`focusin`,e,!0),d(c,`focusout`,e,!0))},[c,b]),v(()=>{!c||x!==!0||!y.current||(ct(c),y.current=!1)},[x,c]);let C=D.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:c,setFocusManagerState:_}),[c]);return(0,M.jsxs)(D.Fragment,{children:[u,(0,M.jsxs)(Ct.Provider,{value:C,children:[S&&c&&(0,M.jsx)($,{"data-type":`outside`,ref:f,onFocus:e=>{Q(e,c)?m.current?.focus():rt(g?g.domReference:null)?.focus()}}),S&&c&&(0,M.jsx)(`span`,{"aria-owns":l,style:xt}),c&&he.createPortal(a,c),S&&c&&(0,M.jsx)($,{"data-type":`outside`,ref:p,onFocus:e=>{Q(e,c)?h.current?.focus():(nt(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,ee(`focus-out`,e.nativeEvent)))}})]})]})}),Ot=D.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:d}=x({disabled:i,focusableWhenDisabled:a,native:o});return u(`button`,e,{state:{disabled:i},ref:[t,d],props:[c,l]})}),kt=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,At=r,jt=(e,t)=>n=>{if(t?.variants==null)return At(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=kt(t)||kt(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return At(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Mt=jt(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function Nt({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,M.jsx)(Ot,{"data-slot":`button`,className:C(Mt({variant:t,size:n,className:e})),...r})}export{_e as $,G as A,H as B,$e as C,Ve as D,He as E,Ne as F,Ae as G,je as H,Le as I,z as J,Ee as K,U as L,Pe as M,Ie as N,K as O,Fe as P,ge as Q,Re as R,Q as S,W as T,Oe as U,Me as V,ke as W,L as X,Se as Y,Ce as Z,et as _,wt as a,se as at,at as b,mt as c,vt as d,N as et,bt as f,dt as g,ut as h,Et as i,oe as it,ze as j,Be as k,pt as l,$ as m,jt as n,me as nt,St as o,T as ot,ft as p,B as q,Dt as r,A as rt,_t as s,w as st,Nt as t,j as tt,yt as u,nt as v,Z as w,ot as x,rt as y,V as z};
1
+ import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{i as n,r}from"./bundle-mjs-DKHVkVWu.js";import{t as i}from"./react-dom-Bwxum3ti.js";import{t as a}from"./jsx-runtime-NZYk81nU.js";import{F as o,G as s,J as c,K as l,O as u,P as d,S as f,X as p,at as m,ct as h,et as g,it as _,rt as v,st as y,t as ee,tt as b,v as x,z as S}from"./createBaseUIEventDetails-DV0dQrBX.js";import{t as C}from"./utils-Eg7xtNmV.js";var te=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),w=t(((e,t)=>{t.exports=te()})),ne=t((e=>{var t=n(),r=w();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),T=t(((e,t)=>{t.exports=ne()})),E=w(),re=e(T(),1),D=e(n(),1),O=[],k=void 0;function ie(){return k}function ae(e){O.push(e)}function oe(e){let t=(t,n)=>{let r=_(ce).current,i;try{k=r;for(let e of O)e.before(r);i=e(t,n);for(let e of O)e.after(r);r.didInitialize=!0}finally{k=void 0}return i};return t.displayName=e.displayName||e.name,t}function se(e){return D.forwardRef(oe(e))}function ce(){return{didInitialize:!1}}var le=b(19)?de:fe;function A(e,t,n,r,i){return le(e,t,n,r,i)}function ue(e,t,n,r,i){let a=D.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,E.useSyncExternalStore)(e.subscribe,a,a)}ae({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,E.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function de(e,t,n,r,i){let a=ie();if(!a)return ue(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function fe(e,t,n,r,i){return(0,re.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var pe=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return A(this,e,t,n,r)}},me=class extends pe{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){D.useDebugValue(e);let n=this;v(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;v(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);v(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){D.useDebugValue(e);let n=this,r=t!==void 0;v(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return D.useDebugValue(e),A(this,this.selectors[e],t,n,r)}useContextCallback(e,t){D.useDebugValue(e);let n=g(t??h);this.context[e]=n}useStateSetter(e){let t=D.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},he=e(i(),1);function j(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var M=a();function N(e){return e?.ownerDocument||document}var P=0,ge=class e{static create(){return new e}currentId=P;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=P,t()},e)}isStarted(){return this.currentId!==P}clear=()=>{this.currentId!==P&&(clearTimeout(this.currentId),this.currentId=P)};disposeEffect=()=>this.clear};function _e(){let e=_(ge.create).current;return m(e.disposeEffect),e}function ve(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:ye,platform:be,maxTouchPoints:xe}=ve(),F=ye.toLowerCase(),I=be.toLowerCase(),L=/^i(os$|p)/.test(I)||I===`macintel`&&xe>1,R=`android`,Se=I===R||F.includes(R),Ce=!L&&I.startsWith(`mac`);I.startsWith(`win`),!Se&&/^(linux|chrome os)/.test(I);var we=Ce||L,z=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!z&&F.includes(`firefox`),!z&&F.includes(`chrom`);var Te=we,B=/jsdom|happydom/.test(F),Ee=`data-base-ui-focusable`,De=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Oe=`ArrowLeft`,ke=`ArrowRight`,Ae=`ArrowUp`,je=`ArrowDown`;function V(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function H(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&p(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Me(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Ne(e,t){if(!s(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(H(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function Pe(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Fe(e){return e.matches(`html,body`)}function U(e){return l(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Ie(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${De}`)!=null}function Le(e){return e?e.getAttribute(`role`)===`combobox`&&U(e):!1}function Re(e){if(!e||B)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ze(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Be(e,t){return t<0||t>=e.length}function Ve(e,t){return W(e.current,{disabledIndices:t})}function He(e,t){return W(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function W(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&G(e,a,r));return a}function G(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!K(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function Ue(e){return e.visibility===`hidden`||e.visibility===`collapse`}function K(e,t=e?o(e):null){return!e||!e.isConnected||!t||Ue(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var We=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Ge(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return p(n)?n.host:null}function q(e){for(let t of Array.from(e.children))if(S(t)===`summary`)return t;return null}function Ke(e,t){let n=q(t);return!!n&&(e===n||H(n,e))}function J(e){let t=e?S(e):``;return e!=null&&e.matches(We)&&(t!==`summary`||e.parentElement!=null&&S(e.parentElement)===`details`&&q(e.parentElement)===e)&&(t!==`details`||q(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Y(e){if(!J(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Ge(t)){let n=t!==e,r=S(t)===`slot`;if(t.hasAttribute(`inert`)||n&&S(t)===`details`&&!t.open&&!Ke(e,t)||t.hasAttribute(`hidden`)||!r&&!qe(t,n))return!1}return!0}function qe(e,t){let n=o(e);return t?n.display!==`none`:K(e,n)}function Je(e){let t=e.tabIndex;if(t<0){let t=S(e);if(t===`details`||t===`audio`||t===`video`||l(e)&&e.isContentEditable)return 0}return t}function X(e){if(S(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Ye(e,t){let n=X(e);if(!n)return!0;let r=t.find(e=>{let t=X(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=X(e);return t?.name===n.name&&t.form===n.form})===n}function Xe(e){if(l(e)&&S(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return l(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ze(e,t){Xe(e).forEach(e=>{J(e)&&t.push(e),Ze(e,t)})}function Qe(e,t,n){Xe(e).forEach(e=>{l(e)&&e.matches(t)&&n.push(e),Qe(e,t,n)})}function $e(e){return Y(e)&&Je(e)>=0}function et(e){let t=[];return Ze(e,t),t.filter(Y)}function Z(e){let t=et(e);return t.filter(e=>Je(e)>=0&&Ye(e,t))}function tt(e,t){let n=Z(e),r=n.length;if(r===0)return;let i=V(N(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function nt(e){return tt(N(e).body,1)||e}function rt(e){return tt(N(e).body,-1)||e}function it(e,t){if(!e)return null;let n=Z(N(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function at(e){return it(e,1)}function ot(e){return it(e,-1)}function Q(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!H(n,r)}function st(e){Z(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ct(e){let t=[];Qe(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var lt={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},ut={...lt,position:`fixed`,top:0,left:0},dt={...lt,position:`absolute`},$=D.forwardRef(function(e,t){let[n,r]=D.useState();v(()=>{Te&&z&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,M.jsx)(`span`,{...e,ref:t,style:ut,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function ft(e){return b(19)?e:e?`true`:void 0}var pt={style:{transition:`none`}},mt=`data-base-ui-click-trigger`,ht=`data-base-ui-swipe-ignore`,gt=`data-swipe-ignore`,_t=`[${ht}]`,vt=`[${gt}]`,yt={fallbackAxisSide:`none`},bt={fallbackAxisSide:`end`},xt={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0};function St(e){return`data-base-ui-${e}`}var Ct=D.createContext(null),wt=()=>D.useContext(Ct),Tt=St(`portal`);function Et(e={}){let{ref:t,container:n,componentProps:r=y,elementProps:i}=e,a=f(),o=wt()?.portalNode,[s,l]=D.useState(null),[d,p]=D.useState(null),m=g(e=>{e!==null&&p(e)}),h=D.useRef(null);v(()=>{if(n===null){h.current&&(h.current=null,p(null),l(null));return}let e=(n&&(c(n)?n:n.current))??o??document.body;if(e==null){h.current&&(h.current=null,p(null),l(null));return}h.current!==e&&(h.current=e,p(null),l(e))},[n,o]);let _=u(`div`,r,{ref:[t,m],props:[{id:a,[Tt]:``},i]}),ee=s&&_?he.createPortal(_,s):null;return{node:d,nodeId:D.isValidElement(_)?_.props.id:void 0,subtree:ee}}var Dt=D.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,...s}=e,{node:c,nodeId:l,subtree:u}=Et({container:o,ref:t,componentProps:e,elementProps:s}),f=D.useRef(null),p=D.useRef(null),m=D.useRef(null),h=D.useRef(null),[g,_]=D.useState(null),y=D.useRef(!1),b=g?.modal,x=g?.open,S=!!g&&!g.modal&&g.open&&!!c;D.useEffect(()=>{if(!c||b)return;function e(e){c&&e.relatedTarget&&Q(e)&&(e.type===`focusin`?y.current&&=(ct(c),!1):(st(c),y.current=!0))}return j(d(c,`focusin`,e,!0),d(c,`focusout`,e,!0))},[c,b]),v(()=>{!c||x!==!0||!y.current||(ct(c),y.current=!1)},[x,c]);let C=D.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:c,setFocusManagerState:_}),[c]);return(0,M.jsxs)(D.Fragment,{children:[u,(0,M.jsxs)(Ct.Provider,{value:C,children:[S&&c&&(0,M.jsx)($,{"data-type":`outside`,ref:f,onFocus:e=>{Q(e,c)?m.current?.focus():rt(g?g.domReference:null)?.focus()}}),S&&c&&(0,M.jsx)(`span`,{"aria-owns":l,style:xt}),c&&he.createPortal(a,c),S&&c&&(0,M.jsx)($,{"data-type":`outside`,ref:p,onFocus:e=>{Q(e,c)?h.current?.focus():(nt(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,ee(`focus-out`,e.nativeEvent)))}})]})]})}),Ot=D.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:d}=x({disabled:i,focusableWhenDisabled:a,native:o});return u(`button`,e,{state:{disabled:i},ref:[t,d],props:[c,l]})}),kt=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,At=r,jt=(e,t)=>n=>{if(t?.variants==null)return At(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=kt(t)||kt(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return At(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Mt=jt(`group/button inline-flex shrink-0 items-center justify-center rounded-full border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 rounded-full px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5`,xs:`h-6 gap-1 rounded-full px-2 text-xs in-data-[slot=button-group]:rounded-full has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-full px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-full has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 rounded-full px-3.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3`,icon:`size-8 rounded-full`,"icon-xs":`size-6 rounded-full in-data-[slot=button-group]:rounded-full [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-full in-data-[slot=button-group]:rounded-full`,"icon-lg":`size-9 rounded-full`}},defaultVariants:{variant:`default`,size:`default`}});function Nt({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,M.jsx)(Ot,{"data-slot":`button`,className:C(Mt({variant:t,size:n,className:e})),...r})}export{_e as $,G as A,H as B,$e as C,Ve as D,He as E,Ne as F,Ae as G,je as H,Le as I,z as J,Ee as K,U as L,Pe as M,Ie as N,K as O,Fe as P,ge as Q,Re as R,Q as S,W as T,Oe as U,Me as V,ke as W,L as X,Se as Y,Ce as Z,et as _,wt as a,se as at,at as b,mt as c,vt as d,N as et,bt as f,dt as g,ut as h,Et as i,oe as it,ze as j,Be as k,pt as l,$ as m,jt as n,me as nt,St as o,T as ot,ft as p,B as q,Dt as r,A as rt,_t as s,w as st,Nt as t,j as tt,yt as u,nt as v,Z as w,ot as x,rt as y,V as z};
@@ -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{t as r}from"./createLucideIcon-DwxZHm0M.js";import{t as i}from"./right-panel-registry-DOyEvIMD.js";import{i as a,n as o,r as s,t as c}from"./sun-BWiZFty0.js";import{t as l}from"./plus-DXN1Bg_z.js";import{t as u}from"./square-Bhn8gjr0.js";import{a as d,c as f,i as p,n as m,o as h,r as g,s as _}from"./command-Cx-UYeQ9.js";var v=r(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),y=e(t(),1),b=n();function x({open:e,onOpenChange:t,onNewSession:n,onStop:r,onResumeSession:x,onSetRightPanel:S,onThemeChange:C,sessions:w,isStreaming:T,themePreference:E}){let[D,O]=(0,y.useState)(``),[k,A]=(0,y.useState)(e);e!==k&&(A(e),e&&O(``));let j=e=>{e(),t(!1)};return(0,b.jsxs)(m,{open:e,onOpenChange:t,children:[(0,b.jsx)(d,{placeholder:`Type a command or search…`,value:D,onValueChange:O}),(0,b.jsxs)(_,{children:[(0,b.jsx)(g,{children:`No commands found.`}),(0,b.jsxs)(p,{heading:`Actions`,children:[(0,b.jsxs)(h,{onSelect:()=>j(n),keywords:[`new`,`session`,`chat`],children:[(0,b.jsx)(l,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`New session`})]}),T&&(0,b.jsxs)(h,{onSelect:()=>j(r),keywords:[`stop`,`abort`,`cancel`],children:[(0,b.jsx)(u,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Stop generation`})]})]}),(0,b.jsx)(f,{}),(0,b.jsx)(p,{heading:`Panels`,children:i.map(e=>{let t=e.icon;return(0,b.jsxs)(h,{onSelect:()=>j(()=>S(e.id)),keywords:e.commandKeywords,children:[(0,b.jsx)(t,{}),(0,b.jsx)(`span`,{children:e.commandLabel})]},e.id)})}),w.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f,{}),(0,b.jsx)(p,{heading:`Sessions`,children:w.map(e=>{let t=e.title;return(0,b.jsxs)(h,{onSelect:()=>j(()=>x(e)),keywords:[`session`,t],children:[(0,b.jsx)(v,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{className:`truncate`,children:t})]},e.sessionId)})})]}),(0,b.jsx)(f,{}),(0,b.jsxs)(p,{heading:`Theme`,children:[(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`light`)),keywords:[`theme`,`light`],children:[(0,b.jsx)(c,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Light`}),E===`light`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]}),(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`dark`)),keywords:[`theme`,`dark`],children:[(0,b.jsx)(o,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Dark`}),E===`dark`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]}),(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`system`)),keywords:[`theme`,`system`],children:[(0,b.jsx)(s,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`System`}),E===`system`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]})]})]})]})}export{x as ChatCommandPalette};
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{t as r}from"./createLucideIcon-DwxZHm0M.js";import{t as i}from"./right-panel-registry-DewpBWHM.js";import{i as a,n as o,r as s,t as c}from"./sun-BWiZFty0.js";import{t as l}from"./plus-DXN1Bg_z.js";import{t as u}from"./square-Bhn8gjr0.js";import{a as d,c as f,i as p,n as m,o as h,r as g,s as _}from"./command-DPfiaYUL.js";var v=r(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),y=e(t(),1),b=n();function x({open:e,onOpenChange:t,onNewSession:n,onStop:r,onResumeSession:x,onSetRightPanel:S,onThemeChange:C,sessions:w,isStreaming:T,themePreference:E}){let[D,O]=(0,y.useState)(``),[k,A]=(0,y.useState)(e);e!==k&&(A(e),e&&O(``));let j=e=>{e(),t(!1)};return(0,b.jsxs)(m,{open:e,onOpenChange:t,children:[(0,b.jsx)(d,{placeholder:`Type a command or search…`,value:D,onValueChange:O}),(0,b.jsxs)(_,{children:[(0,b.jsx)(g,{children:`No commands found.`}),(0,b.jsxs)(p,{heading:`Actions`,children:[(0,b.jsxs)(h,{onSelect:()=>j(n),keywords:[`new`,`session`,`chat`],children:[(0,b.jsx)(l,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`New session`})]}),T&&(0,b.jsxs)(h,{onSelect:()=>j(r),keywords:[`stop`,`abort`,`cancel`],children:[(0,b.jsx)(u,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Stop generation`})]})]}),(0,b.jsx)(f,{}),(0,b.jsx)(p,{heading:`Panels`,children:i.map(e=>{let t=e.icon;return(0,b.jsxs)(h,{onSelect:()=>j(()=>S(e.id)),keywords:e.commandKeywords,children:[(0,b.jsx)(t,{}),(0,b.jsx)(`span`,{children:e.commandLabel})]},e.id)})}),w.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f,{}),(0,b.jsx)(p,{heading:`Sessions`,children:w.map(e=>{let t=e.title;return(0,b.jsxs)(h,{onSelect:()=>j(()=>x(e)),keywords:[`session`,t],children:[(0,b.jsx)(v,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{className:`truncate`,children:t})]},e.sessionId)})})]}),(0,b.jsx)(f,{}),(0,b.jsxs)(p,{heading:`Theme`,children:[(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`light`)),keywords:[`theme`,`light`],children:[(0,b.jsx)(c,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Light`}),E===`light`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]}),(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`dark`)),keywords:[`theme`,`dark`],children:[(0,b.jsx)(o,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`Dark`}),E===`dark`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]}),(0,b.jsxs)(h,{onSelect:()=>j(()=>C(`system`)),keywords:[`theme`,`system`],children:[(0,b.jsx)(s,{className:`mr-2 size-4`}),(0,b.jsx)(`span`,{children:`System`}),E===`system`&&(0,b.jsx)(a,{className:`ml-auto size-3 opacity-50`})]})]})]})]})}export{x as ChatCommandPalette};