neural-loom 0.2.40 → 0.2.41

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 (122) hide show
  1. package/.next/build-manifest.json +3 -3
  2. package/.next/cache/.previewinfo +1 -1
  3. package/.next/cache/.rscinfo +1 -1
  4. package/.next/cache/.tsbuildinfo +1 -1
  5. package/.next/diagnostics/build-diagnostics.json +1 -1
  6. package/.next/fallback-build-manifest.json +3 -3
  7. package/.next/server/app/api/context/aider/route.js.nft.json +1 -1
  8. package/.next/server/app/api/context/claude/route.js.nft.json +1 -1
  9. package/.next/server/app/api/context/ssh/route.js.nft.json +1 -1
  10. package/.next/server/app/api/recents/route.js.nft.json +1 -1
  11. package/.next/server/app/api/sessions/inject/route.js +1 -1
  12. package/.next/server/app/api/sessions/inject/route.js.nft.json +1 -1
  13. package/.next/server/app/api/sessions/input/route.js +1 -1
  14. package/.next/server/app/api/sessions/input/route.js.nft.json +1 -1
  15. package/.next/server/app/api/sessions/launch/route.js +1 -1
  16. package/.next/server/app/api/sessions/launch/route.js.nft.json +1 -1
  17. package/.next/server/app/api/sessions/route.js +1 -1
  18. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  19. package/.next/server/app/api/sessions/scope/route.js +1 -1
  20. package/.next/server/app/api/sessions/scope/route.js.nft.json +1 -1
  21. package/.next/server/app/api/sessions/start/route.js +1 -1
  22. package/.next/server/app/api/sessions/start/route.js.nft.json +1 -1
  23. package/.next/server/app/api/sessions/stats/route.js +1 -1
  24. package/.next/server/app/api/sessions/stats/route.js.nft.json +1 -1
  25. package/.next/server/app/api/sessions/stop/route.js +1 -1
  26. package/.next/server/app/api/sessions/stop/route.js.nft.json +1 -1
  27. package/.next/server/app/page/react-loadable-manifest.json +3 -3
  28. package/.next/server/app/page_client-reference-manifest.js +1 -1
  29. package/.next/server/chunks/[root-of-the-server]__005xmeg._.js +15 -0
  30. package/.next/server/chunks/{[root-of-the-server]__0d9_-7g._.js.map → [root-of-the-server]__005xmeg._.js.map} +1 -1
  31. package/.next/server/chunks/[root-of-the-server]__0_~zjnf._.js +15 -0
  32. package/.next/server/chunks/{[root-of-the-server]__0fhv7.1._.js.map → [root-of-the-server]__0_~zjnf._.js.map} +1 -1
  33. package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js +8 -8
  34. package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js.map +1 -1
  35. package/.next/server/chunks/[root-of-the-server]__0hl8jxx._.js +15 -0
  36. package/.next/server/chunks/{[root-of-the-server]__0~zauvq._.js.map → [root-of-the-server]__0hl8jxx._.js.map} +1 -1
  37. package/.next/server/chunks/[root-of-the-server]__0ho7s6e._.js +15 -0
  38. package/.next/server/chunks/{[root-of-the-server]__0-vx6-s._.js.map → [root-of-the-server]__0ho7s6e._.js.map} +1 -1
  39. package/.next/server/chunks/[root-of-the-server]__0lh_jn-._.js +15 -0
  40. package/.next/server/chunks/{[root-of-the-server]__0xr~y1f._.js.map → [root-of-the-server]__0lh_jn-._.js.map} +1 -1
  41. package/.next/server/chunks/[root-of-the-server]__0mq3k0u._.js +15 -0
  42. package/.next/server/chunks/{[root-of-the-server]__0zkcq9q._.js.map → [root-of-the-server]__0mq3k0u._.js.map} +1 -1
  43. package/.next/server/chunks/[root-of-the-server]__0rr36fm._.js +15 -0
  44. package/.next/server/chunks/{[root-of-the-server]__0qqnqov._.js.map → [root-of-the-server]__0rr36fm._.js.map} +1 -1
  45. package/.next/server/chunks/[root-of-the-server]__0xcrc-1._.js +15 -0
  46. package/.next/server/chunks/{[root-of-the-server]__0t_~on0._.js.map → [root-of-the-server]__0xcrc-1._.js.map} +1 -1
  47. package/.next/server/chunks/ssr/[root-of-the-server]__0v73tbn._.js +1 -1
  48. package/.next/server/chunks/ssr/[root-of-the-server]__0v73tbn._.js.map +1 -1
  49. package/.next/server/chunks/ssr/_0t7oqy6._.js +1 -1
  50. package/.next/server/chunks/ssr/_0t7oqy6._.js.map +1 -1
  51. package/.next/server/middleware-build-manifest.js +3 -3
  52. package/.next/server/pages-manifest.json +1 -4
  53. package/.next/server/server-reference-manifest.js +1 -1
  54. package/.next/server/server-reference-manifest.json +1 -1
  55. package/.next/static/ZtSBLhTiGqKpNetcymWiC/_ssgManifest.js +1 -0
  56. package/.next/static/chunks/{0x__nd4avi0fg.js → 070hz362~_h8n.js} +1 -1
  57. package/.next/static/chunks/0bclk7hf35ac4.js +1 -0
  58. package/.next/static/chunks/17jifiroq0_q..js +1 -0
  59. package/package.json +1 -1
  60. package/src/app/components/IdeLayout.tsx +500 -25
  61. package/src/app/components/TerminalConsole.tsx +2 -2
  62. package/src/app/layout.tsx +0 -1
  63. package/src/app/page.tsx +12 -4
  64. package/src/lib/agents/AiderRunner.ts +8 -8
  65. package/src/lib/agents/ClaudeRunner.ts +43 -18
  66. package/src/lib/agents/DockerRunner.ts +1 -3
  67. package/src/lib/agents/SSHRunner.ts +1 -3
  68. package/src/lib/agents/ShellRunner.ts +1 -3
  69. package/src/lib/agents/WebSocketServer.ts +20 -13
  70. package/.next/BUILD_ID +0 -1
  71. package/.next/app-path-routes-manifest.json +0 -20
  72. package/.next/diagnostics/route-bundle-stats.json +0 -25
  73. package/.next/export-marker.json +0 -6
  74. package/.next/images-manifest.json +0 -68
  75. package/.next/prerender-manifest.json +0 -85
  76. package/.next/required-server-files.js +0 -335
  77. package/.next/required-server-files.json +0 -335
  78. package/.next/routes-manifest.json +0 -153
  79. package/.next/server/app/_global-error.html +0 -1
  80. package/.next/server/app/_global-error.meta +0 -15
  81. package/.next/server/app/_global-error.rsc +0 -14
  82. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +0 -5
  83. package/.next/server/app/_global-error.segments/_full.segment.rsc +0 -14
  84. package/.next/server/app/_global-error.segments/_head.segment.rsc +0 -5
  85. package/.next/server/app/_global-error.segments/_index.segment.rsc +0 -5
  86. package/.next/server/app/_global-error.segments/_tree.segment.rsc +0 -1
  87. package/.next/server/app/_not-found.html +0 -1
  88. package/.next/server/app/_not-found.meta +0 -16
  89. package/.next/server/app/_not-found.rsc +0 -16
  90. package/.next/server/app/_not-found.segments/_full.segment.rsc +0 -16
  91. package/.next/server/app/_not-found.segments/_head.segment.rsc +0 -6
  92. package/.next/server/app/_not-found.segments/_index.segment.rsc +0 -5
  93. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +0 -5
  94. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +0 -5
  95. package/.next/server/app/_not-found.segments/_tree.segment.rsc +0 -2
  96. package/.next/server/app/index.html +0 -1
  97. package/.next/server/app/index.meta +0 -14
  98. package/.next/server/app/index.rsc +0 -21
  99. package/.next/server/app/index.segments/__PAGE__.segment.rsc +0 -10
  100. package/.next/server/app/index.segments/_full.segment.rsc +0 -21
  101. package/.next/server/app/index.segments/_head.segment.rsc +0 -6
  102. package/.next/server/app/index.segments/_index.segment.rsc +0 -5
  103. package/.next/server/app/index.segments/_tree.segment.rsc +0 -5
  104. package/.next/server/chunks/[root-of-the-server]__0-vx6-s._.js +0 -15
  105. package/.next/server/chunks/[root-of-the-server]__0d9_-7g._.js +0 -15
  106. package/.next/server/chunks/[root-of-the-server]__0fhv7.1._.js +0 -15
  107. package/.next/server/chunks/[root-of-the-server]__0qqnqov._.js +0 -15
  108. package/.next/server/chunks/[root-of-the-server]__0t_~on0._.js +0 -15
  109. package/.next/server/chunks/[root-of-the-server]__0xr~y1f._.js +0 -15
  110. package/.next/server/chunks/[root-of-the-server]__0zkcq9q._.js +0 -15
  111. package/.next/server/chunks/[root-of-the-server]__0~zauvq._.js +0 -15
  112. package/.next/server/functions-config-manifest.json +0 -4
  113. package/.next/server/pages/404.html +0 -1
  114. package/.next/server/pages/500.html +0 -1
  115. package/.next/server/prefetch-hints.json +0 -1
  116. package/.next/static/5uGIuH8oXybqivkeHIrqb/_ssgManifest.js +0 -1
  117. package/.next/static/chunks/07-tub5vqy.fk.js +0 -1
  118. package/.next/static/chunks/0wq3_34inbzj6.js +0 -1
  119. package/.next/trace +0 -1
  120. package/.next/trace-build +0 -1
  121. /package/.next/static/{5uGIuH8oXybqivkeHIrqb → ZtSBLhTiGqKpNetcymWiC}/_buildManifest.js +0 -0
  122. /package/.next/static/{5uGIuH8oXybqivkeHIrqb → ZtSBLhTiGqKpNetcymWiC}/_clientMiddlewareManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67585,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let t=e.r(32061);function n({reason:e,children:a}){if("u"<typeof window)throw Object.defineProperty(new t.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return a}},9885,(e,a,s)=>{"use strict";function t(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"encodeURIPath",{enumerable:!0,get:function(){return t}})},52157,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return i}});let t=e.r(43476),n=e.r(74080),r=e.r(63599),l=e.r(9885),o=e.r(43369);function i({moduleIds:e}){if("u">typeof window)return null;let a=r.workAsyncStorage.getStore();if(void 0===a)return null;let s=[];if(a.reactLoadableManifest&&e){let t=a.reactLoadableManifest;for(let a of e){if(!t[a])continue;let e=t[a].files;s.push(...e)}}if(0===s.length)return null;let d=(0,o.getAssetTokenQuery)();return(0,t.jsx)(t.Fragment,{children:s.map(e=>{let s=`${a.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,t.jsx)("link",{precedence:"dynamic",href:s,rel:"stylesheet",as:"style",nonce:a.nonce},e):((0,n.preload)(s,{as:"script",fetchPriority:"low",nonce:a.nonce}),null)})})}},69093,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return d}});let t=e.r(43476),n=e.r(71645),r=e.r(67585),l=e.r(52157);function o(e){return{default:e&&"default"in e?e.default:e}}let i={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},d=function(e){let a={...i,...e},s=(0,n.lazy)(()=>a.loader().then(o)),d=a.loading;function c(e){let o=d?(0,t.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,i=!a.ssr||!!a.loading,c=i?n.Suspense:n.Fragment,u=a.ssr?(0,t.jsxs)(t.Fragment,{children:["u"<typeof window?(0,t.jsx)(l.PreloadChunks,{moduleIds:a.modules}):null,(0,t.jsx)(s,{...e})]}):(0,t.jsx)(r.BailoutToCSR,{reason:"next/dynamic",children:(0,t.jsx)(s,{...e})});return(0,t.jsx)(c,{...i?{fallback:o}:{},children:u})}return c.displayName="LoadableComponent",c}},70703,(e,a,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return n}});let t=e.r(55682)._(e.r(69093));function n(e,a){let s={};"function"==typeof e&&(s.loader=e);let n={...s,...a};return(0,t.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),a.exports=s.default)},20897,e=>{e.v({activeBorder:"page-module___8aEwW__activeBorder",agentBadge:"page-module___8aEwW__agentBadge",agentCard:"page-module___8aEwW__agentCard",agentGrid:"page-module___8aEwW__agentGrid",agentHeader:"page-module___8aEwW__agentHeader",agentName:"page-module___8aEwW__agentName",ansiCyan:"page-module___8aEwW__ansiCyan",ansiGreen:"page-module___8aEwW__ansiGreen",ansiMagenta:"page-module___8aEwW__ansiMagenta",ansiRed:"page-module___8aEwW__ansiRed",ansiYellow:"page-module___8aEwW__ansiYellow",cardBody:"page-module___8aEwW__cardBody",container:"page-module___8aEwW__container",containerActive:"page-module___8aEwW__containerActive",contextDetails:"page-module___8aEwW__contextDetails",contextItem:"page-module___8aEwW__contextItem",contextList:"page-module___8aEwW__contextList",contextMeta:"page-module___8aEwW__contextMeta",contextTitle:"page-module___8aEwW__contextTitle",dashboardGrid:"page-module___8aEwW__dashboardGrid",envGrid:"page-module___8aEwW__envGrid",envName:"page-module___8aEwW__envName",envRow:"page-module___8aEwW__envRow",envStatus:"page-module___8aEwW__envStatus",footer:"page-module___8aEwW__footer",header:"page-module___8aEwW__header",logoArea:"page-module___8aEwW__logoArea",mainPanel:"page-module___8aEwW__mainPanel",pulse:"page-module___8aEwW__pulse",pulseDot:"page-module___8aEwW__pulseDot",quickLaunchBtn:"page-module___8aEwW__quickLaunchBtn",sectionTitle:"page-module___8aEwW__sectionTitle",sidePanel:"page-module___8aEwW__sidePanel",statusIndicator:"page-module___8aEwW__statusIndicator",stoppedBadge:"page-module___8aEwW__stoppedBadge",subtitle:"page-module___8aEwW__subtitle",terminalContainer:"page-module___8aEwW__terminalContainer",terminalInput:"page-module___8aEwW__terminalInput",terminalInputArea:"page-module___8aEwW__terminalInputArea",terminalLine:"page-module___8aEwW__terminalLine",terminalSendBtn:"page-module___8aEwW__terminalSendBtn",title:"page-module___8aEwW__title"})},52683,e=>{"use strict";var a=e.i(43476),s=e.i(71645),t=e.i(70703),n=e.i(20897);let r=(0,t.default)(()=>e.A(33779),{loadableGenerated:{modules:[37314]},ssr:!1,loading:()=>(0,a.jsx)("div",{style:{height:"400px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#05070a",color:"var(--muted)",border:"1px solid var(--border)",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"},children:(0,a.jsx)("span",{children:"Initializing terminal emulator..."})})}),l=(0,t.default)(()=>e.A(39429),{loadableGenerated:{modules:[1985]},ssr:!1,loading:()=>(0,a.jsx)("div",{style:{height:"280px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--card)",border:"1px solid var(--border)",borderRadius:"12px",marginTop:"1.5rem"},children:(0,a.jsx)("span",{style:{color:"var(--muted)"},children:"Initializing prompt editor..."})})}),o=(0,t.default)(()=>e.A(56915),{loadableGenerated:{modules:[99026]},ssr:!1}),i=(0,t.default)(()=>e.A(78716),{loadableGenerated:{modules:[9949]},ssr:!1}),d=(0,t.default)(()=>e.A(33789),{loadableGenerated:{modules:[20032]},ssr:!1}),c=(0,t.default)(()=>e.A(78003),{loadableGenerated:{modules:[97722]},ssr:!1});e.s(["default",0,function(){let[e,t]=(0,s.useState)([]),[u,p]=(0,s.useState)(null),[m,h]=(0,s.useState)(!1),[f,_]=(0,s.useState)(!1),[g,x]=(0,s.useState)(!1),[j,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(!1),[k,w]=(0,s.useState)(!1),[C,S]=(0,s.useState)(""),[N,W]=(0,s.useState)(3001),[P,E]=(0,s.useState)("0.2.19"),[T,L]=(0,s.useState)(null),R=e.filter(e=>"workspace-terminal"!==e.id),A=e.find(e=>e.id===u),D=R.some(e=>("claude-docker"===e.type||"aider-docker"===e.type)&&"running"===e.status),B=R.some(e=>"claude-ssh"===e.type&&"running"===e.status),I=async()=>{try{let e=await fetch("/api/sessions"),a=await e.json();a.sessions&&t(a.sessions),a.wsPort&&W(a.wsPort),a.originalCwd&&S(a.originalCwd),a.version&&E(a.version)}catch(e){console.error("Failed to fetch sessions:",e)}},O=async()=>{try{let e=await fetch("/api/recents");if(e.ok){let a=await e.json();a.success&&a.recents&&a.recents.lastSession&&L(a.recents.lastSession)}}catch(e){console.error("Failed to fetch recents:",e)}};(0,s.useEffect)(()=>{(async()=>{await I(),await O()})(),"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(e=>console.log("Service Worker registered:",e.scope)).catch(e=>console.error("Service Worker registration failed:",e));let e=setInterval(I,4e3);return()=>clearInterval(e)},[]);let z=async(e,a,s,t)=>{h(!0);try{let n=a;n||("claude"===e?n="Claude Local":"claude-docker"===e?n="Claude Docker":"claude-ssh"===e?n="Claude SSH":"aider"===e?n="Aider Local":"aider-docker"===e?n="Aider Docker":"mock"===e&&(n="Mock Session"));let r={type:e,name:n,workspaceRoot:s,scopedDirs:t};if(("aider"===e||"aider-docker"===e)&&!s)try{let e=await fetch("/api/context/aider");if(e.ok){let a=await e.json();a.success&&a.config&&(r.workspaceRoot=a.config.workspaceRoot,r.scopedDirs=a.config.scopedDirs)}}catch(e){console.error("Failed to load aider configuration before launch:",e)}let l=await fetch("/api/sessions/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),o=await l.json();o.success&&(await I(),p(o.session.id),L({type:e,name:n,workspaceRoot:s,scopedDirs:t}))}catch(e){console.error("Failed to launch session:",e)}finally{h(!1)}},M=async(e,a=!1)=>{try{let s=await fetch("/api/sessions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,delete:a})});(await s.json()).success&&(a&&u===e&&p(null),await I())}catch(e){console.error("Failed to stop session:",e)}};return(0,a.jsxs)("div",{className:`${n.default.container} ${A?n.default.containerActive:""}`,children:[(0,a.jsxs)("header",{className:n.default.header,children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1.5rem"},children:[(0,a.jsx)("img",{src:"/logo.png",alt:"NeuralLoom Logo",style:{width:"160px",height:"160px",borderRadius:"16px",objectFit:"contain"}}),(0,a.jsxs)("div",{className:n.default.logoArea,children:[(0,a.jsx)("h1",{className:n.default.title,style:{margin:0,lineHeight:1.1},children:"NeuralLoom"}),(0,a.jsx)("span",{className:n.default.subtitle,children:"Unified AI Orchestrator & Context Bridge"})]})]}),(0,a.jsxs)("div",{className:n.default.statusIndicator,children:[(0,a.jsx)("span",{className:n.default.pulseDot}),(0,a.jsx)("span",{children:"Orchestrator Online"})]})]}),A?(0,a.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:(0,a.jsx)(c,{sessionId:A.id,workspaceRoot:A.workspaceRoot||"",scopedDirs:A.scopedDirs||[],onClose:()=>p(null),sessions:e,onSwitchSession:e=>p(e),onRefreshSessions:I,wsPort:N})}):(0,a.jsxs)("div",{className:n.default.dashboardGrid,children:[(0,a.jsxs)("main",{className:n.default.mainPanel,children:[(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Active AI Agents"}),0===R.length?(0,a.jsxs)("div",{className:"card",style:{padding:"3rem 1.5rem",textAlign:"center"},children:[(0,a.jsx)("p",{style:{color:"var(--muted)",marginBottom:"1.5rem"},children:"No active agent sessions in this workspace. Launch a Claude or Aider agent session to begin."}),(0,a.jsxs)("div",{style:{display:"flex",gap:"1rem",justifyContent:"center",flexWrap:"wrap"},children:[T&&(0,a.jsx)("button",{className:n.default.quickLaunchBtn,onClick:()=>{z(T.type,T.name,T.workspaceRoot,T.scopedDirs)},disabled:m,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none",maxWidth:"200px"},title:`Re-launch: ${T.name||T.type}`,children:"⚡ Re-launch Last Session"}),(0,a.jsx)("button",{className:n.default.quickLaunchBtn,onClick:()=>{w(!1),v(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none",maxWidth:"200px"},children:"Launch Claude PTY"}),(0,a.jsx)("button",{className:n.default.quickLaunchBtn,onClick:()=>{y(!1),x(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",maxWidth:"200px"},children:"Launch Aider PTY"})]}),(0,a.jsxs)("div",{style:{marginTop:"1.5rem",fontSize:"0.75rem",color:"var(--muted)"},children:["Want to verify layout features first?"," ",(0,a.jsx)("span",{onClick:()=>z("mock"),style:{color:"var(--primary)",cursor:"pointer",textDecoration:"underline"},children:"Start simulated sandbox session"})]})]}):(0,a.jsx)("div",{className:n.default.agentGrid,children:R.map(e=>(0,a.jsxs)("div",{className:`${n.default.agentCard} card ${u===e.id?n.default.activeBorder:""}`,children:[(0,a.jsxs)("div",{className:n.default.agentHeader,children:[(0,a.jsx)("span",{className:n.default.agentName,children:e.name}),(0,a.jsx)("span",{className:`${n.default.agentBadge} ${"stopped"===e.status?n.default.stoppedBadge:""}`,children:e.status})]}),(0,a.jsxs)("div",{className:n.default.cardBody,children:[(0,a.jsxs)("p",{style:{fontSize:"0.825rem",color:"var(--muted)"},children:["ID: ",(0,a.jsx)("code",{style:{fontSize:"0.75rem"},children:e.id.substring(0,8)}),(0,a.jsx)("br",{}),"Type: ","claude"===e.type?"Claude Local PTY":"claude-docker"===e.type?"Claude Docker PTY":"claude-ssh"===e.type?"Claude SSH PTY":"aider"===e.type?"Aider Local PTY":"aider-docker"===e.type?"Aider Docker PTY":"mock"===e.type?"Simulated Mock PTY":"Unknown PTY",(0,a.jsx)("br",{}),"Logs: ",e.logsCount," captured lines"]}),(0,a.jsxs)("div",{style:{display:"flex",gap:"0.5rem",marginTop:"1rem"},children:["running"===e.status?(0,a.jsx)("button",{onClick:()=>M(e.id,!1),style:{flex:1,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"transparent",fontSize:"0.75rem",fontWeight:600,color:"var(--danger)"},children:"Stop"}):(0,a.jsx)("button",{onClick:()=>M(e.id,!0),style:{flex:1,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",fontSize:"0.75rem",fontWeight:600,color:"var(--muted)"},children:"Delete"}),(0,a.jsx)("button",{onClick:()=>p(e.id),style:{flex:2,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"none",backgroundColor:u===e.id?"var(--border-focus)":"var(--primary)",fontSize:"0.75rem",fontWeight:600,color:"#fff"},children:u===e.id?"Connected":"Open Session"})]})]})]},e.id))})]}),u&&"workspace-terminal"!==u&&(0,a.jsxs)("section",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border-focus)"},children:[(0,a.jsxs)("div",{className:n.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(109, 40, 217, 0.08)"},children:[(0,a.jsxs)("span",{style:{fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:["🖥️ Console Bridge — ",e.find(e=>e.id===u)?.name]}),(0,a.jsxs)("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center"},children:[e.find(e=>e.id===u)?.status==="stopped"&&(0,a.jsx)("button",{onClick:async()=>{try{let e=await fetch("/api/sessions/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u})});if(e.ok)await I();else{let a=await e.json();alert(a.error||"Failed to restart session.")}}catch(e){console.error("Failed to restart session:",e),alert("Network error: failed to restart session.")}},style:{padding:"0.2rem 0.5rem",borderRadius:"4px",border:"1px solid #eab308",backgroundColor:"rgba(234, 179, 8, 0.15)",color:"#eab308",fontSize:"0.7rem",fontWeight:600,cursor:"pointer",boxShadow:"0 0 8px rgba(234, 179, 8, 0.2)"},title:"Restart the stopped session process runner",children:"⚡ Restart Session"}),(0,a.jsx)("button",{onClick:()=>p(null),style:{border:"none",background:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.75rem"},children:"Close Panel ✖"})]})]}),(0,a.jsx)(r,{sessionId:u,wsPort:N})]}),(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Workspace Shell Terminal"}),(0,a.jsxs)("div",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border)",padding:0},children:[(0,a.jsxs)("div",{className:n.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(255, 255, 255, 0.02)"},children:[(0,a.jsxs)("span",{style:{fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem",fontSize:"0.85rem"},children:["💻 Local Workspace Shell (CWD: ",C||"root",")"]}),(0,a.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)"},children:"Pre-configured environment"})]}),(0,a.jsx)(r,{sessionId:"workspace-terminal",height:"300px",wsPort:N})]})]}),(0,a.jsxs)("section",{style:{marginTop:"2rem"},children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Shared Context Hub & Slash Commands"}),(0,a.jsxs)("div",{className:n.default.contextList,children:[(0,a.jsxs)("div",{className:`${n.default.contextItem} card`,children:[(0,a.jsxs)("div",{className:n.default.contextMeta,children:[(0,a.jsx)("span",{className:n.default.contextTitle,children:"Staged Context & System Rules (/ccc)"}),(0,a.jsx)("span",{className:n.default.contextDetails,children:"Compiles AGENTS.md guidelines and project files folder hierarchy map."})]}),(0,a.jsx)("button",{onClick:async()=>{u&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,command:"/ccc"})})},disabled:!u,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.75rem",fontWeight:600,opacity:u?1:.5,cursor:u?"pointer":"not-allowed"},children:"🚀 Mount Context (/ccc)"})]}),(0,a.jsxs)("div",{className:`${n.default.contextItem} card`,children:[(0,a.jsxs)("div",{className:n.default.contextMeta,children:[(0,a.jsx)("span",{className:n.default.contextTitle,children:"Staged Developer Prompt (/ccp)"}),(0,a.jsx)("span",{className:n.default.contextDetails,children:"Executes instructions written in .ai/neural-loom/cprompt.md."})]}),(0,a.jsx)("button",{onClick:async()=>{u&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:u,command:"/ccp"})})},disabled:!u,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--success)",backgroundColor:"transparent",color:"var(--success)",fontSize:"0.75rem",fontWeight:600,opacity:u?1:.5,cursor:u?"pointer":"not-allowed"},children:"⚡ Trigger Prompt (/ccp)"})]})]}),(0,a.jsx)(l,{})]})]}),(0,a.jsxs)("aside",{className:n.default.sidePanel,children:[(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:n.default.sectionTitle,children:"Execution Environments"}),(0,a.jsxs)("div",{className:n.default.envGrid,children:[(0,a.jsxs)("div",{className:n.default.envRow,children:[(0,a.jsx)("span",{className:n.default.envName,children:"💻 Local host OS"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:"var(--success)"},children:"Active"})]}),(0,a.jsxs)("div",{className:n.default.envRow,style:{opacity:D?1:.6},children:[(0,a.jsx)("span",{className:n.default.envName,children:"🐳 Docker Sandbox"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:D?"var(--success)":"var(--muted)"},children:D?"Active":"Not Mounted"})]}),(0,a.jsxs)("div",{className:n.default.envRow,style:{opacity:B?1:.6},children:[(0,a.jsx)("span",{className:n.default.envName,children:"🌐 Remote VM (SSH)"}),(0,a.jsx)("span",{className:n.default.envStatus,style:{color:B?"var(--success)":"var(--muted)"},children:B?"Active":"Disconnected"})]})]})]}),(0,a.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{w(!1),v(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🤖"}),(0,a.jsx)("span",{children:"Launch Claude PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{w(!0),v(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(170, 72%, 40%) 0%, hsl(195, 100%, 40%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐳"}),(0,a.jsx)("span",{children:"Launch Docker PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>_(!0),disabled:m,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🌐"}),(0,a.jsx)("span",{children:"Launch SSH PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{y(!1),x(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐍"}),(0,a.jsx)("span",{children:"Launch Aider PTY"})]}),(0,a.jsxs)("button",{className:n.default.quickLaunchBtn,onClick:()=>{y(!0),x(!0)},disabled:m,style:{background:"linear-gradient(135deg, hsl(195, 100%, 40%) 0%, hsl(262, 80%, 55%) 100%)",border:"none"},children:[(0,a.jsx)("span",{children:"🐳"}),(0,a.jsx)("span",{children:"Launch Aider Docker"})]})]}),(0,a.jsxs)("section",{className:"card",style:{padding:"1.5rem",display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,a.jsx)("h3",{style:{fontSize:"1rem",fontWeight:700},children:"Quick Actions"}),(0,a.jsxs)("ul",{style:{listStyle:"none",fontSize:"0.875rem",display:"flex",flexDirection:"column",gap:"0.5rem",color:"var(--muted)"},children:[(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Configure global API Keys"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Edit rules templates"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,a.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,a.jsx)("span",{children:"Inspect process locks"}),(0,a.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]})]}),(0,a.jsxs)("div",{style:{marginTop:"1.2rem",textAlign:"center",fontSize:"0.72rem",color:"var(--muted)"},children:["Need to troubleshoot?"," ",(0,a.jsx)("span",{onClick:()=>z("mock"),style:{color:"var(--primary)",cursor:"pointer",textDecoration:"underline"},children:"Launch simulated playground sandbox"})]})]})]})]}),(0,a.jsxs)("footer",{className:n.default.footer,children:[(0,a.jsxs)("span",{children:["NeuralLoom v",P," — Experimental AI Orchestrator Bridge"]}),(0,a.jsxs)("span",{children:["Directory: ",C||"Loading..."]})]}),f&&(0,a.jsx)(o,{onClose:()=>_(!1),onConfirmLaunch:()=>{_(!1),z("claude-ssh")}}),g&&(0,a.jsx)(i,{onClose:()=>x(!1),isDocker:j,onConfirmLaunch:()=>{x(!1),z(j?"aider-docker":"aider")}}),b&&(0,a.jsx)(d,{onClose:()=>v(!1),isDocker:k,onConfirmLaunch:(e,a,s)=>{v(!1),z(k?"claude-docker":"claude",e,a,s)}})]})}])},33779,e=>{e.v(a=>Promise.all(["static/chunks/03g6xpslyid3~.js","static/chunks/0x__nd4avi0fg.js","static/chunks/0ga14ztvrhau2.css"].map(a=>e.l(a))).then(()=>a(37314)))},39429,e=>{e.v(a=>Promise.all(["static/chunks/16w4~t4h7gk13.js"].map(a=>e.l(a))).then(()=>a(1985)))},56915,e=>{e.v(a=>Promise.all(["static/chunks/0lnobx4eh3~-_.js"].map(a=>e.l(a))).then(()=>a(99026)))},78716,e=>{e.v(a=>Promise.all(["static/chunks/0kkoif8x_kxrq.js"].map(a=>e.l(a))).then(()=>a(9949)))},33789,e=>{e.v(a=>Promise.all(["static/chunks/0b89ti7ob.09t.js"].map(a=>e.l(a))).then(()=>a(20032)))},78003,e=>{e.v(a=>Promise.all(["static/chunks/0eidfx-s54367.js","static/chunks/0x__nd4avi0fg.js","static/chunks/0wq3_34inbzj6.js","static/chunks/0ga14ztvrhau2.css"].map(a=>e.l(a))).then(()=>a(97722)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3839,e=>{"use strict";var t=e.i(43476),r=e.i(71645),o=e.i(5991),n=e.i(54370);function i({content:e}){let o=(0,r.useMemo)(()=>{if(!e)return[];let t=e.split("\n"),r=[],o=null;for(let e=0;e<t.length;e++){let n=t[e];if(o&&"code"===o.type){n.trim().startsWith("```")?(r.push(o),o=null):o.content.push(n);continue}if(o&&"table"===o.type)if(n.trim().startsWith("|")){o.content.push(n);continue}else r.push(o),o=null;let i=n.trim();if(i.startsWith("```")){o&&r.push(o),o={type:"code",language:i.substring(3).trim(),content:[]};continue}if(/^(\s*[-*_]\s*){3,}$/.test(i)){o&&r.push(o),r.push({type:"hr"}),o=null;continue}let l=n.match(/^(#{1,6})\s+(.*)$/);if(l){o&&r.push(o),r.push({type:"h",level:l[1].length,content:l[2]}),o=null;continue}let a=n.match(/^>\s*(.*)$/);if(a){if(o)if("blockquote"===o.type){o.content.push(a[1]);continue}else r.push(o);o={type:"blockquote",content:[a[1]]};continue}let s=n.match(/^([-*+])\s+(.*)$/);if(s){if(o)if("ul"===o.type){o.content.push(s[2]);continue}else r.push(o);o={type:"ul",content:[s[2]]};continue}let d=n.match(/^(\d+)\.\s+(.*)$/);if(d){if(o)if("ol"===o.type){o.content.push(d[2]);continue}else r.push(o);o={type:"ol",content:[d[2]]};continue}if(i.startsWith("|")){o&&r.push(o),o={type:"table",content:[n]};continue}if(""===i){o&&(r.push(o),o=null);continue}o?"p"===o.type?o.content=o.content+" "+i:(r.push(o),o={type:"p",content:i}):o={type:"p",content:i}}return o&&r.push(o),r},[e]),n=0;function T(e){return function e(r){if(!r)return[];let o=r.match(/`(.*?)`/),i=r.match(/\*\*(.*?)\*\*/),l=r.match(/\*(.*?)\*/),a=r.match(/\[(.*?)\]\((.*?)\)/),s=[o?{index:o.index,type:"code",match:o}:null,i?{index:i.index,type:"bold",match:i}:null,l?{index:l.index,type:"italic",match:l}:null,a?{index:a.index,type:"link",match:a}:null].filter(Boolean);if(0===s.length)return[r];s.sort((e,t)=>e.index-t.index);let d=s[0],c=r.substring(0,d.index),p=d.match[0],u=r.substring(d.index+p.length),m=[];c&&m.push(c);let h=`inline-${d.type}-${n++}`;return"code"===d.type?m.push((0,t.jsx)("code",{style:x,children:d.match[1]},h)):"bold"===d.type?m.push((0,t.jsx)("strong",{style:{fontWeight:700,color:"var(--foreground)"},children:e(d.match[1])},h)):"italic"===d.type?m.push((0,t.jsx)("em",{style:{fontStyle:"italic"},children:e(d.match[1])},h)):"link"===d.type&&m.push((0,t.jsx)("a",{href:d.match[2],target:"_blank",rel:"noopener noreferrer",style:y,children:e(d.match[1])},h)),[...m,...e(u)]}(e)}return(0,t.jsx)("div",{style:a,children:o.map((e,r)=>{let o=`block-${e.type}-${r}`;switch(e.type){case"h":{let r=T(e.content);switch(e.level){case 1:return(0,t.jsx)("h1",{style:d,children:r},o);case 2:return(0,t.jsx)("h2",{style:c,children:r},o);case 3:return(0,t.jsx)("h3",{style:p,children:r},o);default:return(0,t.jsx)("h4",{style:u,children:r},o)}}case"code":{let r=e.content.join("\n");return(0,t.jsx)(l,{code:r,language:e.language||""},o)}case"blockquote":return(0,t.jsx)("blockquote",{style:k,children:e.content&&e.content.map((e,r)=>(0,t.jsx)("p",{style:{margin:"0.25rem 0"},children:T(e)},r))},o);case"ul":return(0,t.jsx)("ul",{style:m,children:e.content&&e.content.map((e,r)=>(0,t.jsxs)("li",{style:f,children:[(0,t.jsx)("span",{style:{marginRight:"0.5rem",color:"var(--accent)"},children:"•"}),(0,t.jsx)("div",{style:{flex:1},children:T(e)})]},r))},o);case"ol":return(0,t.jsx)("ol",{style:h,children:e.content&&e.content.map((e,r)=>(0,t.jsxs)("li",{style:f,children:[(0,t.jsxs)("span",{style:{marginRight:"0.5rem",color:"var(--accent)",fontWeight:600},children:[r+1,"."]}),(0,t.jsx)("div",{style:{flex:1},children:T(e)})]},r))},o);case"table":return function(e,r){let o=e.map(e=>e.split("|").map(e=>e.trim()).filter((e,t,r)=>t>0&&t<r.length-1));if(0===o.length)return null;let n=o[0],i=o.slice(1).filter(e=>!e.every(e=>e.startsWith("-")||""===e));return(0,t.jsx)("div",{style:b,children:(0,t.jsxs)("table",{style:v,children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{children:n.map((e,r)=>(0,t.jsx)("th",{style:j,children:T(e)},r))})}),(0,t.jsx)("tbody",{children:i.map((e,r)=>(0,t.jsx)("tr",{style:r%2==0?w:S,children:e.map((e,r)=>(0,t.jsx)("td",{style:C,children:T(e)},r))},r))})]})},r)}(e.content,o);case"hr":return(0,t.jsx)("hr",{style:g},o);case"p":return(0,t.jsx)("p",{style:s,children:T(e.content)},o);default:return null}})})}function l({code:e,language:o}){let[n,i]=(0,r.useState)(!1);return(0,t.jsxs)("div",{style:T,children:[(0,t.jsxs)("div",{style:z,children:[(0,t.jsx)("span",{children:o||"code"}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)},style:P,children:n?"Copied! ✓":"Copy"})]}),(0,t.jsx)("pre",{style:R,children:(0,t.jsx)("code",{children:e})})]})}let a={fontFamily:"var(--font-sans), sans-serif",color:"var(--foreground)",lineHeight:1.6,padding:"1.5rem",overflowY:"auto",height:"100%",backgroundColor:"#080c14",borderLeft:"1px solid var(--border)"},s={fontSize:"0.875rem",marginBottom:"1rem",color:"var(--foreground-muted, #94a3b8)"},d={fontSize:"1.5rem",fontWeight:700,margin:"1.5rem 0 1rem 0",paddingBottom:"0.3rem",borderBottom:"1px solid var(--border)",color:"var(--foreground)",background:"linear-gradient(135deg, #fff 0%, #a855f7 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},c={fontSize:"1.25rem",fontWeight:650,margin:"1.25rem 0 0.85rem 0",paddingBottom:"0.25rem",borderBottom:"1px solid var(--border)",color:"var(--foreground)"},p={fontSize:"1.05rem",fontWeight:600,margin:"1rem 0 0.75rem 0",color:"var(--foreground)"},u={fontSize:"0.925rem",fontWeight:600,margin:"0.85rem 0 0.5rem 0",color:"var(--foreground)"},m={listStyleType:"none",padding:0,margin:"0 0 1rem 0"},h={listStyleType:"none",padding:0,margin:"0 0 1rem 0"},f={display:"flex",alignItems:"flex-start",fontSize:"0.875rem",marginBottom:"0.375rem",color:"var(--foreground-muted, #94a3b8)"},g={border:"none",height:"1px",background:"linear-gradient(90deg, var(--border) 0%, rgba(255,255,255,0.05) 100%)",margin:"1.5rem 0"},x={fontFamily:"var(--font-mono), monospace",fontSize:"0.85em",backgroundColor:"rgba(255, 255, 255, 0.06)",border:"1px solid rgba(255, 255, 255, 0.08)",borderRadius:"4px",padding:"0.1rem 0.3rem",color:"#f87171"},y={color:"#60a5fa",textDecoration:"underline",fontWeight:500},b={width:"100%",overflowX:"auto",margin:"1rem 0",borderRadius:"8px",border:"1px solid var(--border)",backgroundColor:"rgba(255, 255, 255, 0.01)"},v={width:"100%",borderCollapse:"collapse",fontSize:"0.85rem"},j={backgroundColor:"rgba(255, 255, 255, 0.03)",borderBottom:"2px solid var(--border)",padding:"0.5rem 0.75rem",fontWeight:700,textAlign:"left",color:"var(--foreground)"},C={borderBottom:"1px solid var(--border)",padding:"0.5rem 0.75rem",color:"var(--foreground-muted, #94a3b8)"},w={backgroundColor:"rgba(255, 255, 255, 0.01)"},S={backgroundColor:"transparent"},k={borderLeft:"4px solid #a855f7",backgroundColor:"rgba(168, 85, 247, 0.03)",padding:"0.5rem 1rem",margin:"1rem 0",borderRadius:"4px",fontStyle:"italic",color:"var(--muted)"},T={margin:"1rem 0",borderRadius:"8px",border:"1px solid var(--border)",backgroundColor:"#05070a",overflow:"hidden"},z={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.35rem 0.75rem",backgroundColor:"rgba(255, 255, 255, 0.02)",borderBottom:"1px solid var(--border)",fontSize:"0.7rem",color:"var(--muted)",textTransform:"uppercase",fontFamily:"var(--font-mono), monospace"},R={margin:0,padding:"1rem",overflowX:"auto",fontSize:"0.8rem",fontFamily:"var(--font-mono), monospace",lineHeight:1.5,color:"#e2e8f0"},P={background:"none",border:"1px solid var(--border)",borderRadius:"4px",padding:"2px 6px",color:"var(--muted)",cursor:"pointer",fontSize:"0.65rem",transition:"all 0.1s ease"},I={display:"flex",width:"100%",height:"100%",flex:1,minHeight:0,backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"12px",overflow:"hidden",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.6)"},W={width:"50px",backgroundColor:"#030406",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",padding:"0.75rem 0"},O={display:"flex",flexDirection:"column",width:"100%",gap:"0.5rem"},F={width:"100%",height:"45px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"1.25rem",transition:"all 0.15s ease"},L={width:"300px",backgroundColor:"#080c14",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",overflow:"hidden"},D={padding:"0.75rem 1rem",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(255,255,255,0.02)"},E={flex:1,overflowY:"auto",padding:"0.75rem 0"},M={padding:"0.25rem 1rem",fontSize:"0.75rem",fontWeight:700,color:"var(--muted)",display:"flex",alignItems:"center",justifyContent:"space-between",textTransform:"uppercase",letterSpacing:"0.05em"},B={fontSize:"0.6rem",backgroundColor:"rgba(59, 130, 246, 0.1)",color:"#3b82f6",padding:"0.1rem 0.3rem",borderRadius:"3px",textTransform:"none",letterSpacing:"normal"},N={fontSize:"0.75rem",fontWeight:600,color:"var(--foreground)"},$={flex:1,display:"flex",flexDirection:"column",overflow:"hidden",backgroundColor:"#0b101b"},A={flex:1,display:"flex",flexDirection:"column",borderBottom:"1px solid var(--border)",overflow:"hidden"},U={height:"35px",backgroundColor:"#05070a",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",paddingRight:"0.75rem"},J={display:"flex",height:"100%",overflowX:"auto"},V={padding:"0 1rem",height:"100%",display:"flex",alignItems:"center",gap:"0.75rem",fontSize:"0.75rem",borderRight:"1px solid var(--border)",borderBottom:"2px solid transparent",cursor:"pointer",transition:"all 0.15s ease",maxWidth:"150px"},H={fontSize:"0.65rem",color:"var(--muted)",cursor:"pointer",padding:"2px"},K={color:"var(--primary)",fontSize:"0.65rem",marginLeft:"2px"},_={padding:"0.25rem 0.5rem",borderRadius:"4px",border:"1px solid var(--border-focus)",backgroundColor:"rgba(16, 185, 129, 0.15)",color:"var(--success)",fontSize:"0.7rem",fontWeight:600},Y={flex:1,position:"relative",overflow:"hidden"},G={width:"100%",height:"100%",backgroundColor:"#0b101b",border:"none",outline:"none",color:"#e2e8f0",fontFamily:"var(--font-mono), monospace",fontSize:"0.85rem",padding:"1rem",resize:"none",lineHeight:1.5},X={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",color:"var(--muted)",textAlign:"center",padding:"2rem"},q={flex:1.4,backgroundColor:"#05070a",display:"flex",flexDirection:"column",overflow:"hidden"},Q={padding:"0.5rem 1rem",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"rgba(255,255,255,0.01)"},Z={padding:"0.3rem 0.6rem",borderRadius:"4px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.7rem",fontWeight:600,cursor:"pointer"},ee={padding:"0.3rem 0.6rem",borderRadius:"4px",border:"1px solid var(--success)",backgroundColor:"transparent",color:"var(--success)",fontSize:"0.7rem",fontWeight:600,cursor:"pointer"},et={flex:1,overflow:"hidden"};function er({node:e,onSelect:o,onCreate:n,onRename:i,onDelete:l,isReadOnly:a=!1}){let[s,d]=(0,r.useState)(!1),[c,p]=(0,r.useState)(!1),u="directory"===e.type,m={padding:"0.25rem 0.5rem",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"0.8rem",fontFamily:"var(--font-mono), monospace",cursor:"pointer",color:"var(--foreground)",borderRadius:"4px",transition:"background 0.1s ease",userSelect:"none",backgroundColor:c?"rgba(255, 255, 255, 0.05)":"transparent",minWidth:0,width:"100%"},h={display:"flex",alignItems:"center",gap:"0.375rem",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},f={display:c?"flex":"none",alignItems:"center",gap:"0.25rem",paddingLeft:"0.5rem",flexShrink:0},g={background:"none",border:"none",padding:"2px 4px",cursor:"pointer",fontSize:"0.75rem",color:"var(--muted)",borderRadius:"3px",transition:"all 0.1s ease"},x=(e,t)=>{e.stopPropagation(),t()};return u?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{onClick:()=>d(!s),style:m,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[(0,t.jsxs)("div",{style:h,children:[(0,t.jsx)("span",{style:{color:"#eab308"},children:s?"📂":"📁"}),(0,t.jsx)("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})]}),!a&&(0,t.jsxs)("div",{style:f,children:[(0,t.jsx)("button",{onClick:t=>x(t,()=>n(e.path,"file")),style:g,title:"New File inside...",onMouseEnter:e=>e.currentTarget.style.color="var(--success)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"📄+"}),(0,t.jsx)("button",{onClick:t=>x(t,()=>n(e.path,"directory")),style:g,title:"New Folder inside...",onMouseEnter:e=>e.currentTarget.style.color="var(--success)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"📁+"}),(0,t.jsx)("button",{onClick:t=>x(t,()=>i(e.path)),style:g,title:"Rename...",onMouseEnter:e=>e.currentTarget.style.color="var(--primary)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"✏️"}),(0,t.jsx)("button",{onClick:t=>x(t,()=>l(e.path)),style:g,title:"Delete Folder",onMouseEnter:e=>e.currentTarget.style.color="var(--danger)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"🗑️"})]})]}),s&&e.children&&(0,t.jsx)("div",{style:{paddingLeft:"10px",borderLeft:"1px solid rgba(255, 255, 255, 0.05)",marginLeft:"8px"},children:e.children.map(e=>(0,t.jsx)(er,{node:e,onSelect:o,onCreate:n,onRename:i,onDelete:l,isReadOnly:a},e.path))})]}):(0,t.jsxs)("div",{onClick:()=>o(e.path),style:m,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[(0,t.jsxs)("div",{style:h,children:[(0,t.jsx)("span",{style:{color:"#3b82f6"},children:"📄"}),(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})]}),!a&&(0,t.jsxs)("div",{style:f,children:[(0,t.jsx)("button",{onClick:t=>x(t,()=>i(e.path)),style:g,title:"Rename...",onMouseEnter:e=>e.currentTarget.style.color="var(--primary)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"✏️"}),(0,t.jsx)("button",{onClick:t=>x(t,()=>l(e.path)),style:g,title:"Delete File",onMouseEnter:e=>e.currentTarget.style.color="var(--danger)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"🗑️"})]})]})}let eo={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.7)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,backdropFilter:"blur(4px)"},en={width:"420px",backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"12px",padding:"1.5rem",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.8)"},ei={width:"100%",backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"6px",padding:"0.5rem 0.75rem",color:"#e2e8f0",fontSize:"0.85rem",outline:"none",marginBottom:"1.5rem",fontFamily:"var(--font-mono), monospace"},el={display:"flex",justifyContent:"flex-end",gap:"0.75rem"},ea={backgroundColor:"transparent",border:"1px solid var(--border)",color:"var(--foreground)",padding:"0.5rem 1rem",borderRadius:"6px",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},es={backgroundColor:"var(--primary)",border:"none",color:"#ffffff",padding:"0.5rem 1rem",borderRadius:"6px",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},ed={background:"none",border:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.8rem",padding:"4px",borderRadius:"3px",transition:"all 0.1s ease"},ec={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.5)",display:"flex",alignItems:"flex-start",justifyContent:"center",zIndex:1100,paddingTop:"5vh",backdropFilter:"blur(2px)"},ep={width:"600px",backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"8px",boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.8)",display:"flex",flexDirection:"column",overflow:"hidden"},eu={width:"100%",backgroundColor:"#05070a",border:"none",borderBottom:"1px solid var(--border)",padding:"0.75rem 1rem",color:"#e2e8f0",fontSize:"0.9rem",outline:"none",fontFamily:"var(--font-mono), monospace"},em={maxHeight:"300px",overflowY:"auto",padding:"0.25rem 0"},eh={display:"flex",alignItems:"center",padding:"0.5rem 1rem",cursor:"pointer",transition:"all 0.1s ease",justifyContent:"space-between"},ef={backgroundColor:"rgba(255,255,255,0.02)",border:"1px solid var(--border)",borderRadius:"6px",padding:"0.5rem 0.75rem",display:"flex",flexDirection:"column",gap:"0.25rem"},eg={fontSize:"0.6rem",color:"var(--muted)",textTransform:"uppercase"},ex={fontSize:"1.1rem",fontWeight:700,fontFamily:"var(--font-mono)"},ey={width:"100%",height:"6px",backgroundColor:"rgba(255,255,255,0.05)",borderRadius:"3px",overflow:"hidden"},eb={height:"100%",borderRadius:"3px",transition:"width 0.5s ease-out"},ev={padding:"0.35rem 1rem",borderBottom:"1px solid var(--border)",backgroundColor:"#030406",display:"flex",alignItems:"center",gap:"0.75rem",flexWrap:"nowrap",overflowX:"auto"},ej={padding:"0.15rem 0.45rem",borderRadius:"4px",border:"1px solid var(--border)",backgroundColor:"rgba(255,255,255,0.02)",color:"var(--muted)",fontSize:"0.7rem",fontFamily:"var(--font-mono)",fontWeight:600,cursor:"pointer",transition:"all 0.1s ease"},eC={backgroundColor:"#05070a",borderBottom:"1px solid var(--border)",padding:"0.25rem 0.75rem 0 0.75rem",display:"flex",alignItems:"center",justifyContent:"space-between"},ew={padding:"0.35rem 0.75rem",borderRadius:"6px 6px 0 0",border:"1px solid var(--border)",borderBottom:"none",display:"flex",alignItems:"center",gap:"0.5rem",cursor:"pointer",transition:"all 0.15s ease"},eS={display:"flex",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.3)",border:"1px solid var(--border)",borderRadius:"6px",padding:"2px",marginRight:"0.5rem"},ek={padding:"0.2rem 0.5rem",borderRadius:"4px",border:"1px solid transparent",fontSize:"0.65rem",fontWeight:600,cursor:"pointer",transition:"all 0.15s ease",display:"flex",alignItems:"center",gap:"3px"};function eT({file:e,isStaged:o,onAction:n,onSelect:i,onIgnore:l,onDiscard:a}){let[s,d]=(0,r.useState)(!1),c="#eab308",p=o?e.indexStatus||"M":e.worktreeStatus||"M";return("??"===p||"?"===p)&&(c="#10b981"),"A"===p&&(c="#10b981"),"D"===p&&(c="#ef4444"),(0,t.jsxs)("div",{onClick:()=>i(e),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.35rem 0.5rem",borderRadius:"4px",backgroundColor:"rgba(255,255,255,0.02)",cursor:"pointer",fontSize:"0.75rem",fontFamily:"var(--font-mono)",position:"relative"},children:[(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,marginRight:"0.5rem"},title:e.relativePath,children:e.name}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.35rem"},children:[s&&(0,t.jsxs)("div",{style:{display:"flex",gap:"0.25rem"},children:[!o&&l&&(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),l(e.relativePath)},title:"Add to .gitignore",style:{background:"none",border:"none",cursor:"pointer",fontSize:"0.65rem",color:"var(--muted)",padding:"1px 4px",borderRadius:"3px",backgroundColor:"rgba(255,255,255,0.05)"},onMouseEnter:e=>e.currentTarget.style.color="var(--danger)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"🚫"}),!o&&a&&(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),a(e.relativePath)},title:"Discard changes",style:{background:"none",border:"none",cursor:"pointer",fontSize:"0.65rem",color:"var(--muted)",padding:"1px 4px",borderRadius:"3px",backgroundColor:"rgba(255,255,255,0.05)"},onMouseEnter:e=>e.currentTarget.style.color="var(--danger)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"🗑️"}),(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),n(e.relativePath)},title:o?"Unstage Change":"Stage Change",style:{background:"none",border:"none",cursor:"pointer",fontSize:"0.65rem",color:"var(--muted)",padding:"1px 4px",borderRadius:"3px",backgroundColor:"rgba(255,255,255,0.05)"},onMouseEnter:e=>e.currentTarget.style.color="var(--foreground)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:o?"➖":"➕"})]}),(0,t.jsx)("span",{style:{fontSize:"0.6rem",padding:"0.1rem 0.3rem",borderRadius:"3px",backgroundColor:c+"22",color:c,fontWeight:700,width:"1.2rem",display:"inline-block",textAlign:"center"},children:p.substring(0,1)})]})]})}let ez={width:"100%",minHeight:"60px",backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"6px",padding:"0.5rem",color:"#e2e8f0",fontSize:"0.75rem",resize:"vertical",outline:"none",fontFamily:"var(--font-sans), sans-serif"},eR={width:"100%",padding:"0.35rem",backgroundColor:"var(--primary)",border:"none",color:"#ffffff",borderRadius:"6px",fontSize:"0.75rem",fontWeight:600,cursor:"pointer",transition:"opacity 0.1s ease"},eP={background:"none",border:"1px solid var(--border)",borderRadius:"4px",padding:"2px 5px",cursor:"pointer",fontSize:"0.7rem",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255,255,255,0.02)"},eI={background:"none",border:"none",cursor:"pointer",fontSize:"0.65rem",color:"var(--muted)",padding:"2px 4px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center"};e.s(["default",0,function({sessionId:e,workspaceRoot:l,scopedDirs:a,onClose:s,sessions:d,onSwitchSession:c,onRefreshSessions:p,wsPort:u=3001}){let m=JSON.stringify(a),h=d.find(t=>t.id===e),[f,g]=(0,r.useState)(null),[x,y]=(0,r.useState)([]),[b,v]=(0,r.useState)(!1),j=async t=>{try{let r=await fetch("/api/sessions/scope",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e,path:t,action:"add"})});if(r.ok)p&&p();else{let e=await r.json();alert(e.error||"Failed to add scoped folder.")}}catch(e){console.error(e),alert("Network error: failed to add scoped folder.")}},C=async t=>{try{let r=await fetch("/api/sessions/scope",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e,path:t,action:"remove"})});if(r.ok)p&&p();else{let e=await r.json();alert(e.error||"Failed to remove scoped folder.")}}catch(e){console.error(e),alert("Network error: failed to remove scoped folder.")}},[w,S]=(0,r.useState)({}),[k,T]=(0,r.useState)({}),z=w[e]||[],R=k[e]||null,P=(0,r.useCallback)(t=>{S(r=>{let o=r[e]||[],n="function"==typeof t?t(o):t;return{...r,[e]:n}})},[e]),eW=(0,r.useCallback)(t=>{T(r=>({...r,[e]:t}))},[e]),[eO,eF]=(0,r.useState)("edit"),[eL,eD]=(0,r.useState)(!0),[eE,eM]=(0,r.useState)("explorer"),[eB,eN]=(0,r.useState)(!1),[e$,eA]=(0,r.useState)(300),[eU,eJ]=(0,r.useState)(!1),[eV,eH]=(0,r.useState)(380),[eK,e_]=(0,r.useState)(!1),eY=(0,r.useCallback)(e=>{e.preventDefault(),eJ(!0)},[]),eG=(0,r.useCallback)(e=>{e.preventDefault(),e_(!0)},[]);(0,r.useEffect)(()=>{let e=e=>{if(eU){let t=document.getElementById("loom-ide-container");if(t){let r=t.getBoundingClientRect(),o=e.clientX-r.left-50;o>150&&o<600&&eA(o)}}if(eK){let t=document.getElementById("loom-ide-container");if(t){let r=t.getBoundingClientRect(),o=r.bottom-e.clientY;o>100&&o<r.height-150&&eH(o)}}},t=()=>{eJ(!1),e_(!1)};return(eU||eK)&&(window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),document.body.style.cursor=eU?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t),document.body.style.cursor="",document.body.style.userSelect=""}},[eU,eK]);let[eX,eq]=(0,r.useState)([]),[eQ,eZ]=(0,r.useState)(!1),[e0,e5]=(0,r.useState)(!1),[e1,e2]=(0,r.useState)(""),[e7,e8]=(0,r.useState)({ahead:0,behind:0}),[e3,e6]=(0,r.useState)(""),[e4,e9]=(0,r.useState)(null),[te,tt]=(0,r.useState)(null),[tr,to]=(0,r.useState)(""),[tn,ti]=(0,r.useState)([]),[tl,ta]=(0,r.useState)(""),[ts,td]=(0,r.useState)(""),[tc,tp]=(0,r.useState)(null),tu=(0,r.useCallback)(async()=>{await new Promise(e=>setTimeout(e,0)),e5(!0);try{let e=await fetch(`/api/git?action=status&root=${encodeURIComponent(l)}`);if(e.ok){let t=await e.json();t.success&&(eZ(t.isGit),eq(t.files||[]),e2(t.branch||""),e8({ahead:t.ahead||0,behind:t.behind||0}))}}catch(e){console.error("Failed to load git status:",e)}finally{e5(!1)}},[l]);(0,r.useEffect)(()=>{setTimeout(()=>{tu()},0);let e=setInterval(tu,5e3);return()=>clearInterval(e)},[tu]);let tm=async e=>{try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"stage",file:e,rootPath:l})})).ok&&await tu()}catch(e){console.error(e)}},th=async e=>{try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ignore",file:e,rootPath:l})})).ok&&await tu()}catch(e){console.error(e)}},tf=async e=>{if(confirm(`Are you sure you want to discard changes in "${e}"? This action cannot be undone.`))try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"discard",file:e,rootPath:l})})).ok&&await tu()}catch(e){console.error(e)}},tg=async()=>{try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"stage",rootPath:l})})).ok&&await tu()}catch(e){console.error(e)}},tx=async e=>{try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"unstage",file:e,rootPath:l})})).ok&&await tu()}catch(e){console.error(e)}},ty=async()=>{try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"unstage",rootPath:l})})).ok&&await tu()}catch(e){console.error(e)}},tb=async()=>{if(e3.trim())try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"commit",message:e3,rootPath:l})});if(e.ok)e6(""),await tu();else{let t=await e.json();alert(t.error||"Git commit failed")}}catch(e){console.error(e)}},tv=async()=>{try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"pull",rootPath:l})});if(e.ok){let t=await e.json();alert(t.output||"Git pull completed successfully."),await tu()}else{let t=await e.json();alert(t.error||"Git pull failed")}}catch(e){console.error(e)}},tj=async()=>{try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"push",rootPath:l})});if(e.ok){let t=await e.json();alert(t.output||"Git push completed successfully."),await tu()}else{let t=await e.json();alert(t.error||"Git push failed")}}catch(e){console.error(e)}},tC=async e=>{try{let t=await fetch(`/api/git?action=diff&file=${encodeURIComponent(e.relativePath)}&root=${encodeURIComponent(l)}`);if(t.ok){let r=await t.json();if(r.success){let t=`diff:${e.relativePath}`;z.some(e=>e.path===t)||P(o=>[...o,{name:`Diff: ${e.name}`,path:t,content:r.diff,isModified:!1}]),eW(t)}}}catch(e){console.error(e)}};(0,r.useEffect)(()=>{let t=async()=>{try{let t=await fetch(`/api/sessions?id=${e}`);if(t.ok){let e=await t.json();e9(e)}}catch(e){console.error("Failed to fetch session status:",e)}};t();let r=setInterval(t,3e3);return()=>clearInterval(r)},[e]),(0,r.useEffect)(()=>{let t=async()=>{try{let t=await fetch(`/api/sessions/stats?id=${e}`);if(t.ok){let e=await t.json();tt(e)}}catch(e){console.error("Failed to fetch container/process stats:",e)}};t();let r=setInterval(t,3e3);return()=>clearInterval(r)},[e]),(0,r.useEffect)(()=>{let e=localStorage.getItem("neural_loom_custom_commands");if(e)try{let t=JSON.parse(e);setTimeout(()=>{ti(t)},0)}catch{}},[]);let tw=e=>{ti(e),localStorage.setItem("neural_loom_custom_commands",JSON.stringify(e))},tS=async t=>{try{await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,command:t})})}catch(e){console.error("Failed to inject command:",e)}},tk=e4?.type?.includes("aider"),[tT,tz]=(0,r.useState)({type:null,targetPath:null,inputValue:"",error:null}),[tR,tP]=(0,r.useState)(!1),[tI,tW]=(0,r.useState)(""),[tO,tF]=(0,r.useState)([]),[tL,tD]=(0,r.useState)(0),tE=(0,r.useCallback)(async()=>{await new Promise(e=>setTimeout(e,0)),eN(!0);try{let e=a&&a.length>0?`&scoped=${encodeURIComponent(a.join(","))}`:"",t=await fetch(`/api/files?action=list&root=${encodeURIComponent(l)}${e}`);if(t.ok){let e=await t.json();e.success&&(g(e.workspace),y(e.scoped||[]))}}catch(e){console.error("Failed to load file explorer:",e)}finally{eN(!1)}},[l,m]);(0,r.useEffect)(()=>{tE();let e=setInterval(()=>{tE()},3e3);return()=>clearInterval(e)},[tE]);let tM=(e,t)=>{tz({type:"file"===t?"create-file":"create-folder",targetPath:e,inputValue:"",error:null})},tB=e=>{let t=e.split(/[/\\]/).pop()||"";tz({type:"rename",targetPath:e,inputValue:t,error:null})},tN=e=>{tz({type:"delete",targetPath:e,inputValue:"",error:null})},t$=async e=>{if(e&&e.preventDefault(),tT.type&&tT.targetPath){tz(e=>({...e,error:null}));try{if("create-file"===tT.type||"create-folder"===tT.type){if(!tT.inputValue.trim())return void tz(e=>({...e,error:"Name cannot be empty"}));let e=`${tT.targetPath}/${tT.inputValue.trim()}`,t="create-file"===tT.type?"file":"directory",r=await fetch("/api/files",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create",path:e,type:t})});if(r.ok){let o=await r.json();o.success?(tz({type:null,targetPath:null,inputValue:"",error:null}),await tE(),"file"===t&&await tU(e)):tz(e=>({...e,error:o.error||"Failed to create item"}))}else{let e=await r.json();tz(t=>({...t,error:e.error||"Failed to create item"}))}}if("rename"===tT.type){if(!tT.inputValue.trim())return void tz(e=>({...e,error:"Name cannot be empty"}));let e=tT.targetPath.replace(/\\/g,"/"),t=e.substring(0,e.lastIndexOf("/")),r=t?`${t}/${tT.inputValue.trim()}`:tT.inputValue.trim(),o=await fetch("/api/files",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"rename",oldPath:tT.targetPath,newPath:r})});if(o.ok){let e=await o.json();e.success?(P(e=>e.map(e=>e.path===tT.targetPath?{...e,path:r,name:tT.inputValue.trim()}:e)),R===tT.targetPath&&eW(r),tz({type:null,targetPath:null,inputValue:"",error:null}),await tE()):tz(t=>({...t,error:e.error||"Failed to rename item"}))}else{let e=await o.json();tz(t=>({...t,error:e.error||"Failed to rename item"}))}}if("delete"===tT.type){let e=await fetch("/api/files",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",path:tT.targetPath})});if(e.ok){let t=await e.json();t.success?(tJ(tT.targetPath),tz({type:null,targetPath:null,inputValue:"",error:null}),await tE()):tz(e=>({...e,error:t.error||"Failed to delete item"}))}else{let t=await e.json();tz(e=>({...e,error:t.error||"Failed to delete item"}))}}}catch(e){console.error("File operation failed:",e),tz(e=>({...e,error:"An unexpected error occurred"}))}}},tA=(0,r.useCallback)(async()=>{try{let e=a&&a.length>0?`&scoped=${encodeURIComponent(a.join(","))}`:"",t=await fetch(`/api/files?action=flat_list&root=${encodeURIComponent(l)}${e}`);if(t.ok){let e=await t.json();e.success&&e.files&&tF(e.files)}}catch(e){console.error("Failed to load flat files list:",e)}},[l,m]);(0,r.useEffect)(()=>{tR&&setTimeout(()=>{tW(""),tD(0),tA()},0)},[tR,tA]);let tU=async e=>{if(z.find(t=>t.path===e))return void eW(e);try{let t=await fetch(`/api/files?action=read&path=${encodeURIComponent(e)}`);if(t.ok){let r=await t.json();if(r.success){let t={name:e.split(/[/\\]/).pop()||"Untitled",path:e,content:r.content,isModified:!1};P([...z,t]),eW(e)}}}catch(t){console.error(`Failed to read file ${e}:`,t)}},tJ=e=>{let t=z.filter(t=>t.path!==e);P(t),R===e&&eW(t.length>0?t[t.length-1].path:null)},tV=z.find(e=>e.path===R),tH=!!tV&&tV.path.toLowerCase().endsWith(".md"),tK=tH?eO:"edit",t_=eX.filter(e=>e.indexStatus&&" "!==e.indexStatus&&"?"!==e.indexStatus),tY=eX.filter(e=>e.worktreeStatus&&" "!==e.worktreeStatus||"??"===e.status),tG=e=>{R&&P(z.map(t=>t.path===R?{...t,content:e,isModified:!0}:t))},tX=(0,r.useCallback)(async()=>{if(tV)try{(await fetch("/api/files",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"write",path:tV.path,content:tV.content})})).ok&&P(e=>e.map(e=>e.path===R?{...e,isModified:!1}:e))}catch(e){console.error(`Failed to save file ${tV.path}:`,e)}},[tV,R,P]);(0,r.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&"s"===e.key&&(e.preventDefault(),tX()),(e.ctrlKey||e.metaKey)&&"p"===e.key&&(e.preventDefault(),tP(e=>!e))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[tX]);let tq=tO.filter(e=>e.name.toLowerCase().includes(tI.toLowerCase())||e.relativePath.toLowerCase().includes(tI.toLowerCase())).slice(0,10);return(0,t.jsxs)("div",{id:"loom-ide-container",style:I,children:[(0,t.jsxs)("div",{style:W,children:[(0,t.jsxs)("div",{style:O,children:[(0,t.jsx)("div",{onClick:()=>{"explorer"===eE?eD(!eL):(eM("explorer"),eD(!0))},style:{...F,backgroundColor:"explorer"===eE&&eL?"rgba(255,255,255,0.08)":"transparent",borderLeft:"explorer"===eE&&eL?"2px solid var(--primary)":"2px solid transparent"},title:"File Explorer (Ctrl+P to search files)",children:"📁"}),(0,t.jsx)("div",{onClick:()=>{"git"===eE?eD(!eL):(eM("git"),eD(!0))},style:{...F,backgroundColor:"git"===eE&&eL?"rgba(255,255,255,0.08)":"transparent",borderLeft:"git"===eE&&eL?"2px solid var(--primary)":"2px solid transparent"},title:"Source Control (Git Changes)",children:"🌿"}),(0,t.jsx)("div",{onClick:()=>{"analytics"===eE?eD(!eL):(eM("analytics"),eD(!0))},style:{...F,backgroundColor:"analytics"===eE&&eL?"rgba(255,255,255,0.08)":"transparent",borderLeft:"analytics"===eE&&eL?"2px solid var(--primary)":"2px solid transparent"},title:"Token Usage & Cost Analytics",children:"📊"}),(0,t.jsx)("div",{onClick:()=>{"auditor"===eE?eD(!eL):(eM("auditor"),eD(!0))},style:{...F,backgroundColor:"auditor"===eE&&eL?"rgba(255,255,255,0.08)":"transparent",borderLeft:"auditor"===eE&&eL?"2px solid var(--primary)":"2px solid transparent"},title:"Session Log Auditor & Search",children:"🔍"})]}),(0,t.jsx)("div",{onClick:s,style:{...F,color:"var(--danger)",fontSize:"1rem"},title:"Exit Session Layout",children:"✖"})]}),eL&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{...L,width:`${e$}px`,borderRight:"none"},children:[(0,t.jsxs)("div",{style:D,children:[(0,t.jsxs)("span",{style:{fontWeight:700,fontSize:"0.75rem",textTransform:"uppercase",letterSpacing:"0.05em"},children:["explorer"===eE&&"Workspace Explorer","git"===eE&&"Source Control","analytics"===eE&&"Telemetry & Cost","auditor"===eE&&"Session Auditor"]}),"explorer"===eE&&(0,t.jsxs)("div",{style:{display:"flex",gap:"0.25rem"},children:[f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>tM(f.path,"file"),style:ed,title:"New File at Root...",children:"📄+"}),(0,t.jsx)("button",{onClick:()=>tM(f.path,"directory"),style:ed,title:"New Folder at Root...",children:"📁+"})]}),(0,t.jsx)("button",{onClick:tE,disabled:eB,style:ed,title:"Refresh tree",children:"🔄"})]}),"git"===eE&&(0,t.jsx)("button",{onClick:tu,disabled:e0,style:ed,title:"Refresh git status",children:"🔄"})]}),(0,t.jsxs)("div",{style:E,children:["explorer"===eE&&(0,t.jsxs)(t.Fragment,{children:[f?(0,t.jsxs)("div",{style:{marginBottom:"1.5rem"},children:[(0,t.jsxs)("div",{style:M,children:["💼 ",f.name," ",(0,t.jsx)("span",{style:B,title:f.path,children:"root"})]}),(0,t.jsx)("div",{style:{padding:"0.25rem 0.5rem"},children:f.tree.map(e=>(0,t.jsx)(er,{node:e,onSelect:tU,onCreate:tM,onRename:tB,onDelete:tN,isReadOnly:!1},e.path))})]}):(0,t.jsx)("div",{style:{padding:"1rem",color:"var(--muted)",fontSize:"0.8rem"},children:"Scanning Workspace directory..."}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{...M,borderTop:"1px solid var(--border)",paddingTop:"1rem"},children:[(0,t.jsxs)("span",{children:["🔍 Scoped Folders (",x.length,")"]}),(0,t.jsx)("button",{onClick:()=>v(!0),style:ed,title:"Add Scoped Folder...",children:"➕"})]}),x.length>0?x.map(e=>(0,t.jsxs)("div",{style:{marginTop:"0.75rem",padding:"0 0.5rem"},children:[(0,t.jsxs)("div",{style:{...N,display:"flex",gap:"0.25rem",color:"#a855f7",fontSize:"0.75rem",fontWeight:700,padding:"0.25rem",justifyContent:"space-between",alignItems:"center"},title:e.path,children:[(0,t.jsxs)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:["🔗 ",e.name,"/"]}),(0,t.jsx)("button",{onClick:()=>C(e.path),style:{background:"none",border:"none",color:"var(--danger)",cursor:"pointer",fontSize:"0.75rem",padding:"0 0.25rem"},title:"Remove Scoped Folder",children:"✖"})]}),(0,t.jsx)("div",{style:{paddingLeft:"0.25rem"},children:e.tree.map(e=>(0,t.jsx)(er,{node:e,onSelect:tU,onCreate:tM,onRename:tB,onDelete:tN,isReadOnly:!0},e.path))})]},e.path)):(0,t.jsx)("div",{style:{padding:"0.5rem 1rem",color:"var(--muted)",fontSize:"0.75rem",fontStyle:"italic"},children:"No extra scoped folders. Click [+] to mount a folder."})]})]}),"git"===eE&&(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{padding:"0.5rem 1rem",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"rgba(255,255,255,0.01)",flexShrink:0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.4rem",fontSize:"0.75rem",fontWeight:600,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1},children:[(0,t.jsx)("span",{style:{color:"var(--primary)",flexShrink:0},children:"🌿"}),(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:e1,children:eQ?e1||"HEAD detached":"No Repository"})]}),eQ&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.35rem",flexShrink:0},children:[e7.ahead>0&&(0,t.jsxs)("span",{style:{fontSize:"0.65rem",color:"#10b981",fontWeight:700},title:"Commits ahead of remote",children:["↑",e7.ahead]}),e7.behind>0&&(0,t.jsxs)("span",{style:{fontSize:"0.65rem",color:"#ef4444",fontWeight:700},title:"Commits behind remote",children:["↓",e7.behind]}),(0,t.jsx)("button",{onClick:tv,title:"Pull changes",style:eP,onMouseEnter:e=>e.currentTarget.style.backgroundColor="rgba(255,255,255,0.08)",onMouseLeave:e=>e.currentTarget.style.backgroundColor="rgba(255,255,255,0.02)",children:"📥"}),(0,t.jsx)("button",{onClick:tj,title:"Push commits",style:eP,onMouseEnter:e=>e.currentTarget.style.backgroundColor="rgba(255,255,255,0.08)",onMouseLeave:e=>e.currentTarget.style.backgroundColor="rgba(255,255,255,0.02)",children:"📤"})]})]}),eQ?(0,t.jsxs)("div",{style:{flex:1,overflowY:"auto",padding:"0.5rem 1rem",display:"flex",flexDirection:"column",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.4rem"},children:[(0,t.jsx)("textarea",{value:e3,onChange:e=>e6(e.target.value),placeholder:"Commit message (Ctrl+Enter to commit)...",style:ez,onKeyDown:e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),tb())}}),(0,t.jsx)("button",{onClick:tb,disabled:0===eX.length,style:{...eR,opacity:eX.length>0?1:.5,cursor:eX.length>0?"pointer":"not-allowed"},children:"✓ Commit"})]}),t_.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.35rem"},children:[(0,t.jsxs)("span",{style:{fontSize:"0.7rem",fontWeight:700,textTransform:"uppercase",color:"var(--muted)"},children:["Staged Changes (",t_.length,")"]}),(0,t.jsx)("button",{onClick:()=>ty(),title:"Unstage All",style:eI,children:"➖"})]}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:t_.map(e=>(0,t.jsx)(eT,{file:e,isStaged:!0,onAction:tx,onSelect:tC},e.relativePath))})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.35rem"},children:[(0,t.jsxs)("span",{style:{fontSize:"0.7rem",fontWeight:700,textTransform:"uppercase",color:"var(--muted)"},children:["Changes (",tY.length,")"]}),tY.length>0&&(0,t.jsx)("button",{onClick:()=>tg(),title:"Stage All",style:eI,children:"➕"})]}),0===tY.length&&0===t_.length?(0,t.jsx)("div",{style:{color:"var(--success)",fontSize:"0.75rem",padding:"0.5rem 0"},children:"✔ Workspace clean."}):0===tY.length?(0,t.jsx)("div",{style:{color:"var(--muted)",fontSize:"0.7rem",fontStyle:"italic",padding:"0.25rem 0"},children:"No unstaged changes."}):(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:tY.map(e=>(0,t.jsx)(eT,{file:e,isStaged:!1,onAction:tm,onSelect:tC,onIgnore:th,onDiscard:tf},e.relativePath))})]})]}):(0,t.jsx)("div",{style:{padding:"1rem",color:"var(--muted)",fontSize:"0.75rem",fontStyle:"italic"},children:"Not a git repository."})]}),"analytics"===eE&&(0,t.jsxs)("div",{style:{padding:"0.5rem 1rem",display:"flex",flexDirection:"column",gap:"1.25rem"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",color:"var(--muted)",marginBottom:"0.5rem"},children:"Token Usage"}),(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.5rem"},children:[(0,t.jsxs)("div",{style:ef,children:[(0,t.jsx)("div",{style:eg,children:"Input"}),(0,t.jsx)("div",{style:ex,children:(e4?.tokenUsage?.input??0).toLocaleString()})]}),(0,t.jsxs)("div",{style:ef,children:[(0,t.jsx)("div",{style:eg,children:"Output"}),(0,t.jsx)("div",{style:ex,children:(e4?.tokenUsage?.output??0).toLocaleString()})]}),(0,t.jsxs)("div",{style:{...ef,gridColumn:"span 2"},children:[(0,t.jsx)("div",{style:eg,children:"Cost"}),(0,t.jsxs)("div",{style:{...ex,color:"#10b981",fontSize:"1.25rem"},children:["$",(e4?.tokenUsage?.cost??0).toFixed(4)]})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",color:"var(--muted)",marginBottom:"0.5rem"},children:"Resource Telemetry"}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.7rem",marginBottom:"0.25rem"},children:[(0,t.jsx)("span",{children:"CPU Usage"}),(0,t.jsx)("span",{style:{fontWeight:600,color:"var(--primary)"},children:te?.cpu??"0.0%"})]}),(0,t.jsx)("div",{style:ey,children:(0,t.jsx)("div",{style:{...eb,width:te?.cpu||"0%",backgroundColor:"var(--primary)"}})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.7rem",marginBottom:"0.25rem"},children:[(0,t.jsx)("span",{children:"Memory Usage"}),(0,t.jsx)("span",{style:{fontWeight:600,color:"#eab308"},children:te?.memory??"0.0MiB"})]}),(0,t.jsx)("div",{style:ey,children:(0,t.jsx)("div",{style:{...eb,width:te?.memoryPercent||"0%",backgroundColor:"#eab308"}})})]}),(0,t.jsx)("div",{style:{fontSize:"0.6rem",color:"var(--muted)",marginTop:"0.25rem",fontStyle:"italic"},children:te?.type?.includes("docker")?"🐳 Docker container statistics":"💻 Local process statistics"})]})]})]}),"auditor"===eE&&(0,t.jsxs)("div",{style:{padding:"0.5rem 1rem",display:"flex",flexDirection:"column",gap:"1rem",height:"100%"},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"text",placeholder:"Search logs...",value:tr,onChange:e=>to(e.target.value),style:{flex:1,backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"4px",padding:"0.25rem 0.5rem",color:"#ffffff",fontSize:"0.75rem",outline:"none"}}),(0,t.jsx)("button",{onClick:()=>{if(!e4?.logs)return;let t=new Blob([e4.logs.join("").replace(/\x1b\[[0-9;]*m/g,"")],{type:"text/plain;charset=utf-8"}),r=URL.createObjectURL(t),o=document.createElement("a");o.href=r,o.download=`session-${e}-logs.txt`,o.click(),URL.revokeObjectURL(r)},style:{backgroundColor:"rgba(59, 130, 246, 0.15)",border:"1px solid #3b82f6",color:"#3b82f6",padding:"0.25rem 0.5rem",borderRadius:"4px",fontSize:"0.7rem",fontWeight:600,cursor:"pointer"},children:"Export"})]}),(0,t.jsx)("div",{style:{height:"220px",overflowY:"auto",backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"6px",padding:"0.5rem",fontFamily:"var(--font-mono)",fontSize:"0.7rem",lineHeight:"1.4",whiteSpace:"pre-wrap",color:"#cbd5e1"},children:(()=>{if(!e4?.logs||0===e4.logs.length)return(0,t.jsx)("div",{style:{color:"var(--muted)",fontStyle:"italic",textAlign:"center"},children:"No logs captured."});let e=e4.logs.join("").replace(/\x1b\[[0-9;]*m/g,"").split(/\r?\n/),r=tr.trim()?e.filter(e=>e.toLowerCase().includes(tr.toLowerCase())):e;return 0===r.length?(0,t.jsx)("div",{style:{color:"var(--muted)",fontStyle:"italic",textAlign:"center"},children:"No matches."}):r.map((e,r)=>{if(!tr.trim())return(0,t.jsx)("div",{children:e},r);let o=e.split(RegExp(`(${tr})`,"gi"));return(0,t.jsx)("div",{children:o.map((e,r)=>e.toLowerCase()===tr.toLowerCase()?(0,t.jsx)("span",{style:{backgroundColor:"#eab308",color:"#000000",fontWeight:600},children:e},r):e)},r)})})()}),(0,t.jsxs)("div",{style:{borderTop:"1px solid var(--border)",paddingTop:"0.75rem"},children:[(0,t.jsx)("div",{style:{fontSize:"0.75rem",fontWeight:700,color:"var(--muted)",marginBottom:"0.5rem"},children:"Custom Buttons"}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.35rem"},children:[(0,t.jsx)("input",{type:"text",placeholder:"Button Name (e.g. /undo)",value:tl,onChange:e=>ta(e.target.value),style:{backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"4px",padding:"0.25rem 0.5rem",color:"#ffffff",fontSize:"0.7rem",outline:"none"}}),(0,t.jsx)("input",{type:"text",placeholder:"Injection Command",value:ts,onChange:e=>td(e.target.value),style:{backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"4px",padding:"0.25rem 0.5rem",color:"#ffffff",fontSize:"0.7rem",outline:"none"}}),(0,t.jsx)("button",{onClick:()=>{tl.trim()&&ts.trim()&&(tw([...tn,{name:tl.trim(),command:ts.trim()}]),ta(""),td(""))},style:{backgroundColor:"rgba(168, 85, 247, 0.15)",border:"1px solid #a855f7",color:"#c084fc",padding:"0.3rem",borderRadius:"4px",fontSize:"0.7rem",fontWeight:600,cursor:"pointer"},children:"+ Add Button"}),tn.length>0&&(0,t.jsx)("div",{style:{marginTop:"0.25rem",maxHeight:"60px",overflowY:"auto"},children:tn.map((e,r)=>(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"0.65rem",backgroundColor:"rgba(255,255,255,0.02)",padding:"0.1rem 0.25rem",borderRadius:"3px",marginTop:"0.15rem"},children:[(0,t.jsx)("span",{style:{color:"#c084fc"},children:e.name}),(0,t.jsx)("span",{onClick:()=>{tw(tn.filter((e,t)=>t!==r))},style:{color:"var(--danger)",cursor:"pointer"},children:"✖"})]},r))})]})]})]})]})]}),(0,t.jsx)("div",{onMouseDown:eY,style:{width:"4px",cursor:"col-resize",backgroundColor:eU?"var(--primary)":"var(--border)",transition:"background-color 0.15s ease",zIndex:10,alignSelf:"stretch"},onMouseEnter:e=>{eU||(e.currentTarget.style.backgroundColor="var(--border-focus)")},onMouseLeave:e=>{eU||(e.currentTarget.style.backgroundColor="var(--border)")},title:"Drag to resize sidebar"})]}),(0,t.jsxs)("div",{style:$,children:[(0,t.jsx)("div",{style:eC,children:(0,t.jsx)("div",{style:{display:"flex",gap:"0.25rem",overflowX:"auto"},children:d.map(r=>{let o=r.id===e,n="running"===r.status?"#10b981":"rgba(255,255,255,0.2)";return(0,t.jsxs)("div",{onClick:()=>{tc===r.id&&tp(null),c(r.id)},style:{...ew,backgroundColor:o?"#0b101b":"rgba(8,12,20,0.6)",borderColor:o?"var(--border-focus)":"var(--border)",color:o?"var(--foreground)":"var(--muted)"},children:[(0,t.jsx)("span",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:n,display:"inline-block"}}),(0,t.jsx)("span",{style:{fontSize:"0.75rem",fontWeight:o?600:500},children:r.name}),(0,t.jsx)("span",{style:{fontSize:"0.6rem",color:"var(--muted)",backgroundColor:"rgba(255,255,255,0.05)",padding:"1px 4px",borderRadius:"3px"},children:r.type.replace("claude-","").replace("aider-","")})]},r.id)})})}),(0,t.jsxs)("div",{style:{...A,borderBottom:"none"},children:[(0,t.jsxs)("div",{style:U,children:[(0,t.jsx)("div",{style:J,children:z.map(e=>(0,t.jsxs)("div",{style:{...V,backgroundColor:R===e.path?"#0b101b":"rgba(8,12,20,0.4)",borderColor:R===e.path?"var(--border-focus)":"transparent",color:R===e.path?"var(--foreground)":"var(--muted)"},onClick:()=>eW(e.path),children:[(0,t.jsxs)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e.name," ",e.isModified&&(0,t.jsx)("span",{style:K,children:"●"})]}),(0,t.jsx)("span",{onClick:t=>{t.stopPropagation(),tJ(e.path)},style:H,children:"✖"})]},e.path))}),tV&&!tV.path.startsWith("diff:")&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[tH&&(0,t.jsxs)("div",{style:eS,children:[(0,t.jsx)("button",{onClick:()=>eF("edit"),style:{...ek,backgroundColor:"edit"===tK?"rgba(255,255,255,0.08)":"transparent",color:"edit"===tK?"var(--foreground)":"var(--muted)",borderColor:"edit"===tK?"var(--border-focus)":"transparent"},title:"Edit file",children:"✏️ Edit"}),(0,t.jsx)("button",{onClick:()=>eF("split"),style:{...ek,backgroundColor:"split"===tK?"rgba(255,255,255,0.08)":"transparent",color:"split"===tK?"var(--foreground)":"var(--muted)",borderColor:"split"===tK?"var(--border-focus)":"transparent"},title:"Split editor & preview",children:"🥞 Split"}),(0,t.jsx)("button",{onClick:()=>eF("preview"),style:{...ek,backgroundColor:"preview"===tK?"rgba(255,255,255,0.08)":"transparent",color:"preview"===tK?"var(--foreground)":"var(--muted)",borderColor:"preview"===tK?"var(--border-focus)":"transparent"},title:"Preview rendered document",children:"👁️ Preview"})]}),(0,t.jsx)("button",{onClick:tX,disabled:!tV.isModified,style:{..._,opacity:tV.isModified?1:.5,cursor:tV.isModified?"pointer":"not-allowed"},children:"💾 Save (Ctrl+S)"})]})]}),(0,t.jsx)("div",{style:Y,children:tV?tV.path.startsWith("diff:")?(0,t.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.8rem",padding:"1rem",overflow:"auto",height:"100%",backgroundColor:"#0b101b",lineHeight:1.5},children:tV.content.split("\n").map((e,r)=>{let o="#e2e8f0",n="transparent";return e.startsWith("+")?(o="#4ade80",n="rgba(74, 222, 128, 0.08)"):e.startsWith("-")?(o="#f87171",n="rgba(248, 113, 113, 0.08)"):e.startsWith("@@")&&(o="#60a5fa",n="rgba(96, 165, 250, 0.05)"),(0,t.jsx)("div",{style:{color:o,backgroundColor:n,whiteSpace:"pre-wrap",padding:"0.1rem 0.5rem"},children:e},r)})}):tH?"preview"===tK?(0,t.jsx)("div",{style:{height:"100%",overflow:"hidden"},children:(0,t.jsx)(i,{content:tV.content})}):"split"===tK?(0,t.jsxs)("div",{style:{display:"flex",width:"100%",height:"100%",overflow:"hidden"},children:[(0,t.jsx)("div",{style:{flex:1,height:"100%"},children:(0,t.jsx)("textarea",{value:tV.content,onChange:e=>tG(e.target.value),style:G,spellCheck:!1})}),(0,t.jsx)("div",{style:{flex:1,height:"100%",overflow:"hidden"},children:(0,t.jsx)(i,{content:tV.content})})]}):(0,t.jsx)("textarea",{value:tV.content,onChange:e=>tG(e.target.value),style:G,spellCheck:!1}):(0,t.jsx)("textarea",{value:tV.content,onChange:e=>tG(e.target.value),style:G,spellCheck:!1}):(0,t.jsxs)("div",{style:X,children:[(0,t.jsx)("div",{style:{fontSize:"2rem",marginBottom:"1rem"},children:"💻"}),(0,t.jsx)("h4",{style:{margin:0,fontWeight:600},children:"NeuralLoom Workspace Editor"}),(0,t.jsx)("p",{style:{margin:"0.5rem 0 0 0",color:"var(--muted)",fontSize:"0.8rem"},children:"Select files from the left explorer panel to view and edit. Use Ctrl+S to save changes."}),(0,t.jsxs)("p",{style:{margin:"0.5rem 0 0 0",color:"var(--muted)",fontSize:"0.75rem",fontStyle:"italic"},children:["Press ",(0,t.jsx)("kbd",{style:{background:"rgba(255,255,255,0.1)",padding:"2px 4px",borderRadius:"3px"},children:"Ctrl+P"})," to search files."]})]})})]}),(0,t.jsx)("div",{onMouseDown:eG,style:{height:"4px",cursor:"row-resize",backgroundColor:eK?"var(--primary)":"var(--border)",transition:"background-color 0.15s ease",zIndex:10,width:"100%"},onMouseEnter:e=>{eK||(e.currentTarget.style.backgroundColor="var(--border-focus)")},onMouseLeave:e=>{eK||(e.currentTarget.style.backgroundColor="var(--border)")},title:"Drag to resize console"}),(0,t.jsxs)("div",{style:{...q,flex:"none",height:`${eV}px`},children:[(0,t.jsxs)("div",{style:Q,children:[(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"0.5rem",fontWeight:600,fontSize:"0.8rem"},children:["🖥️ Session Console Bridge ",tc&&"(Split View Active)"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center"},children:[h?.status==="stopped"&&(0,t.jsx)("button",{onClick:async()=>{try{let t=await fetch("/api/sessions/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e})});if(t.ok)p&&p();else{let e=await t.json();alert(e.error||"Failed to restart session.")}}catch(e){console.error("Failed to restart session:",e),alert("Network error: failed to restart session.")}},style:{padding:"0.3rem 0.6rem",borderRadius:"4px",border:"1px solid #eab308",backgroundColor:"rgba(234, 179, 8, 0.15)",color:"#eab308",fontSize:"0.7rem",fontWeight:600,cursor:"pointer",boxShadow:"0 0 8px rgba(234, 179, 8, 0.2)"},title:"Restart the stopped session process runner",children:"⚡ Restart Session"}),(0,t.jsxs)("select",{onChange:e=>{tp(e.target.value||null)},value:tc||"",style:{backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"4px",padding:"0.2rem 0.5rem",color:"var(--foreground)",fontSize:"0.7rem",outline:"none",cursor:"pointer"},children:[(0,t.jsx)("option",{value:"",children:"🖥️ Single Terminal"}),d.filter(t=>t.id!==e&&"running"===t.status).map(e=>(0,t.jsxs)("option",{value:e.id,children:["🖥️|🖥️ Split: ",e.name]},e.id))]}),(0,t.jsx)("button",{onClick:async()=>{await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,command:"/ccc"})})},style:Z,children:"🚀 Mount Context (/ccc)"}),(0,t.jsx)("button",{onClick:async()=>{await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,command:"/ccp"})})},style:ee,children:"⚡ Trigger Prompt (/ccp)"})]})]}),(0,t.jsxs)("div",{style:ev,children:[(0,t.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:700},children:"Quick Commands:"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.35rem",flexWrap:"wrap",alignItems:"center"},children:[tk?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>tS("/undo"),style:ej,title:"Aider: undo last commit",children:"/undo"}),(0,t.jsx)("button",{onClick:()=>tS("/diff"),style:ej,title:"Aider: show git diff",children:"/diff"}),(0,t.jsx)("button",{onClick:()=>tS("/commit"),style:ej,title:"Aider: commit edits",children:"/commit"}),(0,t.jsx)("button",{onClick:()=>tS("/test"),style:ej,title:"Aider: run tests",children:"/test"}),(0,t.jsx)("button",{onClick:()=>tS("/clear"),style:ej,title:"Clear terminal screen",children:"/clear"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>tS("/compact"),style:ej,title:"Claude Code: compact history",children:"/compact"}),(0,t.jsx)("button",{onClick:()=>tS("/history"),style:ej,title:"Claude Code: view history",children:"/history"}),(0,t.jsx)("button",{onClick:()=>tS("/reset"),style:ej,title:"Claude Code: reset conversation",children:"/reset"}),(0,t.jsx)("button",{onClick:()=>tS("/help"),style:ej,title:"Claude Code: show help",children:"/help"})]}),tn.map((e,r)=>(0,t.jsx)("button",{onClick:()=>tS(e.command),style:{...ej,borderColor:"rgba(168, 85, 247, 0.4)",color:"#c084fc"},title:`Inject command: ${e.command}`,children:e.name},r))]})]}),(0,t.jsxs)("div",{style:{...et,display:"flex",width:"100%"},children:[(0,t.jsx)("div",{style:{flex:1,height:"100%",borderRight:tc?"1px solid var(--border)":"none",overflow:"hidden"},children:(0,t.jsx)(o.default,{sessionId:e,height:"100%",wsPort:u})}),tc&&(0,t.jsxs)("div",{style:{flex:1,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},children:[(0,t.jsxs)("div",{style:{padding:"0.25rem 0.5rem",backgroundColor:"#030406",fontSize:"0.7rem",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsxs)("span",{style:{color:"#a855f7",fontWeight:600},children:["🔗 Focused PTY Connection: ",d.find(e=>e.id===tc)?.name]}),(0,t.jsx)("button",{onClick:()=>tp(null),style:{background:"none",border:"none",color:"var(--danger)",cursor:"pointer",fontSize:"0.7rem"},children:"Close Split ✖"})]}),(0,t.jsx)("div",{style:{flex:1,overflow:"hidden"},children:(0,t.jsx)(o.default,{sessionId:tc,height:"100%",wsPort:u})})]})]})]})]}),tT.type&&(0,t.jsx)("div",{style:eo,children:(0,t.jsxs)("div",{style:en,children:[(0,t.jsxs)("h3",{style:{margin:"0 0 1rem 0",fontSize:"1rem",fontWeight:600},children:["create-file"===tT.type&&"Create New File","create-folder"===tT.type&&"Create New Folder","rename"===tT.type&&"Rename Item","delete"===tT.type&&"Confirm Deletion"]}),tT.error&&(0,t.jsxs)("div",{style:{color:"var(--danger)",fontSize:"0.8rem",marginBottom:"1rem"},children:["⚠️ ",tT.error]}),"delete"!==tT.type?(0,t.jsxs)("form",{onSubmit:t$,children:[(0,t.jsxs)("div",{style:{marginBottom:"0.5rem",fontSize:"0.75rem",color:"var(--muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:tT.targetPath||"",children:["Target: ",tT.targetPath]}),(0,t.jsx)("input",{type:"text",value:tT.inputValue,onChange:e=>tz({...tT,inputValue:e.target.value}),style:ei,autoFocus:!0,placeholder:"rename"===tT.type?"Enter new name":"Enter name"}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("button",{type:"button",onClick:()=>tz({type:null,targetPath:null,inputValue:"",error:null}),style:ea,children:"Cancel"}),(0,t.jsx)("button",{type:"submit",style:es,children:"Submit"})]})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{fontSize:"0.85rem",marginBottom:"1.5rem",color:"var(--muted)",overflowWrap:"break-word"},children:["Are you sure you want to delete this item? This action is permanent.",(0,t.jsx)("div",{style:{marginTop:"0.5rem",color:"#e2e8f0",fontFamily:"var(--font-mono)",fontSize:"0.75rem",background:"rgba(255,255,255,0.05)",padding:"0.5rem",borderRadius:"4px"},children:tT.targetPath})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("button",{type:"button",onClick:()=>tz({type:null,targetPath:null,inputValue:"",error:null}),style:ea,children:"Cancel"}),(0,t.jsx)("button",{onClick:()=>t$(),style:{...es,backgroundColor:"var(--danger)"},children:"Delete Permanently"})]})]})]})}),tR&&(0,t.jsx)("div",{style:ec,onClick:()=>tP(!1),children:(0,t.jsxs)("div",{style:ep,onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("input",{type:"text",value:tI,onChange:e=>{tW(e.target.value),tD(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),tD(e=>(e+1)%Math.max(1,tq.length))):"ArrowUp"===e.key?(e.preventDefault(),tD(e=>(e-1+tq.length)%Math.max(1,tq.length))):"Enter"===e.key?(e.preventDefault(),tq[tL]&&(tU(tq[tL].path),tP(!1))):"Escape"===e.key&&(e.preventDefault(),tP(!1))},placeholder:"Search files by name or path...",style:eu,autoFocus:!0}),(0,t.jsx)("div",{style:em,children:tq.length>0?tq.map((e,r)=>(0,t.jsxs)("div",{onClick:()=>{tU(e.path),tP(!1)},style:{...eh,backgroundColor:r===tL?"rgba(168, 85, 247, 0.15)":"transparent",borderLeft:r===tL?"3px solid var(--primary)":"3px solid transparent"},children:[(0,t.jsx)("span",{style:{fontSize:"0.85rem",fontWeight:600},children:e.name}),(0,t.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",marginLeft:"0.5rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.relativePath})]},e.path)):(0,t.jsx)("div",{style:{padding:"0.75rem 1rem",color:"var(--muted)",fontSize:"0.8rem",textAlign:"center"},children:"No matching files found"})}),(0,t.jsx)("div",{style:{padding:"0.5rem 1rem",borderTop:"1px solid var(--border)",fontSize:"0.65rem",color:"var(--muted)",textAlign:"right"},children:"Use ↑↓ to navigate, Enter to select, Esc to close"})]})}),b&&(0,t.jsx)(n.default,{title:"Add Scoped Directory",initialPath:l,onClose:()=>v(!1),onSelect:e=>{j(e),v(!1)}})]})}],3839)},97722,e=>{e.n(e.i(3839))}]);
package/.next/trace DELETED
@@ -1 +0,0 @@
1
- [{"name":"generate-buildid","duration":302,"timestamp":182211737476,"id":4,"parentId":1,"tags":{},"startTime":1781402945477,"traceId":"60734d939f4ef031"},{"name":"load-custom-routes","duration":398,"timestamp":182211737907,"id":5,"parentId":1,"tags":{},"startTime":1781402945477,"traceId":"60734d939f4ef031"},{"name":"create-dist-dir","duration":2266,"timestamp":182211738339,"id":6,"parentId":1,"tags":{},"startTime":1781402945478,"traceId":"60734d939f4ef031"},{"name":"clean","duration":594,"timestamp":182211741508,"id":7,"parentId":1,"tags":{},"startTime":1781402945481,"traceId":"60734d939f4ef031"},{"name":"discover-routes","duration":6786,"timestamp":182211765390,"id":8,"parentId":1,"tags":{},"startTime":1781402945505,"traceId":"60734d939f4ef031"},{"name":"create-root-mapping","duration":69,"timestamp":182211772226,"id":9,"parentId":1,"tags":{},"startTime":1781402945512,"traceId":"60734d939f4ef031"},{"name":"generate-route-types","duration":18127,"timestamp":182211773572,"id":10,"parentId":1,"tags":{},"startTime":1781402945513,"traceId":"60734d939f4ef031"},{"name":"public-dir-conflict-check","duration":100,"timestamp":182211791835,"id":11,"parentId":1,"tags":{},"startTime":1781402945531,"traceId":"60734d939f4ef031"},{"name":"generate-routes-manifest","duration":2217,"timestamp":182211792037,"id":12,"parentId":1,"tags":{},"startTime":1781402945531,"traceId":"60734d939f4ef031"},{"name":"run-turbopack","duration":2433037,"timestamp":182211801579,"id":14,"parentId":1,"tags":{},"startTime":1781402945541,"traceId":"60734d939f4ef031"},{"name":"turbopack-build-events","duration":70,"timestamp":182212121601,"id":15,"parentId":1,"tags":{},"startTime":1781402945861,"traceId":"60734d939f4ef031"},{"name":"run-typescript","duration":4136250,"timestamp":182214244372,"id":16,"parentId":1,"tags":{},"startTime":1781402947984,"traceId":"60734d939f4ef031"},{"name":"generate-required-server-files","duration":1532,"timestamp":182218381518,"id":18,"parentId":1,"tags":{},"startTime":1781402952121,"traceId":"60734d939f4ef031"},{"name":"check-static-error-page","duration":8409,"timestamp":182218522688,"id":20,"parentId":19,"tags":{},"startTime":1781402952262,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":655084,"timestamp":182218538097,"id":40,"parentId":22,"tags":{},"startTime":1781402952277,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":666749,"timestamp":182218526566,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1781402952266,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":793431,"timestamp":182218538345,"id":42,"parentId":24,"tags":{},"startTime":1781402952278,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":804550,"timestamp":182218527293,"id":24,"parentId":19,"tags":{"page":"/api/context/claude"},"startTime":1781402952267,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":802557,"timestamp":182218537732,"id":39,"parentId":21,"tags":{},"startTime":1781402952277,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":815591,"timestamp":182218524749,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1781402952264,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":811341,"timestamp":182218539033,"id":45,"parentId":27,"tags":{},"startTime":1781402952278,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":822403,"timestamp":182218528025,"id":27,"parentId":19,"tags":{"page":"/api/files"},"startTime":1781402952267,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":811854,"timestamp":182218539180,"id":46,"parentId":28,"tags":{},"startTime":1781402952278,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":822810,"timestamp":182218528277,"id":28,"parentId":19,"tags":{"page":"/api/git"},"startTime":1781402952268,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":829222,"timestamp":182218538253,"id":41,"parentId":23,"tags":{},"startTime":1781402952278,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":840523,"timestamp":182218527007,"id":23,"parentId":19,"tags":{"page":"/api/context/aider"},"startTime":1781402952266,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":834043,"timestamp":182218543786,"id":56,"parentId":38,"tags":{},"startTime":1781402952283,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":847110,"timestamp":182218530770,"id":38,"parentId":19,"tags":{"page":"/"},"startTime":1781402952270,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":854176,"timestamp":182218538655,"id":43,"parentId":25,"tags":{},"startTime":1781402952278,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":865359,"timestamp":182218527521,"id":25,"parentId":19,"tags":{"page":"/api/context"},"startTime":1781402952267,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":855981,"timestamp":182218538772,"id":44,"parentId":26,"tags":{},"startTime":1781402952278,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":867018,"timestamp":182218527791,"id":26,"parentId":19,"tags":{"page":"/api/context/ssh"},"startTime":1781402952267,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":861779,"timestamp":182218539289,"id":47,"parentId":29,"tags":{},"startTime":1781402952279,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":872614,"timestamp":182218528502,"id":29,"parentId":19,"tags":{"page":"/api/recents"},"startTime":1781402952268,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":862696,"timestamp":182218539809,"id":51,"parentId":33,"tags":{},"startTime":1781402952279,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":873169,"timestamp":182218529378,"id":33,"parentId":19,"tags":{"page":"/api/sessions"},"startTime":1781402952269,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":863144,"timestamp":182218539953,"id":54,"parentId":36,"tags":{},"startTime":1781402952279,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":872831,"timestamp":182218530304,"id":36,"parentId":19,"tags":{"page":"/api/sessions/stats"},"startTime":1781402952270,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":870180,"timestamp":182218539989,"id":55,"parentId":37,"tags":{},"startTime":1781402952279,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":879658,"timestamp":182218530562,"id":37,"parentId":19,"tags":{"page":"/api/sessions/stop"},"startTime":1781402952270,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":870483,"timestamp":182218539871,"id":52,"parentId":34,"tags":{},"startTime":1781402952279,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":880806,"timestamp":182218529572,"id":34,"parentId":19,"tags":{"page":"/api/sessions/scope"},"startTime":1781402952269,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":886879,"timestamp":182218539916,"id":53,"parentId":35,"tags":{},"startTime":1781402952279,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":896968,"timestamp":182218529877,"id":35,"parentId":19,"tags":{"page":"/api/sessions/start"},"startTime":1781402952269,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":888792,"timestamp":182218539660,"id":49,"parentId":31,"tags":{},"startTime":1781402952279,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":899520,"timestamp":182218528979,"id":31,"parentId":19,"tags":{"page":"/api/sessions/input"},"startTime":1781402952268,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":891388,"timestamp":182218539505,"id":48,"parentId":30,"tags":{},"startTime":1781402952279,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":902204,"timestamp":182218528736,"id":30,"parentId":19,"tags":{"page":"/api/sessions/inject"},"startTime":1781402952268,"traceId":"60734d939f4ef031"},{"name":"is-page-static","duration":896534,"timestamp":182218539750,"id":50,"parentId":32,"tags":{},"startTime":1781402952279,"traceId":"60734d939f4ef031"},{"name":"check-page","duration":907154,"timestamp":182218529183,"id":32,"parentId":19,"tags":{"page":"/api/sessions/launch"},"startTime":1781402952269,"traceId":"60734d939f4ef031"},{"name":"static-check","duration":914273,"timestamp":182218522105,"id":19,"parentId":1,"tags":{},"startTime":1781402952261,"traceId":"60734d939f4ef031"},{"name":"write-routes-manifest","duration":1208,"timestamp":182219437601,"id":58,"parentId":1,"tags":{},"startTime":1781402953177,"traceId":"60734d939f4ef031"},{"name":"load-dotenv","duration":50,"timestamp":182219456737,"id":61,"parentId":60,"tags":{},"startTime":1781402953196,"traceId":"60734d939f4ef031"},{"name":"run-export-path-map","duration":454,"timestamp":182219463096,"id":62,"parentId":60,"tags":{},"startTime":1781402953202,"traceId":"60734d939f4ef031"},{"name":"next-export","duration":668597,"timestamp":182219455342,"id":60,"parentId":1,"tags":{},"startTime":1781402953195,"traceId":"60734d939f4ef031"},{"name":"move-exported-app-not-found-","duration":2030,"timestamp":182220125612,"id":63,"parentId":59,"tags":{},"startTime":1781402953865,"traceId":"60734d939f4ef031"},{"name":"move-exported-app-global-error-","duration":1499,"timestamp":182220127746,"id":64,"parentId":59,"tags":{},"startTime":1781402953867,"traceId":"60734d939f4ef031"},{"name":"static-generation","duration":689076,"timestamp":182219443956,"id":59,"parentId":1,"tags":{},"startTime":1781402953183,"traceId":"60734d939f4ef031"},{"name":"write-routes-manifest","duration":912,"timestamp":182220133160,"id":65,"parentId":1,"tags":{},"startTime":1781402953872,"traceId":"60734d939f4ef031"},{"name":"print-tree-view","duration":3334,"timestamp":182220146100,"id":66,"parentId":1,"tags":{},"startTime":1781402953885,"traceId":"60734d939f4ef031"},{"name":"write-route-bundle-stats","duration":12711,"timestamp":182220149467,"id":67,"parentId":1,"tags":{},"startTime":1781402953889,"traceId":"60734d939f4ef031"},{"name":"telemetry-flush","duration":191988,"timestamp":182220162221,"id":68,"parentId":1,"tags":{},"startTime":1781402953902,"traceId":"60734d939f4ef031"},{"name":"next-build","duration":8675858,"timestamp":182211678373,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781402945418,"traceId":"60734d939f4ef031"}]
package/.next/trace-build DELETED
@@ -1 +0,0 @@
1
- [{"name":"run-turbopack","duration":2433037,"timestamp":182211801579,"id":14,"parentId":1,"tags":{},"startTime":1781402945541,"traceId":"60734d939f4ef031"},{"name":"turbopack-build-events","duration":70,"timestamp":182212121601,"id":15,"parentId":1,"tags":{},"startTime":1781402945861,"traceId":"60734d939f4ef031"},{"name":"run-typescript","duration":4136250,"timestamp":182214244372,"id":16,"parentId":1,"tags":{},"startTime":1781402947984,"traceId":"60734d939f4ef031"},{"name":"static-check","duration":914273,"timestamp":182218522105,"id":19,"parentId":1,"tags":{},"startTime":1781402952261,"traceId":"60734d939f4ef031"},{"name":"static-generation","duration":689076,"timestamp":182219443956,"id":59,"parentId":1,"tags":{},"startTime":1781402953183,"traceId":"60734d939f4ef031"},{"name":"telemetry-flush","duration":191988,"timestamp":182220162221,"id":68,"parentId":1,"tags":{},"startTime":1781402953902,"traceId":"60734d939f4ef031"},{"name":"next-build","duration":8675858,"timestamp":182211678373,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781402945418,"traceId":"60734d939f4ef031"}]