@qredence/fleet 0.5.10 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/web/client/assets/agent-activity-CwMDU7aP.js +1 -0
  3. package/dist/web/client/assets/artifacts-panel-CJ75gQub.js +1 -0
  4. package/dist/web/client/assets/chat-Ci2cEQrR.js +52 -0
  5. package/dist/web/client/assets/{chat-command-palette-DfYSPPXI.js → chat-command-palette-CkISHfKE.js} +1 -1
  6. package/dist/web/client/assets/{citations-BQ_pr_9_.js → citations-C_tPOJE_.js} +1 -1
  7. package/dist/web/client/assets/{command-DPfiaYUL.js → command-_WjnervL.js} +1 -1
  8. package/dist/web/client/assets/fleet-message-queue-BCno4XP-.js +1 -0
  9. package/dist/web/client/assets/{fleet-pi-tool-renderer-AJoMbXBa.js → fleet-pi-tool-renderer-BEDIO3al.js} +4 -4
  10. package/dist/web/client/assets/fleet-reasoning-panel-CbkO7u-v.js +1 -0
  11. package/dist/web/client/assets/{fleet-subagent-list-BnRnrWKS.js → fleet-subagent-list-iKUtLJKZ.js} +1 -1
  12. package/dist/web/client/assets/fleet-tool-timeline-C8heL7ae.js +1 -0
  13. package/dist/web/client/assets/{fork-picker-dialog-CkcSekBl.js → fork-picker-dialog-ByBOGVsa.js} +1 -1
  14. package/dist/web/client/assets/globals-B_I1Eq1u.css +2 -0
  15. package/dist/web/client/assets/horizontal-resize-CwoDojST.js +1 -0
  16. package/dist/web/client/assets/{index-DlnHLDpx.js → index-DJ1fFbQu.js} +3 -3
  17. package/dist/web/client/assets/input-group-Tb5TYbzi.js +1 -0
  18. package/dist/web/client/assets/{ipython-tool-BrMePqD-.js → ipython-tool-ldJ9F1Cw.js} +1 -1
  19. package/dist/web/client/assets/model-selector-list-Ch05B2nZ.js +1 -0
  20. package/dist/web/client/assets/{openui-renderer-DwYFJdbe.js → openui-renderer-Bf60nxNi.js} +4 -4
  21. package/dist/web/client/assets/pencil-DcUwsKLn.js +1 -0
  22. package/dist/web/client/assets/prompt-input-qPIXZ-Rb.js +1 -0
  23. package/dist/web/client/assets/prompt-suggestions-Cc--lSNR.js +1 -0
  24. package/dist/web/client/assets/{provider-label-BCJh04J5.js → provider-label-DDLRnZyC.js} +1 -1
  25. package/dist/web/client/assets/repl-panel-DsPX04Xr.js +1 -0
  26. package/dist/web/client/assets/{resources-panel-Bo8dfUdm.js → resources-panel-D867-goy.js} +1 -1
  27. package/dist/web/client/assets/right-panel-registry-Dp8yX-oL.js +2 -0
  28. package/dist/web/client/assets/routes-DpgMJZ5n.js +16 -0
  29. package/dist/web/client/assets/safe-storage-s25GrfpH.js +1 -0
  30. package/dist/web/client/assets/session-insights-panel-YnaXvTpi.js +1 -0
  31. package/dist/web/client/assets/settings-dialog-YJkvt5EB.js +2 -0
  32. package/dist/web/client/assets/skeleton-loaders-C9vHwAYV.js +1 -0
  33. package/dist/web/client/assets/{subagent-chat-panel-DseoO31p.js → subagent-chat-panel-Yujplxpb.js} +1 -1
  34. package/dist/web/client/assets/subagent-transcript-CnI-mqN0.js +1 -0
  35. package/dist/web/client/assets/subagents-panel-CjXEdimj.js +1 -0
  36. package/dist/web/client/assets/{surfaces-cW-gp56p.js → surfaces-DI-U-_2a.js} +1 -1
  37. package/dist/web/client/assets/tool-result-DfnPN0FQ.js +4 -0
  38. package/dist/web/client/assets/ui-preferences-CImQGZm_.js +1 -0
  39. package/dist/web/client/assets/virtualized-turn-list--Vynre4D.js +6 -0
  40. package/dist/web/client/assets/{workspace-panel-DI1W3ce9.js → workspace-panel-CPPIznT9.js} +1 -1
  41. package/dist/web/client/bundle-budget.json +6 -6
  42. package/dist/web/server/{_tanstack-start-manifest_v-Cdx6hy2i-I7A5YJRU.js → _tanstack-start-manifest_v-DS_CSIFQ-WB3VTKF3.js} +15 -13
  43. package/dist/web/server/{agent-activity-B-JMvecd-SLE3GGY2.js → agent-activity-CS2rbF_C-A3R26CYH.js} +2 -2
  44. package/dist/web/server/{artifacts-panel-DLMK1O8P-42T45JMA.js → artifacts-panel-CaKrX2XC-R37I4BHF.js} +12 -12
  45. package/dist/web/server/{chat-command-palette-CdYwoTMe-4LBAZF7K.js → chat-command-palette-7gbqEnm9-6XICQZN7.js} +4 -4
  46. package/dist/web/server/{chunk-EBCYJSBR.js → chunk-7SD2ZSEA.js} +3 -3
  47. package/dist/web/server/{chunk-6AW2XFTZ.js → chunk-BBBS5AS7.js} +194 -10
  48. package/dist/web/server/{chunk-EOVMHQ2H.js → chunk-CNXJN5HN.js} +7 -7
  49. package/dist/web/server/{chunk-XKKXXG6N.js → chunk-DI7XRK2H.js} +2 -2
  50. package/dist/web/server/{chunk-KNJUSMBT.js → chunk-DZ2IC3FH.js} +2 -2
  51. package/dist/web/server/{chunk-K5ESTT4A.js → chunk-EAE2QXRK.js} +11 -3
  52. package/dist/web/server/{chunk-VHBFU4TG.js → chunk-EH4BZ6QM.js} +123 -16
  53. package/dist/web/server/{chunk-54II5QXQ.js → chunk-ETTDO4UO.js} +6 -3
  54. package/dist/web/server/{chunk-EHNIN245.js → chunk-GETSIVNU.js} +5 -5
  55. package/dist/web/server/{chunk-X2R5YPQZ.js → chunk-IJPCV6DH.js} +3 -2
  56. package/dist/web/server/{chunk-AJJ2S5FF.js → chunk-JQDLJ7KI.js} +20 -20
  57. package/dist/web/server/{chunk-M564UIEY.js → chunk-KELEYPVK.js} +8 -8
  58. package/dist/web/server/{chunk-OB5OSYJK.js → chunk-LXJD6IGW.js} +53 -29
  59. package/dist/web/server/chunk-M5RSPNYN.js +22 -0
  60. package/dist/web/server/{chunk-2TRF62K5.js → chunk-N6NOTURM.js} +3 -3
  61. package/dist/web/server/{chunk-5XX7RKJ6.js → chunk-NXJ32VFR.js} +5 -5
  62. package/dist/web/server/{chunk-P7H2OPKF.js → chunk-PIOFZUOU.js} +9 -1
  63. package/dist/web/server/chunk-PTCKOR23.js +39 -0
  64. package/dist/web/server/chunk-SZJUXVWG.js +40 -0
  65. package/dist/web/server/{chunk-TCH3U26B.js → chunk-TWYHHG5N.js} +2 -10
  66. package/dist/web/server/{chunk-FED63ZHU.js → chunk-WHBVQJ4K.js} +11 -6
  67. package/dist/web/server/{chunk-ANL4B775.js → chunk-XLNCWZMZ.js} +2 -2
  68. package/dist/web/server/{chunk-GM32R7JW.js → chunk-YKVGQBZA.js} +10 -8
  69. package/dist/web/server/{chunk-NRDG2ISJ.js → chunk-YNUWKMNQ.js} +59 -52
  70. package/dist/web/server/{chunk-3PIUR75R.js → chunk-YXXRP3NS.js} +9 -9
  71. package/dist/web/server/fleet-message-queue-BS-cZ56r-GLZXUKDF.js +152 -0
  72. package/dist/web/server/{fleet-pi-tool-renderer-RIeVlM9J-D6MISCQC.js → fleet-pi-tool-renderer-umKunT3K-O4GBH35V.js} +5 -5
  73. package/dist/web/server/{fleet-reasoning-panel-D_K48UOT-GN2PA6KT.js → fleet-reasoning-panel-BxC2COxi-GPLMQSTT.js} +9 -9
  74. package/dist/web/server/{fleet-subagent-list-5luKtpds-3OTVFHJQ.js → fleet-subagent-list-CpSYzCIq-JDH2LHSS.js} +1 -1
  75. package/dist/web/server/{fleet-tool-timeline-DwRqQgOj-HUFLGMDV.js → fleet-tool-timeline-IB36_PB2-XJENTO6I.js} +1 -1
  76. package/dist/web/server/{fork-picker-dialog-B9yGc8Au-IL63F2DN.js → fork-picker-dialog-DlINz9UQ-UWIXFDJX.js} +3 -3
  77. package/dist/web/server/{model-selector-list-cb2-ewoA-KIVU6LD3.js → model-selector-list-jBTZc2Mu-OXJOS5NA.js} +7 -7
  78. package/dist/web/server/{openui-renderer-Czy5Vo2L-BLXPJD65.js → openui-renderer-Biyyjhjn-SJOEKPTJ.js} +4 -4
  79. package/dist/web/server/{prompt-suggestions-BOmHi4-J-C563CHFU.js → prompt-suggestions-D4AEEY7K-RZSP7PWV.js} +3 -3
  80. package/dist/web/server/{repl-panel-yyxhwe4c-7U6HXYPS.js → repl-panel-D5KsoJik-BQKO53JO.js} +9 -9
  81. package/dist/web/server/{resources-panel-j4fAIi9g-5C267IXV.js → resources-panel-CE5pD4vy-V5FXBTYC.js} +2 -2
  82. package/dist/web/server/{router-CgSWrAYc-5UBYSZTJ.js → router-DWALoX_M-I5CBL7FQ.js} +1461 -515
  83. package/dist/web/server/{routes-CP_BBhD0-BAWQYGKY.js → routes-BBVirYfL-5WXMOT7M.js} +908 -566
  84. package/dist/web/server/server.js +2 -2
  85. package/dist/web/server/{session-insights-panel-BHZyKDTo-LRMAMA3O.js → session-insights-panel-CUhdgvRt-VB2HUCQP.js} +4 -4
  86. package/dist/web/server/{settings-dialog-CxHe8nym-KKXDPTIW.js → settings-dialog-DndPbM-v-RFNXXEAN.js} +902 -575
  87. package/dist/web/server/{subagent-chat-panel-DlSsM59d-DBW7DI3T.js → subagent-chat-panel-C0RpnXav-J7VYO7QY.js} +11 -11
  88. package/dist/web/server/{subagents-panel-Txzk8oDb-NRKLASYN.js → subagents-panel-jDqIn9Nh-YEV6QLUY.js} +13 -13
  89. package/dist/web/server/{workspace-panel-BOs-58Cv-SWQBMZSB.js → workspace-panel-CX_Vo6As-EWO6AMPI.js} +5 -4
  90. package/package.json +1 -1
  91. package/dist/web/client/assets/agent-activity-CDcDNVC6.js +0 -1
  92. package/dist/web/client/assets/artifacts-panel-CObI-DMt.js +0 -1
  93. package/dist/web/client/assets/chat-C8XDWWXz.js +0 -52
  94. package/dist/web/client/assets/fleet-message-queue-zWM5-y18.js +0 -1
  95. package/dist/web/client/assets/fleet-reasoning-panel-MtbSdoCv.js +0 -1
  96. package/dist/web/client/assets/fleet-tool-timeline-COzPrwr8.js +0 -1
  97. package/dist/web/client/assets/generative-text-renderer-CDKHv-v_.js +0 -6
  98. package/dist/web/client/assets/globals-DisQPFtV.css +0 -2
  99. package/dist/web/client/assets/horizontal-resize-Bl3AyBJg.js +0 -1
  100. package/dist/web/client/assets/input-group-BFDsCVS9.js +0 -1
  101. package/dist/web/client/assets/model-selector-list-DQaPFUYt.js +0 -1
  102. package/dist/web/client/assets/prompt-input-DZ4cho_e.js +0 -1
  103. package/dist/web/client/assets/prompt-suggestions-CXM6knMK.js +0 -1
  104. package/dist/web/client/assets/repl-panel-BDQ5MEgV.js +0 -1
  105. package/dist/web/client/assets/right-panel-registry-VVRPktV3.js +0 -2
  106. package/dist/web/client/assets/routes-DAikUNzO.js +0 -16
  107. package/dist/web/client/assets/session-insights-panel-CQdT90Op.js +0 -1
  108. package/dist/web/client/assets/settings-dialog-DS64KmwC.js +0 -1
  109. package/dist/web/client/assets/skeleton-loaders-DjGv9LLA.js +0 -1
  110. package/dist/web/client/assets/subagent-transcript-cxVKYnh9.js +0 -1
  111. package/dist/web/client/assets/subagents-panel-CHC96I68.js +0 -1
  112. package/dist/web/client/assets/tool-result-Baj3CdL_.js +0 -4
  113. package/dist/web/client/assets/ui-preferences-DUEFuJFj.js +0 -1
  114. package/dist/web/server/chunk-QK4CHLVV.js +0 -17
  115. package/dist/web/server/fleet-message-queue-BxycG26e-2XLOTCLP.js +0 -75
@@ -0,0 +1 @@
1
+ import{t as e}from"./createLucideIcon-DwxZHm0M.js";var t=e(`pencil`,[[`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`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]);export{t};
@@ -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"./react-dom-Bwxum3ti.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";import{$ as i,G as a,H as o,J as s,Q as c,U as l,z as u}from"./layout-gyLzPvVv.js";import{c as d,d as f,h as p,l as m,m as h,p as g,r as _,s as v,u as y}from"./ease-u56MhKYS.js";import{n as b,t as x}from"./use-reduced-motion-eORd7fqW.js";import{t as S}from"./utils-Eg7xtNmV.js";import{t as C}from"./createLucideIcon-DwxZHm0M.js";import{o as w}from"./citations-C_tPOJE_.js";import{t as T}from"./check-JjHKAZas.js";import{t as ee}from"./chevron-down-BEVGmnSb.js";import{t as E}from"./loader-circle-DjfHXUPB.js";import{t as te}from"./plus-DXN1Bg_z.js";import{t as ne}from"./square-Bhn8gjr0.js";import{t as D}from"./x-CsRC_tCI.js";function O(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],c=s(i,a,o);return t?c(r):c}function k(e,t,n={}){let r=e.get(),o=null,s=r,c,l=typeof r==`string`?r.replace(/[\d.-]/g,``):void 0,d=()=>{o&&=(o.stop(),null),e.animation=void 0},f=()=>{let t=j(e.get()),r=j(s);if(t===r){d();return}let i=o?o.getGeneratorVelocity():e.getVelocity();d(),o=new a({keyframes:[t,r],velocity:i,type:`spring`,restDelta:.001,restSpeed:.01,...n,onUpdate:c})},p=()=>{f(),e.animation=o??void 0,e.events.animationStart?.notify(),o?.then(()=>{e.animation=void 0,e.events.animationComplete?.notify()})};if(e.attach((e,t)=>{s=e,c=e=>t(A(e,l)),i.postRender(p)},d),u(t)){let r=n.skipInitialAnimation===!0,i=t.on(`change`,t=>{r?(r=!1,e.jump(A(t,l),!1)):e.set(A(t,l))}),a=e.on(`destroy`,i);return()=>{i(),a()}}return d}function A(e,t){return t?e+t:e}function j(e){return typeof e==`number`?e:parseFloat(e)}var M=e(t(),1);function N(e){let t=p(()=>l(e)),{isStatic:n}=(0,M.useContext)(g);if(n){let[,n]=(0,M.useState)(e);(0,M.useEffect)(()=>t.on(`change`,n),[])}return t}function P(e,t){let n=N(t()),r=()=>n.set(t());return r(),h(()=>{let t=()=>i.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),c(r)}}),n}function F(e){o.current=[],e();let t=P(o.current,e);return o.current=void 0,t}function I(e,t,n,r){if(typeof e==`function`)return F(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return R(e,t,n,r);let i=typeof t==`function`?t:O(t,n,r),a=Array.isArray(e)?L(e,i):L([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;return o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&(a.accelerate={...o,times:t,keyframes:n,isTransformed:!0,...r?.ease?{ease:r.ease}:{}}),a}function L(e,t){let n=p(()=>[]);return P(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function R(e,t,n,r){let i=p(()=>Object.keys(n)),a=p(()=>({}));for(let o of i)a[o]=I(e,t,n[o],r);return a}function z(e,t={}){let{isStatic:n}=(0,M.useContext)(g),r=()=>u(e)?e.get():e;if(n)return I(r);let i=N(r());return(0,M.useInsertionEffect)(()=>k(i,e,t),[i,JSON.stringify(t)]),i}function B(e,t={}){return z(e,{type:`spring`,...t})}var re=C(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),V=r(),H={primary:`bg-primary text-primary-foreground hover:bg-primary/90`,secondary:`border border-border bg-card text-foreground hover:border-border`,ghost:`text-muted-foreground hover:text-foreground hover:bg-primary/5`,outline:`border border-border bg-transparent text-foreground hover:bg-primary/5`},U={sm:`h-8 px-3 text-xs gap-1.5 rounded-full`,md:`h-10 px-5 text-sm gap-2 rounded-full`,lg:`h-12 px-6 text-base gap-2 rounded-full`,icon:`h-8 w-8 rounded-lg`},W=(0,M.forwardRef)(function({variant:e=`primary`,size:t=`md`,pressScale:n=.93,ripple:r=!1,className:i,children:a,onPointerDown:o,...s},c){let l=x(),u=w(),[d,p]=(0,M.useState)([]),h=(0,M.useRef)(0),g=(0,M.useCallback)(e=>{if(r&&!l){let t=e.currentTarget.getBoundingClientRect(),n=Math.max(t.width,t.height)*2,r=h.current++;p(i=>[...i,{id:r,x:e.clientX-t.left,y:e.clientY-t.top,size:n}])}o?.(e)},[r,l,o]);return(0,V.jsxs)(f.button,{ref:c,type:`button`,whileTap:l?void 0:{scale:n},whileHover:l||!u?void 0:{scale:1.02},transition:m,onPointerDown:g,className:S(`inline-flex items-center justify-center font-medium select-none`,`transition-colors`,`disabled:pointer-events-none disabled:opacity-50`,r&&`relative overflow-hidden`,H[e],U[t],i),...s,children:[(0,V.jsx)(`span`,{className:S(`pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]`,!r&&`hidden`),children:(0,V.jsx)(b,{children:r&&!l?d.map(e=>(0,V.jsx)(f.span,{className:`absolute rounded-full bg-current`,style:{left:e.x,top:e.y,width:e.size,height:e.size,x:`-50%`,y:`-50%`},initial:{scale:.05,opacity:.3},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:1.6,ease:_},onAnimationComplete:()=>p(t=>t.filter(t=>t.id!==e.id))},e.id)):null})}),a]})});(0,M.forwardRef)(function({variant:e=`primary`,size:t=`md`,pressScale:n=.93,className:r,children:i,...a},o){let s=x(),c=w();return(0,V.jsx)(f.a,{ref:o,whileTap:s?void 0:{scale:n},whileHover:s||!c?void 0:{scale:1.02},transition:m,className:S(`inline-flex items-center justify-center font-medium select-none`,`transition-colors`,H[e],U[t],r),...a,children:i})});function G({children:e,strength:t=.35,className:n}){let r=(0,M.useRef)(null),i=x(),a=w(),o=!i&&a,s=N(0),c=N(0),l=B(s,v),u=B(c,v);return(0,V.jsx)(f.div,{ref:r,onMouseMove:e=>{let n=r.current;if(!n||!o)return;let i=n.getBoundingClientRect();s.set((e.clientX-i.left-i.width/2)*t),c.set((e.clientY-i.top-i.height/2)*t)},onMouseLeave:()=>{s.set(0),c.set(0)},style:{x:l,y:u},className:S(`inline-block`,n),children:e})}(0,M.forwardRef)(function({strength:e=.25,magneticClassName:t,children:n,...r},i){return(0,V.jsx)(G,{strength:e,className:t,children:(0,V.jsx)(W,{ref:i,...r,children:n})})});var K=.025,q=`blur(6px)`,ie={initial:{opacity:0,y:`105%`,filter:q},animate:(e=0)=>({opacity:1,y:`0%`,filter:`blur(0px)`,transition:{...y,delay:e}}),exit:(e=0)=>({opacity:0,y:`-105%`,filter:q,transition:{duration:.16,ease:_,delay:e*.5}})},ae={initial:{opacity:0,width:0,scale:.7,filter:q},animate:{opacity:1,width:`1.5rem`,scale:1,filter:`blur(0px)`,transition:y},exit:{opacity:0,width:0,scale:.7,filter:q,transition:{duration:.16,ease:_}}};function J({keyId:e,children:t}){let n=x();return(0,V.jsx)(f.span,{variants:ae,initial:n?{opacity:0}:`initial`,animate:n?{opacity:1}:`animate`,exit:n?{opacity:0}:`exit`,transition:n?{duration:.15}:void 0,className:`inline-grid shrink-0 place-items-center overflow-hidden`,children:t},e)}function oe({value:e,children:t}){let n=x(),r=(0,M.useRef)(null),[i,a]=(0,M.useState)(),o=typeof t==`string`?t:null,s=o!==null&&!n;return(0,M.useLayoutEffect)(()=>{let e=r.current?.offsetWidth;e&&a(t=>t===e?t:e)}),(0,V.jsxs)(f.span,{initial:!1,layout:`size`,style:{width:i},transition:n?{duration:0}:y,className:`relative inline-block overflow-hidden whitespace-nowrap align-bottom`,children:[(0,V.jsx)(`span`,{ref:r,"aria-hidden":!0,className:`invisible inline-block whitespace-nowrap`,children:s?o.split(``).map((e,t)=>(0,V.jsx)(`span`,{className:`inline-block whitespace-pre`,children:e},t)):t}),s?(0,V.jsx)(`span`,{className:`sr-only`,children:o}):null,(0,V.jsx)(b,{initial:!1,children:s?(0,V.jsx)(f.span,{"aria-hidden":!0,initial:`initial`,animate:`animate`,exit:`exit`,className:`absolute left-0 top-0 inline-block whitespace-pre`,children:o.split(``).map((e,t)=>(0,V.jsx)(f.span,{custom:t*K,variants:ie,className:`inline-block whitespace-pre`,children:e},t))},`cascade-${e}`):(0,V.jsx)(f.span,{initial:n?{opacity:0}:{opacity:0,y:14,filter:q},animate:n?{opacity:1}:{opacity:1,y:0,filter:`blur(0px)`},exit:n?{opacity:0}:{opacity:0,y:-14,filter:q},transition:n?{duration:.15}:y,className:`absolute left-0 top-0 inline-block`,children:t},`text-${e}`)})]})}(0,M.forwardRef)(function({state:e=`idle`,children:t,loadingText:n=`Loading`,successText:r=`Done`,errorText:i=`Try again`,icon:a,disabled:o,...s},c){let l=e===`loading`,u=e===`loading`?n:e===`success`?r:e===`error`?i:t,d=typeof u==`string`?`${e}-${u}`:e;return(0,V.jsx)(W,{ref:c,disabled:o||l,"aria-busy":l,whileHover:void 0,...s,children:(0,V.jsxs)(`span`,{"aria-live":`polite`,className:`relative inline-flex items-center justify-center overflow-hidden`,children:[(0,V.jsxs)(b,{initial:!1,children:[e===`loading`?(0,V.jsx)(J,{keyId:`loading-icon`,children:(0,V.jsx)(E,{className:`size-4 animate-spin`})}):null,e===`success`?(0,V.jsx)(J,{keyId:`success-icon`,children:(0,V.jsx)(T,{className:`size-4`})}):null,e===`error`?(0,V.jsx)(J,{keyId:`error-icon`,children:(0,V.jsx)(D,{className:`size-4`})}):null]}),(0,V.jsx)(oe,{value:d,children:u}),(0,V.jsx)(b,{initial:!1,children:e===`idle`&&a?(0,V.jsx)(J,{keyId:`idle-icon`,children:a}):null})]})})});var se=e(n(),1);function ce(e,t){return e?.trigger.left===t.trigger.left&&e.trigger.top===t.trigger.top&&e.trigger.width===t.trigger.width&&e.trigger.height===t.trigger.height&&e.content.width===t.content.width&&e.content.height===t.content.height}function Y(e,t,n){let[r,i]=(0,M.useState)(null),a=(0,M.useCallback)(()=>{let n=e.current,r=t.current;if(!n||!r)return;let a=n.getBoundingClientRect(),o={trigger:{left:a.left,top:a.top,width:a.width,height:a.height},content:{width:r.offsetWidth,height:r.offsetHeight}};i(e=>ce(e,o)?e:o)},[t,e]);return(0,M.useLayoutEffect)(()=>{if(a(),!n)return;let r=e.current,i=t.current,o=new ResizeObserver(a);return r&&o.observe(r),i&&o.observe(i),window.addEventListener(`scroll`,a,!0),window.addEventListener(`resize`,a),()=>{o.disconnect(),window.removeEventListener(`scroll`,a,!0),window.removeEventListener(`resize`,a)}},[n,t,e,a]),r}function le(){return()=>{}}function ue(){return!0}function de(){return!1}function X(){return(0,M.useSyncExternalStore)(le,ue,de)}var fe=(0,M.createContext)(null);function pe(e){let t=(0,M.useContext)(fe);if(!t)throw Error(`${e} must be used within <MorphPopover>`);return t}function me({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,className:i}){let a=(0,M.useId)(),o=(0,M.useRef)(null),s=(0,M.useRef)(null),c=(0,M.useRef)(null),[l,u]=(0,M.useState)(n),d=t!==void 0,f=d?t:l,p=(0,M.useCallback)(e=>{d||u(e),r?.(e)},[d,r]),m=(0,M.useCallback)(()=>p(!f),[p,f]),h=(0,M.useEffectEvent)(p);(0,M.useEffect)(()=>{if(!f)return;let e=e=>e.key===`Escape`&&h(!1),t=e=>{let t=e.target;o.current&&!o.current.contains(t)&&!c.current?.contains(t)&&h(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`pointerdown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`pointerdown`,t)}},[f]);let g=(0,M.useMemo)(()=>({open:f,setOpen:p,toggle:m,triggerId:`${a}-trigger`,contentId:`${a}-content`,triggerRef:s,contentRef:c}),[f,p,m,a]);return(0,V.jsx)(fe.Provider,{value:g,children:(0,V.jsx)(`div`,{ref:o,className:S(`relative inline-flex`,i),children:e})})}function he(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n&&typeof n==`object`&&(n.current=t)}}function ge({children:e}){let t=pe(`MorphPopoverTrigger`);if(!(0,M.isValidElement)(e))return e;let n=e,r=n.props.onClick,i=n.props.ref;return(0,M.cloneElement)(n,{id:t.triggerId,ref:he(i,e=>{t.triggerRef.current=e}),onClick:e=>{r?.(e),t.toggle()},"aria-haspopup":`dialog`,"aria-expanded":t.open,"aria-controls":t.open?t.contentId:void 0})}var _e=(e,t)=>`${e===`bottom`?`top`:`bottom`} ${t===`end`?`right`:`left`}`;function ve(e,t,n){return`inset(${e===`bottom`?`0%`:`92%`} ${t===`end`?`0%`:`92%`} ${e===`bottom`?`92%`:`0%`} ${t===`end`?`92%`:`0%`} round ${n}px)`}var ye=e=>`inset(0% 0% 0% 0% round ${e}px)`,be={duration:.32,ease:_};function xe({children:e,side:t=`bottom`,align:n=`end`,sideOffset:r=8,radius:i=16,className:a}){let o=pe(`MorphPopoverContent`),s=x()??!1,c=X(),l=Y(o.triggerRef,o.contentRef,c&&o.open),u=l?n===`end`?l.trigger.left+l.trigger.width-l.content.width:l.trigger.left:0,p=l?t===`bottom`?l.trigger.top+l.trigger.height+r:l.trigger.top-l.content.height-r:0,m=s?void 0:{hidden:{opacity:0,scale:.96,transition:d},show:{opacity:1,scale:1,transition:d}},h=s?void 0:{hidden:{clipPath:ve(t,n,i),transition:be},show:{clipPath:ye(i),transition:be}};return c?(0,se.createPortal)((0,V.jsx)(b,{children:o.open?(0,V.jsx)(f.div,{"data-morph-popover-portal":``,variants:m,initial:s?{opacity:0}:`hidden`,animate:s?{opacity:1}:`show`,exit:s?{opacity:0}:`hidden`,transition:s?{duration:.12}:void 0,style:{left:u,top:p,visibility:l?`visible`:`hidden`,transformOrigin:_e(t,n)},className:`fixed z-[9999] [filter:drop-shadow(0_10px_18px_rgba(0,0,0,0.14))]`,children:(0,V.jsx)(f.div,{ref:o.contentRef,id:o.contentId,role:`dialog`,"aria-labelledby":o.triggerId,variants:h,style:{borderRadius:i},className:S(`overflow-hidden border border-border bg-background`,a),children:e})}):null}),document.body):null}var Z={duration:0},Se={type:`spring`,duration:.4,bounce:.3},Ce={hidden:{},show:{transition:{staggerChildren:.035,delayChildren:.05}}},we={hidden:{opacity:0,y:-6,filter:`blur(3px)`},show:{opacity:1,y:0,filter:`blur(0px)`}},Q=(0,M.createContext)(null);function $(e){let t=(0,M.useContext)(Q);if(!t)throw Error(`${e} must be used within <AnimatedSelect>`);return t}function Te({value:e,defaultValue:t,onValueChange:n,disabled:r=!1,className:i,children:a}){let o=x()??!1,s=(0,M.useId)(),c=(0,M.useRef)(null),[l,u]=(0,M.useState)(!1),[d,f]=(0,M.useState)(t),[p,m]=(0,M.useState)(new Map),[h,g]=(0,M.useState)(`bottom`),_=e!==void 0,v=_?e:d,y=(0,M.useCallback)(e=>{_||f(e),n?.(e),u(!1)},[_,n]),b=(0,M.useCallback)((e,t)=>{m(n=>n.get(e)===t?n:new Map(n).set(e,t))},[]),C=(0,M.useCallback)(e=>{m(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]);(0,M.useEffect)(()=>{if(!l)return;let e=e=>e.key===`Escape`&&u(!1),t=e=>{c.current&&!c.current.contains(e.target)&&u(!1)};return window.addEventListener(`keydown`,e),window.addEventListener(`pointerdown`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`pointerdown`,t)}},[l]);let w=(0,M.useMemo)(()=>({value:v,open:l,setOpen:u,select:y,register:b,unregister:C,labelFor:e=>e===void 0?void 0:p.get(e),reduce:o,triggerId:`${s}-trigger`,listId:`${s}-list`,disabled:r,placement:h,setPlacement:g}),[v,l,y,b,C,p,o,s,r,h]);return(0,V.jsx)(Q.Provider,{value:w,children:(0,V.jsx)(`div`,{ref:c,className:S(`relative`,i),children:a})})}function Ee({className:e,children:t}){let n=$(`AnimatedSelectTrigger`),r=n.placement===`top`,i=n.open?[0,0,12]:[12,0,12],a=n.reduce?{duration:0}:n.open?{duration:.6,times:[0,.4,1],ease:_}:{duration:.42,times:[0,.5,1],ease:_};return(0,V.jsxs)(f.button,{type:`button`,id:n.triggerId,disabled:n.disabled,"aria-haspopup":`listbox`,"aria-expanded":n.open,"aria-controls":n.listId,onClick:()=>n.setOpen(!n.open),initial:!1,animate:{borderTopLeftRadius:r?i:12,borderTopRightRadius:r?i:12,borderBottomLeftRadius:r?12:i,borderBottomRightRadius:r?12:i},transition:{borderTopLeftRadius:r?a:Z,borderTopRightRadius:r?a:Z,borderBottomLeftRadius:r?Z:a,borderBottomRightRadius:r?Z:a},className:S(`relative z-10 flex w-full items-center justify-between gap-2 rounded-xl border border-border bg-background px-3 py-2 text-sm text-foreground outline-none transition-colors`,`hover:border-(--color-border-strong) focus-visible:ring-2 focus-visible:ring-foreground/20`,`disabled:pointer-events-none disabled:opacity-50`,e),children:[t,(0,V.jsx)(f.span,{"aria-hidden":!0,animate:{rotate:n.open?180:0},transition:n.reduce?{duration:0}:Se,className:`text-muted-foreground`,children:(0,V.jsx)(ee,{className:`size-4`})})]})}function De({className:e,children:t}){let n=$(`AnimatedSelectContent`),r=(0,M.useRef)(null),[i,a]=(0,M.useState)(0),o=n.open,{setPlacement:s}=n;(0,M.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>a(e.offsetHeight);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()}),(0,M.useLayoutEffect)(()=>{if(!o)return;let e=document.getElementById(n.triggerId),t=r.current;if(!e||!t)return;let i=e.getBoundingClientRect(),a=t.offsetHeight,c=window.innerHeight-i.bottom,l=i.top;s(c<a+16&&l>c?`top`:`bottom`)},[o,n.triggerId,s]);let c=n.placement===`top`,l=o?8:0,u=o?12:0,d=o?{type:`spring`,duration:.6,bounce:.5,delay:.12}:{type:`spring`,duration:.3,bounce:.1},p=o?{duration:.3,ease:_,delay:.14}:{duration:.16,ease:_};return(0,V.jsx)(f.div,{id:n.listId,role:`listbox`,"aria-labelledby":n.triggerId,"aria-hidden":!o,inert:!o,initial:!1,animate:n.reduce?{opacity:+!!o,height:o?i:0}:{opacity:+!!o,height:o?i:0,marginTop:c?0:l,marginBottom:c?l:0,borderTopLeftRadius:c?12:u,borderTopRightRadius:c?12:u,borderBottomLeftRadius:c?u:12,borderBottomRightRadius:c?u:12},transition:n.reduce?{duration:.12}:{opacity:o?{duration:.18}:{duration:.16,delay:.12},height:o?{type:`spring`,duration:.42,bounce:.14}:{duration:.26,ease:_,delay:.14},marginTop:c?Z:d,marginBottom:c?d:Z,borderTopLeftRadius:c?Z:p,borderTopRightRadius:c?Z:p,borderBottomLeftRadius:c?p:Z,borderBottomRightRadius:c?p:Z},style:{transformOrigin:c?`bottom`:`top`,overflow:`hidden`,pointerEvents:o?`auto`:`none`},className:S(`absolute left-0 right-0 z-20 rounded-xl border border-border bg-background shadow-lg`,c?`bottom-full`:`top-full`,e),children:(0,V.jsx)(f.div,{ref:r,variants:n.reduce?void 0:Ce,initial:!1,animate:o?`show`:`hidden`,className:`p-1`,children:t})})}function Oe({value:e,disabled:t=!1,className:n,children:r}){let i=$(`AnimatedSelectItem`),a=i.value===e,o=typeof r==`string`?r:e;return(0,M.useLayoutEffect)(()=>(i.register(e,o),()=>i.unregister(e)),[i.register,i.unregister,e,o]),(0,V.jsx)(f.li,{variants:i.reduce?void 0:we,children:(0,V.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":a,disabled:t,onClick:()=>i.select(e),className:S(`flex w-full items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm outline-none transition-colors`,a?`bg-muted text-foreground`:`text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:bg-muted`,`disabled:pointer-events-none disabled:opacity-50`,n),children:[r,a?(0,V.jsx)(T,{className:`size-3.5 shrink-0`}):null]})})}function ke({value:e,defaultValue:t=``,onValueChange:n,models:r=[],model:i,defaultModel:a,onModelChange:o,actions:s=[],onAction:c,onSubmit:l,loading:u=!1,submitWhileLoading:d=!1,onStop:p,minRows:m=2,maxRows:h=8,leadingAction:g,className:_,disabled:v,placeholder:C=`Ask the agent to do something…`,"aria-label":w=`Prompt`,onKeyDown:T,...ee}){let E=x()??!1,D=(0,M.useRef)(null),O=(0,M.useRef)(null),[k,A]=(0,M.useState)(t),[j,N]=(0,M.useState)(a??r[0]?.value),[P,F]=(0,M.useState)(!1),I=e??k,L=i??j,R=r.find(e=>e.value===L),z=!!I.trim()&&!v&&(!u||d),B=(0,M.useCallback)(()=>{let e=D.current,t=O.current;if(!e||!t||e.value!==I)return;let n=`${Math.min(Math.max(t.scrollHeight,m*24),h*24)}px`;e.style.height!==n&&(e.style.height=n)},[I,h,m]);(0,M.useLayoutEffect)(()=>{B()},[B]);let H=(0,M.useRef)(B);(0,M.useEffect)(()=>{H.current=B}),(0,M.useEffect)(()=>{let e=D.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>H.current());return t.observe(e),()=>t.disconnect()},[]);let U=t=>{e===void 0&&A(t),n?.(t)},G=e=>{i===void 0&&N(e),o?.(e)},K=t=>{t?.preventDefault();let n=I.trim();!n||v||u&&!d||(l?.(n,L),e===void 0&&A(``),D.current?.focus({preventScroll:!0}))},q=e=>{T?.(e),!(e.defaultPrevented||e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing)&&(e.preventDefault(),K())};return(0,V.jsxs)(`form`,{onSubmit:K,className:S(`relative w-full rounded-[24px] border border-border/70 bg-sidebar p-2 text-[color:var(--foreground)] shadow-sm transition-[border-color,box-shadow] focus-within:border-foreground/25 focus-within:ring-1 focus-within:ring-ring/20`,v&&`opacity-60`,_),children:[(0,V.jsx)(`div`,{ref:O,"aria-hidden":`true`,className:`pointer-events-none invisible absolute inset-x-2 top-0 whitespace-pre-wrap px-2 text-sm leading-6 [overflow-wrap:break-word]`,children:`${I}\u200b`}),(0,V.jsx)(`textarea`,{ref:D,value:I,disabled:v,placeholder:C,"aria-label":w,rows:m,...ee,onChange:e=>U(e.target.value),onKeyDown:q,className:`scrollbar-hide block w-full resize-none overflow-y-auto bg-transparent px-2 pt-1.5 text-sm leading-6 text-foreground outline-none placeholder:text-foreground/55`}),(0,V.jsxs)(`div`,{className:`mt-1 flex min-h-8 items-center gap-1`,children:[s.length?(0,V.jsxs)(me,{open:P,onOpenChange:F,children:[(0,V.jsx)(ge,{children:(0,V.jsx)(W,{type:`button`,variant:`ghost`,size:`icon`,disabled:v||u,"aria-label":`Add to prompt`,className:`size-8 rounded-full text-foreground/70 hover:text-foreground`,children:(0,V.jsx)(f.span,{"aria-hidden":`true`,animate:{rotate:P?45:0},transition:E?{duration:0}:y,children:(0,V.jsx)(te,{className:`size-4`})})})}),(0,V.jsx)(xe,{side:`top`,align:`start`,sideOffset:8,radius:12,className:`w-56 p-1.5`,children:s.map(e=>(0,V.jsxs)(`button`,{type:`button`,disabled:e.disabled,onClick:()=>{c?.(e.value),F(!1)},className:`flex w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left outline-none transition-colors hover:bg-muted focus-visible:bg-muted disabled:pointer-events-none disabled:opacity-50`,children:[e.icon?(0,V.jsx)(`span`,{className:`mt-0.5 grid size-5 shrink-0 place-items-center text-foreground/70 [&_svg]:size-4`,children:e.icon}):null,(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`block text-sm text-foreground`,children:e.label}),e.description?(0,V.jsx)(`span`,{className:`mt-0.5 block text-xs leading-4 text-foreground/60`,children:e.description}):null]})]},e.value))})]}):null,g,r.length?(0,V.jsxs)(Te,{value:L,onValueChange:G,disabled:v||u,className:`min-w-0`,children:[(0,V.jsx)(Ee,{className:`h-8 w-auto max-w-52 rounded-xl border-0 bg-transparent px-2 py-0 text-xs hover:bg-muted focus-visible:ring-2`,children:(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[R?.icon?(0,V.jsx)(`span`,{className:`grid size-4 shrink-0 place-items-center text-foreground/70 [&_svg]:size-3.5`,children:R.icon}):null,(0,V.jsx)(`span`,{className:`truncate text-foreground/70`,children:R?.label??`Choose model`})]})}),(0,V.jsx)(De,{className:`right-auto w-52 shadow-none`,children:r.map(e=>(0,V.jsx)(Oe,{value:e.value,disabled:e.disabled,className:`py-2`,children:(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[e.icon?(0,V.jsx)(`span`,{className:`grid size-5 shrink-0 place-items-center text-muted-foreground [&_svg]:size-4`,children:e.icon}):null,(0,V.jsx)(`span`,{className:`min-w-0 truncate text-sm text-foreground`,children:e.label})]})},e.value))})]}):null,u&&p?(0,V.jsx)(W,{type:`button`,size:`icon`,"aria-label":`Stop generating`,onClick:p,className:`ml-auto size-8 rounded-full`,children:(0,V.jsx)(ne,{className:`size-3 fill-current`})}):null,!u||z?(0,V.jsx)(W,{type:`submit`,size:`icon`,disabled:!z,"aria-label":u?`Steer current run`:`Send prompt`,className:S(`size-8 rounded-full`,!u&&`ml-auto`),children:(0,V.jsx)(b,{initial:!1,mode:`popLayout`,children:(0,V.jsx)(f.span,{initial:E?{opacity:1}:{opacity:0,y:3,scale:.8},animate:{opacity:1,y:0,scale:1},exit:E?{opacity:0}:{opacity:0,y:-3,scale:.8},transition:E?{duration:0}:y,className:`grid place-items-center`,children:(0,V.jsx)(re,{className:`size-4`})},`send`)})}):null]})]})}export{X as a,re as c,ge as i,me as n,Y as o,xe as r,W as s,ke as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-NZYk81nU.js";import{t}from"./utils-Eg7xtNmV.js";import{s as n}from"./surfaces-DI-U-_2a.js";var r=e();function i({suggestions:e,selectedSuggestion:i,cycle:a,onSuggestion:o,variant:s=`pills`,className:c,...l}){let u=s===`list`;return(0,r.jsx)(`div`,{"data-slot":`suggestions`,className:t(u?`flex w-full max-w-sm flex-col gap-2`:`flex w-full max-w-xl flex-wrap justify-center gap-1`,c),...l,children:e.map((e,a)=>(0,r.jsx)(`button`,{type:`button`,"aria-pressed":i===e,onClick:()=>o(e),className:t(n,`fade-in slide-in-from-bottom-2 animate-in fill-mode-both flex cursor-pointer items-center text-[0.8125rem] text-foreground/80 transition-[color,transform] duration-300 hover:-translate-y-px hover:text-foreground focus-visible:text-foreground active:scale-[0.96] motion-reduce:animate-none`,u?`w-full rounded-2xl px-4 py-2.5 text-start`:`rounded-full px-4 py-2`,i===e&&`!bg-foreground !text-background hover:!text-background focus-visible:!text-background`),style:{animationDelay:`${a*70}ms`},children:e},e))},a)}export{i as PromptSuggestions};
@@ -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"./react-dom-Bwxum3ti.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";import{$ as i,B as a,F as o,N as s,Q as c,V as l,et as u,n as d,st as f,t as p,tt as m}from"./button-BR2WWrFo.js";import{G as h,P as g,at as _,ct as v,et as y,h as b,it as x,rt as S,t as C}from"./createBaseUIEventDetails-DV0dQrBX.js";import{_ as w,ct as T,d as E,f as D,g as O,h as k,it as A,l as j,m as M,nt as N,p as P,s as F,tt as I,u as ee}from"./dialog-BEZuZhzk.js";import{a as te,r as L,t as R}from"./provider-catalog-D8G66gwc.js";import{r as z}from"./useBaseUiId-CHqXB2UQ.js";import{t as B}from"./utils-Eg7xtNmV.js";import{t as V}from"./createLucideIcon-DwxZHm0M.js";import{t as H}from"./bot-Bs7QWJ2q.js";import{t as ne}from"./loader-circle-DjfHXUPB.js";import{n as re,r as ie,t as ae}from"./shield-check-CkA2viVW.js";import{t as oe}from"./plug-Dt6VN0zF.js";import{t as U}from"./sparkles-DuclzqlE.js";var W=e(t(),1),se=f();function ce(e,t){return t!=null&&!A(t)?0:typeof e==`function`?e():e}function G(e,t,n){let r=ce(e,n);return typeof r==`number`?r:r?.[t]}function le(e){return typeof e==`function`?e():e}function ue(e,t){return t||e===`click`||e===`mousedown`}function de(e){return e?.includes(`mouse`)&&e!==`mousedown`}function fe(e){let t=W.useCallback(t=>e===void 0?v:e.subscribeStore(t),[e]),n=W.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,se.useSyncExternalStore)(t,n,()=>e?.serverStore)}var pe=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new c,this.restTimeout=new c,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},K=new WeakMap;function q(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&K.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),K.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function me(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=K.get(n);a&&a!==e&&q(a),q(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,K.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function he(e){let t=e.context.dataRef.current,n=x(()=>t.hoverInteractionState??pe.create()).current;return t.hoverInteractionState||=n,_(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function ge(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:c}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),p=d.useState(`floatingElement`),_=d.useState(`domReferenceElement`),{dataRef:v}=d.context,x=N(),w=I(),E=he(d),D=i(),O=y(()=>ue(v.current.openEvent?.type,E.interactedInside)),k=y(()=>de(v.current.openEvent?.type)),A=y(()=>{q(E)});S(()=>{f||(E.pointerType=void 0,E.restTimeoutPending=!1,E.interactedInside=!1,A())},[f,E,A]),W.useEffect(()=>A,[A]),S(()=>{if(n&&f&&E.handleCloseOptions?.blockPointerEvents&&k()&&h(_)&&p){let e=_,t=p,n=u(p),r=x?.nodesRef.current.find(e=>e.id===w)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=E.pointerEventsScopeElement===t?null:E.pointerEventsScopeElement,a=r===t?null:r,o=E.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body;return me(E,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{A()}}},[n,f,_,p,E,k,x,w,A]),W.useEffect(()=>{if(!n)return;function e(){return!!(x&&w&&T(x.nodesRef.current,w).length>0)}function t(e){let t=G(r,`close`,E.pointerType),n=()=>{d.setOpen(!1,C(b,e)),x?.events.emit(`floating.closed`,e)};t?E.openChangeTimeout.start(t,n):(E.openChangeTimeout.clear(),n())}function i(e){let t=l(e);if(!s(t)){E.interactedInside=!1;return}E.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function u(){E.openChangeTimeout.clear(),D.clear(),x?.events.off(`floating.closed`,_),A()}function f(n){if(e()&&x){x.events.on(`floating.closed`,_);return}if(o(n.relatedTarget,d.context.triggerElements))return;let r=v.current.floatingContext?.nodeId??c,i=n.relatedTarget;if(!(x&&r&&h(i)&&T(x.nodesRef.current,r,!1).some(e=>a(e.context?.elements.floating,i)))){if(E.handler){E.handler(n);return}A(),k()&&!O()&&t(n)}}function _(t){!x||!w||e()||D.start(0,()=>{x.events.off(`floating.closed`,_),d.setOpen(!1,C(b,t)),x.events.emit(`floating.closed`,t)})}let y=p;return m(y&&g(y,`mouseenter`,u),y&&g(y,`mouseleave`,f),y&&g(y,`pointerdown`,i,!0),()=>{x?.events.off(`floating.closed`,_)})},[n,p,d,v,r,c,k,O,A,E,x,w,D])}var _e=e(n(),1),ve={current:null};function ye(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:s=!1,restMs:c=0,move:d=!0,triggerElementRef:f=ve,externalTree:p,isActiveTrigger:_=!0,getHandleCloseContext:v,isClosing:x,shouldOpen:S,guardStaleOpen:w=!1}=t,T=`rootStore`in e?e.rootStore:e,{dataRef:E,events:D}=T.context,O=N(p),k=he(T),j=W.useRef(!1),M=z(i),P=z(r),F=z(c),I=z(n),ee=z(S),te=z(x),L=y(()=>ue(E.current.openEvent?.type,k.interactedInside)),R=y(()=>ee.current?.()!==!1),B=y((e,t,n)=>{let r=T.context.triggerElements;if(r.hasElement(t))return!e||!a(e,t);if(!h(n))return!1;let i=n;return r.hasMatchingElement(e=>a(e,i))&&(!e||!a(e,i))}),V=y(()=>{k.handler&&=(u(T.select(`domReferenceElement`)).removeEventListener(`mousemove`,k.handler),void 0)}),H=y(()=>{q(k)});return _&&(k.handleCloseOptions=M.current?.__options),W.useEffect(()=>V,[V]),W.useEffect(()=>{if(!n)return;function e(e){e.open?j.current=!1:(j.current=e.reason===b,V(),k.openChangeTimeout.clear(),k.restTimeout.clear(),k.blockMouseMove=!0,k.restTimeoutPending=!1)}return D.on(`openchange`,e),()=>{D.off(`openchange`,e)}},[n,D,k,V]),W.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=G(P.current,`close`,k.pointerType);n?k.openChangeTimeout.start(n,()=>{T.setOpen(!1,C(b,e)),O?.events.emit(`floating.closed`,e)}):t&&(k.openChangeTimeout.clear(),T.setOpen(!1,C(b,e)),O?.events.emit(`floating.closed`,e))}let t=f.current??(_?T.select(`domReferenceElement`):null);if(!h(t))return;function r(e){if(k.openChangeTimeout.clear(),k.blockMouseMove=!1,s&&!A(k.pointerType))return;let t=le(F.current),n=G(P.current,`open`,k.pointerType),r=l(e),i=e.currentTarget??null,o=T.select(`domReferenceElement`),c=i;if(h(r)&&!T.context.triggerElements.hasElement(r)){for(let e of T.context.triggerElements.elements())if(a(e,r)){c=e;break}}h(i)&&h(o)&&!T.context.triggerElements.hasElement(i)&&a(i,o)&&(c=o);let u=c!=null&&B(o,c,r),d=T.select(`open`),f=te.current?.()??T.select(`transitionStatus`)===`ending`,p=!d&&f&&j.current,m=!u&&h(c)&&h(o)&&a(o,c)&&p,g=t>0&&!n,_=u&&(d||p)||m,v=!d||u;if(_){R()&&T.setOpen(!0,C(b,e,c));return}g||(n?k.openChangeTimeout.start(n,()=>{v&&R()&&T.setOpen(!0,C(b,e,c))}):v&&R()&&T.setOpen(!0,C(b,e,c)))}function i(t){if(L()){H();return}V();let n=T.select(`domReferenceElement`),r=u(n);k.restTimeout.clear(),k.restTimeoutPending=!1;let i=E.current.floatingContext??v?.();if(!o(t.relatedTarget,T.context.triggerElements)){if(M.current&&i){T.select(`open`)||k.openChangeTimeout.clear();let n=f.current;k.handler=M.current({...i,tree:O,x:t.clientX,y:t.clientY,onClose(){H(),V(),I.current&&!L()&&n===T.select(`domReferenceElement`)&&e(t,!0)}}),r.addEventListener(`mousemove`,k.handler),k.handler(t);return}(k.pointerType!==`touch`||!a(T.select(`floatingElement`),t.relatedTarget))&&e(t)}}function c(e){a(t,e.relatedTarget)||(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1)}let p=w?g(t,`mouseout`,c):void 0;return d?m(g(t,`mousemove`,r,{once:!0}),g(t,`mouseenter`,r),g(t,`mouseleave`,i),p):m(g(t,`mouseenter`,r),g(t,`mouseleave`,i),p)},[V,H,E,P,T,n,M,k,_,B,L,s,d,F,f,O,I,v,te,R,w]),W.useMemo(()=>{if(!n)return;function e(e){k.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=T.select(`domReferenceElement`),i=T.select(`open`),a=B(r,n,e.target);if(s&&!A(k.pointerType))return;if(i&&a&&k.handleCloseOptions?.blockPointerEvents){let e=T.select(`floatingElement`);if(e){let t=k.handleCloseOptions?.getScope?.()??n.ownerDocument.body;me(k,{scopeElement:t,referenceElement:n,floatingElement:e})}}let o=le(F.current);if(i&&!a||o===0||!a&&k.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;k.restTimeout.clear();function c(){if(k.restTimeoutPending=!1,L())return;let e=T.select(`open`);!k.blockMouseMove&&(!e||a)&&R()&&T.setOpen(!0,C(b,t,n))}k.pointerType===`touch`?_e.flushSync(()=>{c()}):a&&i?c():(k.restTimeoutPending=!0,k.restTimeout.start(o,c))}}},[n,k,L,B,s,T,F,R])}var be=.1,xe=be*be,J=.5;function Y(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function X(e,t,n,r,i,a,o,s,c,l){let u=!1;return Y(e,t,n,r,i,a)&&(u=!u),Y(e,t,i,a,o,s)&&(u=!u),Y(e,t,o,s,c,l)&&(u=!u),Y(e,t,c,l,n,r)&&(u=!u),u}function Se(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Z(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Ce(e={}){let{blockPointerEvents:t=!1}=e,n=new c,r=({x:e,y:t,placement:r,elements:i,onClose:o,nodeId:s,tree:c})=>{let u=r?.split(`-`)[0],d=!1,f=null,p=null,m=typeof performance<`u`?performance.now():0;function g(e,t){let n=performance.now(),r=n-m;if(f===null||p===null||r===0)return f=e,p=t,m=n,!1;let i=e-f,a=t-p,o=i*i+a*a,s=r*r*xe;return f=e,p=t,m=n,o<s}function _(){n.clear(),o()}return function(r){n.clear();let o=i.domReference,f=i.floating;if(!o||!f||u==null||e==null||t==null)return;let{clientX:p,clientY:m}=r,v=l(r),y=r.type===`mouseleave`,b=a(f,v),x=a(o,v);if(b&&(d=!0,!y))return;if(x&&(d=!1,!y)){d=!0;return}if(y&&h(r.relatedTarget)&&a(f,r.relatedTarget))return;function S(){return!!(c&&T(c.nodesRef.current,s).length>0)}function C(){S()||_()}if(S())return;let w=o.getBoundingClientRect(),E=f.getBoundingClientRect(),D=e>E.right-E.width/2,O=t>E.bottom-E.height/2,k=E.width>w.width,A=E.height>w.height,j=(k?w:E).left,M=(k?w:E).right,N=(A?w:E).top,P=(A?w:E).bottom;if(u===`top`&&t>=w.bottom-1||u===`bottom`&&t<=w.top+1||u===`left`&&e>=w.right-1||u===`right`&&e<=w.left+1){C();return}let F=!1;switch(u){case`top`:F=Z(p,m,j,w.top+1,M,E.bottom-1);break;case`bottom`:F=Z(p,m,j,E.top+1,M,w.bottom-1);break;case`left`:F=Z(p,m,E.right-1,P,w.left+1,N);break;case`right`:F=Z(p,m,w.right-1,P,E.left+1,N)}if(F)return;if(d&&!Se(p,m,w)){C();return}if(!y&&g(p,m)){C();return}let I=!1;switch(u){case`top`:{let n=k?J/2:J*4,r=k||D?e+n:e-n,i=k?e-n:D?e+n:e-n,a=t+J+1,o=D||k?E.bottom-J:E.top,s=D?k?E.bottom-J:E.top:E.bottom-J;I=X(p,m,r,a,i,a,E.left,o,E.right,s);break}case`bottom`:{let n=k?J/2:J*4,r=k||D?e+n:e-n,i=k?e-n:D?e+n:e-n,a=t-J,o=D||k?E.top+J:E.bottom,s=D?k?E.top+J:E.bottom:E.top+J;I=X(p,m,r,a,i,a,E.left,o,E.right,s);break}case`left`:{let n=A?J/2:J*4,r=A||O?t+n:t-n,i=A?t-n:O?t+n:t-n,a=e+J+1,o=O||A?E.right-J:E.left,s=O?A?E.right-J:E.left:E.right-J;I=X(p,m,o,E.top,s,E.bottom,a,r,a,i);break}case`right`:{let n=A?J/2:J*4,r=A||O?t+n:t-n,i=A?t-n:O?t+n:t-n,a=e-J,o=O||A?E.left+J:E.right,s=O?A?E.left+J:E.right:E.left+J;I=X(p,m,a,r,a,i,o,E.top,s,E.bottom);break}}I?d||n.start(40,C):C()}};return r.__options={...e,blockPointerEvents:t},r}var we=V(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Te=V(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Ee=V(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),De=V(`pencil`,[[`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`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Oe=V(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),ke=V(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Ae=V(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),je=V(`wind`,[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`,key:`148xed`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`,key:`1u4tom`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`,key:`75valh`}]]),Me=V(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]),Ne=`h-8 shrink-0 cursor-pointer rounded-full border-border/45 bg-background/65 px-3 text-[11px] font-semibold text-foreground/75 shadow-sm transition-[background-color,border-color,box-shadow,opacity,transform] duration-150 hover:bg-foreground/5 active:scale-[0.96] disabled:opacity-50`,Pe=`relative after:absolute after:top-1/2 after:left-1/2 after:size-10 after:-translate-x-1/2 after:-translate-y-1/2`,Fe=`relative after:absolute after:inset-x-0 after:-top-1.5 after:-bottom-1.5`,Ie=`relative inline-flex h-9 items-center gap-1.5 rounded-[10px] border border-border/70 px-3 text-label font-medium whitespace-nowrap shadow-sm backdrop-blur transition-colors`,Le=`bg-sidebar text-foreground/55 hover:bg-background hover:text-foreground/75`,Re=`bg-background text-foreground/75`;`${Le}`,`${Re}`;var ze=`relative z-10 overflow-visible`,Be=`h-full min-h-0 w-[min(360px,calc(100vw-1.5rem))] overflow-hidden rounded-md border border-border/70 bg-background/95 shadow-lg backdrop-blur`,Ve=d(`flex min-w-0 rounded-[4px] border`,{variants:{tone:{default:`border-border/30 bg-background/30`,muted:`border-border/20 bg-foreground/1.5`,inset:`border-border/60 bg-foreground/2`,dashed:`border-dashed border-border/25 bg-background/10`},padding:{sm:`p-2`,md:`px-2.5 py-2`,lg:`p-2.5`},interactive:{true:`transition-[border-color,background-color,box-shadow] duration-200 hover:border-border/45 hover:bg-foreground/2 hover:shadow-sm`,lift:`transition-[border-color,background-color,box-shadow,transform] duration-200 hover:-translate-y-px hover:border-border/45 hover:bg-foreground/3.5 hover:shadow-sm`,false:``}},defaultVariants:{tone:`default`,padding:`sm`,interactive:!1}}),Q=r();function He({className:e,...t}){return(0,Q.jsx)(ne,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:B(`size-4 animate-spin`,e),...t})}function Ue(e){return j(`alert-dialog`,e)}var We=4;function Ge({...e}){return(0,Q.jsx)(Ue,{"data-slot":`alert-dialog`,...e})}function Ke({...e}){return(0,Q.jsx)(ee,{"data-slot":`alert-dialog-portal`,...e})}function qe({className:e,...t}){return(0,Q.jsx)(M,{"data-slot":`alert-dialog-backdrop`,className:B(`fixed inset-0 isolate z-[60] bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function Je({className:e,children:t,...n}){let r=O(),i=Math.min(r+We,8);return(0,Q.jsxs)(Ke,{children:[(0,Q.jsx)(qe,{}),(0,Q.jsx)(E,{"data-slot":`alert-dialog-content`,className:B(`fixed top-1/2 left-1/2 z-[60] grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-6 text-sm text-popover-foreground outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,w(i),e),...n,children:(0,Q.jsx)(k,{value:i,children:t})})]})}function Ye({className:e,...t}){return(0,Q.jsx)(F,{"data-slot":`alert-dialog-title`,className:B(`font-heading text-base leading-none font-medium`,e),...t})}function Xe({className:e,...t}){return(0,Q.jsx)(D,{"data-slot":`alert-dialog-description`,className:B(`text-sm text-pretty text-muted-foreground`,e),...t})}function Ze({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:B(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function Qe({...e}){return(0,Q.jsx)(P,{"data-slot":`alert-dialog-cancel`,render:(0,Q.jsx)(p,{variant:`outline`}),...e})}function $e({...e}){return(0,Q.jsx)(P,{"data-slot":`alert-dialog-action`,render:(0,Q.jsx)(p,{variant:`destructive`}),...e})}var et={"amazon-bedrock":{icon:Oe,placeholder:`AKIA... (AWS access key id)`,help:`Amazon Bedrock uses standard AWS credentials (AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY) plus AWS_REGION. This field sets AWS_ACCESS_KEY_ID in .env.local.`},openai:{icon:U,placeholder:`sk-proj-...`,help:`Stored securely in your root .env.local file. Overrides the active OPENAI_API_KEY environment variable.`},"openai-chat-completions":{icon:U,placeholder:`sk-... or nvapi-...`,help:`OpenAI-compatible Chat Completions root (e.g. https://opencode.ai/zen/v1). Paste …/chat/completions if you want — it is normalized. Requires API key, base URL, and model name.`},"openai-chat-completions-model":{icon:U,placeholder:`meta/llama-3.1-70b-instruct`,help:`Gateway model name registered when /models is empty or incomplete.`},anthropic:{icon:H,placeholder:`sk-ant-...`,help:`Stored securely in your root .env.local file. Overrides the active ANTHROPIC_API_KEY environment variable.`},"google-vertex":{icon:ae,placeholder:`Path to service account JSON, or credentials text...`,help:`Stored securely in your root .env.local file. Overrides the active GOOGLE_APPLICATION_CREDENTIALS environment variable.`},google:{icon:Te,placeholder:`AIzaSy...`,help:`Stored securely in your root .env.local file. Overrides the active GEMINI_API_KEY environment variable.`},mistral:{icon:je,placeholder:`Your Mistral API key...`,help:`Stored securely in your root .env.local file. Overrides the active MISTRAL_API_KEY environment variable.`},groq:{icon:Me,placeholder:`gsk_...`,help:`Stored securely in your root .env.local file. Overrides the active GROQ_API_KEY environment variable.`},openrouter:{icon:re,placeholder:`sk-or-...`,help:`Stored securely in your root .env.local file. Overrides the active OPENROUTER_API_KEY environment variable.`},"vercel-ai-gateway":{icon:ie,placeholder:`Your AI Gateway API key...`,help:`Stored securely in your root .env.local file. Overrides the active AI_GATEWAY_API_KEY environment variable.`},"github-copilot":{icon:H,placeholder:`OAuth subscription`,help:`GitHub Copilot uses device-code OAuth. Sign in from Settings; credentials are stored in auth.json.`},"openai-codex":{icon:U,placeholder:`OAuth subscription`,help:`OpenAI Codex uses ChatGPT OAuth. Sign in from Settings; credentials are stored in auth.json.`},ollama:{icon:Ee,placeholder:`http://localhost:11434 (default)`,help:`Configure local Ollama execution endpoints. Overrides the active OLLAMA_BASE_URL environment variable.`},custom:{icon:oe,placeholder:`sk-... / provider key`,help:`Register any OpenAI-, Anthropic-, or Google-compatible endpoint through Pi's native custom-provider mechanism. Requires a name, API key, https base URL, API family, and at least one model id. Deployed accounts only.`}},$=`size-4`;function tt({className:e}){return(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,className:B($,e),fill:`currentColor`,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.368v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.814 3.354-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.079.079 0 0 0-.041-.067zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zM8.306 12.683l-2.02-1.163a.08.08 0 0 1-.038-.057V6.074a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.392.681zm1.098-2.016l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z`})})}function nt({className:e}){return(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,className:B($,e),fill:`currentColor`,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`M17.305 14.256h-3.778l-2.28-7.23h-.005l-2.32 7.23H5.145L9.93 3h4.14l4.235 11.256zm-8.48 2.37h6.37l1.16 3.374h3.465L14.18 3h-4.36L4.15 20h3.465l1.21-3.374z`})})}function rt({className:e}){return(0,Q.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:B($,e),fill:`currentColor`,"aria-hidden":!0,children:[(0,Q.jsx)(`path`,{d:`M21.6 12.23c0-.71-.06-1.4-.18-2.05H12v3.87h5.38a4.6 4.6 0 0 1-2 3.02v2.5h3.24c1.89-1.74 2.98-4.3 2.98-7.34z`}),(0,Q.jsx)(`path`,{d:`M12 22c2.7 0 4.96-.89 6.61-2.42l-3.24-2.5c-.9.6-2.04.96-3.37.96-2.59 0-4.78-1.75-5.56-4.1H3.1v2.58A9.99 9.99 0 0 0 12 22z`}),(0,Q.jsx)(`path`,{d:`M6.44 13.94A5.99 5.99 0 0 1 6.12 12c0-.67.12-1.33.32-1.94V7.48H3.1A9.99 9.99 0 0 0 2 12c0 1.61.39 3.14 1.1 4.52l3.34-2.58z`}),(0,Q.jsx)(`path`,{d:`M12 5.96c1.47 0 2.79.5 3.82 1.5l2.87-2.87C16.95 2.99 14.7 2 12 2A9.99 9.99 0 0 0 3.1 7.48l3.34 2.58C7.22 7.71 9.41 5.96 12 5.96z`})]})}function it({className:e}){return(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,className:B($,e),fill:`currentColor`,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2.2c-3.3.7-4-1.4-4-1.4-.5-1.4-1.3-1.8-1.3-1.8-1.1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1.1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.8-1.6-2.7-.3-5.5-1.3-5.5-6 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.5.1-3.2 0 0 1-.3 3.3 1.2a11.5 11.5 0 0 1 6 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.7.2 2.9.1 3.2.8.8 1.2 1.9 1.2 3.2 0 4.6-2.9 5.6-5.5 5.9.4.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6A12 12 0 0 0 12 .3z`})})}function at({provider:e,api:t,className:n}){let r=e.toLowerCase();if(L(r)||r===`custom`)return t===`anthropic-messages`?(0,Q.jsx)(nt,{className:n}):t===`google-genai`?(0,Q.jsx)(rt,{className:n}):(0,Q.jsx)(tt,{className:n});if(r===`openai`||r===`openai-codex`||te(r))return(0,Q.jsx)(tt,{className:n});if(r===`anthropic`)return(0,Q.jsx)(nt,{className:n});if(r===`google`||r===`google-vertex`)return(0,Q.jsx)(rt,{className:n});if(r===`github-copilot`||r===`github`)return(0,Q.jsx)(it,{className:n});let i=e in et?et[e].icon:Ee;return(0,Q.jsx)(i,{className:B($,n),"aria-hidden":!0})}function ot(e){return R.find(t=>t.id===e)?.name??e}export{fe as A,De as C,ye as D,Ce as E,ge as O,ke as S,we as T,Pe as _,$e as a,Ve as b,Xe as c,He as d,ze as f,Ne as g,Le as h,Ge as i,G as j,he as k,Ze as l,Ie as m,at as n,Qe as o,Re as p,et as r,Je as s,ot as t,Ye as u,Fe as v,Ee as w,Ae as x,Be as y};
1
+ 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{$ as i,B as a,F as o,N as s,Q as c,V as l,et as u,n as d,st as f,t as p,tt as m}from"./button-BR2WWrFo.js";import{G as h,P as g,at as _,ct as v,et as y,h as b,it as x,rt as S,t as C}from"./createBaseUIEventDetails-DV0dQrBX.js";import{_ as w,ct as T,d as E,f as D,g as O,h as k,it as A,l as j,m as M,nt as N,p as P,s as F,tt as I,u as ee}from"./dialog-BEZuZhzk.js";import{a as te,r as L,t as R}from"./provider-catalog-D8G66gwc.js";import{r as z}from"./useBaseUiId-CHqXB2UQ.js";import{t as B}from"./utils-Eg7xtNmV.js";import{t as V}from"./createLucideIcon-DwxZHm0M.js";import{t as H}from"./bot-Bs7QWJ2q.js";import{t as ne}from"./loader-circle-DjfHXUPB.js";import{n as re,r as ie,t as ae}from"./shield-check-CkA2viVW.js";import{t as oe}from"./plug-Dt6VN0zF.js";import{t as U}from"./sparkles-DuclzqlE.js";var W=e(t(),1),se=f();function ce(e,t){return t!=null&&!A(t)?0:typeof e==`function`?e():e}function G(e,t,n){let r=ce(e,n);return typeof r==`number`?r:r?.[t]}function le(e){return typeof e==`function`?e():e}function ue(e,t){return t||e===`click`||e===`mousedown`}function de(e){return e?.includes(`mouse`)&&e!==`mousedown`}function fe(e){let t=W.useCallback(t=>e===void 0?v:e.subscribeStore(t),[e]),n=W.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,se.useSyncExternalStore)(t,n,()=>e?.serverStore)}var pe=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new c,this.restTimeout=new c,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},K=new WeakMap;function q(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&K.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),K.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function me(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=K.get(n);a&&a!==e&&q(a),q(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,K.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function he(e){let t=e.context.dataRef.current,n=x(()=>t.hoverInteractionState??pe.create()).current;return t.hoverInteractionState||=n,_(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function ge(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:c}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),p=d.useState(`floatingElement`),_=d.useState(`domReferenceElement`),{dataRef:v}=d.context,x=N(),w=I(),E=he(d),D=i(),O=y(()=>ue(v.current.openEvent?.type,E.interactedInside)),k=y(()=>de(v.current.openEvent?.type)),A=y(()=>{q(E)});S(()=>{f||(E.pointerType=void 0,E.restTimeoutPending=!1,E.interactedInside=!1,A())},[f,E,A]),W.useEffect(()=>A,[A]),S(()=>{if(n&&f&&E.handleCloseOptions?.blockPointerEvents&&k()&&h(_)&&p){let e=_,t=p,n=u(p),r=x?.nodesRef.current.find(e=>e.id===w)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=E.pointerEventsScopeElement===t?null:E.pointerEventsScopeElement,a=r===t?null:r,o=E.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body;return me(E,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{A()}}},[n,f,_,p,E,k,x,w,A]),W.useEffect(()=>{if(!n)return;function e(){return!!(x&&w&&T(x.nodesRef.current,w).length>0)}function t(e){let t=G(r,`close`,E.pointerType),n=()=>{d.setOpen(!1,C(b,e)),x?.events.emit(`floating.closed`,e)};t?E.openChangeTimeout.start(t,n):(E.openChangeTimeout.clear(),n())}function i(e){let t=l(e);if(!s(t)){E.interactedInside=!1;return}E.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function u(){E.openChangeTimeout.clear(),D.clear(),x?.events.off(`floating.closed`,_),A()}function f(n){if(e()&&x){x.events.on(`floating.closed`,_);return}if(o(n.relatedTarget,d.context.triggerElements))return;let r=v.current.floatingContext?.nodeId??c,i=n.relatedTarget;if(!(x&&r&&h(i)&&T(x.nodesRef.current,r,!1).some(e=>a(e.context?.elements.floating,i)))){if(E.handler){E.handler(n);return}A(),k()&&!O()&&t(n)}}function _(t){!x||!w||e()||D.start(0,()=>{x.events.off(`floating.closed`,_),d.setOpen(!1,C(b,t)),x.events.emit(`floating.closed`,t)})}let y=p;return m(y&&g(y,`mouseenter`,u),y&&g(y,`mouseleave`,f),y&&g(y,`pointerdown`,i,!0),()=>{x?.events.off(`floating.closed`,_)})},[n,p,d,v,r,c,k,O,A,E,x,w,D])}var _e=e(n(),1),ve={current:null};function ye(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:s=!1,restMs:c=0,move:d=!0,triggerElementRef:f=ve,externalTree:p,isActiveTrigger:_=!0,getHandleCloseContext:v,isClosing:x,shouldOpen:S,guardStaleOpen:w=!1}=t,T=`rootStore`in e?e.rootStore:e,{dataRef:E,events:D}=T.context,O=N(p),k=he(T),j=W.useRef(!1),M=z(i),P=z(r),F=z(c),I=z(n),ee=z(S),te=z(x),L=y(()=>ue(E.current.openEvent?.type,k.interactedInside)),R=y(()=>ee.current?.()!==!1),B=y((e,t,n)=>{let r=T.context.triggerElements;if(r.hasElement(t))return!e||!a(e,t);if(!h(n))return!1;let i=n;return r.hasMatchingElement(e=>a(e,i))&&(!e||!a(e,i))}),V=y(()=>{k.handler&&=(u(T.select(`domReferenceElement`)).removeEventListener(`mousemove`,k.handler),void 0)}),H=y(()=>{q(k)});return _&&(k.handleCloseOptions=M.current?.__options),W.useEffect(()=>V,[V]),W.useEffect(()=>{if(!n)return;function e(e){e.open?j.current=!1:(j.current=e.reason===b,V(),k.openChangeTimeout.clear(),k.restTimeout.clear(),k.blockMouseMove=!0,k.restTimeoutPending=!1)}return D.on(`openchange`,e),()=>{D.off(`openchange`,e)}},[n,D,k,V]),W.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=G(P.current,`close`,k.pointerType);n?k.openChangeTimeout.start(n,()=>{T.setOpen(!1,C(b,e)),O?.events.emit(`floating.closed`,e)}):t&&(k.openChangeTimeout.clear(),T.setOpen(!1,C(b,e)),O?.events.emit(`floating.closed`,e))}let t=f.current??(_?T.select(`domReferenceElement`):null);if(!h(t))return;function r(e){if(k.openChangeTimeout.clear(),k.blockMouseMove=!1,s&&!A(k.pointerType))return;let t=le(F.current),n=G(P.current,`open`,k.pointerType),r=l(e),i=e.currentTarget??null,o=T.select(`domReferenceElement`),c=i;if(h(r)&&!T.context.triggerElements.hasElement(r)){for(let e of T.context.triggerElements.elements())if(a(e,r)){c=e;break}}h(i)&&h(o)&&!T.context.triggerElements.hasElement(i)&&a(i,o)&&(c=o);let u=c!=null&&B(o,c,r),d=T.select(`open`),f=te.current?.()??T.select(`transitionStatus`)===`ending`,p=!d&&f&&j.current,m=!u&&h(c)&&h(o)&&a(o,c)&&p,g=t>0&&!n,_=u&&(d||p)||m,v=!d||u;if(_){R()&&T.setOpen(!0,C(b,e,c));return}g||(n?k.openChangeTimeout.start(n,()=>{v&&R()&&T.setOpen(!0,C(b,e,c))}):v&&R()&&T.setOpen(!0,C(b,e,c)))}function i(t){if(L()){H();return}V();let n=T.select(`domReferenceElement`),r=u(n);k.restTimeout.clear(),k.restTimeoutPending=!1;let i=E.current.floatingContext??v?.();if(!o(t.relatedTarget,T.context.triggerElements)){if(M.current&&i){T.select(`open`)||k.openChangeTimeout.clear();let n=f.current;k.handler=M.current({...i,tree:O,x:t.clientX,y:t.clientY,onClose(){H(),V(),I.current&&!L()&&n===T.select(`domReferenceElement`)&&e(t,!0)}}),r.addEventListener(`mousemove`,k.handler),k.handler(t);return}(k.pointerType!==`touch`||!a(T.select(`floatingElement`),t.relatedTarget))&&e(t)}}function c(e){a(t,e.relatedTarget)||(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1)}let p=w?g(t,`mouseout`,c):void 0;return d?m(g(t,`mousemove`,r,{once:!0}),g(t,`mouseenter`,r),g(t,`mouseleave`,i),p):m(g(t,`mouseenter`,r),g(t,`mouseleave`,i),p)},[V,H,E,P,T,n,M,k,_,B,L,s,d,F,f,O,I,v,te,R,w]),W.useMemo(()=>{if(!n)return;function e(e){k.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=T.select(`domReferenceElement`),i=T.select(`open`),a=B(r,n,e.target);if(s&&!A(k.pointerType))return;if(i&&a&&k.handleCloseOptions?.blockPointerEvents){let e=T.select(`floatingElement`);if(e){let t=k.handleCloseOptions?.getScope?.()??n.ownerDocument.body;me(k,{scopeElement:t,referenceElement:n,floatingElement:e})}}let o=le(F.current);if(i&&!a||o===0||!a&&k.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;k.restTimeout.clear();function c(){if(k.restTimeoutPending=!1,L())return;let e=T.select(`open`);!k.blockMouseMove&&(!e||a)&&R()&&T.setOpen(!0,C(b,t,n))}k.pointerType===`touch`?_e.flushSync(()=>{c()}):a&&i?c():(k.restTimeoutPending=!0,k.restTimeout.start(o,c))}}},[n,k,L,B,s,T,F,R])}var be=.1,xe=be*be,J=.5;function Y(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function X(e,t,n,r,i,a,o,s,c,l){let u=!1;return Y(e,t,n,r,i,a)&&(u=!u),Y(e,t,i,a,o,s)&&(u=!u),Y(e,t,o,s,c,l)&&(u=!u),Y(e,t,c,l,n,r)&&(u=!u),u}function Se(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Z(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Ce(e={}){let{blockPointerEvents:t=!1}=e,n=new c,r=({x:e,y:t,placement:r,elements:i,onClose:o,nodeId:s,tree:c})=>{let u=r?.split(`-`)[0],d=!1,f=null,p=null,m=typeof performance<`u`?performance.now():0;function g(e,t){let n=performance.now(),r=n-m;if(f===null||p===null||r===0)return f=e,p=t,m=n,!1;let i=e-f,a=t-p,o=i*i+a*a,s=r*r*xe;return f=e,p=t,m=n,o<s}function _(){n.clear(),o()}return function(r){n.clear();let o=i.domReference,f=i.floating;if(!o||!f||u==null||e==null||t==null)return;let{clientX:p,clientY:m}=r,v=l(r),y=r.type===`mouseleave`,b=a(f,v),x=a(o,v);if(b&&(d=!0,!y))return;if(x&&(d=!1,!y)){d=!0;return}if(y&&h(r.relatedTarget)&&a(f,r.relatedTarget))return;function S(){return!!(c&&T(c.nodesRef.current,s).length>0)}function C(){S()||_()}if(S())return;let w=o.getBoundingClientRect(),E=f.getBoundingClientRect(),D=e>E.right-E.width/2,O=t>E.bottom-E.height/2,k=E.width>w.width,A=E.height>w.height,j=(k?w:E).left,M=(k?w:E).right,N=(A?w:E).top,P=(A?w:E).bottom;if(u===`top`&&t>=w.bottom-1||u===`bottom`&&t<=w.top+1||u===`left`&&e>=w.right-1||u===`right`&&e<=w.left+1){C();return}let F=!1;switch(u){case`top`:F=Z(p,m,j,w.top+1,M,E.bottom-1);break;case`bottom`:F=Z(p,m,j,E.top+1,M,w.bottom-1);break;case`left`:F=Z(p,m,E.right-1,P,w.left+1,N);break;case`right`:F=Z(p,m,w.right-1,P,E.left+1,N)}if(F)return;if(d&&!Se(p,m,w)){C();return}if(!y&&g(p,m)){C();return}let I=!1;switch(u){case`top`:{let n=k?J/2:J*4,r=k||D?e+n:e-n,i=k?e-n:D?e+n:e-n,a=t+J+1,o=D||k?E.bottom-J:E.top,s=D?k?E.bottom-J:E.top:E.bottom-J;I=X(p,m,r,a,i,a,E.left,o,E.right,s);break}case`bottom`:{let n=k?J/2:J*4,r=k||D?e+n:e-n,i=k?e-n:D?e+n:e-n,a=t-J,o=D||k?E.top+J:E.bottom,s=D?k?E.top+J:E.bottom:E.top+J;I=X(p,m,r,a,i,a,E.left,o,E.right,s);break}case`left`:{let n=A?J/2:J*4,r=A||O?t+n:t-n,i=A?t-n:O?t+n:t-n,a=e+J+1,o=O||A?E.right-J:E.left,s=O?A?E.right-J:E.left:E.right-J;I=X(p,m,o,E.top,s,E.bottom,a,r,a,i);break}case`right`:{let n=A?J/2:J*4,r=A||O?t+n:t-n,i=A?t-n:O?t+n:t-n,a=e-J,o=O||A?E.left+J:E.right,s=O?A?E.left+J:E.right:E.left+J;I=X(p,m,a,r,a,i,o,E.top,s,E.bottom);break}}I?d||n.start(40,C):C()}};return r.__options={...e,blockPointerEvents:t},r}var we=V(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Te=V(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Ee=V(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),De=V(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Oe=V(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ke=V(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Ae=V(`wind`,[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`,key:`148xed`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`,key:`1u4tom`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`,key:`75valh`}]]),je=V(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]),Me=`h-8 shrink-0 cursor-pointer rounded-full border-border/45 bg-background/65 px-3 text-[0.6875rem] font-semibold text-foreground/75 shadow-sm transition-[background-color,border-color,box-shadow,opacity,transform] duration-150 hover:bg-foreground/5 active:scale-[0.96] disabled:opacity-50`,Ne=`relative after:absolute after:top-1/2 after:left-1/2 after:size-10 after:-translate-x-1/2 after:-translate-y-1/2`,Pe=`relative after:absolute after:inset-x-0 after:-top-1.5 after:-bottom-1.5`,Fe=`relative inline-flex h-9 items-center gap-1.5 rounded-[10px] border border-border/70 px-3 text-label font-medium whitespace-nowrap shadow-sm backdrop-blur transition-colors`,Ie=`bg-sidebar text-foreground/55 hover:bg-background hover:text-foreground/75`,Le=`bg-background text-foreground/75`;`${Ie}`,`${Le}`;var Re=`relative z-10 overflow-visible`,ze=`h-full min-h-0 w-[min(360px,calc(100vw-1.5rem))] overflow-hidden rounded-md border border-border/70 bg-background/95 shadow-lg backdrop-blur`,Be=d(`flex min-w-0 rounded-[4px] border`,{variants:{tone:{default:`border-border/30 bg-background/30`,muted:`border-border/20 bg-foreground/1.5`,inset:`border-border/60 bg-foreground/2`,dashed:`border-dashed border-border/25 bg-background/10`},padding:{sm:`p-2`,md:`px-2.5 py-2`,lg:`p-2.5`},interactive:{true:`transition-[border-color,background-color,box-shadow] duration-200 hover:border-border/45 hover:bg-foreground/2 hover:shadow-sm`,lift:`transition-[border-color,background-color,box-shadow,transform] duration-200 hover:-translate-y-px hover:border-border/45 hover:bg-foreground/3.5 hover:shadow-sm`,false:``}},defaultVariants:{tone:`default`,padding:`sm`,interactive:!1}}),Q=r();function Ve({className:e,...t}){return(0,Q.jsx)(ne,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:B(`size-4 animate-spin`,e),...t})}function He(e){return j(`alert-dialog`,e)}var Ue=4;function We({...e}){return(0,Q.jsx)(He,{"data-slot":`alert-dialog`,...e})}function Ge({...e}){return(0,Q.jsx)(ee,{"data-slot":`alert-dialog-portal`,...e})}function Ke({className:e,...t}){return(0,Q.jsx)(M,{"data-slot":`alert-dialog-backdrop`,className:B(`fixed inset-0 isolate z-[60] bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function qe({className:e,children:t,...n}){let r=O(),i=Math.min(r+Ue,8);return(0,Q.jsxs)(Ge,{children:[(0,Q.jsx)(Ke,{}),(0,Q.jsx)(E,{"data-slot":`alert-dialog-content`,className:B(`fixed top-1/2 left-1/2 z-[60] grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-6 text-sm text-popover-foreground outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,w(i),e),...n,children:(0,Q.jsx)(k,{value:i,children:t})})]})}function Je({className:e,...t}){return(0,Q.jsx)(F,{"data-slot":`alert-dialog-title`,className:B(`font-heading text-base leading-none font-medium`,e),...t})}function Ye({className:e,...t}){return(0,Q.jsx)(D,{"data-slot":`alert-dialog-description`,className:B(`text-sm text-pretty text-muted-foreground`,e),...t})}function Xe({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:B(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function Ze({...e}){return(0,Q.jsx)(P,{"data-slot":`alert-dialog-cancel`,render:(0,Q.jsx)(p,{variant:`outline`}),...e})}function Qe({...e}){return(0,Q.jsx)(P,{"data-slot":`alert-dialog-action`,render:(0,Q.jsx)(p,{variant:`destructive`}),...e})}var $e={"amazon-bedrock":{icon:De,placeholder:`AKIA... (AWS access key id)`,help:`Amazon Bedrock uses standard AWS credentials (AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY) plus AWS_REGION. This field sets AWS_ACCESS_KEY_ID in .env.local.`},openai:{icon:U,placeholder:`sk-proj-...`,help:`Stored securely in your root .env.local file. Overrides the active OPENAI_API_KEY environment variable.`},"openai-chat-completions":{icon:U,placeholder:`sk-... or nvapi-...`,help:`OpenAI-compatible Chat Completions root (e.g. https://opencode.ai/zen/v1). Paste …/chat/completions if you want — it is normalized. Requires API key, base URL, and model name.`},"openai-chat-completions-model":{icon:U,placeholder:`meta/llama-3.1-70b-instruct`,help:`Gateway model name registered when /models is empty or incomplete.`},anthropic:{icon:H,placeholder:`sk-ant-...`,help:`Stored securely in your root .env.local file. Overrides the active ANTHROPIC_API_KEY environment variable.`},"google-vertex":{icon:ae,placeholder:`Path to service account JSON, or credentials text...`,help:`Stored securely in your root .env.local file. Overrides the active GOOGLE_APPLICATION_CREDENTIALS environment variable.`},google:{icon:Te,placeholder:`AIzaSy...`,help:`Stored securely in your root .env.local file. Overrides the active GEMINI_API_KEY environment variable.`},mistral:{icon:Ae,placeholder:`Your Mistral API key...`,help:`Stored securely in your root .env.local file. Overrides the active MISTRAL_API_KEY environment variable.`},groq:{icon:je,placeholder:`gsk_...`,help:`Stored securely in your root .env.local file. Overrides the active GROQ_API_KEY environment variable.`},openrouter:{icon:re,placeholder:`sk-or-...`,help:`Stored securely in your root .env.local file. Overrides the active OPENROUTER_API_KEY environment variable.`},"vercel-ai-gateway":{icon:ie,placeholder:`Your AI Gateway API key...`,help:`Stored securely in your root .env.local file. Overrides the active AI_GATEWAY_API_KEY environment variable.`},"github-copilot":{icon:H,placeholder:`OAuth subscription`,help:`GitHub Copilot uses device-code OAuth. Sign in from Settings; credentials are stored in auth.json.`},"openai-codex":{icon:U,placeholder:`OAuth subscription`,help:`OpenAI Codex uses ChatGPT OAuth. Sign in from Settings; credentials are stored in auth.json.`},ollama:{icon:Ee,placeholder:`http://localhost:11434 (default)`,help:`Configure local Ollama execution endpoints. Overrides the active OLLAMA_BASE_URL environment variable.`},custom:{icon:oe,placeholder:`sk-... / provider key`,help:`Register any OpenAI-, Anthropic-, or Google-compatible endpoint through Pi's native custom-provider mechanism. Requires a name, API key, https base URL, API family, and at least one model id. Deployed accounts only.`}},$=`size-4`;function et({className:e}){return(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,className:B($,e),fill:`currentColor`,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.368v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.814 3.354-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.079.079 0 0 0-.041-.067zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zM8.306 12.683l-2.02-1.163a.08.08 0 0 1-.038-.057V6.074a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.392.681zm1.098-2.016l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z`})})}function tt({className:e}){return(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,className:B($,e),fill:`currentColor`,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`M17.305 14.256h-3.778l-2.28-7.23h-.005l-2.32 7.23H5.145L9.93 3h4.14l4.235 11.256zm-8.48 2.37h6.37l1.16 3.374h3.465L14.18 3h-4.36L4.15 20h3.465l1.21-3.374z`})})}function nt({className:e}){return(0,Q.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:B($,e),fill:`currentColor`,"aria-hidden":!0,children:[(0,Q.jsx)(`path`,{d:`M21.6 12.23c0-.71-.06-1.4-.18-2.05H12v3.87h5.38a4.6 4.6 0 0 1-2 3.02v2.5h3.24c1.89-1.74 2.98-4.3 2.98-7.34z`}),(0,Q.jsx)(`path`,{d:`M12 22c2.7 0 4.96-.89 6.61-2.42l-3.24-2.5c-.9.6-2.04.96-3.37.96-2.59 0-4.78-1.75-5.56-4.1H3.1v2.58A9.99 9.99 0 0 0 12 22z`}),(0,Q.jsx)(`path`,{d:`M6.44 13.94A5.99 5.99 0 0 1 6.12 12c0-.67.12-1.33.32-1.94V7.48H3.1A9.99 9.99 0 0 0 2 12c0 1.61.39 3.14 1.1 4.52l3.34-2.58z`}),(0,Q.jsx)(`path`,{d:`M12 5.96c1.47 0 2.79.5 3.82 1.5l2.87-2.87C16.95 2.99 14.7 2 12 2A9.99 9.99 0 0 0 3.1 7.48l3.34 2.58C7.22 7.71 9.41 5.96 12 5.96z`})]})}function rt({className:e}){return(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,className:B($,e),fill:`currentColor`,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2.2c-3.3.7-4-1.4-4-1.4-.5-1.4-1.3-1.8-1.3-1.8-1.1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1.1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.8-1.6-2.7-.3-5.5-1.3-5.5-6 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.5.1-3.2 0 0 1-.3 3.3 1.2a11.5 11.5 0 0 1 6 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.7.2 2.9.1 3.2.8.8 1.2 1.9 1.2 3.2 0 4.6-2.9 5.6-5.5 5.9.4.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6A12 12 0 0 0 12 .3z`})})}function it({provider:e,api:t,className:n}){let r=e.toLowerCase();if(L(r)||r===`custom`)return t===`anthropic-messages`?(0,Q.jsx)(tt,{className:n}):t===`google-genai`?(0,Q.jsx)(nt,{className:n}):(0,Q.jsx)(et,{className:n});if(r===`openai`||r===`openai-codex`||te(r))return(0,Q.jsx)(et,{className:n});if(r===`anthropic`)return(0,Q.jsx)(tt,{className:n});if(r===`google`||r===`google-vertex`)return(0,Q.jsx)(nt,{className:n});if(r===`github-copilot`||r===`github`)return(0,Q.jsx)(rt,{className:n});let i=e in $e?$e[e].icon:Ee;return(0,Q.jsx)(i,{className:B($,n),"aria-hidden":!0})}function at(e){return R.find(t=>t.id===e)?.name??e}export{G as A,Ee as C,ge as D,ye as E,he as O,Oe as S,Ce as T,Ne as _,Qe as a,Be as b,Ye as c,Ve as d,Re as f,Me as g,Ie as h,We as i,fe as k,Xe as l,Fe as m,it as n,Ze as o,Le as p,$e as r,qe as s,at as t,Je as u,Pe as v,we as w,ke as x,ze as y};
@@ -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{o as r,t as i}from"./ipython-tool-ldJ9F1Cw.js";import{t as a}from"./square-terminal-BYTN_I86.js";import{t as o}from"./triangle-alert-CU-gd7ui.js";var s=e(t(),1),c=n(),l={running:{toolState:`input-streaming`,label:`Running`},error:{toolState:`output-error`,label:`Failed`},cancelled:{toolState:`aborted`,label:`Cancelled`},success:{toolState:`output-available`,label:`Completed`}};function u(e){return l[e].toolState}function d(e){return{type:`tool-IPython`,toolCallId:e.sourceToolCallId??e.id,state:u(e.status),input:e.input,output:e.output,backgroundOutput:e.backgroundOutput}}function f(e){return l[e].label}function p({artifact:e,index:t,selected:n}){let a=(0,s.useRef)(null);return(0,s.useEffect)(()=>{n&&requestAnimationFrame(()=>{a.current?.focus({preventScroll:!0}),a.current?.scrollIntoView({block:`nearest`})})},[e.id,n]),(0,c.jsxs)(`article`,{ref:a,tabIndex:-1,className:`overflow-hidden rounded-md border border-border/60 bg-background outline-none focus-visible:ring-2 focus-visible:ring-ring`,"data-repl-run-id":e.id,children:[(0,c.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 border-b border-border/50 px-2.5 py-1.5`,children:[(0,c.jsx)(r,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,c.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-[0.6875rem] font-medium text-foreground/70`,children:[`Cell `,t+1]}),(0,c.jsx)(`span`,{className:`shrink-0 text-[0.625rem] text-foreground/40`,children:f(e.status)})]}),(0,c.jsx)(`div`,{className:`p-2`,children:(0,c.jsx)(i,{part:d(e)})})]})}function m({artifactRuns:e=[],selectedArtifactId:t,kernelDiagnostics:n}){let r=e.flatMap(e=>e.artifacts).filter(e=>e.kind===`ipython`);return(0,c.jsxs)(`section`,{"aria-label":`REPL runs`,className:`space-y-2 pb-1`,children:[(0,c.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,c.jsx)(a,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,c.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`IPython cells`}),(0,c.jsx)(`span`,{className:`shrink-0 text-[0.625rem] text-foreground/40`,children:r.length>0?r.length:`none yet`})]}),n?(0,c.jsxs)(`details`,{className:`overflow-hidden rounded-md border border-border/60 bg-background`,children:[(0,c.jsxs)(`summary`,{className:`flex min-w-0 cursor-pointer items-center gap-2 px-2.5 py-1.5`,children:[(0,c.jsx)(o,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,c.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[0.6875rem] font-medium text-foreground/70`,children:`Kernel diagnostics`}),(0,c.jsx)(`span`,{className:`shrink-0 text-[0.625rem] text-foreground/40`,children:n.truncated?`tail`:`stderr`})]}),(0,c.jsx)(`pre`,{className:`max-h-48 overflow-auto border-t border-border/50 px-2.5 py-1.5 font-mono text-[0.6875rem] leading-4 whitespace-pre-wrap text-foreground/70`,children:n.tail})]}):null,r.length===0?(0,c.jsx)(`p`,{className:`px-2 text-[0.6875rem] leading-4 text-foreground/45`,children:`Executed IPython cells and their output will appear here.`}):(0,c.jsx)(`div`,{className:`space-y-2`,"data-testid":`repl-run-list`,children:r.map((e,n)=>(0,c.jsx)(p,{artifact:e,index:n,selected:e.id===t},e.id))})]})}export{m as ReplPanelContent};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-NZYk81nU.js";import{r as t}from"./resource-helpers-Q2T0YCMO.js";import{t as n}from"./circle-alert-CONlFReH.js";import{a as r,i,t as a}from"./skeleton-loaders-DjGv9LLA.js";var o=e();function s({error:e,loading:s,resources:c,workspace:l}){let u=t(c,l);return(0,o.jsxs)(o.Fragment,{children:[e&&(0,o.jsx)(r,{icon:n,title:`Unable to load resources`,description:e.message}),!e&&s&&!c&&(0,o.jsx)(a,{}),!e&&c&&u.map(e=>(0,o.jsx)(i,{...e},e.id))]})}export{s as ResourcesPanelContent};
1
+ import{t as e}from"./jsx-runtime-NZYk81nU.js";import{r as t}from"./resource-helpers-Q2T0YCMO.js";import{t as n}from"./circle-alert-CONlFReH.js";import{a as r,i,t as a}from"./skeleton-loaders-C9vHwAYV.js";var o=e();function s({error:e,loading:s,resources:c,workspace:l}){let u=t(c,l);return(0,o.jsxs)(o.Fragment,{children:[e&&(0,o.jsx)(r,{icon:n,title:`Unable to load resources`,description:e.message}),!e&&s&&!c&&(0,o.jsx)(a,{}),!e&&c&&u.map(e=>(0,o.jsx)(i,{...e},e.id))]})}export{s as ResourcesPanelContent};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/artifacts-panel-CJ75gQub.js","assets/rolldown-runtime-hePW80VL.js","assets/bundle-mjs-DKHVkVWu.js","assets/jsx-runtime-NZYk81nU.js","assets/button-BR2WWrFo.js","assets/react-dom-Bwxum3ti.js","assets/createBaseUIEventDetails-DV0dQrBX.js","assets/utils-Eg7xtNmV.js","assets/createLucideIcon-DwxZHm0M.js","assets/tool-result-DfnPN0FQ.js","assets/ease-u56MhKYS.js","assets/layout-gyLzPvVv.js","assets/use-reduced-motion-eORd7fqW.js","assets/check-JjHKAZas.js","assets/chevron-down-BEVGmnSb.js","assets/loader-circle-DjfHXUPB.js","assets/circle-x-CkKCB__4.js","assets/action-swap-roll-BB8DFMuf.js","assets/rotate-ccw-WNFNkKQD.js","assets/square-terminal-BYTN_I86.js","assets/wrench-BJNNe07k.js","assets/preload-helper-Czpn1I53.js","assets/agent-disclosure-B8SnhQXL.js","assets/chevron-right-DrJxToLs.js","assets/package-CdcJFPf2.js","assets/openui-renderer-Bf60nxNi.js","assets/dialog-BEZuZhzk.js","assets/useBaseUiId-CHqXB2UQ.js","assets/x-CsRC_tCI.js","assets/provider-catalog-D8G66gwc.js","assets/useControlled-CJJ9BOQB.js","assets/input-0wwjWjKq.js","assets/chevron-up-CnSvySGH.js","assets/card-BKl76a3R.js","assets/chunk-YOKDWASO-BAf618wr.js","assets/lib-ChrQ49PO.js","assets/character-entities-legacy-Wut6vMuj.js","assets/openui-utils-DawGoQNp.js","assets/safe-external-url-D3PJJIcM.js","assets/chat-Ci2cEQrR.js","assets/switch-9rTeg6J6.js","assets/markdown-DInPmRUG.js","assets/cn-C8c0S2mI.js","assets/dist-BPaFisIZ.js","assets/collapsible-BoXtZZWN.js","assets/prime-agent-artifacts-C-g1VPiW.js","assets/artifacts-utils-N_kUFbz2.js","assets/resources-panel-D867-goy.js","assets/resource-helpers-Q2T0YCMO.js","assets/file-text-T-NcAlZs.js","assets/plug-Dt6VN0zF.js","assets/circle-alert-CONlFReH.js","assets/skeleton-loaders-C9vHwAYV.js","assets/skeleton-CkR2VmWc.js","assets/session-insights-panel-YnaXvTpi.js","assets/repl-panel-DsPX04Xr.js","assets/ipython-tool-ldJ9F1Cw.js","assets/triangle-alert-CU-gd7ui.js","assets/subagents-panel-CjXEdimj.js","assets/bot-Bs7QWJ2q.js","assets/subagent-utils-DDH5qm9Z.js","assets/subagent-transcript-CnI-mqN0.js","assets/citations-C_tPOJE_.js","assets/earth-DGZXAN5r.js","assets/shield-check-CkA2viVW.js","assets/virtualized-turn-list--Vynre4D.js","assets/image-BbPmlw-n.js","assets/notify-DgMKgZZW.js","assets/toast-Bt9p2OL4.js","assets/fleet-pi-tool-renderer-BEDIO3al.js","assets/eye-B0DFz5hL.js","assets/search-eWVnAJsb.js","assets/sparkles-DuclzqlE.js","assets/terminal-DOS1s1gm.js","assets/dist-CZDnnosQ.js","assets/workspace-path-nav-C0AQNZyy.js","assets/surfaces-DI-U-_2a.js","assets/range-BWOHiLNe.js","assets/fleet-tool-timeline-C8heL7ae.js","assets/refresh-cw-IThTJ3j-.js","assets/fleet-subagent-list-iKUtLJKZ.js","assets/workspace-panel-CPPIznT9.js","assets/horizontal-resize-CwoDojST.js","assets/safe-storage-s25GrfpH.js","assets/folder-BC5p7qK7.js","assets/hard-drive-CHqgr7VQ.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"./jsx-runtime-NZYk81nU.js";import{t as r}from"./createLucideIcon-DwxZHm0M.js";import{t as i}from"./bot-Bs7QWJ2q.js";import{t as a}from"./folder-BC5p7qK7.js";import{t as o}from"./package-CdcJFPf2.js";import{t as s}from"./square-terminal-BYTN_I86.js";import{t as c}from"./preload-helper-Czpn1I53.js";import{i as l,n as u}from"./right-panel-context-DHlNWJsF.js";import{t as d}from"./skeleton-CkR2VmWc.js";var f=r(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),p=r(`library`,[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]),m=e(t(),1),h=n(),g=(0,m.lazy)(()=>c(async()=>{let{ArtifactsPanelContent:e}=await import(`./artifacts-panel-CJ75gQub.js`);return{ArtifactsPanelContent: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,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])).then(({ArtifactsPanelContent:e})=>({default:e}))),_=(0,m.lazy)(()=>c(async()=>{let{ResourcesPanelContent:e}=await import(`./resources-panel-D867-goy.js`);return{ResourcesPanelContent:e}},__vite__mapDeps([47,3,1,48,8,2,49,24,50,51,52,53,7])).then(({ResourcesPanelContent:e})=>({default:e}))),v=(0,m.lazy)(()=>c(async()=>{let{SessionInsightsPanel:e}=await import(`./session-insights-panel-YnaXvTpi.js`);return{SessionInsightsPanel:e}},__vite__mapDeps([54,3,1])).then(({SessionInsightsPanel:e})=>({default:e}))),y=(0,m.lazy)(()=>c(async()=>{let{ReplPanelContent:e}=await import(`./repl-panel-DsPX04Xr.js`);return{ReplPanelContent:e}},__vite__mapDeps([55,1,2,3,56,7,8,42,19,57])).then(({ReplPanelContent:e})=>({default:e}))),b=(0,m.lazy)(()=>c(async()=>{let{SubagentsPanelContent:e}=await import(`./subagents-panel-CjXEdimj.js`);return{SubagentsPanelContent:e}},__vite__mapDeps([58,1,2,3,4,5,6,7,59,8,23,60,51,15,16,61,62,10,11,12,14,63,64,21,22,38,65,13,17,49,66,28,42,67,68,57,37,69,9,18,19,20,32,56,70,71,72,73,74,35,36,75,44,27,30,76,77,78,79,80,45])).then(({SubagentsPanelContent:e})=>({default:e}))),x=(0,m.lazy)(()=>c(async()=>{let{WorkspacePanelContent:e}=await import(`./workspace-panel-CPPIznT9.js`);return{WorkspacePanelContent:e}},__vite__mapDeps([81,1,2,3,10,11,12,7,48,8,49,24,50,23,51,82,83,84,85,75,41,21,34,5,35,42,52,53])).then(({WorkspacePanelContent:e})=>({default:e})));function S(){return(0,h.jsxs)(`div`,{className:`flex min-h-32 flex-col gap-3 p-4`,"aria-label":`Loading panel`,children:[(0,h.jsx)(d,{className:`h-5 w-32`}),(0,h.jsx)(d,{className:`h-20 w-full`})]})}function C(){let e=u();return(0,h.jsx)(m.Suspense,{fallback:(0,h.jsx)(S,{}),children:(0,h.jsx)(v,{activityLabel:e.activityLabel,artifactRuns:e.artifactRuns,chatMode:e.chatMode,messages:e.messages,planLabel:e.planLabel,presentation:e.presentation,queue:e.queue,selectedModelKey:e.selectedModelKey,sessionId:e.sessionId,status:e.status,thinkingLevel:e.thinkingLevel})})}function w(){let e=u(),t=l();return(0,h.jsx)(m.Suspense,{fallback:(0,h.jsx)(S,{}),children:(0,h.jsx)(_,{error:e.resourcesError,loading:e.resourcesLoading,resources:e.resources,workspace:t.workspaceTree})})}function T(){let e=l();return(0,h.jsx)(m.Suspense,{fallback:(0,h.jsx)(S,{}),children:(0,h.jsx)(x,{error:e.workspaceError,loadWorkspaceFile:e.loadWorkspaceFile,loading:e.workspaceLoading,onSelectedPathChange:e.setSelectedWorkspacePath,selectedPath:e.selectedWorkspacePath,workspace:e.workspaceTree})})}function E(){let e=u();return(0,h.jsx)(m.Suspense,{fallback:(0,h.jsx)(S,{}),children:(0,h.jsx)(g,{artifactRuns:e.artifactRuns,messages:e.messages,onOpenUIAction:e.onOpenUIAction,selectedArtifactId:e.selectedArtifactId,status:e.status})})}function D(){let e=u();return(0,h.jsx)(m.Suspense,{fallback:(0,h.jsx)(S,{}),children:(0,h.jsx)(y,{artifactRuns:e.artifactRuns,selectedArtifactId:e.selectedArtifactId,kernelDiagnostics:e.presentation.kernelDiagnostics})})}function O(){let e=u();return(0,h.jsx)(m.Suspense,{fallback:(0,h.jsx)(S,{}),children:(0,h.jsx)(b,{agents:e.presentation.rlmChildren,loadSession:e.loadSubagentSession,onOpenTab:e.onOpenSubagentTab,parentSessionId:e.sessionId,tree:e.presentation.rlmTree})})}var k={resources:{id:`resources`,order:0,title:`Resources`,ariaLabel:`Resources`,commandLabel:`Open Resources`,commandKeywords:[`resources`,`skills`,`panels`],icon:p,dataTestid:`pi-resources-canvas`,mobileDataTestid:`pi-resources-mobile-panel`,showInLauncher:!0,badgeSource:`resources`,loadingSource:`resources`,refreshSource:`resources`,component:w},workspace:{id:`workspace`,order:1,title:`Workspace`,ariaLabel:`Workspace`,commandLabel:`Open Workspace`,commandKeywords:[`workspace`,`files`,`panels`],icon:a,dataTestid:`pi-workspace-canvas`,mobileDataTestid:`pi-workspace-mobile-panel`,showInLauncher:!0,badgeSource:void 0,loadingSource:`workspace`,refreshSource:`workspace`,component:T},artifacts:{id:`artifacts`,order:2,title:`Artifacts`,ariaLabel:`Artifacts`,commandLabel:`Open Artifacts`,commandKeywords:[`artifacts`,`reports`,`datasets`,`panels`],icon:o,dataTestid:`pi-artifacts-canvas`,mobileDataTestid:`pi-artifacts-mobile-panel`,showInLauncher:!0,badgeSource:`artifacts`,loadingSource:void 0,refreshSource:void 0,component:E},repl:{id:`repl`,order:3,title:`REPL`,ariaLabel:`REPL runs`,commandLabel:`Open REPL`,commandKeywords:[`repl`,`ipython`,`python`,`cells`,`panels`],icon:s,dataTestid:`pi-repl-canvas`,mobileDataTestid:`pi-repl-mobile-panel`,showInLauncher:!0,badgeSource:`repl`,loadingSource:void 0,refreshSource:void 0,component:D},subagents:{id:`subagents`,order:4,title:`Subagents`,ariaLabel:`Subagents`,commandLabel:`Open Subagents`,commandKeywords:[`subagents`,`agents`,`threads`,`delegation`,`panels`],icon:i,dataTestid:`pi-subagents-canvas`,mobileDataTestid:`pi-subagents-mobile-panel`,showInLauncher:!1,badgeSource:void 0,loadingSource:void 0,refreshSource:void 0,component:O},"session-insights":{id:`session-insights`,order:5,title:`Session insights`,ariaLabel:`Session insights`,commandLabel:`Open Session Insights`,commandKeywords:[`session`,`insights`,`activity`,`panels`],icon:f,dataTestid:`pi-session-insights-canvas`,mobileDataTestid:`pi-session-insights-mobile-panel`,showInLauncher:!0,badgeSource:void 0,loadingSource:void 0,refreshSource:void 0,component:C}},A=Object.values(k).sort((e,t)=>e.order-t.order).filter(e=>e.showInLauncher!==!1);function j(e){return k[e]}export{j as n,p as r,A as t};