@lovelybunch/api 1.0.78-alpha.3 → 1.0.78-alpha.4

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 (141) hide show
  1. package/dist/lib/auth/auth-manager.d.ts +1 -1
  2. package/dist/lib/auth/auth-manager.js +2 -1
  3. package/dist/lib/symlinks/symlink-manager.d.ts +3 -4
  4. package/dist/lib/symlinks/symlink-manager.js +49 -30
  5. package/dist/lib/terminal/terminal-manager.d.ts +8 -5
  6. package/dist/lib/terminal/terminal-manager.js +29 -5
  7. package/dist/middleware/auth.d.ts +23 -2
  8. package/dist/middleware/auth.js +44 -4
  9. package/dist/routes/api/v1/ai/route.js +117 -4
  10. package/dist/routes/api/v1/api-keys/route.js +7 -1
  11. package/dist/routes/api/v1/jobs/[id]/route.d.ts +28 -28
  12. package/dist/routes/api/v1/jobs/route.d.ts +28 -28
  13. package/dist/routes/api/v1/knowledge/[filename]/route.js +29 -7
  14. package/dist/routes/api/v1/slack/route.d.ts +6 -6
  15. package/dist/routes/api/v1/terminal/[taskId]/create/route.js +2 -1
  16. package/dist/routes/api/v1/terminal/[taskId]/destroy/route.js +2 -1
  17. package/dist/routes/api/v1/terminal/[taskId]/resize/route.js +2 -1
  18. package/dist/routes/api/v1/terminal/code/route.js +2 -1
  19. package/dist/routes/api/v1/terminal/sessions/route.js +5 -3
  20. package/dist/server-with-static.js +3 -3
  21. package/dist/server.js +3 -3
  22. package/package.json +4 -4
  23. package/static/assets/{ActivityPage-CO2m97Hz.js → ActivityPage-CtFAFqlg.js} +1 -1
  24. package/static/assets/{AgentsContextEditPage-B9pcC3Y4.js → AgentsContextEditPage-CsRJvzE6.js} +1 -1
  25. package/static/assets/{AgentsContextPage-CWsGDD4F.js → AgentsContextPage-CWCs8CgG.js} +1 -1
  26. package/static/assets/{ApiKeysSettingsPage-CPckUylF.js → ApiKeysSettingsPage-B4b_fmJg.js} +1 -1
  27. package/static/assets/{AuthSettingsPage-CaiYl7fx.js → AuthSettingsPage-O3UdLrHC.js} +1 -1
  28. package/static/assets/{CallbackPage-C73ggs1e.js → CallbackPage-WTwVSxdx.js} +1 -1
  29. package/static/assets/{CoconutCallbackPage-Bhc_sIuJ.js → CoconutCallbackPage-LEWgUV8J.js} +1 -1
  30. package/static/assets/{CodePage-7zrLYTBq.js → CodePage-DpVmg_UD.js} +1 -1
  31. package/static/assets/{CollapsibleSection-DD6cnVaM.js → CollapsibleSection-BHag26Vf.js} +1 -1
  32. package/static/assets/{DashboardPage-BiVDSLAm.js → DashboardPage-BZnCikpf.js} +1 -1
  33. package/static/assets/{GitPage-C7n82d8O.js → GitPage-DD6dgeNu.js} +1 -1
  34. package/static/assets/{GitSettingsPage-D2R-zg9d.js → GitSettingsPage-CLHCZ6at.js} +1 -1
  35. package/static/assets/{IdentityPage-B3gUyFXr.js → IdentityPage-DtzLSTYd.js} +1 -1
  36. package/static/assets/{ImplementationStepsEditor-DmrYGdZB.js → ImplementationStepsEditor-Ca1aygKs.js} +1 -1
  37. package/static/assets/{IntegrationsSettingsPage-V6t85OD_.js → IntegrationsSettingsPage-C2tzpbuI.js} +1 -1
  38. package/static/assets/{JobDetailPage-BUmQGshi.js → JobDetailPage-B03z4VgG.js} +1 -1
  39. package/static/assets/{KnowledgeDetailPage-DzpoOs9C.js → KnowledgeDetailPage-XslT5GUv.js} +1 -1
  40. package/static/assets/{KnowledgeEditPage-C9zyCfr6.js → KnowledgeEditPage-5NFEnGJh.js} +1 -1
  41. package/static/assets/{KnowledgePage-C56_NMA9.js → KnowledgePage-Dzh409qU.js} +1 -1
  42. package/static/assets/{LoginPage-DZpAjZmK.js → LoginPage-IDVkR1zN.js} +1 -1
  43. package/static/assets/{MailInboxPage-BvOBQvF3.js → MailInboxPage-CXaBqNl2.js} +1 -1
  44. package/static/assets/{MailProcessingModal-CCGrVGDs.js → MailProcessingModal-BWyzTMEv.js} +1 -1
  45. package/static/assets/{MailReadPage-CycqG4oj.js → MailReadPage-DPGuT0gC.js} +1 -1
  46. package/static/assets/{MailSentPage-DpwRNrju.js → MailSentPage-Dtq37Kap.js} +1 -1
  47. package/static/assets/{McpSettingsPage-pJ41THOO.js → McpSettingsPage-BiCSPaAJ.js} +1 -1
  48. package/static/assets/{MemoryEditPage-DobGCRrl.js → MemoryEditPage-Dfa6MsnE.js} +1 -1
  49. package/static/assets/{MemoryPage-BrFnh8rC.js → MemoryPage-BqUngqIS.js} +1 -1
  50. package/static/assets/{NewKnowledgePage-CTFx_YTk.js → NewKnowledgePage-BmYwcO98.js} +1 -1
  51. package/static/assets/{NewSkillPage-D_FfkSKi.js → NewSkillPage-BfNaXH37.js} +1 -1
  52. package/static/assets/{NewTaskPage-CehAYsyJ.js → NewTaskPage-Ctmh2uiJ.js} +1 -1
  53. package/static/assets/{NotFoundPage-wcJQI6_Y.js → NotFoundPage-a2erdq4H.js} +1 -1
  54. package/static/assets/{NotificationsSettingsPage-_9Dum2JJ.js → NotificationsSettingsPage-BB9QuyUf.js} +1 -1
  55. package/static/assets/{PromptsSettingsPage-BBIP8PWS.js → PromptsSettingsPage-BZLwTFcd.js} +1 -1
  56. package/static/assets/{ResourceDetailPage-C7goHk6o.js → ResourceDetailPage-DRWNjykw.js} +1 -1
  57. package/static/assets/{ResourcesPage-ZH5lSPaG.js → ResourcesPage-C3Lx8hz_.js} +1 -1
  58. package/static/assets/{RoleEditPage-JJnQ7UXW.js → RoleEditPage-W9SV6Mwr.js} +1 -1
  59. package/static/assets/{RolePage-C-gQnpzL.js → RolePage-DWWo77tA.js} +1 -1
  60. package/static/assets/{RulesSettingsPage-Bc05Q6j8.js → RulesSettingsPage-BKsadZ7r.js} +1 -1
  61. package/static/assets/{RunDetailPage-BhWthPVR.js → RunDetailPage-C6miynGX.js} +1 -1
  62. package/static/assets/{SchedulePage-zvr5ce8N.js → SchedulePage-B6s-CkVg.js} +1 -1
  63. package/static/assets/{SkillDetailPage-5DhKM3NY.js → SkillDetailPage-DYkLxRjB.js} +1 -1
  64. package/static/assets/{SkillEditPage-1V1ADtPe.js → SkillEditPage-DIB2lUMz.js} +1 -1
  65. package/static/assets/{SkillsPage-6VQCj1hf.js → SkillsPage-BgR2gdCy.js} +1 -1
  66. package/static/assets/{SkillsSettingsPage-C7lqSbBf.js → SkillsSettingsPage-CoDOG0YQ.js} +1 -1
  67. package/static/assets/{SourceInput-CeltF2kQ.js → SourceInput-CS6u1yPi.js} +1 -1
  68. package/static/assets/{TagInput-DUR8EcF5.js → TagInput-C3WzbX6I.js} +1 -1
  69. package/static/assets/{TaskDetailPage-HqNWYvGE.js → TaskDetailPage-DEBBE0D8.js} +1 -1
  70. package/static/assets/{TaskEditPage-Cy6_oKRU.js → TaskEditPage-B26tEsUP.js} +1 -1
  71. package/static/assets/{TasksPage-DHdwWucP.js → TasksPage-pqQ7VlC3.js} +1 -1
  72. package/static/assets/{TeamEditPage-DZHs9LwL.js → TeamEditPage-C6DugOii.js} +1 -1
  73. package/static/assets/{TeamPage-C10th6Xi.js → TeamPage-BDqQZ6Rr.js} +1 -1
  74. package/static/assets/{TerminalPage-BajLCwBP.js → TerminalPage-pjss7X1h.js} +1 -1
  75. package/static/assets/{TerminalSessionPage-dJGlApIY.js → TerminalSessionPage-C9sJ_13t.js} +1 -1
  76. package/static/assets/{UserPreferencesPage-crzoMvn3.js → UserPreferencesPage-BrpKf14p.js} +1 -1
  77. package/static/assets/{UserSettingsPage-B4eeW2b9.js → UserSettingsPage-BbazpvdQ.js} +1 -1
  78. package/static/assets/{UtilitiesPage-ZnNRIlEg.js → UtilitiesPage-niclH8kb.js} +1 -1
  79. package/static/assets/{alert-a0XoDY__.js → alert-DBhIskRX.js} +1 -1
  80. package/static/assets/{arrow-down-DwCDIVHH.js → arrow-down-TpeNydxP.js} +1 -1
  81. package/static/assets/{arrow-left-D4GyWema.js → arrow-left-_lXkdm9Q.js} +1 -1
  82. package/static/assets/{arrow-up-ClZJeJXS.js → arrow-up-DaIMsmSO.js} +1 -1
  83. package/static/assets/{arrow-up-down-ozcTje6W.js → arrow-up-down-C7wqirJv.js} +1 -1
  84. package/static/assets/{badge-CgbZdX-R.js → badge-TeAh_Zh0.js} +1 -1
  85. package/static/assets/{browser-modal-CV9x_ILy.js → browser-modal-BpGFpZZj.js} +1 -1
  86. package/static/assets/{card-bSzcwVEz.js → card-CiLixwCG.js} +1 -1
  87. package/static/assets/{chevron-left-Dnm2Bv2g.js → chevron-left-CuMfw52D.js} +1 -1
  88. package/static/assets/{chevron-up-znuSUWjo.js → chevron-up-B4J4D5aE.js} +1 -1
  89. package/static/assets/{chevrons-up-DyHcV7KP.js → chevrons-up-Dcs-Dj4B.js} +1 -1
  90. package/static/assets/{circle-alert-Dn8B5NPI.js → circle-alert-nI75emvr.js} +1 -1
  91. package/static/assets/{circle-check-big-HUp82Tz-.js → circle-check-big-CxxxVvOw.js} +1 -1
  92. package/static/assets/{circle-check-2Hh5KJn8.js → circle-check-k6ER9afD.js} +1 -1
  93. package/static/assets/{circle-play-BG4sTHV2.js → circle-play-B4D0d7YW.js} +1 -1
  94. package/static/assets/{circle-x-DBrbnMPA.js → circle-x-BzPgPb47.js} +1 -1
  95. package/static/assets/{clipboard-B6OwO-az.js → clipboard-CLObCrC4.js} +1 -1
  96. package/static/assets/{clock-B36ytcOX.js → clock-BK-8XMqv.js} +1 -1
  97. package/static/assets/{code-CK8i3Xlg.js → code-lhIVzb1q.js} +1 -1
  98. package/static/assets/{download-C_C3f7cE.js → download-ChgFRTfC.js} +1 -1
  99. package/static/assets/{external-link-kQIXuJh_.js → external-link-D4kianlP.js} +1 -1
  100. package/static/assets/{eye-DTyfbeQg.js → eye-H1JnZ9E9.js} +1 -1
  101. package/static/assets/{folder-git-2-CKR2HcNZ.js → folder-git-2-BZGvXcyj.js} +1 -1
  102. package/static/assets/{globe--bHEtjre.js → globe-DAzCOUla.js} +1 -1
  103. package/static/assets/{index-CJBq79WW.js → index-B7UEVagI.js} +1 -1
  104. package/static/assets/{index-CRSpx2tQ.js → index-Bik-wLXi.js} +1 -1
  105. package/static/assets/{index-ObZJu-Zv.js → index-BlOxV6pf.js} +1 -1
  106. package/static/assets/{index-QgKSm0gN.js → index-C7dpn8dK.js} +1 -1
  107. package/static/assets/{index-ffbhzKxY.js → index-C9wsYS8C.js} +1 -1
  108. package/static/assets/{index-9Y0fmmy7.js → index-Ck9sMDuo.js} +1 -1
  109. package/static/assets/{index-CvrVx0kf.js → index-DMeIDO6W.js} +1 -1
  110. package/static/assets/{index-Bg80D0Z0.js → index-DOpjlxVe.js} +1 -1
  111. package/static/assets/{index-nRow2q03.js → index-DT4K0HgO.js} +1 -1
  112. package/static/assets/{index-DMKQFm-M.js → index-DeF-CCVg.js} +1 -1
  113. package/static/assets/{index-CTZ51lNe.js → index-DkvhkCo1.js} +1 -1
  114. package/static/assets/{index-DXkvtMiO.js → index-DuDW1LwX.js} +1 -1
  115. package/static/assets/{index-DOgqHj1l.js → index-Dy_-mpPq.js} +1 -1
  116. package/static/assets/{index-B81KYk3Z.js → index-SUQrIHd7.js} +6 -6
  117. package/static/assets/{index-UKy_jk8q.js → index-c-gr7Bew.js} +1 -1
  118. package/static/assets/{index-C_zW1Hi0.js → index-kJaEkklL.js} +1 -1
  119. package/static/assets/{index-XJ0Ck2RG.js → index-rslXoTnS.js} +1 -1
  120. package/static/assets/{index-CD6zflLk.js → index-rwsZ-IsL.js} +1 -1
  121. package/static/assets/{index-B52hVXHu.js → index-sBbL8_xu.js} +1 -1
  122. package/static/assets/{info-wSiZMXgL.js → info-CVmPHERQ.js} +1 -1
  123. package/static/assets/{label-CHP4q6u3.js → label-n5pqaObd.js} +1 -1
  124. package/static/assets/{markdown-editor-DSI9T1tt.js → markdown-editor-Cvh5pZzJ.js} +3 -3
  125. package/static/assets/{message-square-D1sMYX2G.js → message-square-BmnqRsu6.js} +1 -1
  126. package/static/assets/{paperclip-plxfUm0D.js → paperclip-BwcNeQ_C.js} +1 -1
  127. package/static/assets/{pause-B2JeikEI.js → pause-CUswidZW.js} +1 -1
  128. package/static/assets/{play-l7Mu5YPO.js → play-DyZbNGiK.js} +1 -1
  129. package/static/assets/{radio-group-DxYoqBDN.js → radio-group-Bzu_d7xN.js} +1 -1
  130. package/static/assets/{refresh-cw-BTHxZiES.js → refresh-cw-DvQ0rmk7.js} +1 -1
  131. package/static/assets/{search-Cpy49h7H.js → search-kc_tG8Rf.js} +1 -1
  132. package/static/assets/{select-CG6kgyUu.js → select-CIOYQA7a.js} +1 -1
  133. package/static/assets/{server-DzOL5RbP.js → server-CWIJxRf0.js} +1 -1
  134. package/static/assets/{switch-7YpWWyAq.js → switch-DczkR77Y.js} +1 -1
  135. package/static/assets/{tabs-DJk1ZrWh.js → tabs-DOEakD76.js} +1 -1
  136. package/static/assets/{tag-BvoXF-sG.js → tag-Dc8sXXlM.js} +1 -1
  137. package/static/assets/{terminal-preview-d_BZ8s8s.js → terminal-preview-D8oASUdZ.js} +1 -1
  138. package/static/assets/{triangle-alert-P6aKUDal.js → triangle-alert-C-5ixej6.js} +1 -1
  139. package/static/assets/{use-terminal-BXYq-vfY.js → use-terminal-xdcf4Z2G.js} +1 -1
  140. package/static/assets/{video-PACu7StA.js → video-CBneSE9B.js} +1 -1
  141. package/static/index.html +1 -1
@@ -1 +1 @@
1
- import{r as n,bi as E,ap as K,aj as T,j as a,ak as N,bk as U,an as x,ao as w,bj as V,am as g,b8 as z,as as H,ar as $,e as j,bG as W}from"./index-B81KYk3Z.js";var C="Radio",[X,k]=N(C),[Y,J]=X(C),I=n.forwardRef((r,t)=>{const{__scopeRadio:e,name:d,checked:o=!1,required:s,disabled:i,value:p="on",onCheck:f,form:R,...v}=r,[l,m]=n.useState(null),c=w(t,y=>m(y)),u=n.useRef(!1),b=l?R||!!l.closest("form"):!0;return a.jsxs(Y,{scope:e,checked:o,disabled:i,children:[a.jsx(x.button,{type:"button",role:"radio","aria-checked":o,"data-state":S(o),"data-disabled":i?"":void 0,disabled:i,value:p,...v,ref:c,onClick:g(r.onClick,y=>{o||f?.(),b&&(u.current=y.isPropagationStopped(),u.current||y.stopPropagation())})}),b&&a.jsx(P,{control:l,bubbles:!u.current,name:d,value:p,checked:o,required:s,disabled:i,form:R,style:{transform:"translateX(-100%)"}})]})});I.displayName=C;var G="RadioIndicator",_=n.forwardRef((r,t)=>{const{__scopeRadio:e,forceMount:d,...o}=r,s=J(G,e);return a.jsx(z,{present:d||s.checked,children:a.jsx(x.span,{"data-state":S(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});_.displayName=G;var Q="RadioBubbleInput",P=n.forwardRef(({__scopeRadio:r,control:t,checked:e,bubbles:d=!0,...o},s)=>{const i=n.useRef(null),p=w(i,s),f=H(e),R=$(t);return n.useEffect(()=>{const v=i.current;if(!v)return;const l=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(l,"checked").set;if(f!==e&&c){const u=new Event("click",{bubbles:d});c.call(v,e),v.dispatchEvent(u)}},[f,e,d]),a.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:e,...o,tabIndex:-1,ref:p,style:{...o.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});P.displayName=Q;function S(r){return r?"checked":"unchecked"}var Z=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],h="RadioGroup",[ee,de]=N(h,[E,k]),A=E(),D=k(),[oe,re]=ee(h),M=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,name:d,defaultValue:o,value:s,required:i=!1,disabled:p=!1,orientation:f,dir:R,loop:v=!0,onValueChange:l,...m}=r,c=A(e),u=K(R),[b,y]=T({prop:s,defaultProp:o??null,onChange:l,caller:h});return a.jsx(oe,{scope:e,name:d,required:i,disabled:p,value:b,onValueChange:y,children:a.jsx(U,{asChild:!0,...c,orientation:f,dir:u,loop:v,children:a.jsx(x.div,{role:"radiogroup","aria-required":i,"aria-orientation":f,"data-disabled":p?"":void 0,dir:u,...m,ref:t})})})});M.displayName=h;var O="RadioGroupItem",F=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,disabled:d,...o}=r,s=re(O,e),i=s.disabled||d,p=A(e),f=D(e),R=n.useRef(null),v=w(t,R),l=s.value===o.value,m=n.useRef(!1);return n.useEffect(()=>{const c=b=>{Z.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",c),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",c),document.removeEventListener("keyup",u)}},[]),a.jsx(V,{asChild:!0,...p,focusable:!i,active:l,children:a.jsx(I,{disabled:i,required:s.required,checked:l,...f,...o,name:s.name,ref:v,onCheck:()=>s.onValueChange(o.value),onKeyDown:g(c=>{c.key==="Enter"&&c.preventDefault()}),onFocus:g(o.onFocus,()=>{m.current&&R.current?.click()})})})});F.displayName=O;var ae="RadioGroupIndicator",L=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,...d}=r,o=D(e);return a.jsx(_,{...o,...d,ref:t})});L.displayName=ae;var q=M,B=F,te=L;const se=n.forwardRef(({className:r,...t},e)=>a.jsx(q,{className:j("grid gap-2",r),...t,ref:e}));se.displayName=q.displayName;const ne=n.forwardRef(({className:r,...t},e)=>a.jsx(B,{ref:e,className:j("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),...t,children:a.jsx(te,{className:"flex items-center justify-center",children:a.jsx(W,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ne.displayName=B.displayName;export{se as R,ne as a};
1
+ import{r as n,bi as E,ap as K,aj as T,j as a,ak as N,bk as U,an as x,ao as w,bj as V,am as g,b8 as z,as as H,ar as $,e as j,bG as W}from"./index-SUQrIHd7.js";var C="Radio",[X,k]=N(C),[Y,J]=X(C),I=n.forwardRef((r,t)=>{const{__scopeRadio:e,name:d,checked:o=!1,required:s,disabled:i,value:p="on",onCheck:f,form:R,...v}=r,[l,m]=n.useState(null),c=w(t,y=>m(y)),u=n.useRef(!1),b=l?R||!!l.closest("form"):!0;return a.jsxs(Y,{scope:e,checked:o,disabled:i,children:[a.jsx(x.button,{type:"button",role:"radio","aria-checked":o,"data-state":S(o),"data-disabled":i?"":void 0,disabled:i,value:p,...v,ref:c,onClick:g(r.onClick,y=>{o||f?.(),b&&(u.current=y.isPropagationStopped(),u.current||y.stopPropagation())})}),b&&a.jsx(P,{control:l,bubbles:!u.current,name:d,value:p,checked:o,required:s,disabled:i,form:R,style:{transform:"translateX(-100%)"}})]})});I.displayName=C;var G="RadioIndicator",_=n.forwardRef((r,t)=>{const{__scopeRadio:e,forceMount:d,...o}=r,s=J(G,e);return a.jsx(z,{present:d||s.checked,children:a.jsx(x.span,{"data-state":S(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});_.displayName=G;var Q="RadioBubbleInput",P=n.forwardRef(({__scopeRadio:r,control:t,checked:e,bubbles:d=!0,...o},s)=>{const i=n.useRef(null),p=w(i,s),f=H(e),R=$(t);return n.useEffect(()=>{const v=i.current;if(!v)return;const l=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(l,"checked").set;if(f!==e&&c){const u=new Event("click",{bubbles:d});c.call(v,e),v.dispatchEvent(u)}},[f,e,d]),a.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:e,...o,tabIndex:-1,ref:p,style:{...o.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});P.displayName=Q;function S(r){return r?"checked":"unchecked"}var Z=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],h="RadioGroup",[ee,de]=N(h,[E,k]),A=E(),D=k(),[oe,re]=ee(h),M=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,name:d,defaultValue:o,value:s,required:i=!1,disabled:p=!1,orientation:f,dir:R,loop:v=!0,onValueChange:l,...m}=r,c=A(e),u=K(R),[b,y]=T({prop:s,defaultProp:o??null,onChange:l,caller:h});return a.jsx(oe,{scope:e,name:d,required:i,disabled:p,value:b,onValueChange:y,children:a.jsx(U,{asChild:!0,...c,orientation:f,dir:u,loop:v,children:a.jsx(x.div,{role:"radiogroup","aria-required":i,"aria-orientation":f,"data-disabled":p?"":void 0,dir:u,...m,ref:t})})})});M.displayName=h;var O="RadioGroupItem",F=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,disabled:d,...o}=r,s=re(O,e),i=s.disabled||d,p=A(e),f=D(e),R=n.useRef(null),v=w(t,R),l=s.value===o.value,m=n.useRef(!1);return n.useEffect(()=>{const c=b=>{Z.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",c),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",c),document.removeEventListener("keyup",u)}},[]),a.jsx(V,{asChild:!0,...p,focusable:!i,active:l,children:a.jsx(I,{disabled:i,required:s.required,checked:l,...f,...o,name:s.name,ref:v,onCheck:()=>s.onValueChange(o.value),onKeyDown:g(c=>{c.key==="Enter"&&c.preventDefault()}),onFocus:g(o.onFocus,()=>{m.current&&R.current?.click()})})})});F.displayName=O;var ae="RadioGroupIndicator",L=n.forwardRef((r,t)=>{const{__scopeRadioGroup:e,...d}=r,o=D(e);return a.jsx(_,{...o,...d,ref:t})});L.displayName=ae;var q=M,B=F,te=L;const se=n.forwardRef(({className:r,...t},e)=>a.jsx(q,{className:j("grid gap-2",r),...t,ref:e}));se.displayName=q.displayName;const ne=n.forwardRef(({className:r,...t},e)=>a.jsx(B,{ref:e,className:j("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),...t,children:a.jsx(te,{className:"flex items-center justify-center",children:a.jsx(W,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ne.displayName=B.displayName;export{se as R,ne as a};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-B81KYk3Z.js";/**
1
+ import{c as e}from"./index-SUQrIHd7.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-B81KYk3Z.js";/**
1
+ import{c}from"./index-SUQrIHd7.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as o,j as e,e as r,n as d,ah as y}from"./index-B81KYk3Z.js";import{R as N,V as g,T as n,I as j,P as b,C as i,a as S,b as c,d as v,c as R,e as m,f as p,L as f,S as x}from"./index-ObZJu-Zv.js";import{C}from"./chevron-up-znuSUWjo.js";const k=N,E=g,I=o.forwardRef(({className:t,children:s,...a},l)=>e.jsxs(n,{ref:l,className:r("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[s,e.jsx(j,{asChild:!0,children:e.jsx(d,{className:"h-4 w-4 opacity-50"})})]}));I.displayName=n.displayName;const u=o.forwardRef(({className:t,...s},a)=>e.jsx(m,{ref:a,className:r("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(C,{className:"h-4 w-4"})}));u.displayName=m.displayName;const h=o.forwardRef(({className:t,...s},a)=>e.jsx(p,{ref:a,className:r("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(d,{className:"h-4 w-4"})}));h.displayName=p.displayName;const B=o.forwardRef(({className:t,children:s,position:a="popper",...l},w)=>e.jsx(b,{children:e.jsxs(i,{ref:w,className:r("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...l,children:[e.jsx(u,{}),e.jsx(S,{className:r("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),e.jsx(h,{})]})}));B.displayName=i.displayName;const T=o.forwardRef(({className:t,...s},a)=>e.jsx(f,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",t),...s}));T.displayName=f.displayName;const V=o.forwardRef(({className:t,children:s,...a},l)=>e.jsxs(c,{ref:l,className:r("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(v,{children:e.jsx(y,{className:"h-4 w-4"})})}),e.jsx(R,{children:s})]}));V.displayName=c.displayName;const z=o.forwardRef(({className:t,...s},a)=>e.jsx(x,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",t),...s}));z.displayName=x.displayName;export{k as S,I as a,E as b,B as c,V as d};
1
+ import{r as o,j as e,e as r,n as d,ah as y}from"./index-SUQrIHd7.js";import{R as N,V as g,T as n,I as j,P as b,C as i,a as S,b as c,d as v,c as R,e as m,f as p,L as f,S as x}from"./index-BlOxV6pf.js";import{C}from"./chevron-up-B4J4D5aE.js";const k=N,E=g,I=o.forwardRef(({className:t,children:s,...a},l)=>e.jsxs(n,{ref:l,className:r("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[s,e.jsx(j,{asChild:!0,children:e.jsx(d,{className:"h-4 w-4 opacity-50"})})]}));I.displayName=n.displayName;const u=o.forwardRef(({className:t,...s},a)=>e.jsx(m,{ref:a,className:r("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(C,{className:"h-4 w-4"})}));u.displayName=m.displayName;const h=o.forwardRef(({className:t,...s},a)=>e.jsx(p,{ref:a,className:r("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(d,{className:"h-4 w-4"})}));h.displayName=p.displayName;const B=o.forwardRef(({className:t,children:s,position:a="popper",...l},w)=>e.jsx(b,{children:e.jsxs(i,{ref:w,className:r("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...l,children:[e.jsx(u,{}),e.jsx(S,{className:r("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),e.jsx(h,{})]})}));B.displayName=i.displayName;const T=o.forwardRef(({className:t,...s},a)=>e.jsx(f,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",t),...s}));T.displayName=f.displayName;const V=o.forwardRef(({className:t,children:s,...a},l)=>e.jsxs(c,{ref:l,className:r("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(v,{children:e.jsx(y,{className:"h-4 w-4"})})}),e.jsx(R,{children:s})]}));V.displayName=c.displayName;const z=o.forwardRef(({className:t,...s},a)=>e.jsx(x,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",t),...s}));z.displayName=x.displayName;export{k as S,I as a,E as b,B as c,V as d};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-B81KYk3Z.js";/**
1
+ import{c as e}from"./index-SUQrIHd7.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as c,j as e,e as i}from"./index-B81KYk3Z.js";const d=c.forwardRef(({className:s,onCheckedChange:r,onChange:t,...o},n)=>{const l=a=>{t?.(a),r?.(a.target.checked)};return e.jsxs("label",{className:i("relative inline-flex cursor-pointer",s),children:[e.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:l,ref:n,...o}),e.jsx("div",{className:"block bg-gray-300 w-9 h-5 rounded-full transition-colors duration-200 ease-in-out peer-checked:bg-blue-600"}),e.jsx("div",{className:"absolute left-0 top-0 bg-white w-4 h-4 rounded-full mt-0.5 ml-0.5 transition-transform duration-200 ease-in-out transform peer-checked:translate-x-4 shadow"})]})});d.displayName="Switch";export{d as S};
1
+ import{r as c,j as e,e as i}from"./index-SUQrIHd7.js";const d=c.forwardRef(({className:s,onCheckedChange:r,onChange:t,...o},n)=>{const l=a=>{t?.(a),r?.(a.target.checked)};return e.jsxs("label",{className:i("relative inline-flex cursor-pointer",s),children:[e.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:l,ref:n,...o}),e.jsx("div",{className:"block bg-gray-300 w-9 h-5 rounded-full transition-colors duration-200 ease-in-out peer-checked:bg-blue-600"}),e.jsx("div",{className:"absolute left-0 top-0 bg-white w-4 h-4 rounded-full mt-0.5 ml-0.5 transition-transform duration-200 ease-in-out transform peer-checked:translate-x-4 shadow"})]})});d.displayName="Switch";export{d as S};
@@ -1 +1 @@
1
- import{r as l,ap as F,aj as k,j as c,ak as $,b6 as D,an as g,bi as y,bk as V,bj as G,am as m,b8 as L,e as T}from"./index-B81KYk3Z.js";var p="Tabs",[K,Q]=$(p,[y]),h=y(),[B,x]=K(p),N=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,onValueChange:i,defaultValue:d,orientation:n="horizontal",dir:u,activationMode:f="automatic",...v}=e,r=F(u),[s,b]=k({prop:o,onChange:i,defaultProp:d??"",caller:p});return c.jsx(B,{scope:t,baseId:D(),value:s,onValueChange:b,orientation:n,dir:r,activationMode:f,children:c.jsx(g.div,{dir:r,"data-orientation":n,...v,ref:a})})});N.displayName=p;var C="TabsList",j=l.forwardRef((e,a)=>{const{__scopeTabs:t,loop:o=!0,...i}=e,d=x(C,t),n=h(t);return c.jsx(V,{asChild:!0,...n,orientation:d.orientation,dir:d.dir,loop:o,children:c.jsx(g.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:a})})});j.displayName=C;var I="TabsTrigger",R=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,disabled:i=!1,...d}=e,n=x(I,t),u=h(t),f=A(n.baseId,o),v=E(n.baseId,o),r=o===n.value;return c.jsx(G,{asChild:!0,...u,focusable:!i,active:r,children:c.jsx(g.button,{type:"button",role:"tab","aria-selected":r,"aria-controls":v,"data-state":r?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...d,ref:a,onMouseDown:m(e.onMouseDown,s=>{!i&&s.button===0&&s.ctrlKey===!1?n.onValueChange(o):s.preventDefault()}),onKeyDown:m(e.onKeyDown,s=>{[" ","Enter"].includes(s.key)&&n.onValueChange(o)}),onFocus:m(e.onFocus,()=>{const s=n.activationMode!=="manual";!r&&!i&&s&&n.onValueChange(o)})})})});R.displayName=I;var w="TabsContent",_=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,forceMount:i,children:d,...n}=e,u=x(w,t),f=A(u.baseId,o),v=E(u.baseId,o),r=o===u.value,s=l.useRef(r);return l.useEffect(()=>{const b=requestAnimationFrame(()=>s.current=!1);return()=>cancelAnimationFrame(b)},[]),c.jsx(L,{present:i||r,children:({present:b})=>c.jsx(g.div,{"data-state":r?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!b,id:v,tabIndex:0,...n,ref:a,style:{...e.style,animationDuration:s.current?"0s":void 0},children:b&&d})})});_.displayName=w;function A(e,a){return`${e}-trigger-${a}`}function E(e,a){return`${e}-content-${a}`}var q=N,S=j,M=R,P=_;const U=q,z=l.forwardRef(({className:e,...a},t)=>c.jsx(S,{ref:t,className:T("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...a}));z.displayName=S.displayName;const H=l.forwardRef(({className:e,...a},t)=>c.jsx(M,{ref:t,className:T("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...a}));H.displayName=M.displayName;const O=l.forwardRef(({className:e,...a},t)=>c.jsx(P,{ref:t,className:T("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...a}));O.displayName=P.displayName;export{U as T,z as a,H as b,O as c};
1
+ import{r as l,ap as F,aj as k,j as c,ak as $,b6 as D,an as g,bi as y,bk as V,bj as G,am as m,b8 as L,e as T}from"./index-SUQrIHd7.js";var p="Tabs",[K,Q]=$(p,[y]),h=y(),[B,x]=K(p),N=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,onValueChange:i,defaultValue:d,orientation:n="horizontal",dir:u,activationMode:f="automatic",...v}=e,r=F(u),[s,b]=k({prop:o,onChange:i,defaultProp:d??"",caller:p});return c.jsx(B,{scope:t,baseId:D(),value:s,onValueChange:b,orientation:n,dir:r,activationMode:f,children:c.jsx(g.div,{dir:r,"data-orientation":n,...v,ref:a})})});N.displayName=p;var C="TabsList",j=l.forwardRef((e,a)=>{const{__scopeTabs:t,loop:o=!0,...i}=e,d=x(C,t),n=h(t);return c.jsx(V,{asChild:!0,...n,orientation:d.orientation,dir:d.dir,loop:o,children:c.jsx(g.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:a})})});j.displayName=C;var I="TabsTrigger",R=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,disabled:i=!1,...d}=e,n=x(I,t),u=h(t),f=A(n.baseId,o),v=E(n.baseId,o),r=o===n.value;return c.jsx(G,{asChild:!0,...u,focusable:!i,active:r,children:c.jsx(g.button,{type:"button",role:"tab","aria-selected":r,"aria-controls":v,"data-state":r?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...d,ref:a,onMouseDown:m(e.onMouseDown,s=>{!i&&s.button===0&&s.ctrlKey===!1?n.onValueChange(o):s.preventDefault()}),onKeyDown:m(e.onKeyDown,s=>{[" ","Enter"].includes(s.key)&&n.onValueChange(o)}),onFocus:m(e.onFocus,()=>{const s=n.activationMode!=="manual";!r&&!i&&s&&n.onValueChange(o)})})})});R.displayName=I;var w="TabsContent",_=l.forwardRef((e,a)=>{const{__scopeTabs:t,value:o,forceMount:i,children:d,...n}=e,u=x(w,t),f=A(u.baseId,o),v=E(u.baseId,o),r=o===u.value,s=l.useRef(r);return l.useEffect(()=>{const b=requestAnimationFrame(()=>s.current=!1);return()=>cancelAnimationFrame(b)},[]),c.jsx(L,{present:i||r,children:({present:b})=>c.jsx(g.div,{"data-state":r?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!b,id:v,tabIndex:0,...n,ref:a,style:{...e.style,animationDuration:s.current?"0s":void 0},children:b&&d})})});_.displayName=w;function A(e,a){return`${e}-trigger-${a}`}function E(e,a){return`${e}-content-${a}`}var q=N,S=j,M=R,P=_;const U=q,z=l.forwardRef(({className:e,...a},t)=>c.jsx(S,{ref:t,className:T("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...a}));z.displayName=S.displayName;const H=l.forwardRef(({className:e,...a},t)=>c.jsx(M,{ref:t,className:T("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...a}));H.displayName=M.displayName;const O=l.forwardRef(({className:e,...a},t)=>c.jsx(P,{ref:t,className:T("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...a}));O.displayName=P.displayName;export{U as T,z as a,H as b,O as c};
@@ -1,4 +1,4 @@
1
- import{c}from"./index-B81KYk3Z.js";/**
1
+ import{c}from"./index-SUQrIHd7.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as t,a7 as M,j as m}from"./index-B81KYk3Z.js";import{x as T,a as k}from"./xterm-DTxiCjtJ.js";function B(n){if(!n||typeof n!="object")return!1;const i=n,u=i.type==="snapshot"||i.type==="data",l=i.data===void 0||typeof i.data=="string";return u&&l}function N({sessionId:n,className:i,heightPx:u=160,maxScrollback:l=200}){const b=t.useRef(null),v=t.useRef(null),w=t.useRef(null),x=t.useRef(null),[R,S]=t.useState(!0),c=t.useRef([]),a=t.useRef(null);return t.useEffect(()=>{const o=b.current;if(!o||!n)return;const e=new T.Terminal({disableStdin:!0,cursorBlink:!1,convertEol:!0,scrollback:Math.max(50,Math.min(l,1e3)),fontSize:12,fontFamily:"'IBM Plex Mono', 'Source Code Pro', 'Fira Code', ui-monospace, Menlo, Monaco, monospace",lineHeight:1.25,letterSpacing:.3,theme:{background:"#1a1b26",foreground:"#c0caf5",cursor:"#c0caf5",selectionBackground:"#33467c",black:"#15161e",red:"#f7768e",green:"#9ece6a",yellow:"#e0af68",blue:"#7aa2f7",magenta:"#bb9af7",cyan:"#7dcfff",white:"#a9b1d6",brightBlack:"#414868",brightRed:"#f7768e",brightGreen:"#9ece6a",brightYellow:"#e0af68",brightBlue:"#7aa2f7",brightMagenta:"#bb9af7",brightCyan:"#7dcfff",brightWhite:"#c0caf5"}}),h=new k.FitAddon;e.loadAddon(h),e.open(o),o.style.height=`${u}px`,v.current=e,w.current=h;const f=()=>{try{const r=o.getBoundingClientRect();r.width>8&&r.height>8&&e.element&&h.fit()}catch{}},j=setTimeout(()=>f(),100),p=new ResizeObserver(()=>f());p.observe(o);const y=()=>{document.visibilityState==="visible"&&setTimeout(f,50)};document.addEventListener("visibilitychange",y);const d=new WebSocket(`${M}/ws/terminal-preview/${n}`);x.current=d,d.onopen=()=>S(!1);const E=()=>{a.current=null;const r=c.current;if(r.length){c.current=[];try{e.write(r.join(""))}catch{}}},F=()=>{a.current===null&&(a.current=requestAnimationFrame(E))};return d.onmessage=r=>{let g;try{g=JSON.parse(r.data)}catch{return}if(!B(g))return;const s=g;if(s?.type==="snapshot"){if(e.reset(),c.current=[],s.data)try{e.write(s.data)}catch{}f()}else s?.type==="data"&&s.data&&(c.current.push(String(s.data)),F())},()=>{clearTimeout(j),p.disconnect(),document.removeEventListener("visibilitychange",y);try{d.close()}catch{}a.current!==null&&cancelAnimationFrame(a.current),a.current=null,c.current=[],e.dispose()}},[n,u,l]),m.jsxs("div",{className:`relative w-full ${i||""}`.trim(),children:[R&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50/60 z-10",children:m.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading preview…"})}),m.jsx("div",{ref:b,className:"border border-muted rounded overflow-hidden"})]})}export{N as T};
1
+ import{r as t,a7 as M,j as m}from"./index-SUQrIHd7.js";import{x as T,a as k}from"./xterm-DTxiCjtJ.js";function B(n){if(!n||typeof n!="object")return!1;const i=n,u=i.type==="snapshot"||i.type==="data",l=i.data===void 0||typeof i.data=="string";return u&&l}function N({sessionId:n,className:i,heightPx:u=160,maxScrollback:l=200}){const b=t.useRef(null),v=t.useRef(null),w=t.useRef(null),x=t.useRef(null),[R,S]=t.useState(!0),c=t.useRef([]),a=t.useRef(null);return t.useEffect(()=>{const o=b.current;if(!o||!n)return;const e=new T.Terminal({disableStdin:!0,cursorBlink:!1,convertEol:!0,scrollback:Math.max(50,Math.min(l,1e3)),fontSize:12,fontFamily:"'IBM Plex Mono', 'Source Code Pro', 'Fira Code', ui-monospace, Menlo, Monaco, monospace",lineHeight:1.25,letterSpacing:.3,theme:{background:"#1a1b26",foreground:"#c0caf5",cursor:"#c0caf5",selectionBackground:"#33467c",black:"#15161e",red:"#f7768e",green:"#9ece6a",yellow:"#e0af68",blue:"#7aa2f7",magenta:"#bb9af7",cyan:"#7dcfff",white:"#a9b1d6",brightBlack:"#414868",brightRed:"#f7768e",brightGreen:"#9ece6a",brightYellow:"#e0af68",brightBlue:"#7aa2f7",brightMagenta:"#bb9af7",brightCyan:"#7dcfff",brightWhite:"#c0caf5"}}),h=new k.FitAddon;e.loadAddon(h),e.open(o),o.style.height=`${u}px`,v.current=e,w.current=h;const f=()=>{try{const r=o.getBoundingClientRect();r.width>8&&r.height>8&&e.element&&h.fit()}catch{}},j=setTimeout(()=>f(),100),p=new ResizeObserver(()=>f());p.observe(o);const y=()=>{document.visibilityState==="visible"&&setTimeout(f,50)};document.addEventListener("visibilitychange",y);const d=new WebSocket(`${M}/ws/terminal-preview/${n}`);x.current=d,d.onopen=()=>S(!1);const E=()=>{a.current=null;const r=c.current;if(r.length){c.current=[];try{e.write(r.join(""))}catch{}}},F=()=>{a.current===null&&(a.current=requestAnimationFrame(E))};return d.onmessage=r=>{let g;try{g=JSON.parse(r.data)}catch{return}if(!B(g))return;const s=g;if(s?.type==="snapshot"){if(e.reset(),c.current=[],s.data)try{e.write(s.data)}catch{}f()}else s?.type==="data"&&s.data&&(c.current.push(String(s.data)),F())},()=>{clearTimeout(j),p.disconnect(),document.removeEventListener("visibilitychange",y);try{d.close()}catch{}a.current!==null&&cancelAnimationFrame(a.current),a.current=null,c.current=[],e.dispose()}},[n,u,l]),m.jsxs("div",{className:`relative w-full ${i||""}`.trim(),children:[R&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50/60 z-10",children:m.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading preview…"})}),m.jsx("div",{ref:b,className:"border border-muted rounded overflow-hidden"})]})}export{N as T};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-B81KYk3Z.js";/**
1
+ import{c as e}from"./index-SUQrIHd7.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as i,ag as v,A as f}from"./index-B81KYk3Z.js";function j(){const[y,p]=i.useState([]),[m,c]=i.useState(!1),[d,o]=i.useState(null),{refresh:w}=v(),S=i.useCallback(async(s,n)=>{try{c(!0),o(null);const e=await fetch(`${f}/api/v1/terminal/${s}/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({startupCommand:n})});if(!e.ok){const t=await e.json();throw new Error(t.error||"Failed to create terminal session")}const r=await e.json();return await w(),r.sessionId}catch(e){const r=e instanceof Error?e.message:"Unknown error";return o(r),null}finally{c(!1)}},[w]),g=i.useCallback(async s=>{try{c(!0),o(null);let n;if(s.startsWith("session-")){const r=s.split("-");n=`${r[0]}-${r[1]}`}else{const r=s.split("-");n=`${r[0]}-${r[1]}`}const e=await fetch(`${f}/api/v1/terminal/${n}/destroy`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:s})});if(!e.ok){const r=await e.json();throw new Error(r.error||"Failed to destroy terminal session")}return p(r=>r.filter(t=>t.id!==s)),await w(),!0}catch(n){const e=n instanceof Error?n.message:"Unknown error";return o(e),!1}finally{c(!1)}},[w]),$=i.useCallback(async(s,n,e)=>{try{o(null);let r;if(s.startsWith("session-")){const a=s.split("-");r=`${a[0]}-${a[1]}`}else{const a=s.split("-");r=`${a[0]}-${a[1]}`}const t=await fetch(`${f}/api/v1/terminal/${r}/resize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:s,cols:n,rows:e})});if(!t.ok){const a=await t.json();throw new Error(a.error||"Failed to resize terminal session")}return!0}catch(r){const t=r instanceof Error?r.message:"Unknown error";return o(t),!1}},[]),k=i.useCallback(async(s,n,e)=>{try{c(!0),o(null);const r=new URLSearchParams;s&&r.set("taskId",s),n&&(r.set("withPreview","true"),e&&Number.isFinite(e)&&r.set("lines",String(e)));const t=`${f}/api/v1/terminal/sessions${r.toString()?`?${r.toString()}`:""}`,a=await fetch(t);if(!a.ok){const l=await a.json();throw new Error(l.error||"Failed to fetch terminal sessions")}const u=await a.json();p(u.sessions)}catch(r){const t=r instanceof Error?r.message:"Unknown error";o(t)}finally{c(!1)}},[]),E=i.useCallback(async(s,n=8)=>{try{o(null);const e=new URLSearchParams;e.set("sessionId",s),e.set("withPreview","true"),e.set("lines",String(n)),e.set("colorize","true");const r=`${f}/api/v1/terminal/sessions?${e.toString()}`,t=await fetch(r);if(!t.ok){const l=await t.json().catch(()=>({}));throw new Error(l.error||"Failed to fetch preview")}const a=await t.json(),u=Array.isArray(a?.sessions)&&a.sessions[0]?.preview?a.sessions[0].preview:[];return p(l=>l.map(h=>h.id===s?{...h,preview:u}:h)),u}catch(e){const r=e instanceof Error?e.message:"Unknown error";return o(r),[]}},[]);return{sessions:y,loading:m,error:d,createSession:S,destroySession:g,resizeSession:$,refreshSessions:k,fetchPreview:E}}export{j as u};
1
+ import{r as i,ag as v,A as f}from"./index-SUQrIHd7.js";function j(){const[y,p]=i.useState([]),[m,c]=i.useState(!1),[d,o]=i.useState(null),{refresh:w}=v(),S=i.useCallback(async(s,n)=>{try{c(!0),o(null);const e=await fetch(`${f}/api/v1/terminal/${s}/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({startupCommand:n})});if(!e.ok){const t=await e.json();throw new Error(t.error||"Failed to create terminal session")}const r=await e.json();return await w(),r.sessionId}catch(e){const r=e instanceof Error?e.message:"Unknown error";return o(r),null}finally{c(!1)}},[w]),g=i.useCallback(async s=>{try{c(!0),o(null);let n;if(s.startsWith("session-")){const r=s.split("-");n=`${r[0]}-${r[1]}`}else{const r=s.split("-");n=`${r[0]}-${r[1]}`}const e=await fetch(`${f}/api/v1/terminal/${n}/destroy`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:s})});if(!e.ok){const r=await e.json();throw new Error(r.error||"Failed to destroy terminal session")}return p(r=>r.filter(t=>t.id!==s)),await w(),!0}catch(n){const e=n instanceof Error?n.message:"Unknown error";return o(e),!1}finally{c(!1)}},[w]),$=i.useCallback(async(s,n,e)=>{try{o(null);let r;if(s.startsWith("session-")){const a=s.split("-");r=`${a[0]}-${a[1]}`}else{const a=s.split("-");r=`${a[0]}-${a[1]}`}const t=await fetch(`${f}/api/v1/terminal/${r}/resize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:s,cols:n,rows:e})});if(!t.ok){const a=await t.json();throw new Error(a.error||"Failed to resize terminal session")}return!0}catch(r){const t=r instanceof Error?r.message:"Unknown error";return o(t),!1}},[]),k=i.useCallback(async(s,n,e)=>{try{c(!0),o(null);const r=new URLSearchParams;s&&r.set("taskId",s),n&&(r.set("withPreview","true"),e&&Number.isFinite(e)&&r.set("lines",String(e)));const t=`${f}/api/v1/terminal/sessions${r.toString()?`?${r.toString()}`:""}`,a=await fetch(t);if(!a.ok){const l=await a.json();throw new Error(l.error||"Failed to fetch terminal sessions")}const u=await a.json();p(u.sessions)}catch(r){const t=r instanceof Error?r.message:"Unknown error";o(t)}finally{c(!1)}},[]),E=i.useCallback(async(s,n=8)=>{try{o(null);const e=new URLSearchParams;e.set("sessionId",s),e.set("withPreview","true"),e.set("lines",String(n)),e.set("colorize","true");const r=`${f}/api/v1/terminal/sessions?${e.toString()}`,t=await fetch(r);if(!t.ok){const l=await t.json().catch(()=>({}));throw new Error(l.error||"Failed to fetch preview")}const a=await t.json(),u=Array.isArray(a?.sessions)&&a.sessions[0]?.preview?a.sessions[0].preview:[];return p(l=>l.map(h=>h.id===s?{...h,preview:u}:h)),u}catch(e){const r=e instanceof Error?e.message:"Unknown error";return o(r),[]}},[]);return{sessions:y,loading:m,error:d,createSession:S,destroySession:g,resizeSession:$,refreshSessions:k,fetchPreview:E}}export{j as u};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-B81KYk3Z.js";/**
1
+ import{c as e}from"./index-SUQrIHd7.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
package/static/index.html CHANGED
@@ -8,7 +8,7 @@
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
9
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
10
10
  <title>Coconut - Agentic Development Environment</title>
11
- <script type="module" crossorigin src="/assets/index-B81KYk3Z.js"></script>
11
+ <script type="module" crossorigin src="/assets/index-SUQrIHd7.js"></script>
12
12
  <link rel="stylesheet" crossorigin href="/assets/index-DVMcu9sQ.css">
13
13
  </head>
14
14
  <body class="font-inter">