neural-loom 0.2.67 → 0.2.68
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.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/diagnostics/route-bundle-stats.json +1 -1
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/configs/route.js.nft.json +1 -1
- package/.next/server/app/api/context/aider/route.js.nft.json +1 -1
- package/.next/server/app/api/context/claude/route.js.nft.json +1 -1
- package/.next/server/app/api/context/route.js.nft.json +1 -1
- package/.next/server/app/api/context/ssh/route.js.nft.json +1 -1
- package/.next/server/app/api/recents/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/inject/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/input/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/launch/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/scope/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/start/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/stop/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/upload-image/route.js.nft.json +1 -1
- package/.next/server/app/api/sql/connections/route.js.nft.json +1 -1
- package/.next/server/app/api/sql/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/sql/query/route.js.nft.json +1 -1
- package/.next/server/app/api/sql/schema/route.js.nft.json +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page/react-loadable-manifest.json +3 -3
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/09at8yg03trv8.js +4 -0
- package/.next/static/chunks/{15_baizhaiq8c.js → 0cbr3_t9j1ilb.js} +2 -2
- package/.next/static/chunks/{16rky3981raz5.js → 0fdyrz6c97v4y.js} +3 -3
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/package.json +1 -1
- package/public/feature-guide.html +1443 -0
- package/src/app/components/MarkdownPreview.tsx +28 -1
- package/src/app/components/TerminalConsole.tsx +51 -1
- package/.next/static/chunks/0sr3d9iqny2rf.js +0 -4
- /package/.next/static/{oWEeFdgDSIDLRom42Fn3s → 7qXcDZENU2sMQ6EyGkMNq}/_buildManifest.js +0 -0
- /package/.next/static/{oWEeFdgDSIDLRom42Fn3s → 7qXcDZENU2sMQ6EyGkMNq}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{oWEeFdgDSIDLRom42Fn3s → 7qXcDZENU2sMQ6EyGkMNq}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67585,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return s}});let a=e.r(32061);function s({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new a.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return i}});let a=e.r(43476),s=e.r(74080),n=e.r(63599),l=e.r(9885),o=e.r(43369);function i({moduleIds:e}){if("u">typeof window)return null;let t=n.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let d=(0,o.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,s.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return d}});let a=e.r(43476),s=e.r(71645),n=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 t={...i,...e},r=(0,s.lazy)(()=>t.loader().then(o)),d=t.loading;function c(e){let o=d?(0,a.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,i=!t.ssr||!!t.loading,c=i?s.Suspense:s.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(l.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(n.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(c,{...i?{fallback:o}:{},children:u})}return c.displayName="LoadableComponent",c}},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let a=e.r(55682)._(e.r(69093));function s(e,t){let r={};"function"==typeof e&&(r.loader=e);let s={...r,...t};return(0,a.default)({...s,modules:s.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},66381,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(74080);let s={display:"flex",height:"100%",width:"100%",backgroundColor:"#05070a",color:"#cbd5e1",fontSize:"0.875rem",minHeight:0},n={width:"220px",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",minHeight:0,backgroundColor:"rgba(10, 15, 24, 0.4)",flexShrink:0},l={display:"flex",flexDirection:"column",padding:"1rem",minHeight:0},o={display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.75rem"},i={fontWeight:700,letterSpacing:"0.05em",textTransform:"uppercase",fontSize:"0.75rem",color:"var(--muted)"},d={padding:"0.2rem 0.5rem",borderRadius:"4px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.7rem",fontWeight:600,cursor:"pointer"},c={display:"flex",flexDirection:"column",gap:"0.4rem",overflowY:"auto",maxHeight:"220px"},u={fontSize:"0.65rem",fontWeight:600,color:"var(--muted)",marginTop:"0.5rem",marginBottom:"0.2rem",letterSpacing:"0.05em"},p={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.5rem 0.6rem",borderRadius:"6px",backgroundColor:"rgba(255, 255, 255, 0.02)",border:"1px solid var(--border)",cursor:"pointer",transition:"all 0.2s ease"},m={backgroundColor:"rgba(109, 40, 217, 0.08)",border:"1px solid var(--border-focus)",boxShadow:"0 0 10px rgba(109, 40, 217, 0.1)"},f={display:"flex",flexDirection:"column",gap:"0.15rem",flex:1,minWidth:0},h={fontWeight:600,fontSize:"0.8rem",color:"#fff",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},g={fontSize:"0.7rem",color:"var(--muted)",textTransform:"uppercase"},x={background:"none",border:"none",color:"rgba(239, 68, 68, 0.4)",cursor:"pointer",fontSize:"0.75rem",padding:"0.25rem"},y={display:"flex",flexDirection:"column",gap:"0.25rem",overflowY:"auto",flex:1,minHeight:0},b={fontSize:"0.75rem",color:"var(--muted)",textAlign:"center",padding:"1rem 0"},j={display:"flex",flexDirection:"column"},v={display:"flex",alignItems:"center",padding:"0.35rem 0.5rem",borderRadius:"4px",cursor:"pointer",userSelect:"none",transition:"background 0.2s ease"},_={marginRight:"0.4rem",fontSize:"0.9rem"},w={flex:1,fontSize:"0.8rem",color:"#e2e8f0",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},S={fontSize:"0.6rem",color:"var(--muted)",marginLeft:"0.25rem"},k={display:"flex",flexDirection:"column",gap:"0.2rem",paddingLeft:"1.5rem",marginTop:"0.15rem",borderLeft:"1px dashed rgba(255,255,255,0.06)",marginLeft:"0.8rem",marginBottom:"0.25rem"},C={display:"flex",alignItems:"center",padding:"0.15rem 0.25rem",fontSize:"0.75rem"},N={marginRight:"0.3rem",fontSize:"0.7rem"},R={flex:1,color:"var(--muted)",overflow:"hidden",textOverflow:"ellipsis"},E={fontSize:"0.65rem",color:"rgba(109, 40, 217, 0.75)",fontFamily:"monospace",paddingLeft:"0.5rem"},L={flex:1,display:"flex",flexDirection:"column",minHeight:0,backgroundColor:"#05070a"},W={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.75rem 1rem",borderBottom:"1px solid var(--border)",backgroundColor:"rgba(15, 23, 42, 0.3)",flexShrink:0},O={fontSize:"0.75rem",color:"var(--muted)"},T={fontSize:"0.8rem",fontWeight:600,color:"#fff",display:"flex",alignItems:"center",gap:"0.4rem"},I={padding:"0.1rem 0.4rem",borderRadius:"4px",backgroundColor:"rgba(234, 179, 8, 0.12)",color:"#eab308",fontSize:"0.65rem",fontWeight:700,border:"1px solid rgba(234, 179, 8, 0.2)"},D={padding:"0.4rem 0.9rem",borderRadius:"6px",border:"none",backgroundColor:"var(--primary)",color:"#fff",fontSize:"0.8rem",fontWeight:600,transition:"all 0.2s ease"},P={height:"180px",borderBottom:"1px solid var(--border)",position:"relative",flexShrink:0},z={width:"100%",height:"100%",backgroundColor:"#080c14",border:"none",resize:"none",color:"#e2e8f0",fontFamily:"monospace",fontSize:"0.85rem",padding:"1rem",outline:"none",lineHeight:"1.4"},q={flex:1,display:"flex",flexDirection:"column",minHeight:0,padding:"1rem"},A={padding:"1rem",borderRadius:"8px",backgroundColor:"rgba(239, 68, 68, 0.08)",border:"1px solid rgba(239, 68, 68, 0.2)",overflowY:"auto"},B={margin:0,fontFamily:"monospace",fontSize:"0.8rem",color:"#f87171",whiteSpace:"pre-wrap"},$={marginTop:"1rem",padding:"0.75rem",borderRadius:"6px",backgroundColor:"rgba(0, 0, 0, 0.3)",border:"1px solid var(--border)"},F={display:"block",padding:"0.5rem",backgroundColor:"#090d16",borderRadius:"4px",fontFamily:"monospace",fontSize:"0.8rem",color:"var(--primary)",border:"1px solid var(--border)"},M={display:"flex",flexDirection:"column",height:"100%",minHeight:0},U={display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"0.75rem",color:"var(--muted)",marginBottom:"0.5rem"},H={flex:1,overflow:"auto",border:"1px solid var(--border)",borderRadius:"6px"},G={width:"100%",borderCollapse:"collapse",fontFamily:"monospace",fontSize:"0.8rem"},J={padding:"0.5rem 0.75rem",textAlign:"left",backgroundColor:"#0f172a",borderBottom:"1px solid var(--border)",color:"#94a3b8",fontWeight:600,position:"sticky",top:0,zIndex:1},Q={padding:"0.4rem 0.75rem",borderBottom:"1px solid rgba(255, 255, 255, 0.03)",color:"#cbd5e1",whiteSpace:"nowrap"},K={padding:"0.2rem 0.5rem",borderRadius:"4px",border:"1px solid var(--border)",backgroundColor:"rgba(255, 255, 255, 0.02)",color:"var(--muted)",fontSize:"0.7rem",fontWeight:600,cursor:"pointer",transition:"all 0.15s ease"},Y={width:"100%",backgroundColor:"#070a12",border:"1px solid var(--border-focus)",borderRadius:"3px",color:"#fff",padding:"0.1rem 0.3rem",fontSize:"0.8rem",fontFamily:"monospace",outline:"none"},V={cursor:"pointer",transition:"all 0.15s ease"},X={backgroundColor:"transparent"},Z={backgroundColor:"rgba(255, 255, 255, 0.01)"},ee={flex:1,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--muted)",fontSize:"0.8rem",textAlign:"center"},et={flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"1rem"},er={width:"24px",height:"24px",border:"3px solid rgba(109, 40, 217, 0.15)",borderTop:"3px solid var(--primary)",borderRadius:"50%",animation:"spin 1s linear infinite"},ea={width:"12px",height:"12px",border:"2px solid rgba(255, 255, 255, 0.1)",borderTop:"2px solid var(--muted)",borderRadius:"50%",animation:"spin 1s linear infinite"},es={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:999},en={width:"480px",backgroundColor:"#0d131f",borderRadius:"12px",border:"1px solid var(--border-focus)",padding:"1.5rem",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.5)"},el={display:"flex",flexDirection:"column",gap:"0.35rem",marginBottom:"1rem"},eo={fontSize:"0.75rem",fontWeight:600,color:"var(--muted)"},ei={padding:"0.5rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"#070a12",color:"#fff",outline:"none",fontSize:"0.8rem"},ed={padding:"0.5rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"#070a12",color:"#fff",outline:"none",fontSize:"0.8rem"},ec={padding:"0.5rem",borderRadius:"6px",fontSize:"0.75rem",marginBottom:"1rem"},eu={display:"flex",justifyContent:"space-between",marginTop:"1.5rem"},ep={padding:"0.4rem 0.75rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--muted)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},em={padding:"0.4rem 0.75rem",borderRadius:"6px",border:"none",backgroundColor:"transparent",color:"var(--muted)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},ef={padding:"0.4rem 0.75rem",borderRadius:"6px",border:"none",backgroundColor:"var(--primary)",color:"#fff",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"};if("u">typeof document){let e=document.createElement("style");e.innerHTML=`
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67585,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return a}});let s=e.r(32061);function a({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new s.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,r)=>{"use strict";function s(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return s}})},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return i}});let s=e.r(43476),a=e.r(74080),n=e.r(63599),l=e.r(9885),o=e.r(43369);function i({moduleIds:e}){if("u">typeof window)return null;let t=n.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let s=t.reactLoadableManifest;for(let t of e){if(!s[t])continue;let e=s[t].files;r.push(...e)}}if(0===r.length)return null;let d=(0,o.getAssetTokenQuery)();return(0,s.jsx)(s.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,s.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,a.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return d}});let s=e.r(43476),a=e.r(71645),n=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 t={...i,...e},r=(0,a.lazy)(()=>t.loader().then(o)),d=t.loading;function c(e){let o=d?(0,s.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,i=!t.ssr||!!t.loading,c=i?a.Suspense:a.Fragment,u=t.ssr?(0,s.jsxs)(s.Fragment,{children:["u"<typeof window?(0,s.jsx)(l.PreloadChunks,{moduleIds:t.modules}):null,(0,s.jsx)(r,{...e})]}):(0,s.jsx)(n.BailoutToCSR,{reason:"next/dynamic",children:(0,s.jsx)(r,{...e})});return(0,s.jsx)(c,{...i?{fallback:o}:{},children:u})}return c.displayName="LoadableComponent",c}},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let s=e.r(55682)._(e.r(69093));function a(e,t){let r={};"function"==typeof e&&(r.loader=e);let a={...r,...t};return(0,s.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},66381,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(74080);let a={display:"flex",height:"100%",width:"100%",backgroundColor:"#05070a",color:"#cbd5e1",fontSize:"0.875rem",minHeight:0},n={width:"220px",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",minHeight:0,backgroundColor:"rgba(10, 15, 24, 0.4)",flexShrink:0},l={display:"flex",flexDirection:"column",padding:"1rem",minHeight:0},o={display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.75rem"},i={fontWeight:700,letterSpacing:"0.05em",textTransform:"uppercase",fontSize:"0.75rem",color:"var(--muted)"},d={padding:"0.2rem 0.5rem",borderRadius:"4px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.7rem",fontWeight:600,cursor:"pointer"},c={display:"flex",flexDirection:"column",gap:"0.4rem",overflowY:"auto",maxHeight:"220px"},u={fontSize:"0.65rem",fontWeight:600,color:"var(--muted)",marginTop:"0.5rem",marginBottom:"0.2rem",letterSpacing:"0.05em"},p={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.5rem 0.6rem",borderRadius:"6px",backgroundColor:"rgba(255, 255, 255, 0.02)",border:"1px solid var(--border)",cursor:"pointer",transition:"all 0.2s ease"},m={backgroundColor:"rgba(109, 40, 217, 0.08)",border:"1px solid var(--border-focus)",boxShadow:"0 0 10px rgba(109, 40, 217, 0.1)"},f={display:"flex",flexDirection:"column",gap:"0.15rem",flex:1,minWidth:0},h={fontWeight:600,fontSize:"0.8rem",color:"#fff",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},g={fontSize:"0.7rem",color:"var(--muted)",textTransform:"uppercase"},x={background:"none",border:"none",color:"rgba(239, 68, 68, 0.4)",cursor:"pointer",fontSize:"0.75rem",padding:"0.25rem"},y={display:"flex",flexDirection:"column",gap:"0.25rem",overflowY:"auto",flex:1,minHeight:0},b={fontSize:"0.75rem",color:"var(--muted)",textAlign:"center",padding:"1rem 0"},j={display:"flex",flexDirection:"column"},v={display:"flex",alignItems:"center",padding:"0.35rem 0.5rem",borderRadius:"4px",cursor:"pointer",userSelect:"none",transition:"background 0.2s ease"},_={marginRight:"0.4rem",fontSize:"0.9rem"},w={flex:1,fontSize:"0.8rem",color:"#e2e8f0",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},S={fontSize:"0.6rem",color:"var(--muted)",marginLeft:"0.25rem"},k={display:"flex",flexDirection:"column",gap:"0.2rem",paddingLeft:"1.5rem",marginTop:"0.15rem",borderLeft:"1px dashed rgba(255,255,255,0.06)",marginLeft:"0.8rem",marginBottom:"0.25rem"},C={display:"flex",alignItems:"center",padding:"0.15rem 0.25rem",fontSize:"0.75rem"},N={marginRight:"0.3rem",fontSize:"0.7rem"},R={flex:1,color:"var(--muted)",overflow:"hidden",textOverflow:"ellipsis"},E={fontSize:"0.65rem",color:"rgba(109, 40, 217, 0.75)",fontFamily:"monospace",paddingLeft:"0.5rem"},L={flex:1,display:"flex",flexDirection:"column",minHeight:0,backgroundColor:"#05070a"},W={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.75rem 1rem",borderBottom:"1px solid var(--border)",backgroundColor:"rgba(15, 23, 42, 0.3)",flexShrink:0},O={fontSize:"0.75rem",color:"var(--muted)"},T={fontSize:"0.8rem",fontWeight:600,color:"#fff",display:"flex",alignItems:"center",gap:"0.4rem"},I={padding:"0.1rem 0.4rem",borderRadius:"4px",backgroundColor:"rgba(234, 179, 8, 0.12)",color:"#eab308",fontSize:"0.65rem",fontWeight:700,border:"1px solid rgba(234, 179, 8, 0.2)"},D={padding:"0.4rem 0.9rem",borderRadius:"6px",border:"none",backgroundColor:"var(--primary)",color:"#fff",fontSize:"0.8rem",fontWeight:600,transition:"all 0.2s ease"},P={height:"180px",borderBottom:"1px solid var(--border)",position:"relative",flexShrink:0},z={width:"100%",height:"100%",backgroundColor:"#080c14",border:"none",resize:"none",color:"#e2e8f0",fontFamily:"monospace",fontSize:"0.85rem",padding:"1rem",outline:"none",lineHeight:"1.4"},q={flex:1,display:"flex",flexDirection:"column",minHeight:0,padding:"1rem"},A={padding:"1rem",borderRadius:"8px",backgroundColor:"rgba(239, 68, 68, 0.08)",border:"1px solid rgba(239, 68, 68, 0.2)",overflowY:"auto"},B={margin:0,fontFamily:"monospace",fontSize:"0.8rem",color:"#f87171",whiteSpace:"pre-wrap"},$={marginTop:"1rem",padding:"0.75rem",borderRadius:"6px",backgroundColor:"rgba(0, 0, 0, 0.3)",border:"1px solid var(--border)"},F={display:"block",padding:"0.5rem",backgroundColor:"#090d16",borderRadius:"4px",fontFamily:"monospace",fontSize:"0.8rem",color:"var(--primary)",border:"1px solid var(--border)"},M={display:"flex",flexDirection:"column",height:"100%",minHeight:0},U={display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"0.75rem",color:"var(--muted)",marginBottom:"0.5rem"},H={flex:1,overflow:"auto",border:"1px solid var(--border)",borderRadius:"6px"},G={width:"100%",borderCollapse:"collapse",fontFamily:"monospace",fontSize:"0.8rem"},J={padding:"0.5rem 0.75rem",textAlign:"left",backgroundColor:"#0f172a",borderBottom:"1px solid var(--border)",color:"#94a3b8",fontWeight:600,position:"sticky",top:0,zIndex:1},Q={padding:"0.4rem 0.75rem",borderBottom:"1px solid rgba(255, 255, 255, 0.03)",color:"#cbd5e1",whiteSpace:"nowrap"},K={padding:"0.2rem 0.5rem",borderRadius:"4px",border:"1px solid var(--border)",backgroundColor:"rgba(255, 255, 255, 0.02)",color:"var(--muted)",fontSize:"0.7rem",fontWeight:600,cursor:"pointer",transition:"all 0.15s ease"},Y={width:"100%",backgroundColor:"#070a12",border:"1px solid var(--border-focus)",borderRadius:"3px",color:"#fff",padding:"0.1rem 0.3rem",fontSize:"0.8rem",fontFamily:"monospace",outline:"none"},V={cursor:"pointer",transition:"all 0.15s ease"},X={backgroundColor:"transparent"},Z={backgroundColor:"rgba(255, 255, 255, 0.01)"},ee={flex:1,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--muted)",fontSize:"0.8rem",textAlign:"center"},et={flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"1rem"},er={width:"24px",height:"24px",border:"3px solid rgba(109, 40, 217, 0.15)",borderTop:"3px solid var(--primary)",borderRadius:"50%",animation:"spin 1s linear infinite"},es={width:"12px",height:"12px",border:"2px solid rgba(255, 255, 255, 0.1)",borderTop:"2px solid var(--muted)",borderRadius:"50%",animation:"spin 1s linear infinite"},ea={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:999},en={width:"480px",backgroundColor:"#0d131f",borderRadius:"12px",border:"1px solid var(--border-focus)",padding:"1.5rem",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.5)"},el={display:"flex",flexDirection:"column",gap:"0.35rem",marginBottom:"1rem"},eo={fontSize:"0.75rem",fontWeight:600,color:"var(--muted)"},ei={padding:"0.5rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"#070a12",color:"#fff",outline:"none",fontSize:"0.8rem"},ed={padding:"0.5rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"#070a12",color:"#fff",outline:"none",fontSize:"0.8rem"},ec={padding:"0.5rem",borderRadius:"6px",fontSize:"0.75rem",marginBottom:"1rem"},eu={display:"flex",justifyContent:"space-between",marginTop:"1.5rem"},ep={padding:"0.4rem 0.75rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--muted)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},em={padding:"0.4rem 0.75rem",borderRadius:"6px",border:"none",backgroundColor:"transparent",color:"var(--muted)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},ef={padding:"0.4rem 0.75rem",borderRadius:"6px",border:"none",backgroundColor:"var(--primary)",color:"#fff",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"};if("u">typeof document){let e=document.createElement("style");e.innerHTML=`
|
|
2
2
|
@keyframes spin {
|
|
3
3
|
0% { transform: rotate(0deg); }
|
|
4
4
|
100% { transform: rotate(360deg); }
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
background-color: rgba(255, 255, 255, 0.03) !important;
|
|
8
8
|
outline: 1px dashed rgba(255, 255, 255, 0.2);
|
|
9
9
|
}
|
|
10
|
-
`,document.head.appendChild(e)}e.s(["default",0,function({workspaceRoot:e}){let[eh,eg]=(0,r.useState)({global:[],workspace:[]}),[ex,ey]=(0,r.useState)(null),[eb,ej]=(0,r.useState)(!0),[ev,e_]=(0,r.useState)(!0),[ew,eS]=(0,r.useState)([]),[ek,eC]=(0,r.useState)(null),[eN,eR]=(0,r.useState)({}),[eE,eL]=(0,r.useState)(!1),[eW,eO]=(0,r.useState)("SELECT * FROM sqlite_master;"),[eT,eI]=(0,r.useState)(!1),[eD,eP]=(0,r.useState)(null),[ez,eq]=(0,r.useState)(null),[eA,eB]=(0,r.useState)(null),[e$,eF]=(0,r.useState)(null),[eM,eU]=(0,r.useState)(!1),[eH,eG]=(0,r.useState)(!1),[eJ,eQ]=(0,r.useState)({id:"",name:"",type:"sqlite",filepath:"./dev.db",host:"localhost",port:5432,database:"postgres",username:"postgres",password:"",ssl:!1,readOnly:!0}),[eK,eY]=(0,r.useState)(!1),[eV,eX]=(0,r.useState)(null),eZ=async()=>{try{let t=await fetch(`/api/sql/connections?root=${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();e.success&&(eg({global:e.global||[],workspace:e.workspace||[]}),ey(e.activeId),ej(e.isActiveGlobal))}}catch(e){console.error("Failed to load connection profiles:",e)}},e0=async()=>{if(!ex)return void eS([]);eL(!0);try{let t=await fetch(`/api/sql/schema?action=list_tables&root=${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();e.success?(eS(e.tables||[]),eP(null)):eP(e.error||"Failed to load database schema.")}else{let e=await t.json();eP(e.error||"Failed to load database schema.")}}catch(e){console.error("Failed to load schema:",e)}finally{eL(!1)}},e1=async t=>{if(eN[t])return void eC(ek===t?null:t);try{let r=await fetch(`/api/sql/schema?action=describe_table&table=${encodeURIComponent(t)}&root=${encodeURIComponent(e)}`);if(r.ok){let e=await r.json();e.success&&(eR(r=>({...r,[t]:e.columns})),eC(t))}}catch(e){console.error(`Failed to load columns for table ${t}:`,e)}};(0,r.useEffect)(()=>{eZ()},[e]),(0,r.useEffect)(()=>{e0(),eq(null),eC(null),eR({});let e=eb?eh.global.find(e=>e.id===ex):eh.workspace.find(e=>e.id===ex);e&&("sqlite"===e.type?eO("SELECT name, type FROM sqlite_master WHERE type='table';"):"mssql"===e.type?eO("SELECT * FROM sys.tables;"):eO("SELECT * FROM information_schema.tables LIMIT 10;"))},[ex,eb,eh.global.length,eh.workspace.length]);let e5=async(t,r)=>{try{(await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"set_active",profileId:t,isGlobal:r,root:e})})).ok&&(ey(t),ej(r))}catch(e){console.error("Failed to set active profile:",e)}},e2=async()=>{eX(null);try{let t=await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"test",profile:eJ,root:e})}),r=await t.json();r.success?eX({success:!0,message:"Connection test successful!"}):eX({success:!1,message:r.error||"Connection test failed."})}catch(e){eX({success:!1,message:e.message||"Failed to make test query."})}},e8=async t=>{if(t.preventDefault(),!eJ.name||!eJ.type)return;eY(!0);let r=eJ.id||`profile_${Math.random().toString(36).substring(7)}`,
|
|
11
|
-
${e.message}`)}},e3=async()=>{if(eW.trim()&&ex){eI(!0),eP(null),eq(null);try{let t=await fetch("/api/sql/query",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sql:eW.trim(),root:e})}),r=await t.json();t.ok&&r.success?(eq({rows:r.rows||[],fields:r.fields||[],durationMs:r.durationMs||0,affectedRows:r.affectedRows}),(eW.toLowerCase().includes("create table")||eW.toLowerCase().includes("drop table")||eW.toLowerCase().includes("alter table"))&&e0()):eP(r.error||"Failed to execute query.")}catch(e){eP(e.message||"An unexpected error occurred during execution.")}finally{eI(!1)}}},e4=eb?eh.global.find(e=>e.id===ex):eh.workspace.find(e=>e.id===ex);return(0,t.jsxs)("div",{style:s,children:[(0,t.jsx)("div",{style:{...n,width:ev?"220px":"0px",borderRight:ev?"1px solid var(--border)":"none",overflow:"hidden",transition:"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)"},children:ev&&(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minWidth:"220px",minHeight:0},children:[(0,t.jsxs)("div",{style:l,children:[(0,t.jsxs)("div",{style:o,children:[(0,t.jsx)("span",{style:i,children:"Connections"}),(0,t.jsx)("button",{style:d,onClick:()=>{eX(null),eQ({id:"",name:"",type:"sqlite",filepath:"./dev.db",host:"localhost",port:5432,database:"postgres",username:"postgres",password:"",ssl:!1,readOnly:!0}),eG(!1),eU(!0)},title:"Add Database Connection Profile",children:"➕ Add"})]}),(0,t.jsxs)("div",{style:c,children:[0===eh.global.length&&0===eh.workspace.length&&(0,t.jsx)("div",{style:b,children:"No connections configured. Add one to start."}),eh.workspace.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:u,children:"WORKSPACE CONNECTIONS"}),eh.workspace.map(e=>(0,t.jsxs)("div",{style:{...p,...ex===e.id&&!eb?m:{}},onClick:()=>e5(e.id,!1),children:[(0,t.jsxs)("div",{style:f,children:[(0,t.jsxs)("span",{style:h,children:["📁 ",e.name]}),(0,t.jsx)("span",{style:g,children:e.type})]}),(0,t.jsx)("button",{style:x,onClick:t=>{t.stopPropagation(),e6(e.id,!1)},children:"✖"})]},e.id))]}),eh.global.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:u,children:"GLOBAL CONNECTIONS"}),eh.global.map(e=>(0,t.jsxs)("div",{style:{...p,...ex===e.id&&eb?m:{}},onClick:()=>e5(e.id,!0),children:[(0,t.jsxs)("div",{style:f,children:[(0,t.jsxs)("span",{style:h,children:["🌐 ",e.name]}),(0,t.jsx)("span",{style:g,children:e.type})]}),(0,t.jsx)("button",{style:x,onClick:t=>{t.stopPropagation(),e6(e.id,!0)},children:"✖"})]},e.id))]})]})]}),(0,t.jsxs)("div",{style:{...l,flex:1,borderTop:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{style:o,children:[(0,t.jsx)("span",{style:i,children:"Schema Tables"}),eE&&(0,t.jsx)("span",{style:ea})]}),(0,t.jsxs)("div",{style:y,children:[!ex&&(0,t.jsx)("div",{style:b,children:"Select an active connection to view tables."}),ex&&0===ew.length&&!eE&&(0,t.jsx)("div",{style:b,children:"No tables found in database schema."}),ew.map(e=>(0,t.jsxs)("div",{style:j,children:[(0,t.jsxs)("div",{style:v,onClick:()=>e1(e.name),children:[(0,t.jsx)("span",{style:_,children:"view"===e.type?"👁️":"📊"}),(0,t.jsx)("span",{style:w,children:e.name}),(0,t.jsx)("span",{style:S,children:ek===e.name?"▼":"▶"})]}),ek===e.name&&eN[e.name]&&(0,t.jsx)("div",{style:k,children:eN[e.name].map(e=>(0,t.jsxs)("div",{style:C,children:[(0,t.jsx)("span",{style:N,children:e.isPrimaryKey?"🔑":e.isForeignKey?"🔗":"▫"}),(0,t.jsx)("span",{style:R,title:e.type,children:e.name}),(0,t.jsx)("span",{style:E,children:e.type.toLowerCase().substring(0,12)})]},e.name))})]},e.name))]})]})]})}),(0,t.jsxs)("div",{style:L,children:[(0,t.jsxs)("div",{style:W,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[(0,t.jsx)("button",{type:"button",onClick:()=>e_(!ev),style:{background:"rgba(255, 255, 255, 0.05)",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--muted)",cursor:"pointer",padding:"0.25rem 0.5rem",fontSize:"0.75rem",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.15s ease"},title:ev?"Collapse Connections List":"Expand Connections List",children:ev?"◀ Collapse":"📂 Schema Connections"}),(0,t.jsx)("span",{style:O,children:"Active Connection:"}),e4?(0,t.jsxs)("span",{style:T,children:[eb?"🌐":"📁"," ",e4.name," (",e4.type,")",e4.readOnly&&(0,t.jsx)("span",{style:I,children:"Read-Only"})]}):(0,t.jsx)("span",{style:{...T,color:"var(--danger)"},children:"No Connection Selected"})]}),(0,t.jsx)("button",{style:{...D,opacity:!ex||eT?.6:1,cursor:!ex||eT?"not-allowed":"pointer"},onClick:e3,disabled:!ex||eT,children:eT?"⌛ Running...":"⚡ Execute Query (F5)"})]}),(0,t.jsx)("div",{style:P,children:(0,t.jsx)("textarea",{style:z,value:eW,onChange:e=>eO(e.target.value),placeholder:"Write your SQL query script here...",onKeyDown:e=>{("F5"===e.key||e.ctrlKey&&"Enter"===e.key)&&(e.preventDefault(),e3())}})}),(0,t.jsxs)("div",{style:q,children:[eD&&(0,t.jsxs)("div",{style:A,children:[(0,t.jsx)("h4",{style:{margin:"0 0 0.5rem 0",color:"var(--danger)"},children:"⚠️ Execution Error"}),(0,t.jsx)("pre",{style:B,children:eD}),eD.includes("not installed")&&(0,t.jsxs)("div",{style:$,children:[(0,t.jsx)("p",{style:{margin:"0 0 0.5rem 0"},children:"To resolve this, run this installer command in your workspace terminal:"}),(0,t.jsx)("code",{style:F,children:e4?.type==="sqlite"?"npm install better-sqlite3":e4?.type==="postgres"?"npm install pg":e4?.type==="mysql"?"npm install mysql2":"npm install mssql"})]})]}),ez&&(0,t.jsxs)("div",{style:M,children:[(0,t.jsxs)("div",{style:U,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,t.jsxs)("span",{children:["Query completed."," ",void 0!==ez.affectedRows?`Affected rows: ${ez.affectedRows}`:`Returned ${ez.rows.length} rows`]}),(0,t.jsxs)("span",{children:["Duration: ",ez.durationMs,"ms"]})]}),ez.rows.length>0&&(0,t.jsxs)("div",{style:{display:"flex",gap:"0.4rem"},children:[(0,t.jsx)("button",{onClick:()=>{if(ez&&0!==ez.rows.length)try{let e=ez.fields.join(","),t=ez.rows.map(e=>ez.fields.map(t=>{let r=e[t];if(null===r)return"NULL";let a=String(r);return a.includes(",")||a.includes('"')||a.includes("\n")||a.includes("\r")?`"${a.replace(/"/g,'""')}"`:a}).join(",")),r=[e,...t].join("\r\n"),a=new Blob([r],{type:"text/csv;charset=utf-8;"}),s=URL.createObjectURL(a),n=document.createElement("a");n.setAttribute("href",s),n.setAttribute("download",`query-results-${Date.now()}.csv`),document.body.appendChild(n),n.click(),document.body.removeChild(n)}catch(e){console.error("Export CSV failed:",e),alert("Failed to export as CSV")}},style:K,children:"📥 Export CSV"}),(0,t.jsx)("button",{onClick:()=>{if(ez&&0!==ez.rows.length)try{let e=JSON.stringify(ez.rows,null,2),t=new Blob([e],{type:"application/json;charset=utf-8;"}),r=URL.createObjectURL(t),a=document.createElement("a");a.setAttribute("href",r),a.setAttribute("download",`query-results-${Date.now()}.json`),document.body.appendChild(a),a.click(),document.body.removeChild(a)}catch(e){console.error("Export JSON failed:",e),alert("Failed to export as JSON")}},style:K,children:"📥 Export JSON"})]})]}),ez.rows.length>0?(0,t.jsx)("div",{style:H,children:(0,t.jsxs)("table",{style:G,children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{children:ez.fields.map(e=>(0,t.jsx)("th",{style:J,children:e},e))})}),(0,t.jsx)("tbody",{children:ez.rows.map((e,r)=>(0,t.jsx)("tr",{style:r%2==0?X:Z,children:ez.fields.map(a=>{let s=eA&&eA.rowIndex===r&&eA.field===a,n=e$&&e$.rowIndex===r&&e$.field===a&&"saving"===e$.status,l=e$&&e$.rowIndex===r&&e$.field===a&&"success"===e$.status,o=e$&&e$.rowIndex===r&&e$.field===a&&"error"===e$.status,i={...Q,...V};return n?i={...i,backgroundColor:"rgba(168, 85, 247, 0.15)"}:l?i={...i,backgroundColor:"rgba(16, 185, 129, 0.25)"}:o&&(i={...i,backgroundColor:"rgba(239, 68, 68, 0.25)"}),(0,t.jsx)("td",{style:i,onDoubleClick:()=>{e4?.readOnly?alert("Database connection is Read-Only. Editing is disabled."):eB({rowIndex:r,field:a,value:null===e[a]?"NULL":String(e[a])})},className:"db-cell",title:"Double click to edit cell",children:s?(0,t.jsx)("input",{style:Y,value:eA.value,autoFocus:!0,onChange:e=>eB({...eA,value:e.target.value}),onKeyDown:async t=>{if("Enter"===t.key){t.preventDefault();let s=eA.value;eB(null),s!==(null===e[a]?"NULL":String(e[a]))&&await e7(r,a,s,e[a])}else"Escape"===t.key&&eB(null)},onBlur:async()=>{let t=eA.value;eB(null),t!==(null===e[a]?"NULL":String(e[a]))&&await e7(r,a,t,e[a])}}):null===e[a]?"NULL":"object"==typeof e[a]?JSON.stringify(e[a]):String(e[a])},a)})},r))})]})}):void 0===ez.affectedRows&&(0,t.jsx)("div",{style:ee,children:"Query executed successfully, but returned 0 results."})]}),!eD&&!ez&&!eT&&(0,t.jsx)("div",{style:ee,children:"Write a query script and click Execute to view table records."}),eT&&(0,t.jsxs)("div",{style:et,children:[(0,t.jsx)("span",{style:er}),(0,t.jsx)("span",{style:{color:"var(--muted)"},children:"Running database statement..."})]})]})]}),eM&&"u">typeof document&&(0,a.createPortal)((0,t.jsx)("div",{style:es,children:(0,t.jsxs)("div",{style:en,children:[(0,t.jsxs)("h3",{style:{margin:"0 0 1rem 0",display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"🔌 Add Database Profile"}),(0,t.jsx)("span",{style:{cursor:"pointer"},onClick:()=>eU(!1),children:"✖"})]}),(0,t.jsxs)("form",{onSubmit:e8,children:[(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Profile Name"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.name,onChange:e=>eQ(t=>({...t,name:e.target.value})),placeholder:"e.g. Local Postgres, Dev SQLite"})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Scope Level"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"radio",checked:!eH,onChange:()=>eG(!1)}),"Workspace Local"]}),(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"radio",checked:eH,onChange:()=>eG(!0)}),"Global User Profile"]})]})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database Type"}),(0,t.jsxs)("select",{style:ed,value:eJ.type,onChange:e=>{let t=e.target.value,r=5432;"mysql"===t&&(r=3306),"mssql"===t&&(r=1433),eQ(e=>({...e,type:t,filepath:"sqlite"===t?"./dev.db":void 0,port:"sqlite"!==t?r:void 0,database:"sqlite"===t?void 0:"mssql"===t?"master":"postgres"===t?"postgres":"",username:"sqlite"===t?void 0:"mssql"===t?"sa":"postgres"===t?"postgres":"root"}))},children:[(0,t.jsx)("option",{value:"sqlite",children:"SQLite (Local File)"}),(0,t.jsx)("option",{value:"postgres",children:"PostgreSQL"}),(0,t.jsx)("option",{value:"mysql",children:"MySQL"}),(0,t.jsx)("option",{value:"mssql",children:"Microsoft SQL Server"})]})]}),"sqlite"===eJ.type?(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database File Path"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.filepath||"",onChange:e=>eQ(t=>({...t,filepath:e.target.value})),placeholder:"Relative (e.g. ./data/dev.db) or Absolute path"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{...el,flex:3},children:[(0,t.jsx)("label",{style:eo,children:"Host IP Address"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.host||"",onChange:e=>eQ(t=>({...t,host:e.target.value})),placeholder:"localhost or IP"})]}),(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Port"}),(0,t.jsx)("input",{style:ei,type:"number",required:!0,value:eJ.port||0,onChange:e=>eQ(t=>({...t,port:parseInt(e.target.value)}))})]})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database Name"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.database||"",onChange:e=>eQ(t=>({...t,database:e.target.value}))})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Username"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.username||"",onChange:e=>eQ(t=>({...t,username:e.target.value}))})]}),(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Password"}),(0,t.jsx)("input",{style:ei,type:"password",value:eJ.password||"",onChange:e=>eQ(t=>({...t,password:e.target.value}))})]})]}),("postgres"===eJ.type||"mssql"===eJ.type)&&(0,t.jsx)("div",{style:el,children:(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"checkbox",checked:!!eJ.ssl,onChange:e=>eQ(t=>({...t,ssl:e.target.checked}))}),"Require SSL Secure Connection"]})})]}),(0,t.jsx)("div",{style:el,children:(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"checkbox",checked:!!eJ.readOnly,onChange:e=>eQ(t=>({...t,readOnly:e.target.checked}))}),"Enforce Read-Only Connection (Disable mutations)"]})}),eV&&(0,t.jsx)("div",{style:{...ec,backgroundColor:eV.success?"rgba(16, 185, 129, 0.12)":"rgba(239, 68, 68, 0.12)",border:eV.success?"1px solid var(--success)":"1px solid var(--danger)",color:eV.success?"var(--success)":"var(--danger)"},children:eV.message}),(0,t.jsxs)("div",{style:eu,children:[(0,t.jsx)("button",{type:"button",style:ep,onClick:e2,children:"🔍 Test Connection"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{type:"button",style:em,onClick:()=>eU(!1),children:"Cancel"}),(0,t.jsx)("button",{type:"submit",style:ef,disabled:eK,children:eK?"Saving...":"Save Profile"})]})]})]})]})}),document.body)]})}])},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",agentStateBadge:"page-module___8aEwW__agentStateBadge",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","pulse-attention":"page-module___8aEwW__pulse-attention","pulse-thinking":"page-module___8aEwW__pulse-thinking",pulseDot:"page-module___8aEwW__pulseDot",quickLaunchBtn:"page-module___8aEwW__quickLaunchBtn",sectionTitle:"page-module___8aEwW__sectionTitle",sidePanel:"page-module___8aEwW__sidePanel","state-complete":"page-module___8aEwW__state-complete","state-idle":"page-module___8aEwW__state-idle","state-needs-input":"page-module___8aEwW__state-needs-input","state-thinking":"page-module___8aEwW__state-thinking",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 t=e.i(43476),r=e.i(71645),a=e.i(70703),s=e.i(20897),n=e.i(66381);let l=e=>"mock"===e?"🧪":e.includes("-docker")?"🐳":e.includes("-ssh")?"🌐":"💻",o=(0,a.default)(()=>e.A(33779),{loadableGenerated:{modules:[37314]},ssr:!1,loading:()=>(0,t.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,t.jsx)("span",{children:"Initializing terminal emulator..."})})}),i=(0,a.default)(()=>e.A(39429),{loadableGenerated:{modules:[1985]},ssr:!1,loading:()=>(0,t.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,t.jsx)("span",{style:{color:"var(--muted)"},children:"Initializing prompt editor..."})})}),d=(0,a.default)(()=>e.A(56915),{loadableGenerated:{modules:[99026]},ssr:!1}),c=(0,a.default)(()=>e.A(78716),{loadableGenerated:{modules:[9949]},ssr:!1}),u=(0,a.default)(()=>e.A(33789),{loadableGenerated:{modules:[20032]},ssr:!1}),p=(0,a.default)(()=>e.A(78003),{loadableGenerated:{modules:[97722]},ssr:!1});e.s(["default",0,function(){let[e,a]=(0,r.useState)([]),[m,f]=(0,r.useState)(null),[h,g]=(0,r.useState)(!1),[x,y]=(0,r.useState)(!1),[b,j]=(0,r.useState)(!1),[v,_]=(0,r.useState)(!1),[w,S]=(0,r.useState)(!1),[k,C]=(0,r.useState)(!1),[N,R]=(0,r.useState)(""),[E,L]=(0,r.useState)(9601),[W,O]=(0,r.useState)("0.2.19"),[T,I]=(0,r.useState)(null),[D,P]=(0,r.useState)([]),z=e.filter(e=>"workspace-terminal"!==e.id),q=e.find(e=>e.id===m),A=z.some(e=>("claude-docker"===e.type||"aider-docker"===e.type)&&"running"===e.status),B=z.some(e=>"claude-ssh"===e.type&&"running"===e.status),$=async()=>{try{let e=await fetch("/api/sessions"),t=await e.json();t.sessions&&a(t.sessions),t.wsPort&&L(t.wsPort),t.originalCwd&&R(t.originalCwd),t.version&&O(t.version)}catch(e){console.error("Failed to fetch sessions:",e)}},F=async()=>{try{let e=await fetch("/api/recents");if(e.ok){let t=await e.json();t.success&&t.recents&&t.recents.lastSession&&I(t.recents.lastSession)}}catch(e){console.error("Failed to fetch recents:",e)}},M=async()=>{try{let e=await fetch("/api/configs");if(e.ok){let t=await e.json();t.configs&&P(t.configs)}}catch(e){console.error("Failed to fetch configs:",e)}};(0,r.useEffect)(()=>{(async()=>{await $(),await F(),await M()})(),"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($,4e3);return()=>clearInterval(e)},[]);let U=async(e,t,r,a)=>{g(!0);try{let s=t;s||("claude"===e?s="Claude Local":"claude-docker"===e?s="Claude Docker":"claude-ssh"===e?s="Claude SSH":"aider"===e?s="Aider Local":"aider-docker"===e?s="Aider Docker":"mock"===e&&(s="Mock Session"));let n={type:e,name:s,workspaceRoot:r,scopedDirs:a};if(("aider"===e||"aider-docker"===e)&&!r)try{let e=await fetch("/api/context/aider");if(e.ok){let t=await e.json();t.success&&t.config&&(n.workspaceRoot=t.config.workspaceRoot,n.scopedDirs=t.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(n)}),o=await l.json();o.success&&(await $(),await M(),f(o.session.id),I({type:e,name:s,workspaceRoot:r,scopedDirs:a}))}catch(e){console.error("Failed to launch session:",e)}finally{g(!1)}},H=async e=>{g(!0);try{let t=await fetch("/api/sessions/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:e.type,name:e.name,workspaceRoot:e.workspaceRoot,scopedDirs:e.scopedDirs})}),r=await t.json();r.success?(await $(),f(r.session.id)):alert(r.error||"Failed to launch configuration.")}catch(e){console.error(e),alert("Network error: failed to launch configuration.")}finally{g(!1)}},G=async e=>{if(window.confirm("Are you sure you want to delete this configuration template?"))try{(await fetch("/api/configs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",id:e})})).ok?await M():alert("Failed to delete configuration template.")}catch(e){console.error(e),alert("Network error: failed to delete configuration template.")}},J=async(e,t=!1)=>{try{let r=await fetch("/api/sessions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,delete:t})});(await r.json()).success&&(t&&m===e&&f(null),await $())}catch(e){console.error("Failed to stop session:",e)}};return(0,t.jsxs)("div",{className:`${s.default.container} ${q?s.default.containerActive:""}`,children:[(0,t.jsxs)("header",{className:s.default.header,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1.5rem"},children:[(0,t.jsx)("img",{src:"/logo.png",alt:"NeuralLoom Logo",style:{width:"160px",height:"160px",borderRadius:"16px",objectFit:"contain"}}),(0,t.jsxs)("div",{className:s.default.logoArea,children:[(0,t.jsx)("h1",{className:s.default.title,style:{margin:0,lineHeight:1.1},children:"NeuralLoom"}),(0,t.jsx)("span",{className:s.default.subtitle,children:"Unified AI Orchestrator & Context Bridge"})]})]}),(0,t.jsxs)("div",{className:s.default.statusIndicator,children:[(0,t.jsx)("span",{className:s.default.pulseDot}),(0,t.jsx)("span",{children:"Orchestrator Online"})]})]}),q?(0,t.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:(0,t.jsx)(p,{sessionId:q.id,workspaceRoot:q.workspaceRoot||"",scopedDirs:q.scopedDirs||[],onClose:()=>f(null),sessions:e,onSwitchSession:e=>f(e),onRefreshSessions:$,wsPort:E})}):(0,t.jsxs)("div",{className:s.default.dashboardGrid,children:[(0,t.jsxs)("div",{className:s.default.mainPanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:s.default.sectionTitle,children:"Built-in Database Explorer & SQL Client"}),(0,t.jsx)("div",{className:"card",style:{padding:0,overflow:"hidden",height:"450px",border:"1px solid var(--border)"},children:(0,t.jsx)(n.default,{workspaceRoot:N||""})})]}),(0,t.jsxs)("section",{style:{marginTop:"1.5rem"},children:[(0,t.jsx)("h2",{className:s.default.sectionTitle,children:"Shared Context Hub & Slash Commands"}),(0,t.jsxs)("div",{className:s.default.contextList,children:[(0,t.jsxs)("div",{className:`${s.default.contextItem} card`,children:[(0,t.jsxs)("div",{className:s.default.contextMeta,children:[(0,t.jsx)("span",{className:s.default.contextTitle,children:"Staged Context & System Rules (/ccc)"}),(0,t.jsx)("span",{className:s.default.contextDetails,children:"Compiles AGENTS.md guidelines and files map."})]}),(0,t.jsx)("button",{onClick:async()=>{m&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:m,command:"/ccc"})})},disabled:!m,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.75rem",fontWeight:600,opacity:m?1:.5,cursor:m?"pointer":"not-allowed"},children:"🚀 Mount (/ccc)"})]}),(0,t.jsxs)("div",{className:`${s.default.contextItem} card`,children:[(0,t.jsxs)("div",{className:s.default.contextMeta,children:[(0,t.jsx)("span",{className:s.default.contextTitle,children:"Staged Developer Prompt (/ccp)"}),(0,t.jsx)("span",{className:s.default.contextDetails,children:"Executes prompt in .ai/neural-loom/cprompt.md."})]}),(0,t.jsx)("button",{onClick:async()=>{m&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:m,command:"/ccp"})})},disabled:!m,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--success)",backgroundColor:"transparent",color:"var(--success)",fontSize:"0.75rem",fontWeight:600,opacity:m?1:.5,cursor:m?"pointer":"not-allowed"},children:"⚡ Run (/ccp)"})]})]}),(0,t.jsx)(i,{})]})]}),(0,t.jsxs)("div",{className:s.default.mainPanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:s.default.sectionTitle,children:"Active AI Agents"}),0===z.length?(0,t.jsxs)("div",{className:"card",style:{padding:"3rem 1.5rem",textAlign:"center"},children:[(0,t.jsx)("p",{style:{color:"var(--muted)",marginBottom:"1.5rem"},children:"No active agent sessions. Launch a Claude or Aider agent session to begin."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.75rem",flexDirection:"column"},children:[T&&(0,t.jsx)("button",{className:s.default.quickLaunchBtn,onClick:()=>{U(T.type,T.name,T.workspaceRoot,T.scopedDirs)},disabled:h,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none"},title:`Re-launch: ${T.name||T.type}`,children:"⚡ Re-launch Last Session"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:s.default.quickLaunchBtn,onClick:()=>{C(!1),S(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none",flex:1},children:"Launch Claude"}),(0,t.jsx)("button",{className:s.default.quickLaunchBtn,onClick:()=>{_(!1),j(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",flex:1},children:"Launch Aider"})]})]}),(0,t.jsxs)("div",{style:{marginTop:"1.5rem",fontSize:"0.75rem",color:"var(--muted)"},children:["Need a simulator?"," ",(0,t.jsx)("span",{onClick:()=>U("mock"),style:{color:"var(--primary)",cursor:"pointer",textDecoration:"underline"},children:"Start mock playground"})]})]}):(0,t.jsx)("div",{className:s.default.agentGrid,children:z.map(e=>(0,t.jsxs)("div",{className:`${s.default.agentCard} card ${m===e.id?s.default.activeBorder:""}`,children:[(0,t.jsxs)("div",{className:s.default.agentHeader,children:[(0,t.jsx)("span",{className:s.default.agentName,children:e.name}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.35rem",alignItems:"center"},children:["running"===e.status&&e.agentState&&(0,t.jsxs)("span",{className:`${s.default.agentStateBadge} ${s.default["state-"+e.agentState]}`,children:["thinking"===e.agentState&&`${l(e.type)} 💭`,"needs-input"===e.agentState&&`${l(e.type)} ⚠️`,"complete"===e.agentState&&`${l(e.type)} ✅`,"idle"===e.agentState&&`${l(e.type)} 💤`]}),(0,t.jsx)("span",{className:`${s.default.agentBadge} ${"stopped"===e.status?s.default.stoppedBadge:""}`,children:e.status})]})]}),(0,t.jsxs)("div",{className:s.default.cardBody,style:{padding:"1rem"},children:[(0,t.jsxs)("p",{style:{fontSize:"0.8rem",color:"var(--muted)",margin:0},children:["ID: ",(0,t.jsx)("code",{style:{fontSize:"0.72rem"},children:e.id.substring(0,8)})," | Type: ",e.type,(0,t.jsx)("br",{}),"Logs: ",e.logsCount," lines"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.75rem"},children:["running"===e.status?(0,t.jsx)("button",{onClick:()=>J(e.id,!1),style:{flex:1,padding:"0.35rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"transparent",fontSize:"0.75rem",color:"var(--danger)",cursor:"pointer"},children:"Stop"}):(0,t.jsx)("button",{onClick:()=>J(e.id,!0),style:{flex:1,padding:"0.35rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",fontSize:"0.75rem",color:"var(--muted)",cursor:"pointer"},children:"Delete"}),(0,t.jsx)("button",{onClick:()=>f(e.id),style:{flex:2,padding:"0.35rem",borderRadius:"6px",border:"none",backgroundColor:m===e.id?"var(--border-focus)":"var(--primary)",fontSize:"0.75rem",fontWeight:600,color:"#fff",cursor:"pointer"},children:m===e.id?"Connected":"Open Console"})]})]})]},e.id))})]}),m&&"workspace-terminal"!==m&&(0,t.jsxs)("section",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border-focus)",marginTop:"1rem"},children:[(0,t.jsxs)("div",{className:s.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(109, 40, 217, 0.08)",padding:"0.5rem 1rem"},children:[(0,t.jsxs)("span",{style:{fontWeight:600,fontSize:"0.85rem",display:"flex",alignItems:"center",gap:"0.5rem"},children:["🖥️ Console — ",e.find(e=>e.id===m)?.name]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center"},children:[e.find(e=>e.id===m)?.status==="stopped"&&(0,t.jsx)("button",{onClick:async()=>{try{let t=e.find(e=>e.id===m),r=t&&("claude"===t.type||"claude-docker"===t.type||"claude-ssh"===t.type),a=!1;r&&(a=window.confirm("Would you like to resume your previous Claude session?"));let s=await fetch("/api/sessions/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:m,resume:a})});if(s.ok)await $();else{let e=await s.json();alert(e.error||"Failed to restart session.")}}catch(e){console.error("Failed to restart session:",e)}},style:{padding:"0.15rem 0.4rem",borderRadius:"4px",border:"1px solid #eab308",backgroundColor:"rgba(234, 179, 8, 0.15)",color:"#eab308",fontSize:"0.65rem",fontWeight:600,cursor:"pointer"},children:"⚡ Restart"}),(0,t.jsx)("button",{onClick:()=>f(null),style:{border:"none",background:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.75rem"},children:"✖"})]})]}),(0,t.jsx)(o,{sessionId:m,wsPort:E})]})]}),(0,t.jsxs)("div",{className:s.default.sidePanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:s.default.sectionTitle,children:"Execution Environments"}),(0,t.jsxs)("div",{className:s.default.envGrid,children:[(0,t.jsxs)("div",{className:s.default.envRow,style:{padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:s.default.envName,children:"💻 Local Host"}),(0,t.jsx)("span",{className:s.default.envStatus,style:{color:"var(--success)"},children:"Active"})]}),(0,t.jsxs)("div",{className:s.default.envRow,style:{opacity:A?1:.6,padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:s.default.envName,children:"🐳 Docker Sandbox"}),(0,t.jsx)("span",{className:s.default.envStatus,style:{color:A?"var(--success)":"var(--muted)"},children:A?"Active":"Not Mounted"})]}),(0,t.jsxs)("div",{className:s.default.envRow,style:{opacity:B?1:.6,padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:s.default.envName,children:"🌐 Remote VM (SSH)"}),(0,t.jsx)("span",{className:s.default.envStatus,style:{color:B?"var(--success)":"var(--muted)"},children:B?"Active":"Offline"})]})]})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:s.default.sectionTitle,children:"Saved Configurations"}),(0,t.jsx)("div",{className:"card",style:{padding:"1rem",display:"flex",flexDirection:"column",gap:"0.75rem"},children:0===D.length?(0,t.jsx)("p",{style:{color:"var(--muted)",fontSize:"0.8rem",textAlign:"center",margin:"1rem 0"},children:"No configuration templates saved yet. Save a template from the Claude/Aider launch wizards."}):(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem",maxHeight:"200px",overflowY:"auto"},children:D.map(e=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(255, 255, 255, 0.02)",padding:"0.5rem",borderRadius:"6px",border:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.15rem",minWidth:0},children:[(0,t.jsx)("span",{style:{fontSize:"0.8rem",fontWeight:600,color:"var(--foreground)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.name}),(0,t.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)",textTransform:"uppercase"},children:e.type})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.25rem"},children:[(0,t.jsx)("button",{onClick:()=>H(e),disabled:h,style:{padding:"0.2rem 0.4rem",borderRadius:"4px",backgroundColor:"var(--primary)",color:"#fff",border:"none",fontSize:"0.7rem",cursor:"pointer"},children:"Launch"}),(0,t.jsx)("button",{onClick:()=>G(e.id),style:{padding:"0.2rem 0.4rem",borderRadius:"4px",backgroundColor:"transparent",color:"var(--danger)",border:"1px solid var(--danger)",fontSize:"0.7rem",cursor:"pointer"},children:"Delete"})]})]},e.id))})})]}),(0,t.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:s.default.quickLaunchBtn,onClick:()=>{C(!1),S(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🤖 Claude Local"}),(0,t.jsx)("button",{className:s.default.quickLaunchBtn,onClick:()=>{C(!0),S(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(170, 72%, 40%) 0%, hsl(195, 100%, 40%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐳 Claude Docker"})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:s.default.quickLaunchBtn,onClick:()=>{_(!1),j(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐍 Aider Local"}),(0,t.jsx)("button",{className:s.default.quickLaunchBtn,onClick:()=>{_(!0),j(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(195, 100%, 40%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐳 Aider Docker"})]}),(0,t.jsx)("button",{className:s.default.quickLaunchBtn,onClick:()=>y(!0),disabled:h,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem"},children:"🌐 Connect Remote SSH"})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:s.default.sectionTitle,children:"Workspace Terminal"}),(0,t.jsxs)("div",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border)",padding:0},children:[(0,t.jsx)("div",{className:s.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(255, 255, 255, 0.02)",padding:"0.4rem 0.75rem"},children:(0,t.jsxs)("span",{style:{fontWeight:600,fontSize:"0.75rem"},children:["💻 Local Shell (CWD: ",N.split(/[/\\]/).pop()||"root",")"]})}),(0,t.jsx)(o,{sessionId:"workspace-terminal",height:"180px",wsPort:E})]})]}),(0,t.jsxs)("section",{className:"card",style:{padding:"1rem",display:"flex",flexDirection:"column",gap:"0.5rem"},children:[(0,t.jsx)("h3",{style:{fontSize:"0.9rem",fontWeight:700,margin:0},children:"Quick Actions"}),(0,t.jsxs)("ul",{style:{listStyle:"none",fontSize:"0.75rem",display:"flex",flexDirection:"column",gap:"0.35rem",color:"var(--muted)",padding:0,margin:0},children:[(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Configure API Keys"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Edit rules templates"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Inspect process locks"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]})]})]})]})]}),(0,t.jsxs)("footer",{className:s.default.footer,children:[(0,t.jsxs)("span",{children:["NeuralLoom v",W," — Experimental AI Orchestrator Bridge"]}),(0,t.jsxs)("span",{children:["Directory: ",N||"Loading..."]})]}),x&&(0,t.jsx)(d,{onClose:()=>y(!1),onConfirmLaunch:()=>{y(!1),U("claude-ssh")}}),b&&(0,t.jsx)(c,{onClose:()=>j(!1),isDocker:v,onConfirmLaunch:(e,t,r)=>{j(!1),U(v?"aider-docker":"aider",e,t,r)}}),w&&(0,t.jsx)(u,{onClose:()=>S(!1),isDocker:k,onConfirmLaunch:(e,t,r)=>{S(!1),U(k?"claude-docker":"claude",e,t,r)}})]})}])},33779,e=>{e.v(t=>Promise.all(["static/chunks/03g6xpslyid3~.js","static/chunks/15_baizhaiq8c.js","static/chunks/0ga14ztvrhau2.css"].map(t=>e.l(t))).then(()=>t(37314)))},39429,e=>{e.v(t=>Promise.all(["static/chunks/16w4~t4h7gk13.js"].map(t=>e.l(t))).then(()=>t(1985)))},56915,e=>{e.v(t=>Promise.all(["static/chunks/0lnobx4eh3~-_.js"].map(t=>e.l(t))).then(()=>t(99026)))},78716,e=>{e.v(t=>Promise.all(["static/chunks/0xhaghhxllgzs.js"].map(t=>e.l(t))).then(()=>t(9949)))},33789,e=>{e.v(t=>Promise.all(["static/chunks/15sigqif_v.mu.js"].map(t=>e.l(t))).then(()=>t(20032)))},78003,e=>{e.v(t=>Promise.all(["static/chunks/0gy2rolwxzjl8.js","static/chunks/15_baizhaiq8c.js","static/chunks/0sr3d9iqny2rf.js","static/chunks/0ga14ztvrhau2.css"].map(t=>e.l(t))).then(()=>t(97722)))}]);
|
|
10
|
+
`,document.head.appendChild(e)}e.s(["default",0,function({workspaceRoot:e}){let[eh,eg]=(0,r.useState)({global:[],workspace:[]}),[ex,ey]=(0,r.useState)(null),[eb,ej]=(0,r.useState)(!0),[ev,e_]=(0,r.useState)(!0),[ew,eS]=(0,r.useState)([]),[ek,eC]=(0,r.useState)(null),[eN,eR]=(0,r.useState)({}),[eE,eL]=(0,r.useState)(!1),[eW,eO]=(0,r.useState)("SELECT * FROM sqlite_master;"),[eT,eI]=(0,r.useState)(!1),[eD,eP]=(0,r.useState)(null),[ez,eq]=(0,r.useState)(null),[eA,eB]=(0,r.useState)(null),[e$,eF]=(0,r.useState)(null),[eM,eU]=(0,r.useState)(!1),[eH,eG]=(0,r.useState)(!1),[eJ,eQ]=(0,r.useState)({id:"",name:"",type:"sqlite",filepath:"./dev.db",host:"localhost",port:5432,database:"postgres",username:"postgres",password:"",ssl:!1,readOnly:!0}),[eK,eY]=(0,r.useState)(!1),[eV,eX]=(0,r.useState)(null),eZ=async()=>{try{let t=await fetch(`/api/sql/connections?root=${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();e.success&&(eg({global:e.global||[],workspace:e.workspace||[]}),ey(e.activeId),ej(e.isActiveGlobal))}}catch(e){console.error("Failed to load connection profiles:",e)}},e0=async()=>{if(!ex)return void eS([]);eL(!0);try{let t=await fetch(`/api/sql/schema?action=list_tables&root=${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();e.success?(eS(e.tables||[]),eP(null)):eP(e.error||"Failed to load database schema.")}else{let e=await t.json();eP(e.error||"Failed to load database schema.")}}catch(e){console.error("Failed to load schema:",e)}finally{eL(!1)}},e1=async t=>{if(eN[t])return void eC(ek===t?null:t);try{let r=await fetch(`/api/sql/schema?action=describe_table&table=${encodeURIComponent(t)}&root=${encodeURIComponent(e)}`);if(r.ok){let e=await r.json();e.success&&(eR(r=>({...r,[t]:e.columns})),eC(t))}}catch(e){console.error(`Failed to load columns for table ${t}:`,e)}};(0,r.useEffect)(()=>{eZ()},[e]),(0,r.useEffect)(()=>{e0(),eq(null),eC(null),eR({});let e=eb?eh.global.find(e=>e.id===ex):eh.workspace.find(e=>e.id===ex);e&&("sqlite"===e.type?eO("SELECT name, type FROM sqlite_master WHERE type='table';"):"mssql"===e.type?eO("SELECT * FROM sys.tables;"):eO("SELECT * FROM information_schema.tables LIMIT 10;"))},[ex,eb,eh.global.length,eh.workspace.length]);let e5=async(t,r)=>{try{(await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"set_active",profileId:t,isGlobal:r,root:e})})).ok&&(ey(t),ej(r))}catch(e){console.error("Failed to set active profile:",e)}},e2=async()=>{eX(null);try{let t=await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"test",profile:eJ,root:e})}),r=await t.json();r.success?eX({success:!0,message:"Connection test successful!"}):eX({success:!1,message:r.error||"Connection test failed."})}catch(e){eX({success:!1,message:e.message||"Failed to make test query."})}},e8=async t=>{if(t.preventDefault(),!eJ.name||!eJ.type)return;eY(!0);let r=eJ.id||`profile_${Math.random().toString(36).substring(7)}`,s={...eJ,id:r,name:eJ.name,type:eJ.type};try{(await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"save",profile:s,isGlobal:eH,root:e})})).ok&&(await eZ(),eU(!1),ex||e5(r,eH))}catch(e){console.error("Failed to save profile:",e)}finally{eY(!1)}},e6=async(t,r)=>{if(confirm("Are you sure you want to delete this connection profile?"))try{(await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",profileId:t,isGlobal:r,root:e})})).ok&&(await eZ(),ex===t&&ey(null))}catch(e){console.error("Failed to delete connection profile:",e)}},e7=async(t,r,s,a)=>{if(e4?.readOnly)return void alert("Database connection is Read-Only. Updates are disabled.");let n=(e=>{let t=e.match(/from\s+([a-zA-Z0-9_\`"\[\]\.]+)/i);if(!t)return null;let r=t[1].trim(),s=(r=r.replace(/[\`"\[\]]/g,"")).split(".");return s[s.length-1]})(eW);if(!n)return void alert("Could not extract table name from query for inline edit. Please ensure your query includes 'FROM tableName'.");eF({rowIndex:t,field:r,status:"saving"});try{let a=eN[n];if(!a){let t=await fetch(`/api/sql/schema?action=describe_table&table=${encodeURIComponent(n)}&root=${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();e.success&&e.columns&&(a=e.columns,eR(t=>({...t,[n]:e.columns})))}}if(!a)throw Error(`Could not load schema columns for table "${n}".`);let l=a.find(e=>e.isPrimaryKey);if(!l)throw Error(`Table "${n}" does not have a primary key. Inline editing requires a primary key.`);let o=ez?.rows[t];if(!o||!(l.name in o))throw Error(`Primary key column "${l.name}" was not returned in the query results. Please include it in your SELECT statement.`);let i=o[l.name],d=a.find(e=>e.name===r);if(!d)throw Error(`Column "${r}" was not found in schema columns.`);let c=e=>{let t=e.toLowerCase();return t.includes("int")||t.includes("decimal")||t.includes("numeric")||t.includes("float")||t.includes("double")||t.includes("real")},u="";if("NULL"===s.toUpperCase())u=`${r} = NULL`;else if(c(d.type)){if(""===s||isNaN(Number(s)))throw Error(`Value "${s}" is not a valid number for column "${r}".`);u=`${r} = ${s}`}else u=`${r} = '${s.replace(/'/g,"''")}'`;let p="";p=c(l.type)?`${l.name} = ${i}`:`${l.name} = '${String(i).replace(/'/g,"''")}'`;let m=`UPDATE ${n} SET ${u} WHERE ${p};`,f=await fetch("/api/sql/query",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sql:m,root:e})}),h=await f.json();if(f.ok&&h.success){if(ez){let e=[...ez.rows],a=s;"NULL"===s.toUpperCase()?a=null:c(d.type)&&(a=Number(s)),e[t]={...e[t],[r]:a},eq({...ez,rows:e})}eF({rowIndex:t,field:r,status:"success"}),setTimeout(()=>eF(null),1500)}else throw Error(h.error||"Update database query failed.")}catch(e){eF({rowIndex:t,field:r,status:"error",message:e.message}),alert(`Inline Update Failed:
|
|
11
|
+
${e.message}`)}},e3=async()=>{if(eW.trim()&&ex){eI(!0),eP(null),eq(null);try{let t=await fetch("/api/sql/query",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sql:eW.trim(),root:e})}),r=await t.json();t.ok&&r.success?(eq({rows:r.rows||[],fields:r.fields||[],durationMs:r.durationMs||0,affectedRows:r.affectedRows}),(eW.toLowerCase().includes("create table")||eW.toLowerCase().includes("drop table")||eW.toLowerCase().includes("alter table"))&&e0()):eP(r.error||"Failed to execute query.")}catch(e){eP(e.message||"An unexpected error occurred during execution.")}finally{eI(!1)}}},e4=eb?eh.global.find(e=>e.id===ex):eh.workspace.find(e=>e.id===ex);return(0,t.jsxs)("div",{style:a,children:[(0,t.jsx)("div",{style:{...n,width:ev?"220px":"0px",borderRight:ev?"1px solid var(--border)":"none",overflow:"hidden",transition:"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)"},children:ev&&(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minWidth:"220px",minHeight:0},children:[(0,t.jsxs)("div",{style:l,children:[(0,t.jsxs)("div",{style:o,children:[(0,t.jsx)("span",{style:i,children:"Connections"}),(0,t.jsx)("button",{style:d,onClick:()=>{eX(null),eQ({id:"",name:"",type:"sqlite",filepath:"./dev.db",host:"localhost",port:5432,database:"postgres",username:"postgres",password:"",ssl:!1,readOnly:!0}),eG(!1),eU(!0)},title:"Add Database Connection Profile",children:"➕ Add"})]}),(0,t.jsxs)("div",{style:c,children:[0===eh.global.length&&0===eh.workspace.length&&(0,t.jsx)("div",{style:b,children:"No connections configured. Add one to start."}),eh.workspace.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:u,children:"WORKSPACE CONNECTIONS"}),eh.workspace.map(e=>(0,t.jsxs)("div",{style:{...p,...ex===e.id&&!eb?m:{}},onClick:()=>e5(e.id,!1),children:[(0,t.jsxs)("div",{style:f,children:[(0,t.jsxs)("span",{style:h,children:["📁 ",e.name]}),(0,t.jsx)("span",{style:g,children:e.type})]}),(0,t.jsx)("button",{style:x,onClick:t=>{t.stopPropagation(),e6(e.id,!1)},children:"✖"})]},e.id))]}),eh.global.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:u,children:"GLOBAL CONNECTIONS"}),eh.global.map(e=>(0,t.jsxs)("div",{style:{...p,...ex===e.id&&eb?m:{}},onClick:()=>e5(e.id,!0),children:[(0,t.jsxs)("div",{style:f,children:[(0,t.jsxs)("span",{style:h,children:["🌐 ",e.name]}),(0,t.jsx)("span",{style:g,children:e.type})]}),(0,t.jsx)("button",{style:x,onClick:t=>{t.stopPropagation(),e6(e.id,!0)},children:"✖"})]},e.id))]})]})]}),(0,t.jsxs)("div",{style:{...l,flex:1,borderTop:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{style:o,children:[(0,t.jsx)("span",{style:i,children:"Schema Tables"}),eE&&(0,t.jsx)("span",{style:es})]}),(0,t.jsxs)("div",{style:y,children:[!ex&&(0,t.jsx)("div",{style:b,children:"Select an active connection to view tables."}),ex&&0===ew.length&&!eE&&(0,t.jsx)("div",{style:b,children:"No tables found in database schema."}),ew.map(e=>(0,t.jsxs)("div",{style:j,children:[(0,t.jsxs)("div",{style:v,onClick:()=>e1(e.name),children:[(0,t.jsx)("span",{style:_,children:"view"===e.type?"👁️":"📊"}),(0,t.jsx)("span",{style:w,children:e.name}),(0,t.jsx)("span",{style:S,children:ek===e.name?"▼":"▶"})]}),ek===e.name&&eN[e.name]&&(0,t.jsx)("div",{style:k,children:eN[e.name].map(e=>(0,t.jsxs)("div",{style:C,children:[(0,t.jsx)("span",{style:N,children:e.isPrimaryKey?"🔑":e.isForeignKey?"🔗":"▫"}),(0,t.jsx)("span",{style:R,title:e.type,children:e.name}),(0,t.jsx)("span",{style:E,children:e.type.toLowerCase().substring(0,12)})]},e.name))})]},e.name))]})]})]})}),(0,t.jsxs)("div",{style:L,children:[(0,t.jsxs)("div",{style:W,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[(0,t.jsx)("button",{type:"button",onClick:()=>e_(!ev),style:{background:"rgba(255, 255, 255, 0.05)",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--muted)",cursor:"pointer",padding:"0.25rem 0.5rem",fontSize:"0.75rem",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.15s ease"},title:ev?"Collapse Connections List":"Expand Connections List",children:ev?"◀ Collapse":"📂 Schema Connections"}),(0,t.jsx)("span",{style:O,children:"Active Connection:"}),e4?(0,t.jsxs)("span",{style:T,children:[eb?"🌐":"📁"," ",e4.name," (",e4.type,")",e4.readOnly&&(0,t.jsx)("span",{style:I,children:"Read-Only"})]}):(0,t.jsx)("span",{style:{...T,color:"var(--danger)"},children:"No Connection Selected"})]}),(0,t.jsx)("button",{style:{...D,opacity:!ex||eT?.6:1,cursor:!ex||eT?"not-allowed":"pointer"},onClick:e3,disabled:!ex||eT,children:eT?"⌛ Running...":"⚡ Execute Query (F5)"})]}),(0,t.jsx)("div",{style:P,children:(0,t.jsx)("textarea",{style:z,value:eW,onChange:e=>eO(e.target.value),placeholder:"Write your SQL query script here...",onKeyDown:e=>{("F5"===e.key||e.ctrlKey&&"Enter"===e.key)&&(e.preventDefault(),e3())}})}),(0,t.jsxs)("div",{style:q,children:[eD&&(0,t.jsxs)("div",{style:A,children:[(0,t.jsx)("h4",{style:{margin:"0 0 0.5rem 0",color:"var(--danger)"},children:"⚠️ Execution Error"}),(0,t.jsx)("pre",{style:B,children:eD}),eD.includes("not installed")&&(0,t.jsxs)("div",{style:$,children:[(0,t.jsx)("p",{style:{margin:"0 0 0.5rem 0"},children:"To resolve this, run this installer command in your workspace terminal:"}),(0,t.jsx)("code",{style:F,children:e4?.type==="sqlite"?"npm install better-sqlite3":e4?.type==="postgres"?"npm install pg":e4?.type==="mysql"?"npm install mysql2":"npm install mssql"})]})]}),ez&&(0,t.jsxs)("div",{style:M,children:[(0,t.jsxs)("div",{style:U,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,t.jsxs)("span",{children:["Query completed."," ",void 0!==ez.affectedRows?`Affected rows: ${ez.affectedRows}`:`Returned ${ez.rows.length} rows`]}),(0,t.jsxs)("span",{children:["Duration: ",ez.durationMs,"ms"]})]}),ez.rows.length>0&&(0,t.jsxs)("div",{style:{display:"flex",gap:"0.4rem"},children:[(0,t.jsx)("button",{onClick:()=>{if(ez&&0!==ez.rows.length)try{let e=ez.fields.join(","),t=ez.rows.map(e=>ez.fields.map(t=>{let r=e[t];if(null===r)return"NULL";let s=String(r);return s.includes(",")||s.includes('"')||s.includes("\n")||s.includes("\r")?`"${s.replace(/"/g,'""')}"`:s}).join(",")),r=[e,...t].join("\r\n"),s=new Blob([r],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(s),n=document.createElement("a");n.setAttribute("href",a),n.setAttribute("download",`query-results-${Date.now()}.csv`),document.body.appendChild(n),n.click(),document.body.removeChild(n)}catch(e){console.error("Export CSV failed:",e),alert("Failed to export as CSV")}},style:K,children:"📥 Export CSV"}),(0,t.jsx)("button",{onClick:()=>{if(ez&&0!==ez.rows.length)try{let e=JSON.stringify(ez.rows,null,2),t=new Blob([e],{type:"application/json;charset=utf-8;"}),r=URL.createObjectURL(t),s=document.createElement("a");s.setAttribute("href",r),s.setAttribute("download",`query-results-${Date.now()}.json`),document.body.appendChild(s),s.click(),document.body.removeChild(s)}catch(e){console.error("Export JSON failed:",e),alert("Failed to export as JSON")}},style:K,children:"📥 Export JSON"})]})]}),ez.rows.length>0?(0,t.jsx)("div",{style:H,children:(0,t.jsxs)("table",{style:G,children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{children:ez.fields.map(e=>(0,t.jsx)("th",{style:J,children:e},e))})}),(0,t.jsx)("tbody",{children:ez.rows.map((e,r)=>(0,t.jsx)("tr",{style:r%2==0?X:Z,children:ez.fields.map(s=>{let a=eA&&eA.rowIndex===r&&eA.field===s,n=e$&&e$.rowIndex===r&&e$.field===s&&"saving"===e$.status,l=e$&&e$.rowIndex===r&&e$.field===s&&"success"===e$.status,o=e$&&e$.rowIndex===r&&e$.field===s&&"error"===e$.status,i={...Q,...V};return n?i={...i,backgroundColor:"rgba(168, 85, 247, 0.15)"}:l?i={...i,backgroundColor:"rgba(16, 185, 129, 0.25)"}:o&&(i={...i,backgroundColor:"rgba(239, 68, 68, 0.25)"}),(0,t.jsx)("td",{style:i,onDoubleClick:()=>{e4?.readOnly?alert("Database connection is Read-Only. Editing is disabled."):eB({rowIndex:r,field:s,value:null===e[s]?"NULL":String(e[s])})},className:"db-cell",title:"Double click to edit cell",children:a?(0,t.jsx)("input",{style:Y,value:eA.value,autoFocus:!0,onChange:e=>eB({...eA,value:e.target.value}),onKeyDown:async t=>{if("Enter"===t.key){t.preventDefault();let a=eA.value;eB(null),a!==(null===e[s]?"NULL":String(e[s]))&&await e7(r,s,a,e[s])}else"Escape"===t.key&&eB(null)},onBlur:async()=>{let t=eA.value;eB(null),t!==(null===e[s]?"NULL":String(e[s]))&&await e7(r,s,t,e[s])}}):null===e[s]?"NULL":"object"==typeof e[s]?JSON.stringify(e[s]):String(e[s])},s)})},r))})]})}):void 0===ez.affectedRows&&(0,t.jsx)("div",{style:ee,children:"Query executed successfully, but returned 0 results."})]}),!eD&&!ez&&!eT&&(0,t.jsx)("div",{style:ee,children:"Write a query script and click Execute to view table records."}),eT&&(0,t.jsxs)("div",{style:et,children:[(0,t.jsx)("span",{style:er}),(0,t.jsx)("span",{style:{color:"var(--muted)"},children:"Running database statement..."})]})]})]}),eM&&"u">typeof document&&(0,s.createPortal)((0,t.jsx)("div",{style:ea,children:(0,t.jsxs)("div",{style:en,children:[(0,t.jsxs)("h3",{style:{margin:"0 0 1rem 0",display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"🔌 Add Database Profile"}),(0,t.jsx)("span",{style:{cursor:"pointer"},onClick:()=>eU(!1),children:"✖"})]}),(0,t.jsxs)("form",{onSubmit:e8,children:[(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Profile Name"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.name,onChange:e=>eQ(t=>({...t,name:e.target.value})),placeholder:"e.g. Local Postgres, Dev SQLite"})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Scope Level"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"radio",checked:!eH,onChange:()=>eG(!1)}),"Workspace Local"]}),(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"radio",checked:eH,onChange:()=>eG(!0)}),"Global User Profile"]})]})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database Type"}),(0,t.jsxs)("select",{style:ed,value:eJ.type,onChange:e=>{let t=e.target.value,r=5432;"mysql"===t&&(r=3306),"mssql"===t&&(r=1433),eQ(e=>({...e,type:t,filepath:"sqlite"===t?"./dev.db":void 0,port:"sqlite"!==t?r:void 0,database:"sqlite"===t?void 0:"mssql"===t?"master":"postgres"===t?"postgres":"",username:"sqlite"===t?void 0:"mssql"===t?"sa":"postgres"===t?"postgres":"root"}))},children:[(0,t.jsx)("option",{value:"sqlite",children:"SQLite (Local File)"}),(0,t.jsx)("option",{value:"postgres",children:"PostgreSQL"}),(0,t.jsx)("option",{value:"mysql",children:"MySQL"}),(0,t.jsx)("option",{value:"mssql",children:"Microsoft SQL Server"})]})]}),"sqlite"===eJ.type?(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database File Path"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.filepath||"",onChange:e=>eQ(t=>({...t,filepath:e.target.value})),placeholder:"Relative (e.g. ./data/dev.db) or Absolute path"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{...el,flex:3},children:[(0,t.jsx)("label",{style:eo,children:"Host IP Address"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.host||"",onChange:e=>eQ(t=>({...t,host:e.target.value})),placeholder:"localhost or IP"})]}),(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Port"}),(0,t.jsx)("input",{style:ei,type:"number",required:!0,value:eJ.port||0,onChange:e=>eQ(t=>({...t,port:parseInt(e.target.value)}))})]})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database Name"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.database||"",onChange:e=>eQ(t=>({...t,database:e.target.value}))})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Username"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.username||"",onChange:e=>eQ(t=>({...t,username:e.target.value}))})]}),(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Password"}),(0,t.jsx)("input",{style:ei,type:"password",value:eJ.password||"",onChange:e=>eQ(t=>({...t,password:e.target.value}))})]})]}),("postgres"===eJ.type||"mssql"===eJ.type)&&(0,t.jsx)("div",{style:el,children:(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"checkbox",checked:!!eJ.ssl,onChange:e=>eQ(t=>({...t,ssl:e.target.checked}))}),"Require SSL Secure Connection"]})})]}),(0,t.jsx)("div",{style:el,children:(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"checkbox",checked:!!eJ.readOnly,onChange:e=>eQ(t=>({...t,readOnly:e.target.checked}))}),"Enforce Read-Only Connection (Disable mutations)"]})}),eV&&(0,t.jsx)("div",{style:{...ec,backgroundColor:eV.success?"rgba(16, 185, 129, 0.12)":"rgba(239, 68, 68, 0.12)",border:eV.success?"1px solid var(--success)":"1px solid var(--danger)",color:eV.success?"var(--success)":"var(--danger)"},children:eV.message}),(0,t.jsxs)("div",{style:eu,children:[(0,t.jsx)("button",{type:"button",style:ep,onClick:e2,children:"🔍 Test Connection"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{type:"button",style:em,onClick:()=>eU(!1),children:"Cancel"}),(0,t.jsx)("button",{type:"submit",style:ef,disabled:eK,children:eK?"Saving...":"Save Profile"})]})]})]})]})}),document.body)]})}])},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",agentStateBadge:"page-module___8aEwW__agentStateBadge",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","pulse-attention":"page-module___8aEwW__pulse-attention","pulse-thinking":"page-module___8aEwW__pulse-thinking",pulseDot:"page-module___8aEwW__pulseDot",quickLaunchBtn:"page-module___8aEwW__quickLaunchBtn",sectionTitle:"page-module___8aEwW__sectionTitle",sidePanel:"page-module___8aEwW__sidePanel","state-complete":"page-module___8aEwW__state-complete","state-idle":"page-module___8aEwW__state-idle","state-needs-input":"page-module___8aEwW__state-needs-input","state-thinking":"page-module___8aEwW__state-thinking",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 t=e.i(43476),r=e.i(71645),s=e.i(70703),a=e.i(20897),n=e.i(66381);let l=e=>"mock"===e?"🧪":e.includes("-docker")?"🐳":e.includes("-ssh")?"🌐":"💻",o=(0,s.default)(()=>e.A(33779),{loadableGenerated:{modules:[37314]},ssr:!1,loading:()=>(0,t.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,t.jsx)("span",{children:"Initializing terminal emulator..."})})}),i=(0,s.default)(()=>e.A(39429),{loadableGenerated:{modules:[1985]},ssr:!1,loading:()=>(0,t.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,t.jsx)("span",{style:{color:"var(--muted)"},children:"Initializing prompt editor..."})})}),d=(0,s.default)(()=>e.A(56915),{loadableGenerated:{modules:[99026]},ssr:!1}),c=(0,s.default)(()=>e.A(78716),{loadableGenerated:{modules:[9949]},ssr:!1}),u=(0,s.default)(()=>e.A(33789),{loadableGenerated:{modules:[20032]},ssr:!1}),p=(0,s.default)(()=>e.A(78003),{loadableGenerated:{modules:[97722]},ssr:!1});e.s(["default",0,function(){let[e,s]=(0,r.useState)([]),[m,f]=(0,r.useState)(null),[h,g]=(0,r.useState)(!1),[x,y]=(0,r.useState)(!1),[b,j]=(0,r.useState)(!1),[v,_]=(0,r.useState)(!1),[w,S]=(0,r.useState)(!1),[k,C]=(0,r.useState)(!1),[N,R]=(0,r.useState)(""),[E,L]=(0,r.useState)(9601),[W,O]=(0,r.useState)("0.2.19"),[T,I]=(0,r.useState)(null),[D,P]=(0,r.useState)([]),z=e.filter(e=>"workspace-terminal"!==e.id),q=e.find(e=>e.id===m),A=z.some(e=>("claude-docker"===e.type||"aider-docker"===e.type)&&"running"===e.status),B=z.some(e=>"claude-ssh"===e.type&&"running"===e.status),$=async()=>{try{let e=await fetch("/api/sessions"),t=await e.json();t.sessions&&s(t.sessions),t.wsPort&&L(t.wsPort),t.originalCwd&&R(t.originalCwd),t.version&&O(t.version)}catch(e){console.error("Failed to fetch sessions:",e)}},F=async()=>{try{let e=await fetch("/api/recents");if(e.ok){let t=await e.json();t.success&&t.recents&&t.recents.lastSession&&I(t.recents.lastSession)}}catch(e){console.error("Failed to fetch recents:",e)}},M=async()=>{try{let e=await fetch("/api/configs");if(e.ok){let t=await e.json();t.configs&&P(t.configs)}}catch(e){console.error("Failed to fetch configs:",e)}};(0,r.useEffect)(()=>{(async()=>{await $(),await F(),await M()})(),"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($,4e3);return()=>clearInterval(e)},[]);let U=async(e,t,r,s)=>{g(!0);try{let a=t;a||("claude"===e?a="Claude Local":"claude-docker"===e?a="Claude Docker":"claude-ssh"===e?a="Claude SSH":"aider"===e?a="Aider Local":"aider-docker"===e?a="Aider Docker":"mock"===e&&(a="Mock Session"));let n={type:e,name:a,workspaceRoot:r,scopedDirs:s};if(("aider"===e||"aider-docker"===e)&&!r)try{let e=await fetch("/api/context/aider");if(e.ok){let t=await e.json();t.success&&t.config&&(n.workspaceRoot=t.config.workspaceRoot,n.scopedDirs=t.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(n)}),o=await l.json();o.success&&(await $(),await M(),f(o.session.id),I({type:e,name:a,workspaceRoot:r,scopedDirs:s}))}catch(e){console.error("Failed to launch session:",e)}finally{g(!1)}},H=async e=>{g(!0);try{let t=await fetch("/api/sessions/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:e.type,name:e.name,workspaceRoot:e.workspaceRoot,scopedDirs:e.scopedDirs})}),r=await t.json();r.success?(await $(),f(r.session.id)):alert(r.error||"Failed to launch configuration.")}catch(e){console.error(e),alert("Network error: failed to launch configuration.")}finally{g(!1)}},G=async e=>{if(window.confirm("Are you sure you want to delete this configuration template?"))try{(await fetch("/api/configs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",id:e})})).ok?await M():alert("Failed to delete configuration template.")}catch(e){console.error(e),alert("Network error: failed to delete configuration template.")}},J=async(e,t=!1)=>{try{let r=await fetch("/api/sessions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,delete:t})});(await r.json()).success&&(t&&m===e&&f(null),await $())}catch(e){console.error("Failed to stop session:",e)}};return(0,t.jsxs)("div",{className:`${a.default.container} ${q?a.default.containerActive:""}`,children:[(0,t.jsxs)("header",{className:a.default.header,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1.5rem"},children:[(0,t.jsx)("img",{src:"/logo.png",alt:"NeuralLoom Logo",style:{width:"160px",height:"160px",borderRadius:"16px",objectFit:"contain"}}),(0,t.jsxs)("div",{className:a.default.logoArea,children:[(0,t.jsx)("h1",{className:a.default.title,style:{margin:0,lineHeight:1.1},children:"NeuralLoom"}),(0,t.jsx)("span",{className:a.default.subtitle,children:"Unified AI Orchestrator & Context Bridge"})]})]}),(0,t.jsxs)("div",{className:a.default.statusIndicator,children:[(0,t.jsx)("span",{className:a.default.pulseDot}),(0,t.jsx)("span",{children:"Orchestrator Online"})]})]}),q?(0,t.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:(0,t.jsx)(p,{sessionId:q.id,workspaceRoot:q.workspaceRoot||"",scopedDirs:q.scopedDirs||[],onClose:()=>f(null),sessions:e,onSwitchSession:e=>f(e),onRefreshSessions:$,wsPort:E})}):(0,t.jsxs)("div",{className:a.default.dashboardGrid,children:[(0,t.jsxs)("div",{className:a.default.mainPanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Built-in Database Explorer & SQL Client"}),(0,t.jsx)("div",{className:"card",style:{padding:0,overflow:"hidden",height:"450px",border:"1px solid var(--border)"},children:(0,t.jsx)(n.default,{workspaceRoot:N||""})})]}),(0,t.jsxs)("section",{style:{marginTop:"1.5rem"},children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Shared Context Hub & Slash Commands"}),(0,t.jsxs)("div",{className:a.default.contextList,children:[(0,t.jsxs)("div",{className:`${a.default.contextItem} card`,children:[(0,t.jsxs)("div",{className:a.default.contextMeta,children:[(0,t.jsx)("span",{className:a.default.contextTitle,children:"Staged Context & System Rules (/ccc)"}),(0,t.jsx)("span",{className:a.default.contextDetails,children:"Compiles AGENTS.md guidelines and files map."})]}),(0,t.jsx)("button",{onClick:async()=>{m&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:m,command:"/ccc"})})},disabled:!m,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.75rem",fontWeight:600,opacity:m?1:.5,cursor:m?"pointer":"not-allowed"},children:"🚀 Mount (/ccc)"})]}),(0,t.jsxs)("div",{className:`${a.default.contextItem} card`,children:[(0,t.jsxs)("div",{className:a.default.contextMeta,children:[(0,t.jsx)("span",{className:a.default.contextTitle,children:"Staged Developer Prompt (/ccp)"}),(0,t.jsx)("span",{className:a.default.contextDetails,children:"Executes prompt in .ai/neural-loom/cprompt.md."})]}),(0,t.jsx)("button",{onClick:async()=>{m&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:m,command:"/ccp"})})},disabled:!m,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--success)",backgroundColor:"transparent",color:"var(--success)",fontSize:"0.75rem",fontWeight:600,opacity:m?1:.5,cursor:m?"pointer":"not-allowed"},children:"⚡ Run (/ccp)"})]})]}),(0,t.jsx)(i,{})]})]}),(0,t.jsxs)("div",{className:a.default.mainPanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Active AI Agents"}),0===z.length?(0,t.jsxs)("div",{className:"card",style:{padding:"3rem 1.5rem",textAlign:"center"},children:[(0,t.jsx)("p",{style:{color:"var(--muted)",marginBottom:"1.5rem"},children:"No active agent sessions. Launch a Claude or Aider agent session to begin."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.75rem",flexDirection:"column"},children:[T&&(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{U(T.type,T.name,T.workspaceRoot,T.scopedDirs)},disabled:h,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none"},title:`Re-launch: ${T.name||T.type}`,children:"⚡ Re-launch Last Session"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{C(!1),S(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none",flex:1},children:"Launch Claude"}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{_(!1),j(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",flex:1},children:"Launch Aider"})]})]}),(0,t.jsxs)("div",{style:{marginTop:"1.5rem",fontSize:"0.75rem",color:"var(--muted)"},children:["Need a simulator?"," ",(0,t.jsx)("span",{onClick:()=>U("mock"),style:{color:"var(--primary)",cursor:"pointer",textDecoration:"underline"},children:"Start mock playground"})]})]}):(0,t.jsx)("div",{className:a.default.agentGrid,children:z.map(e=>(0,t.jsxs)("div",{className:`${a.default.agentCard} card ${m===e.id?a.default.activeBorder:""}`,children:[(0,t.jsxs)("div",{className:a.default.agentHeader,children:[(0,t.jsx)("span",{className:a.default.agentName,children:e.name}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.35rem",alignItems:"center"},children:["running"===e.status&&e.agentState&&(0,t.jsxs)("span",{className:`${a.default.agentStateBadge} ${a.default["state-"+e.agentState]}`,children:["thinking"===e.agentState&&`${l(e.type)} 💭`,"needs-input"===e.agentState&&`${l(e.type)} ⚠️`,"complete"===e.agentState&&`${l(e.type)} ✅`,"idle"===e.agentState&&`${l(e.type)} 💤`]}),(0,t.jsx)("span",{className:`${a.default.agentBadge} ${"stopped"===e.status?a.default.stoppedBadge:""}`,children:e.status})]})]}),(0,t.jsxs)("div",{className:a.default.cardBody,style:{padding:"1rem"},children:[(0,t.jsxs)("p",{style:{fontSize:"0.8rem",color:"var(--muted)",margin:0},children:["ID: ",(0,t.jsx)("code",{style:{fontSize:"0.72rem"},children:e.id.substring(0,8)})," | Type: ",e.type,(0,t.jsx)("br",{}),"Logs: ",e.logsCount," lines"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.75rem"},children:["running"===e.status?(0,t.jsx)("button",{onClick:()=>J(e.id,!1),style:{flex:1,padding:"0.35rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"transparent",fontSize:"0.75rem",color:"var(--danger)",cursor:"pointer"},children:"Stop"}):(0,t.jsx)("button",{onClick:()=>J(e.id,!0),style:{flex:1,padding:"0.35rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",fontSize:"0.75rem",color:"var(--muted)",cursor:"pointer"},children:"Delete"}),(0,t.jsx)("button",{onClick:()=>f(e.id),style:{flex:2,padding:"0.35rem",borderRadius:"6px",border:"none",backgroundColor:m===e.id?"var(--border-focus)":"var(--primary)",fontSize:"0.75rem",fontWeight:600,color:"#fff",cursor:"pointer"},children:m===e.id?"Connected":"Open Console"})]})]})]},e.id))})]}),m&&"workspace-terminal"!==m&&(0,t.jsxs)("section",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border-focus)",marginTop:"1rem"},children:[(0,t.jsxs)("div",{className:a.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(109, 40, 217, 0.08)",padding:"0.5rem 1rem"},children:[(0,t.jsxs)("span",{style:{fontWeight:600,fontSize:"0.85rem",display:"flex",alignItems:"center",gap:"0.5rem"},children:["🖥️ Console — ",e.find(e=>e.id===m)?.name]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center"},children:[e.find(e=>e.id===m)?.status==="stopped"&&(0,t.jsx)("button",{onClick:async()=>{try{let t=e.find(e=>e.id===m),r=t&&("claude"===t.type||"claude-docker"===t.type||"claude-ssh"===t.type),s=!1;r&&(s=window.confirm("Would you like to resume your previous Claude session?"));let a=await fetch("/api/sessions/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:m,resume:s})});if(a.ok)await $();else{let e=await a.json();alert(e.error||"Failed to restart session.")}}catch(e){console.error("Failed to restart session:",e)}},style:{padding:"0.15rem 0.4rem",borderRadius:"4px",border:"1px solid #eab308",backgroundColor:"rgba(234, 179, 8, 0.15)",color:"#eab308",fontSize:"0.65rem",fontWeight:600,cursor:"pointer"},children:"⚡ Restart"}),(0,t.jsx)("button",{onClick:()=>f(null),style:{border:"none",background:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.75rem"},children:"✖"})]})]}),(0,t.jsx)(o,{sessionId:m,wsPort:E})]})]}),(0,t.jsxs)("div",{className:a.default.sidePanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Execution Environments"}),(0,t.jsxs)("div",{className:a.default.envGrid,children:[(0,t.jsxs)("div",{className:a.default.envRow,style:{padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:a.default.envName,children:"💻 Local Host"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:"var(--success)"},children:"Active"})]}),(0,t.jsxs)("div",{className:a.default.envRow,style:{opacity:A?1:.6,padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:a.default.envName,children:"🐳 Docker Sandbox"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:A?"var(--success)":"var(--muted)"},children:A?"Active":"Not Mounted"})]}),(0,t.jsxs)("div",{className:a.default.envRow,style:{opacity:B?1:.6,padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:a.default.envName,children:"🌐 Remote VM (SSH)"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:B?"var(--success)":"var(--muted)"},children:B?"Active":"Offline"})]})]})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Saved Configurations"}),(0,t.jsx)("div",{className:"card",style:{padding:"1rem",display:"flex",flexDirection:"column",gap:"0.75rem"},children:0===D.length?(0,t.jsx)("p",{style:{color:"var(--muted)",fontSize:"0.8rem",textAlign:"center",margin:"1rem 0"},children:"No configuration templates saved yet. Save a template from the Claude/Aider launch wizards."}):(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem",maxHeight:"200px",overflowY:"auto"},children:D.map(e=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(255, 255, 255, 0.02)",padding:"0.5rem",borderRadius:"6px",border:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.15rem",minWidth:0},children:[(0,t.jsx)("span",{style:{fontSize:"0.8rem",fontWeight:600,color:"var(--foreground)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.name}),(0,t.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)",textTransform:"uppercase"},children:e.type})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.25rem"},children:[(0,t.jsx)("button",{onClick:()=>H(e),disabled:h,style:{padding:"0.2rem 0.4rem",borderRadius:"4px",backgroundColor:"var(--primary)",color:"#fff",border:"none",fontSize:"0.7rem",cursor:"pointer"},children:"Launch"}),(0,t.jsx)("button",{onClick:()=>G(e.id),style:{padding:"0.2rem 0.4rem",borderRadius:"4px",backgroundColor:"transparent",color:"var(--danger)",border:"1px solid var(--danger)",fontSize:"0.7rem",cursor:"pointer"},children:"Delete"})]})]},e.id))})})]}),(0,t.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{C(!1),S(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🤖 Claude Local"}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{C(!0),S(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(170, 72%, 40%) 0%, hsl(195, 100%, 40%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐳 Claude Docker"})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{_(!1),j(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐍 Aider Local"}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{_(!0),j(!0)},disabled:h,style:{background:"linear-gradient(135deg, hsl(195, 100%, 40%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐳 Aider Docker"})]}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>y(!0),disabled:h,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem"},children:"🌐 Connect Remote SSH"})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Workspace Terminal"}),(0,t.jsxs)("div",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border)",padding:0},children:[(0,t.jsx)("div",{className:a.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(255, 255, 255, 0.02)",padding:"0.4rem 0.75rem"},children:(0,t.jsxs)("span",{style:{fontWeight:600,fontSize:"0.75rem"},children:["💻 Local Shell (CWD: ",N.split(/[/\\]/).pop()||"root",")"]})}),(0,t.jsx)(o,{sessionId:"workspace-terminal",height:"180px",wsPort:E})]})]}),(0,t.jsxs)("section",{className:"card",style:{padding:"1rem",display:"flex",flexDirection:"column",gap:"0.5rem"},children:[(0,t.jsx)("h3",{style:{fontSize:"0.9rem",fontWeight:700,margin:0},children:"Quick Actions"}),(0,t.jsxs)("ul",{style:{listStyle:"none",fontSize:"0.75rem",display:"flex",flexDirection:"column",gap:"0.35rem",color:"var(--muted)",padding:0,margin:0},children:[(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Configure API Keys"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Edit rules templates"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Inspect process locks"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]})]})]})]})]}),(0,t.jsxs)("footer",{className:a.default.footer,children:[(0,t.jsxs)("span",{children:["NeuralLoom v",W," — Experimental AI Orchestrator Bridge"]}),(0,t.jsxs)("span",{children:["Directory: ",N||"Loading..."]})]}),x&&(0,t.jsx)(d,{onClose:()=>y(!1),onConfirmLaunch:()=>{y(!1),U("claude-ssh")}}),b&&(0,t.jsx)(c,{onClose:()=>j(!1),isDocker:v,onConfirmLaunch:(e,t,r)=>{j(!1),U(v?"aider-docker":"aider",e,t,r)}}),w&&(0,t.jsx)(u,{onClose:()=>S(!1),isDocker:k,onConfirmLaunch:(e,t,r)=>{S(!1),U(k?"claude-docker":"claude",e,t,r)}})]})}])},33779,e=>{e.v(t=>Promise.all(["static/chunks/03g6xpslyid3~.js","static/chunks/0cbr3_t9j1ilb.js","static/chunks/0ga14ztvrhau2.css"].map(t=>e.l(t))).then(()=>t(37314)))},39429,e=>{e.v(t=>Promise.all(["static/chunks/16w4~t4h7gk13.js"].map(t=>e.l(t))).then(()=>t(1985)))},56915,e=>{e.v(t=>Promise.all(["static/chunks/0lnobx4eh3~-_.js"].map(t=>e.l(t))).then(()=>t(99026)))},78716,e=>{e.v(t=>Promise.all(["static/chunks/0xhaghhxllgzs.js"].map(t=>e.l(t))).then(()=>t(9949)))},33789,e=>{e.v(t=>Promise.all(["static/chunks/15sigqif_v.mu.js"].map(t=>e.l(t))).then(()=>t(20032)))},78003,e=>{e.v(t=>Promise.all(["static/chunks/0gy2rolwxzjl8.js","static/chunks/0cbr3_t9j1ilb.js","static/chunks/09at8yg03trv8.js","static/chunks/0ga14ztvrhau2.css"].map(t=>e.l(t))).then(()=>t(97722)))}]);
|
package/.next/trace
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":307,"timestamp":38821048124,"id":4,"parentId":1,"tags":{},"startTime":1782208921950,"traceId":"8891e45995bba3d8"},{"name":"load-custom-routes","duration":361,"timestamp":38821048562,"id":5,"parentId":1,"tags":{},"startTime":1782208921951,"traceId":"8891e45995bba3d8"},{"name":"create-dist-dir","duration":2450,"timestamp":38821048957,"id":6,"parentId":1,"tags":{},"startTime":1782208921951,"traceId":"8891e45995bba3d8"},{"name":"clean","duration":588,"timestamp":38821052353,"id":7,"parentId":1,"tags":{},"startTime":1782208921955,"traceId":"8891e45995bba3d8"},{"name":"discover-routes","duration":6789,"timestamp":38821078489,"id":8,"parentId":1,"tags":{},"startTime":1782208921981,"traceId":"8891e45995bba3d8"},{"name":"create-root-mapping","duration":65,"timestamp":38821085331,"id":9,"parentId":1,"tags":{},"startTime":1782208921988,"traceId":"8891e45995bba3d8"},{"name":"generate-route-types","duration":18789,"timestamp":38821086863,"id":10,"parentId":1,"tags":{},"startTime":1782208921989,"traceId":"8891e45995bba3d8"},{"name":"public-dir-conflict-check","duration":122,"timestamp":38821105808,"id":11,"parentId":1,"tags":{},"startTime":1782208922008,"traceId":"8891e45995bba3d8"},{"name":"generate-routes-manifest","duration":2847,"timestamp":38821106079,"id":12,"parentId":1,"tags":{},"startTime":1782208922008,"traceId":"8891e45995bba3d8"},{"name":"run-turbopack","duration":2589064,"timestamp":38821118273,"id":14,"parentId":1,"tags":{},"startTime":1782208922020,"traceId":"8891e45995bba3d8"},{"name":"turbopack-build-events","duration":70,"timestamp":38821467665,"id":15,"parentId":1,"tags":{},"startTime":1782208922370,"traceId":"8891e45995bba3d8"},{"name":"run-typescript","duration":5321062,"timestamp":38823722262,"id":16,"parentId":1,"tags":{},"startTime":1782208924624,"traceId":"8891e45995bba3d8"},{"name":"generate-required-server-files","duration":1655,"timestamp":38829045765,"id":18,"parentId":1,"tags":{},"startTime":1782208929948,"traceId":"8891e45995bba3d8"},{"name":"check-static-error-page","duration":16555,"timestamp":38829221252,"id":20,"parentId":19,"tags":{},"startTime":1782208930123,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":752026,"timestamp":38829244019,"id":47,"parentId":22,"tags":{},"startTime":1782208930146,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":770372,"timestamp":38829225799,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1782208930128,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":914648,"timestamp":38829244140,"id":49,"parentId":24,"tags":{},"startTime":1782208930146,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":931791,"timestamp":38829227070,"id":24,"parentId":19,"tags":{"page":"/api/context/aider"},"startTime":1782208930129,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":924848,"timestamp":38829244084,"id":48,"parentId":23,"tags":{},"startTime":1782208930146,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":942472,"timestamp":38829226513,"id":23,"parentId":19,"tags":{"page":"/api/configs"},"startTime":1782208930129,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":925314,"timestamp":38829244917,"id":58,"parentId":33,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":938813,"timestamp":38829231472,"id":33,"parentId":19,"tags":{"page":"/api/sessions/launch"},"startTime":1782208930134,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":950405,"timestamp":38829244239,"id":51,"parentId":26,"tags":{},"startTime":1782208930146,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":966515,"timestamp":38829228200,"id":26,"parentId":19,"tags":{"page":"/api/context"},"startTime":1782208930130,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":953180,"timestamp":38829244190,"id":50,"parentId":25,"tags":{},"startTime":1782208930146,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":969777,"timestamp":38829227651,"id":25,"parentId":19,"tags":{"page":"/api/context/claude"},"startTime":1782208930130,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":954282,"timestamp":38829244436,"id":53,"parentId":28,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":969623,"timestamp":38829229145,"id":28,"parentId":19,"tags":{"page":"/api/files"},"startTime":1782208930131,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":955859,"timestamp":38829243743,"id":46,"parentId":21,"tags":{},"startTime":1782208930146,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":975703,"timestamp":38829223946,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1782208930126,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":955226,"timestamp":38829244573,"id":55,"parentId":30,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":969764,"timestamp":38829230068,"id":30,"parentId":19,"tags":{"page":"/api/recents"},"startTime":1782208930132,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":951073,"timestamp":38829249535,"id":70,"parentId":45,"tags":{},"startTime":1782208930152,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":963523,"timestamp":38829237117,"id":45,"parentId":19,"tags":{"page":"/"},"startTime":1782208930139,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":955889,"timestamp":38829244830,"id":57,"parentId":32,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":969741,"timestamp":38829231000,"id":32,"parentId":19,"tags":{"page":"/api/sessions/input"},"startTime":1782208930133,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":957325,"timestamp":38829245091,"id":61,"parentId":36,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":969179,"timestamp":38829233276,"id":36,"parentId":19,"tags":{"page":"/api/sessions/start"},"startTime":1782208930135,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":975106,"timestamp":38829245251,"id":64,"parentId":39,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":985915,"timestamp":38829234500,"id":39,"parentId":19,"tags":{"page":"/api/sessions/upload-image"},"startTime":1782208930137,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":978111,"timestamp":38829244304,"id":52,"parentId":27,"tags":{},"startTime":1782208930146,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":993795,"timestamp":38829228684,"id":27,"parentId":19,"tags":{"page":"/api/context/ssh"},"startTime":1782208930131,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":978588,"timestamp":38829244991,"id":59,"parentId":34,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":991572,"timestamp":38829232053,"id":34,"parentId":19,"tags":{"page":"/api/sessions"},"startTime":1782208930134,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":979573,"timestamp":38829245038,"id":60,"parentId":35,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":992012,"timestamp":38829232649,"id":35,"parentId":19,"tags":{"page":"/api/sessions/scope"},"startTime":1782208930135,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":981271,"timestamp":38829245153,"id":62,"parentId":37,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":992773,"timestamp":38829233701,"id":37,"parentId":19,"tags":{"page":"/api/sessions/stats"},"startTime":1782208930136,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":993423,"timestamp":38829244654,"id":56,"parentId":31,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":1007568,"timestamp":38829230560,"id":31,"parentId":19,"tags":{"page":"/api/sessions/inject"},"startTime":1782208930133,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":992942,"timestamp":38829245292,"id":65,"parentId":40,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":1003366,"timestamp":38829234888,"id":40,"parentId":19,"tags":{"page":"/api/sql/connections"},"startTime":1782208930137,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":993383,"timestamp":38829245452,"id":69,"parentId":44,"tags":{},"startTime":1782208930148,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":1002218,"timestamp":38829236649,"id":44,"parentId":19,"tags":{"page":"/api/telemetry"},"startTime":1782208930139,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":995487,"timestamp":38829245378,"id":67,"parentId":42,"tags":{},"startTime":1782208930148,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":1005194,"timestamp":38829235705,"id":42,"parentId":19,"tags":{"page":"/api/sql/query"},"startTime":1782208930138,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":995797,"timestamp":38829245415,"id":68,"parentId":43,"tags":{},"startTime":1782208930148,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":1005064,"timestamp":38829236180,"id":43,"parentId":19,"tags":{"page":"/api/sql/schema"},"startTime":1782208930138,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":997554,"timestamp":38829244504,"id":54,"parentId":29,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":1012515,"timestamp":38829229566,"id":29,"parentId":19,"tags":{"page":"/api/git"},"startTime":1782208930132,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":998531,"timestamp":38829245338,"id":66,"parentId":41,"tags":{},"startTime":1782208930148,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":1008634,"timestamp":38829235264,"id":41,"parentId":19,"tags":{"page":"/api/sql/mcp"},"startTime":1782208930137,"traceId":"8891e45995bba3d8"},{"name":"is-page-static","duration":1000696,"timestamp":38829245207,"id":63,"parentId":38,"tags":{},"startTime":1782208930147,"traceId":"8891e45995bba3d8"},{"name":"check-page","duration":1011810,"timestamp":38829234121,"id":38,"parentId":19,"tags":{"page":"/api/sessions/stop"},"startTime":1782208930136,"traceId":"8891e45995bba3d8"},{"name":"static-check","duration":1025179,"timestamp":38829220776,"id":19,"parentId":1,"tags":{},"startTime":1782208930123,"traceId":"8891e45995bba3d8"},{"name":"write-routes-manifest","duration":770,"timestamp":38830247092,"id":72,"parentId":1,"tags":{},"startTime":1782208931149,"traceId":"8891e45995bba3d8"},{"name":"load-dotenv","duration":46,"timestamp":38830268908,"id":75,"parentId":74,"tags":{},"startTime":1782208931171,"traceId":"8891e45995bba3d8"},{"name":"run-export-path-map","duration":504,"timestamp":38830275416,"id":76,"parentId":74,"tags":{},"startTime":1782208931178,"traceId":"8891e45995bba3d8"},{"name":"next-export","duration":837814,"timestamp":38830267850,"id":74,"parentId":1,"tags":{},"startTime":1782208931170,"traceId":"8891e45995bba3d8"},{"name":"move-exported-app-not-found-","duration":2137,"timestamp":38831107821,"id":77,"parentId":73,"tags":{},"startTime":1782208932010,"traceId":"8891e45995bba3d8"},{"name":"move-exported-app-global-error-","duration":1723,"timestamp":38831110070,"id":78,"parentId":73,"tags":{},"startTime":1782208932012,"traceId":"8891e45995bba3d8"},{"name":"static-generation","duration":860369,"timestamp":38830254766,"id":73,"parentId":1,"tags":{},"startTime":1782208931157,"traceId":"8891e45995bba3d8"},{"name":"write-routes-manifest","duration":975,"timestamp":38831115270,"id":79,"parentId":1,"tags":{},"startTime":1782208932017,"traceId":"8891e45995bba3d8"},{"name":"print-tree-view","duration":3639,"timestamp":38831135624,"id":80,"parentId":1,"tags":{},"startTime":1782208932038,"traceId":"8891e45995bba3d8"},{"name":"write-route-bundle-stats","duration":18219,"timestamp":38831139307,"id":81,"parentId":1,"tags":{},"startTime":1782208932042,"traceId":"8891e45995bba3d8"},{"name":"telemetry-flush","duration":173360,"timestamp":38831157593,"id":82,"parentId":1,"tags":{},"startTime":1782208932060,"traceId":"8891e45995bba3d8"},{"name":"next-build","duration":10358793,"timestamp":38820972184,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1782208921874,"traceId":"8891e45995bba3d8"}]
|
|
1
|
+
[{"name":"generate-buildid","duration":286,"timestamp":26090913541,"id":4,"parentId":1,"tags":{},"startTime":1782283754114,"traceId":"008d7d432f823f76"},{"name":"load-custom-routes","duration":370,"timestamp":26090913943,"id":5,"parentId":1,"tags":{},"startTime":1782283754115,"traceId":"008d7d432f823f76"},{"name":"create-dist-dir","duration":2426,"timestamp":26090914343,"id":6,"parentId":1,"tags":{},"startTime":1782283754115,"traceId":"008d7d432f823f76"},{"name":"clean","duration":602,"timestamp":26090917778,"id":7,"parentId":1,"tags":{},"startTime":1782283754119,"traceId":"008d7d432f823f76"},{"name":"discover-routes","duration":6435,"timestamp":26090942417,"id":8,"parentId":1,"tags":{},"startTime":1782283754143,"traceId":"008d7d432f823f76"},{"name":"create-root-mapping","duration":54,"timestamp":26090948896,"id":9,"parentId":1,"tags":{},"startTime":1782283754150,"traceId":"008d7d432f823f76"},{"name":"generate-route-types","duration":17806,"timestamp":26090950276,"id":10,"parentId":1,"tags":{},"startTime":1782283754151,"traceId":"008d7d432f823f76"},{"name":"public-dir-conflict-check","duration":107,"timestamp":26090968236,"id":11,"parentId":1,"tags":{},"startTime":1782283754169,"traceId":"008d7d432f823f76"},{"name":"generate-routes-manifest","duration":2758,"timestamp":26090968465,"id":12,"parentId":1,"tags":{},"startTime":1782283754169,"traceId":"008d7d432f823f76"},{"name":"run-turbopack","duration":2852795,"timestamp":26090979830,"id":14,"parentId":1,"tags":{},"startTime":1782283754181,"traceId":"008d7d432f823f76"},{"name":"turbopack-build-events","duration":66,"timestamp":26091379332,"id":15,"parentId":1,"tags":{},"startTime":1782283754580,"traceId":"008d7d432f823f76"},{"name":"run-typescript","duration":4695331,"timestamp":26093846005,"id":16,"parentId":1,"tags":{},"startTime":1782283757047,"traceId":"008d7d432f823f76"},{"name":"generate-required-server-files","duration":1457,"timestamp":26098543184,"id":18,"parentId":1,"tags":{},"startTime":1782283761744,"traceId":"008d7d432f823f76"},{"name":"check-static-error-page","duration":10485,"timestamp":26098713493,"id":20,"parentId":19,"tags":{},"startTime":1782283761914,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":735009,"timestamp":26098737707,"id":47,"parentId":22,"tags":{},"startTime":1782283761939,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":754807,"timestamp":26098718038,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1782283761919,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":885022,"timestamp":26098737766,"id":48,"parentId":23,"tags":{},"startTime":1782283761939,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":904208,"timestamp":26098718666,"id":23,"parentId":19,"tags":{"page":"/api/configs"},"startTime":1782283761920,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":886828,"timestamp":26098737956,"id":52,"parentId":27,"tags":{},"startTime":1782283761939,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":905318,"timestamp":26098719521,"id":27,"parentId":19,"tags":{"page":"/api/context/ssh"},"startTime":1782283761920,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":887125,"timestamp":26098738224,"id":54,"parentId":29,"tags":{},"startTime":1782283761939,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":905444,"timestamp":26098719952,"id":29,"parentId":19,"tags":{"page":"/api/git"},"startTime":1782283761921,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":889152,"timestamp":26098737507,"id":46,"parentId":21,"tags":{},"startTime":1782283761938,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":910733,"timestamp":26098715999,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1782283761917,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":895729,"timestamp":26098737807,"id":49,"parentId":24,"tags":{},"startTime":1782283761939,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":914708,"timestamp":26098718889,"id":24,"parentId":19,"tags":{"page":"/api/context/aider"},"startTime":1782283761920,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":907117,"timestamp":26098738799,"id":59,"parentId":34,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":924826,"timestamp":26098721157,"id":34,"parentId":19,"tags":{"page":"/api/sessions"},"startTime":1782283761922,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":912463,"timestamp":26098738636,"id":57,"parentId":32,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":930393,"timestamp":26098720760,"id":32,"parentId":19,"tags":{"page":"/api/sessions/input"},"startTime":1782283761922,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":908663,"timestamp":26098742675,"id":70,"parentId":45,"tags":{},"startTime":1782283761944,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":927778,"timestamp":26098723595,"id":45,"parentId":19,"tags":{"page":"/"},"startTime":1782283761925,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":915012,"timestamp":26098737900,"id":51,"parentId":26,"tags":{},"startTime":1782283761939,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":933617,"timestamp":26098719331,"id":26,"parentId":19,"tags":{"page":"/api/context"},"startTime":1782283761920,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":914002,"timestamp":26098739033,"id":64,"parentId":39,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":930564,"timestamp":26098722497,"id":39,"parentId":19,"tags":{"page":"/api/sessions/upload-image"},"startTime":1782283761923,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":921951,"timestamp":26098739004,"id":63,"parentId":38,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":938697,"timestamp":26098722316,"id":38,"parentId":19,"tags":{"page":"/api/sessions/stop"},"startTime":1782283761923,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":929674,"timestamp":26098739065,"id":65,"parentId":40,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":946113,"timestamp":26098722682,"id":40,"parentId":19,"tags":{"page":"/api/sql/connections"},"startTime":1782283761924,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":929901,"timestamp":26098739098,"id":66,"parentId":41,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":946157,"timestamp":26098722879,"id":41,"parentId":19,"tags":{"page":"/api/sql/mcp"},"startTime":1782283761924,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":933792,"timestamp":26098737859,"id":50,"parentId":25,"tags":{},"startTime":1782283761939,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":952569,"timestamp":26098719121,"id":25,"parentId":19,"tags":{"page":"/api/context/claude"},"startTime":1782283761920,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":937757,"timestamp":26098738328,"id":55,"parentId":30,"tags":{},"startTime":1782283761939,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":955935,"timestamp":26098720200,"id":30,"parentId":19,"tags":{"page":"/api/recents"},"startTime":1782283761921,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":937822,"timestamp":26098739163,"id":68,"parentId":43,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":953827,"timestamp":26098723219,"id":43,"parentId":19,"tags":{"page":"/api/sql/schema"},"startTime":1782283761924,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":939978,"timestamp":26098738435,"id":56,"parentId":31,"tags":{},"startTime":1782283761939,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":958039,"timestamp":26098720410,"id":31,"parentId":19,"tags":{"page":"/api/sessions/inject"},"startTime":1782283761921,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":942400,"timestamp":26098738109,"id":53,"parentId":28,"tags":{},"startTime":1782283761939,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":960819,"timestamp":26098719732,"id":28,"parentId":19,"tags":{"page":"/api/files"},"startTime":1782283761921,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":945292,"timestamp":26098739194,"id":69,"parentId":44,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":961124,"timestamp":26098723406,"id":44,"parentId":19,"tags":{"page":"/api/telemetry"},"startTime":1782283761924,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":947475,"timestamp":26098739131,"id":67,"parentId":42,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":963623,"timestamp":26098723046,"id":42,"parentId":19,"tags":{"page":"/api/sql/query"},"startTime":1782283761924,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":948597,"timestamp":26098738889,"id":61,"parentId":36,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":965683,"timestamp":26098721842,"id":36,"parentId":19,"tags":{"page":"/api/sessions/start"},"startTime":1782283761923,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":950939,"timestamp":26098738850,"id":60,"parentId":35,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":968382,"timestamp":26098721448,"id":35,"parentId":19,"tags":{"page":"/api/sessions/scope"},"startTime":1782283761922,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":951083,"timestamp":26098738955,"id":62,"parentId":37,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":967955,"timestamp":26098722100,"id":37,"parentId":19,"tags":{"page":"/api/sessions/stats"},"startTime":1782283761923,"traceId":"008d7d432f823f76"},{"name":"is-page-static","duration":973787,"timestamp":26098738729,"id":58,"parentId":33,"tags":{},"startTime":1782283761940,"traceId":"008d7d432f823f76"},{"name":"check-page","duration":991596,"timestamp":26098720966,"id":33,"parentId":19,"tags":{"page":"/api/sessions/launch"},"startTime":1782283761922,"traceId":"008d7d432f823f76"},{"name":"static-check","duration":999744,"timestamp":26098712861,"id":19,"parentId":1,"tags":{},"startTime":1782283761914,"traceId":"008d7d432f823f76"},{"name":"write-routes-manifest","duration":946,"timestamp":26099713817,"id":72,"parentId":1,"tags":{},"startTime":1782283762915,"traceId":"008d7d432f823f76"},{"name":"load-dotenv","duration":42,"timestamp":26099735542,"id":75,"parentId":74,"tags":{},"startTime":1782283762936,"traceId":"008d7d432f823f76"},{"name":"run-export-path-map","duration":420,"timestamp":26099741351,"id":76,"parentId":74,"tags":{},"startTime":1782283762942,"traceId":"008d7d432f823f76"},{"name":"next-export","duration":800161,"timestamp":26099734532,"id":74,"parentId":1,"tags":{},"startTime":1782283762935,"traceId":"008d7d432f823f76"},{"name":"move-exported-app-not-found-","duration":2364,"timestamp":26100536910,"id":77,"parentId":73,"tags":{},"startTime":1782283763738,"traceId":"008d7d432f823f76"},{"name":"move-exported-app-global-error-","duration":2037,"timestamp":26100539432,"id":78,"parentId":73,"tags":{},"startTime":1782283763740,"traceId":"008d7d432f823f76"},{"name":"static-generation","duration":824332,"timestamp":26099721182,"id":73,"parentId":1,"tags":{},"startTime":1782283762922,"traceId":"008d7d432f823f76"},{"name":"write-routes-manifest","duration":1198,"timestamp":26100545648,"id":79,"parentId":1,"tags":{},"startTime":1782283763747,"traceId":"008d7d432f823f76"},{"name":"print-tree-view","duration":3456,"timestamp":26100569135,"id":80,"parentId":1,"tags":{},"startTime":1782283763770,"traceId":"008d7d432f823f76"},{"name":"write-route-bundle-stats","duration":17726,"timestamp":26100572628,"id":81,"parentId":1,"tags":{},"startTime":1782283763774,"traceId":"008d7d432f823f76"},{"name":"telemetry-flush","duration":152264,"timestamp":26100590392,"id":82,"parentId":1,"tags":{},"startTime":1782283763791,"traceId":"008d7d432f823f76"},{"name":"next-build","duration":9880340,"timestamp":26090862351,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1782283754063,"traceId":"008d7d432f823f76"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":2852795,"timestamp":26090979830,"id":14,"parentId":1,"tags":{},"startTime":1782283754181,"traceId":"008d7d432f823f76"},{"name":"turbopack-build-events","duration":66,"timestamp":26091379332,"id":15,"parentId":1,"tags":{},"startTime":1782283754580,"traceId":"008d7d432f823f76"},{"name":"run-typescript","duration":4695331,"timestamp":26093846005,"id":16,"parentId":1,"tags":{},"startTime":1782283757047,"traceId":"008d7d432f823f76"},{"name":"static-check","duration":999744,"timestamp":26098712861,"id":19,"parentId":1,"tags":{},"startTime":1782283761914,"traceId":"008d7d432f823f76"},{"name":"static-generation","duration":824332,"timestamp":26099721182,"id":73,"parentId":1,"tags":{},"startTime":1782283762922,"traceId":"008d7d432f823f76"},{"name":"telemetry-flush","duration":152264,"timestamp":26100590392,"id":82,"parentId":1,"tags":{},"startTime":1782283763791,"traceId":"008d7d432f823f76"},{"name":"next-build","duration":9880340,"timestamp":26090862351,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1782283754063,"traceId":"008d7d432f823f76"}]
|