neural-loom 0.2.53 → 0.2.55
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 +2 -2
- 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/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/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 +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- 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 +2 -2
- 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/chunks/[root-of-the-server]__0.ptwor._.js +8 -8
- package/.next/server/chunks/[root-of-the-server]__0.ptwor._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__00l5btc._.js +5 -5
- package/.next/server/chunks/[root-of-the-server]__00l5btc._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__06men8g._.js +5 -5
- package/.next/server/chunks/[root-of-the-server]__06men8g._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__0_o7_jj._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0_o7_jj._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__0co.g5k._.js +5 -5
- package/.next/server/chunks/[root-of-the-server]__0co.g5k._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js +12 -12
- package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js.map +1 -1
- package/.next/server/chunks/ssr/_0t7oqy6._.js +2 -2
- package/.next/server/chunks/ssr/_0t7oqy6._.js.map +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/{070hz362~_h8n.js → 0-vb7c~yrtpon.js} +1 -1
- package/.next/static/chunks/{0m-_sw1425nkp.css → 0hoyc~vbuqe0t.css} +1 -1
- package/.next/static/chunks/0st7_hghhyuv4.js +1 -0
- package/.next/static/chunks/0ulfmf9nsz_o-.js +6 -0
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/README.md +4 -0
- package/package.json +1 -1
- package/public/ui-audit.html +1509 -0
- package/src/app/components/IdeLayout.tsx +37 -1
- package/src/app/components/TerminalConsole.tsx +3 -0
- package/src/app/page.module.css +55 -0
- package/src/app/page.tsx +21 -3
- package/src/lib/agents/AgentRunner.ts +74 -0
- package/src/lib/agents/AiderRunner.ts +4 -2
- package/src/lib/agents/ClaudeRunner.ts +4 -3
- package/src/lib/agents/DockerRunner.ts +4 -2
- package/src/lib/agents/MockRunner.ts +2 -1
- package/src/lib/agents/SSHRunner.ts +4 -2
- package/src/lib/agents/ShellRunner.ts +4 -1
- package/src/lib/sql/adapters/MssqlAdapter.ts +1 -1
- package/src/lib/sql/adapters/MysqlAdapter.ts +1 -1
- package/src/lib/sql/adapters/PostgresAdapter.ts +1 -1
- package/src/lib/sql/adapters/SqliteAdapter.ts +1 -1
- package/.next/static/chunks/0p28yw2f2duy-.js +0 -1
- package/.next/static/chunks/0z0d3-6aolefr.js +0 -6
- /package/.next/static/{WLQchpoAU3XMEr3Ep5w4b → PtixAwrSwsBc6DJtUuNCf}/_buildManifest.js +0 -0
- /package/.next/static/{WLQchpoAU3XMEr3Ep5w4b → PtixAwrSwsBc6DJtUuNCf}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{WLQchpoAU3XMEr3Ep5w4b → PtixAwrSwsBc6DJtUuNCf}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
.page-module___8aEwW__container{flex-direction:column;gap:2rem;max-width:1400px;min-height:100vh;margin:0 auto;padding:2rem;display:flex}.page-module___8aEwW__header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding-bottom:1.5rem;display:flex}.page-module___8aEwW__logoArea{flex-direction:column;gap:.25rem;display:flex}.page-module___8aEwW__title{letter-spacing:-.05em;background:linear-gradient(135deg, hsl(var(--primary-hsl)) 0%, hsl(var(--accent-hsl)) 100%);-webkit-text-fill-color:transparent;-webkit-background-clip:text;font-size:2.25rem;font-weight:800}.page-module___8aEwW__subtitle{color:var(--muted);font-size:.875rem}.page-module___8aEwW__statusIndicator{background-color:var(--card);border:1px solid var(--border);border-radius:9999px;align-items:center;gap:.5rem;padding:.5rem 1rem;font-size:.875rem;display:flex}.page-module___8aEwW__pulseDot{background-color:var(--success);width:8px;height:8px;box-shadow:0 0 10px var(--success);border-radius:50%;animation:2s infinite page-module___8aEwW__pulse}.page-module___8aEwW__dashboardGrid{grid-template-columns:2fr 1fr;gap:2rem;display:grid}@media (max-width:1024px){.page-module___8aEwW__dashboardGrid{grid-template-columns:1fr}}.page-module___8aEwW__mainPanel{flex-direction:column;gap:2rem;min-width:0;display:flex}.page-module___8aEwW__sidePanel{flex-direction:column;gap:2rem;display:flex}.page-module___8aEwW__sectionTitle{color:var(--foreground);margin-bottom:1rem;font-size:1.25rem;font-weight:700}.page-module___8aEwW__cardBody{flex-direction:column;gap:1rem;padding:1.5rem;display:flex}.page-module___8aEwW__agentGrid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.5rem;display:grid}.page-module___8aEwW__agentCard{background-color:var(--card);border:1px solid var(--border);border-radius:12px;overflow:hidden}.page-module___8aEwW__agentHeader{background-color:hsla(var(--border-hsl), .3);border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:1rem 1.5rem;display:flex}.page-module___8aEwW__agentName{font-size:1rem;font-weight:600}.page-module___8aEwW__agentBadge{background-color:hsla(var(--primary-hsl), .15);color:var(--primary);border-radius:4px;padding:.25rem .5rem;font-size:.75rem;font-weight:500}.page-module___8aEwW__envGrid{grid-template-columns:1fr;gap:1rem;display:grid}.page-module___8aEwW__envRow{background-color:var(--card);border:1px solid var(--border);border-radius:8px;justify-content:space-between;align-items:center;padding:.75rem 1rem;display:flex}.page-module___8aEwW__envName{font-size:.875rem;font-weight:500}.page-module___8aEwW__envStatus{color:var(--muted);font-size:.75rem}.page-module___8aEwW__quickLaunchBtn{background-color:var(--primary);color:#fff;border:none;border-radius:8px;justify-content:center;align-items:center;gap:.5rem;width:100%;padding:1rem;font-size:1rem;font-weight:600;display:flex}.page-module___8aEwW__quickLaunchBtn:hover{background-color:var(--primary-hover);transform:translateY(-1px)}.page-module___8aEwW__contextList{flex-direction:column;gap:.75rem;display:flex}.page-module___8aEwW__contextItem{background-color:var(--card);border:1px solid var(--border);border-radius:8px;justify-content:space-between;align-items:center;padding:.75rem 1rem;display:flex}.page-module___8aEwW__contextMeta{flex-direction:column;gap:.25rem;display:flex}.page-module___8aEwW__contextTitle{font-size:.875rem;font-weight:600}.page-module___8aEwW__contextDetails{color:var(--muted);font-size:.75rem}.page-module___8aEwW__footer{border-top:1px solid var(--border);color:var(--muted);justify-content:space-between;margin-top:auto;padding-top:1.5rem;font-size:.75rem;display:flex}@keyframes page-module___8aEwW__pulse{0%{transform:scale(.95);box-shadow:0 0 #22c55eb3}70%{transform:scale(1);box-shadow:0 0 0 6px #22c55e00}to{transform:scale(.95);box-shadow:0 0 #22c55e00}}.page-module___8aEwW__activeBorder{box-shadow:0 0 12px hsla(var(--primary-hsl), .2);border-color:var(--border-focus)!important}.page-module___8aEwW__stoppedBadge{background-color:hsla(var(--danger-hsl), .15)!important;color:var(--danger)!important}.page-module___8aEwW__terminalContainer{border-bottom:1px solid var(--border);font-family:var(--font-mono);color:#c9d1d9;background-color:#05070a;flex-direction:column;gap:.35rem;height:380px;padding:1.5rem;font-size:.825rem;line-height:1.5;display:flex;overflow-y:auto}.page-module___8aEwW__terminalLine{white-space:pre-wrap;word-break:break-all}.page-module___8aEwW__terminalInputArea{background-color:#0b0f17;border-bottom-right-radius:12px;border-bottom-left-radius:12px;align-items:center;gap:.75rem;padding:1rem 1.5rem;display:flex}.page-module___8aEwW__terminalInput{color:var(--foreground);font-family:var(--font-mono);background:0 0;border:none;outline:none;flex:1;font-size:.825rem}.page-module___8aEwW__terminalSendBtn{background-color:var(--primary);color:#fff;border:none;border-radius:6px;padding:.4rem 1rem;font-size:.75rem;font-weight:600;transition:all .2s}.page-module___8aEwW__terminalSendBtn:hover:not(:disabled){background-color:var(--primary-hover);transform:translateY(-1px)}.page-module___8aEwW__terminalSendBtn:disabled{opacity:.5;cursor:not-allowed}.page-module___8aEwW__ansiMagenta{color:#ff79c6}.page-module___8aEwW__ansiCyan{color:#8be9fd}.page-module___8aEwW__ansiGreen{color:#50fa7b}.page-module___8aEwW__ansiRed{color:#f55}.page-module___8aEwW__ansiYellow{color:#f1fa8c}.page-module___8aEwW__containerActive{gap:1rem;width:100%;max-width:none;height:100vh;min-height:100vh;max-height:100vh;padding:1rem 1.5rem;overflow:hidden}
|
|
1
|
+
.page-module___8aEwW__container{flex-direction:column;gap:2rem;max-width:1400px;min-height:100vh;margin:0 auto;padding:2rem;display:flex}.page-module___8aEwW__header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding-bottom:1.5rem;display:flex}.page-module___8aEwW__logoArea{flex-direction:column;gap:.25rem;display:flex}.page-module___8aEwW__title{letter-spacing:-.05em;background:linear-gradient(135deg, hsl(var(--primary-hsl)) 0%, hsl(var(--accent-hsl)) 100%);-webkit-text-fill-color:transparent;-webkit-background-clip:text;font-size:2.25rem;font-weight:800}.page-module___8aEwW__subtitle{color:var(--muted);font-size:.875rem}.page-module___8aEwW__statusIndicator{background-color:var(--card);border:1px solid var(--border);border-radius:9999px;align-items:center;gap:.5rem;padding:.5rem 1rem;font-size:.875rem;display:flex}.page-module___8aEwW__pulseDot{background-color:var(--success);width:8px;height:8px;box-shadow:0 0 10px var(--success);border-radius:50%;animation:2s infinite page-module___8aEwW__pulse}.page-module___8aEwW__dashboardGrid{grid-template-columns:2fr 1fr;gap:2rem;display:grid}@media (max-width:1024px){.page-module___8aEwW__dashboardGrid{grid-template-columns:1fr}}.page-module___8aEwW__mainPanel{flex-direction:column;gap:2rem;min-width:0;display:flex}.page-module___8aEwW__sidePanel{flex-direction:column;gap:2rem;display:flex}.page-module___8aEwW__sectionTitle{color:var(--foreground);margin-bottom:1rem;font-size:1.25rem;font-weight:700}.page-module___8aEwW__cardBody{flex-direction:column;gap:1rem;padding:1.5rem;display:flex}.page-module___8aEwW__agentGrid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.5rem;display:grid}.page-module___8aEwW__agentCard{background-color:var(--card);border:1px solid var(--border);border-radius:12px;overflow:hidden}.page-module___8aEwW__agentHeader{background-color:hsla(var(--border-hsl), .3);border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:1rem 1.5rem;display:flex}.page-module___8aEwW__agentName{font-size:1rem;font-weight:600}.page-module___8aEwW__agentBadge{background-color:hsla(var(--primary-hsl), .15);color:var(--primary);border-radius:4px;padding:.25rem .5rem;font-size:.75rem;font-weight:500}.page-module___8aEwW__envGrid{grid-template-columns:1fr;gap:1rem;display:grid}.page-module___8aEwW__envRow{background-color:var(--card);border:1px solid var(--border);border-radius:8px;justify-content:space-between;align-items:center;padding:.75rem 1rem;display:flex}.page-module___8aEwW__envName{font-size:.875rem;font-weight:500}.page-module___8aEwW__envStatus{color:var(--muted);font-size:.75rem}.page-module___8aEwW__quickLaunchBtn{background-color:var(--primary);color:#fff;border:none;border-radius:8px;justify-content:center;align-items:center;gap:.5rem;width:100%;padding:1rem;font-size:1rem;font-weight:600;display:flex}.page-module___8aEwW__quickLaunchBtn:hover{background-color:var(--primary-hover);transform:translateY(-1px)}.page-module___8aEwW__contextList{flex-direction:column;gap:.75rem;display:flex}.page-module___8aEwW__contextItem{background-color:var(--card);border:1px solid var(--border);border-radius:8px;justify-content:space-between;align-items:center;padding:.75rem 1rem;display:flex}.page-module___8aEwW__contextMeta{flex-direction:column;gap:.25rem;display:flex}.page-module___8aEwW__contextTitle{font-size:.875rem;font-weight:600}.page-module___8aEwW__contextDetails{color:var(--muted);font-size:.75rem}.page-module___8aEwW__footer{border-top:1px solid var(--border);color:var(--muted);justify-content:space-between;margin-top:auto;padding-top:1.5rem;font-size:.75rem;display:flex}@keyframes page-module___8aEwW__pulse{0%{transform:scale(.95);box-shadow:0 0 #22c55eb3}70%{transform:scale(1);box-shadow:0 0 0 6px #22c55e00}to{transform:scale(.95);box-shadow:0 0 #22c55e00}}.page-module___8aEwW__activeBorder{box-shadow:0 0 12px hsla(var(--primary-hsl), .2);border-color:var(--border-focus)!important}.page-module___8aEwW__stoppedBadge{background-color:hsla(var(--danger-hsl), .15)!important;color:var(--danger)!important}.page-module___8aEwW__terminalContainer{border-bottom:1px solid var(--border);font-family:var(--font-mono);color:#c9d1d9;background-color:#05070a;flex-direction:column;gap:.35rem;height:380px;padding:1.5rem;font-size:.825rem;line-height:1.5;display:flex;overflow-y:auto}.page-module___8aEwW__terminalLine{white-space:pre-wrap;word-break:break-all}.page-module___8aEwW__terminalInputArea{background-color:#0b0f17;border-bottom-right-radius:12px;border-bottom-left-radius:12px;align-items:center;gap:.75rem;padding:1rem 1.5rem;display:flex}.page-module___8aEwW__terminalInput{color:var(--foreground);font-family:var(--font-mono);background:0 0;border:none;outline:none;flex:1;font-size:.825rem}.page-module___8aEwW__terminalSendBtn{background-color:var(--primary);color:#fff;border:none;border-radius:6px;padding:.4rem 1rem;font-size:.75rem;font-weight:600;transition:all .2s}.page-module___8aEwW__terminalSendBtn:hover:not(:disabled){background-color:var(--primary-hover);transform:translateY(-1px)}.page-module___8aEwW__terminalSendBtn:disabled{opacity:.5;cursor:not-allowed}.page-module___8aEwW__ansiMagenta{color:#ff79c6}.page-module___8aEwW__ansiCyan{color:#8be9fd}.page-module___8aEwW__ansiGreen{color:#50fa7b}.page-module___8aEwW__ansiRed{color:#f55}.page-module___8aEwW__ansiYellow{color:#f1fa8c}.page-module___8aEwW__containerActive{gap:1rem;width:100%;max-width:none;height:100vh;min-height:100vh;max-height:100vh;padding:1rem 1.5rem;overflow:hidden}.page-module___8aEwW__agentStateBadge{text-transform:uppercase;letter-spacing:.05em;border-radius:4px;align-items:center;gap:.25rem;margin-right:.25rem;padding:.15rem .4rem;font-size:.65rem;font-weight:600;display:inline-flex}.page-module___8aEwW__state-thinking{color:#c084fc;background-color:#a855f726;border:1px solid #a855f74d;animation:2s ease-in-out infinite page-module___8aEwW__pulse-thinking;box-shadow:0 0 8px #a855f733}.page-module___8aEwW__state-needs-input{color:#e0825f;background-color:#d9775226;border:1px solid #d977524d;animation:1.5s ease-in-out infinite page-module___8aEwW__pulse-attention;box-shadow:0 0 8px #d9775233}.page-module___8aEwW__state-complete{color:#34d399;background-color:#10b98126;border:1px solid #10b9814d}.page-module___8aEwW__state-idle{color:var(--muted);background-color:#ffffff0d;border:1px solid #ffffff1a}@keyframes page-module___8aEwW__pulse-thinking{0%{box-shadow:0 0 #a855f766}70%{box-shadow:0 0 0 5px #a855f700}to{box-shadow:0 0 #a855f700}}@keyframes page-module___8aEwW__pulse-attention{0%{box-shadow:0 0 #d9775266}70%{box-shadow:0 0 0 5px #d9775200}to{box-shadow:0 0 #d9775200}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3839,e=>{"use strict";var t=e.i(43476),r=e.i(71645),o=e.i(5991),n=e.i(54370);function i({content:e}){let o=(0,r.useMemo)(()=>{if(!e)return[];let t=e.split("\n"),r=[],o=null;for(let e=0;e<t.length;e++){let n=t[e];if(o&&"code"===o.type){n.trim().startsWith("```")?(r.push(o),o=null):o.content.push(n);continue}if(o&&"table"===o.type)if(n.trim().startsWith("|")){o.content.push(n);continue}else r.push(o),o=null;let i=n.trim();if(i.startsWith("```")){o&&r.push(o),o={type:"code",language:i.substring(3).trim(),content:[]};continue}if(/^(\s*[-*_]\s*){3,}$/.test(i)){o&&r.push(o),r.push({type:"hr"}),o=null;continue}let l=n.match(/^(#{1,6})\s+(.*)$/);if(l){o&&r.push(o),r.push({type:"h",level:l[1].length,content:l[2]}),o=null;continue}let a=n.match(/^>\s*(.*)$/);if(a){if(o)if("blockquote"===o.type){o.content.push(a[1]);continue}else r.push(o);o={type:"blockquote",content:[a[1]]};continue}let s=n.match(/^([-*+])\s+(.*)$/);if(s){if(o)if("ul"===o.type){o.content.push(s[2]);continue}else r.push(o);o={type:"ul",content:[s[2]]};continue}let d=n.match(/^(\d+)\.\s+(.*)$/);if(d){if(o)if("ol"===o.type){o.content.push(d[2]);continue}else r.push(o);o={type:"ol",content:[d[2]]};continue}if(i.startsWith("|")){o&&r.push(o),o={type:"table",content:[n]};continue}if(""===i){o&&(r.push(o),o=null);continue}o?"p"===o.type?o.content=o.content+" "+i:(r.push(o),o={type:"p",content:i}):o={type:"p",content:i}}return o&&r.push(o),r},[e]),n=0;function z(e){return function e(r){if(!r)return[];let o=r.match(/`(.*?)`/),i=r.match(/\*\*(.*?)\*\*/),l=r.match(/\*(.*?)\*/),a=r.match(/\[(.*?)\]\((.*?)\)/),s=[o?{index:o.index,type:"code",match:o}:null,i?{index:i.index,type:"bold",match:i}:null,l?{index:l.index,type:"italic",match:l}:null,a?{index:a.index,type:"link",match:a}:null].filter(Boolean);if(0===s.length)return[r];s.sort((e,t)=>e.index-t.index);let d=s[0],c=r.substring(0,d.index),p=d.match[0],u=r.substring(d.index+p.length),m=[];c&&m.push(c);let h=`inline-${d.type}-${n++}`;return"code"===d.type?m.push((0,t.jsx)("code",{style:x,children:d.match[1]},h)):"bold"===d.type?m.push((0,t.jsx)("strong",{style:{fontWeight:700,color:"var(--foreground)"},children:e(d.match[1])},h)):"italic"===d.type?m.push((0,t.jsx)("em",{style:{fontStyle:"italic"},children:e(d.match[1])},h)):"link"===d.type&&m.push((0,t.jsx)("a",{href:d.match[2],target:"_blank",rel:"noopener noreferrer",style:y,children:e(d.match[1])},h)),[...m,...e(u)]}(e)}return(0,t.jsx)("div",{style:a,children:o.map((e,r)=>{let o=`block-${e.type}-${r}`;switch(e.type){case"h":{let r=z(e.content);switch(e.level){case 1:return(0,t.jsx)("h1",{style:d,children:r},o);case 2:return(0,t.jsx)("h2",{style:c,children:r},o);case 3:return(0,t.jsx)("h3",{style:p,children:r},o);default:return(0,t.jsx)("h4",{style:u,children:r},o)}}case"code":{let r=e.content.join("\n");return(0,t.jsx)(l,{code:r,language:e.language||""},o)}case"blockquote":return(0,t.jsx)("blockquote",{style:k,children:e.content&&e.content.map((e,r)=>(0,t.jsx)("p",{style:{margin:"0.25rem 0"},children:z(e)},r))},o);case"ul":return(0,t.jsx)("ul",{style:m,children:e.content&&e.content.map((e,r)=>(0,t.jsxs)("li",{style:g,children:[(0,t.jsx)("span",{style:{marginRight:"0.5rem",color:"var(--accent)"},children:"•"}),(0,t.jsx)("div",{style:{flex:1},children:z(e)})]},r))},o);case"ol":return(0,t.jsx)("ol",{style:h,children:e.content&&e.content.map((e,r)=>(0,t.jsxs)("li",{style:g,children:[(0,t.jsxs)("span",{style:{marginRight:"0.5rem",color:"var(--accent)",fontWeight:600},children:[r+1,"."]}),(0,t.jsx)("div",{style:{flex:1},children:z(e)})]},r))},o);case"table":return function(e,r){let o=e.map(e=>e.split("|").map(e=>e.trim()).filter((e,t,r)=>t>0&&t<r.length-1));if(0===o.length)return null;let n=o[0],i=o.slice(1).filter(e=>!e.every(e=>e.startsWith("-")||""===e));return(0,t.jsx)("div",{style:b,children:(0,t.jsxs)("table",{style:v,children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{children:n.map((e,r)=>(0,t.jsx)("th",{style:j,children:z(e)},r))})}),(0,t.jsx)("tbody",{children:i.map((e,r)=>(0,t.jsx)("tr",{style:r%2==0?S:w,children:e.map((e,r)=>(0,t.jsx)("td",{style:C,children:z(e)},r))},r))})]})},r)}(e.content,o);case"hr":return(0,t.jsx)("hr",{style:f},o);case"p":return(0,t.jsx)("p",{style:s,children:z(e.content)},o);default:return null}})})}function l({code:e,language:o}){let[n,i]=(0,r.useState)(!1);return(0,t.jsxs)("div",{style:z,children:[(0,t.jsxs)("div",{style:T,children:[(0,t.jsx)("span",{children:o||"code"}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)},style:P,children:n?"Copied! ✓":"Copy"})]}),(0,t.jsx)("pre",{style:R,children:(0,t.jsx)("code",{children:e})})]})}let a={fontFamily:"var(--font-sans), sans-serif",color:"var(--foreground)",lineHeight:1.6,padding:"1.5rem",overflowY:"auto",height:"100%",backgroundColor:"#080c14",borderLeft:"1px solid var(--border)"},s={fontSize:"0.875rem",marginBottom:"1rem",color:"var(--foreground-muted, #94a3b8)"},d={fontSize:"1.5rem",fontWeight:700,margin:"1.5rem 0 1rem 0",paddingBottom:"0.3rem",borderBottom:"1px solid var(--border)",color:"var(--foreground)",background:"linear-gradient(135deg, #fff 0%, #a855f7 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},c={fontSize:"1.25rem",fontWeight:650,margin:"1.25rem 0 0.85rem 0",paddingBottom:"0.25rem",borderBottom:"1px solid var(--border)",color:"var(--foreground)"},p={fontSize:"1.05rem",fontWeight:600,margin:"1rem 0 0.75rem 0",color:"var(--foreground)"},u={fontSize:"0.925rem",fontWeight:600,margin:"0.85rem 0 0.5rem 0",color:"var(--foreground)"},m={listStyleType:"none",padding:0,margin:"0 0 1rem 0"},h={listStyleType:"none",padding:0,margin:"0 0 1rem 0"},g={display:"flex",alignItems:"flex-start",fontSize:"0.875rem",marginBottom:"0.375rem",color:"var(--foreground-muted, #94a3b8)"},f={border:"none",height:"1px",background:"linear-gradient(90deg, var(--border) 0%, rgba(255,255,255,0.05) 100%)",margin:"1.5rem 0"},x={fontFamily:"var(--font-mono), monospace",fontSize:"0.85em",backgroundColor:"rgba(255, 255, 255, 0.06)",border:"1px solid rgba(255, 255, 255, 0.08)",borderRadius:"4px",padding:"0.1rem 0.3rem",color:"#f87171"},y={color:"#60a5fa",textDecoration:"underline",fontWeight:500},b={width:"100%",overflowX:"auto",margin:"1rem 0",borderRadius:"8px",border:"1px solid var(--border)",backgroundColor:"rgba(255, 255, 255, 0.01)"},v={width:"100%",borderCollapse:"collapse",fontSize:"0.85rem"},j={backgroundColor:"rgba(255, 255, 255, 0.03)",borderBottom:"2px solid var(--border)",padding:"0.5rem 0.75rem",fontWeight:700,textAlign:"left",color:"var(--foreground)"},C={borderBottom:"1px solid var(--border)",padding:"0.5rem 0.75rem",color:"var(--foreground-muted, #94a3b8)"},S={backgroundColor:"rgba(255, 255, 255, 0.01)"},w={backgroundColor:"transparent"},k={borderLeft:"4px solid #a855f7",backgroundColor:"rgba(168, 85, 247, 0.03)",padding:"0.5rem 1rem",margin:"1rem 0",borderRadius:"4px",fontStyle:"italic",color:"var(--muted)"},z={margin:"1rem 0",borderRadius:"8px",border:"1px solid var(--border)",backgroundColor:"#05070a",overflow:"hidden"},T={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.35rem 0.75rem",backgroundColor:"rgba(255, 255, 255, 0.02)",borderBottom:"1px solid var(--border)",fontSize:"0.7rem",color:"var(--muted)",textTransform:"uppercase",fontFamily:"var(--font-mono), monospace"},R={margin:0,padding:"1rem",overflowX:"auto",fontSize:"0.8rem",fontFamily:"var(--font-mono), monospace",lineHeight:1.5,color:"#e2e8f0"},P={background:"none",border:"1px solid var(--border)",borderRadius:"4px",padding:"2px 6px",color:"var(--muted)",cursor:"pointer",fontSize:"0.65rem",transition:"all 0.1s ease"};var W=e.i(66381);let I=e=>"mock"===e?"🧪":e.includes("-docker")?"🐳":e.includes("-ssh")?"🌐":"💻",L={display:"flex",width:"100%",height:"100%",flex:1,minHeight:0,backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"12px",overflow:"hidden",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.6)"},F={width:"50px",backgroundColor:"#030406",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",padding:"0.75rem 0"},O={display:"flex",flexDirection:"column",width:"100%",gap:"0.5rem"},D={width:"100%",height:"45px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"1.25rem",transition:"all 0.15s ease"},E={width:"300px",backgroundColor:"#080c14",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",overflow:"hidden"},B={padding:"0.75rem 1rem",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(255,255,255,0.02)"},M={flex:1,overflowY:"auto",padding:"0.75rem 0"},N={padding:"0.25rem 1rem",fontSize:"0.75rem",fontWeight:700,color:"var(--muted)",display:"flex",alignItems:"center",justifyContent:"space-between",textTransform:"uppercase",letterSpacing:"0.05em"},$={fontSize:"0.6rem",backgroundColor:"rgba(59, 130, 246, 0.1)",color:"#3b82f6",padding:"0.1rem 0.3rem",borderRadius:"3px",textTransform:"none",letterSpacing:"normal"},A={fontSize:"0.75rem",fontWeight:600,color:"var(--foreground)"},U={flex:1,display:"flex",flexDirection:"column",overflow:"hidden",backgroundColor:"#0b101b"},J={flex:1,display:"flex",flexDirection:"column",borderBottom:"1px solid var(--border)",overflow:"hidden"},V={height:"35px",backgroundColor:"#05070a",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",paddingRight:"0.75rem"},H={display:"flex",height:"100%",overflowX:"auto"},G={padding:"0 1rem",height:"100%",display:"flex",alignItems:"center",gap:"0.75rem",fontSize:"0.75rem",borderRight:"1px solid var(--border)",borderBottom:"2px solid transparent",cursor:"pointer",transition:"all 0.15s ease",maxWidth:"150px"},K={fontSize:"0.65rem",color:"var(--muted)",cursor:"pointer",padding:"2px"},_={color:"var(--primary)",fontSize:"0.65rem",marginLeft:"2px"},Y={padding:"0.25rem 0.5rem",borderRadius:"4px",border:"1px solid var(--border-focus)",backgroundColor:"rgba(16, 185, 129, 0.15)",color:"var(--success)",fontSize:"0.7rem",fontWeight:600},X={flex:1,position:"relative",overflow:"hidden"},q={width:"100%",height:"100%",backgroundColor:"#0b101b",border:"none",outline:"none",color:"#e2e8f0",fontFamily:"var(--font-mono), monospace",fontSize:"0.85rem",padding:"1rem",resize:"none",lineHeight:1.5},Q={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",color:"var(--muted)",textAlign:"center",padding:"2rem"},Z={flex:1.4,backgroundColor:"#05070a",display:"flex",flexDirection:"column",overflow:"hidden"},ee={padding:"0.5rem 1rem",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"rgba(255,255,255,0.01)"},et={padding:"0.3rem 0.6rem",borderRadius:"4px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.7rem",fontWeight:600,cursor:"pointer"},er={padding:"0.3rem 0.6rem",borderRadius:"4px",border:"1px solid var(--success)",backgroundColor:"transparent",color:"var(--success)",fontSize:"0.7rem",fontWeight:600,cursor:"pointer"},eo={flex:1,overflow:"hidden"};function en({node:e,onSelect:o,onCreate:n,onRename:i,onDelete:l,isReadOnly:a=!1}){let[s,d]=(0,r.useState)(!1),[c,p]=(0,r.useState)(!1),u="directory"===e.type,m={padding:"0.25rem 0.5rem",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"0.8rem",fontFamily:"var(--font-mono), monospace",cursor:"pointer",color:"var(--foreground)",borderRadius:"4px",transition:"background 0.1s ease",userSelect:"none",backgroundColor:c?"rgba(255, 255, 255, 0.05)":"transparent",minWidth:0,width:"100%"},h={display:"flex",alignItems:"center",gap:"0.375rem",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},g={display:c?"flex":"none",alignItems:"center",gap:"0.25rem",paddingLeft:"0.5rem",flexShrink:0},f={background:"none",border:"none",padding:"2px 4px",cursor:"pointer",fontSize:"0.75rem",color:"var(--muted)",borderRadius:"3px",transition:"all 0.1s ease"},x=(e,t)=>{e.stopPropagation(),t()};return u?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{onClick:()=>d(!s),style:m,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[(0,t.jsxs)("div",{style:h,children:[(0,t.jsx)("span",{style:{color:"#eab308"},children:s?"📂":"📁"}),(0,t.jsx)("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})]}),!a&&(0,t.jsxs)("div",{style:g,children:[(0,t.jsx)("button",{onClick:t=>x(t,()=>n(e.path,"file")),style:f,title:"New File inside...",onMouseEnter:e=>e.currentTarget.style.color="var(--success)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"📄+"}),(0,t.jsx)("button",{onClick:t=>x(t,()=>n(e.path,"directory")),style:f,title:"New Folder inside...",onMouseEnter:e=>e.currentTarget.style.color="var(--success)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"📁+"}),(0,t.jsx)("button",{onClick:t=>x(t,()=>i(e.path)),style:f,title:"Rename...",onMouseEnter:e=>e.currentTarget.style.color="var(--primary)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"✏️"}),(0,t.jsx)("button",{onClick:t=>x(t,()=>l(e.path)),style:f,title:"Delete Folder",onMouseEnter:e=>e.currentTarget.style.color="var(--danger)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"🗑️"})]})]}),s&&e.children&&(0,t.jsx)("div",{style:{paddingLeft:"10px",borderLeft:"1px solid rgba(255, 255, 255, 0.05)",marginLeft:"8px"},children:e.children.map(e=>(0,t.jsx)(en,{node:e,onSelect:o,onCreate:n,onRename:i,onDelete:l,isReadOnly:a},e.path))})]}):(0,t.jsxs)("div",{onClick:()=>o(e.path),style:m,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[(0,t.jsxs)("div",{style:h,children:[(0,t.jsx)("span",{style:{color:"#3b82f6"},children:"📄"}),(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})]}),!a&&(0,t.jsxs)("div",{style:g,children:[(0,t.jsx)("button",{onClick:t=>x(t,()=>i(e.path)),style:f,title:"Rename...",onMouseEnter:e=>e.currentTarget.style.color="var(--primary)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"✏️"}),(0,t.jsx)("button",{onClick:t=>x(t,()=>l(e.path)),style:f,title:"Delete File",onMouseEnter:e=>e.currentTarget.style.color="var(--danger)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"🗑️"})]})]})}let ei={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.7)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,backdropFilter:"blur(4px)"},el={width:"420px",backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"12px",padding:"1.5rem",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.8)"},ea={width:"100%",backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"6px",padding:"0.5rem 0.75rem",color:"#e2e8f0",fontSize:"0.85rem",outline:"none",marginBottom:"1.5rem",fontFamily:"var(--font-mono), monospace"},es={display:"flex",justifyContent:"flex-end",gap:"0.75rem"},ed={backgroundColor:"transparent",border:"1px solid var(--border)",color:"var(--foreground)",padding:"0.5rem 1rem",borderRadius:"6px",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},ec={backgroundColor:"var(--primary)",border:"none",color:"#ffffff",padding:"0.5rem 1rem",borderRadius:"6px",fontSize:"0.8rem",fontWeight:600,cursor:"pointer"},ep={background:"none",border:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.8rem",padding:"4px",borderRadius:"3px",transition:"all 0.1s ease"},eu={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.5)",display:"flex",alignItems:"flex-start",justifyContent:"center",zIndex:1100,paddingTop:"5vh",backdropFilter:"blur(2px)"},em={width:"600px",backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"8px",boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.8)",display:"flex",flexDirection:"column",overflow:"hidden"},eh={width:"100%",backgroundColor:"#05070a",border:"none",borderBottom:"1px solid var(--border)",padding:"0.75rem 1rem",color:"#e2e8f0",fontSize:"0.9rem",outline:"none",fontFamily:"var(--font-mono), monospace"},eg={maxHeight:"300px",overflowY:"auto",padding:"0.25rem 0"},ef={display:"flex",alignItems:"center",padding:"0.5rem 1rem",cursor:"pointer",transition:"all 0.1s ease",justifyContent:"space-between"},ex={backgroundColor:"rgba(255,255,255,0.02)",border:"1px solid var(--border)",borderRadius:"6px",padding:"0.5rem 0.75rem",display:"flex",flexDirection:"column",gap:"0.25rem"},ey={fontSize:"0.6rem",color:"var(--muted)",textTransform:"uppercase"},eb={fontSize:"1.1rem",fontWeight:700,fontFamily:"var(--font-mono)"},ev={width:"100%",height:"6px",backgroundColor:"rgba(255,255,255,0.05)",borderRadius:"3px",overflow:"hidden"},ej={height:"100%",borderRadius:"3px",transition:"width 0.5s ease-out"},eC={padding:"0.35rem 1rem",borderBottom:"1px solid var(--border)",backgroundColor:"#030406",display:"flex",alignItems:"center",gap:"0.75rem",flexWrap:"nowrap",overflowX:"auto"},eS={padding:"0.15rem 0.45rem",borderRadius:"4px",border:"1px solid var(--border)",backgroundColor:"rgba(255,255,255,0.02)",color:"var(--muted)",fontSize:"0.7rem",fontFamily:"var(--font-mono)",fontWeight:600,cursor:"pointer",transition:"all 0.1s ease"},ew={backgroundColor:"#05070a",borderBottom:"1px solid var(--border)",padding:"0.25rem 0.75rem 0 0.75rem",display:"flex",alignItems:"center",justifyContent:"space-between"},ek={padding:"0.35rem 0.75rem",borderRadius:"6px 6px 0 0",border:"1px solid var(--border)",borderBottom:"none",display:"flex",alignItems:"center",gap:"0.5rem",cursor:"pointer",transition:"all 0.15s ease"},ez={display:"flex",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.3)",border:"1px solid var(--border)",borderRadius:"6px",padding:"2px",marginRight:"0.5rem"},eT={padding:"0.2rem 0.5rem",borderRadius:"4px",border:"1px solid transparent",fontSize:"0.65rem",fontWeight:600,cursor:"pointer",transition:"all 0.15s ease",display:"flex",alignItems:"center",gap:"3px"};function eR({file:e,isStaged:o,onAction:n,onSelect:i,onIgnore:l,onDiscard:a}){let[s,d]=(0,r.useState)(!1),c="#eab308",p=o?e.indexStatus||"M":e.worktreeStatus||"M";return("??"===p||"?"===p)&&(c="#10b981"),"A"===p&&(c="#10b981"),"D"===p&&(c="#ef4444"),(0,t.jsxs)("div",{onClick:()=>i(e),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.35rem 0.5rem",borderRadius:"4px",backgroundColor:"rgba(255,255,255,0.02)",cursor:"pointer",fontSize:"0.75rem",fontFamily:"var(--font-mono)",position:"relative"},children:[(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,marginRight:"0.5rem"},title:e.relativePath,children:e.name}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.35rem"},children:[s&&(0,t.jsxs)("div",{style:{display:"flex",gap:"0.25rem"},children:[!o&&l&&(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),l(e.relativePath)},title:"Add to .gitignore",style:{background:"none",border:"none",cursor:"pointer",fontSize:"0.65rem",color:"var(--muted)",padding:"1px 4px",borderRadius:"3px",backgroundColor:"rgba(255,255,255,0.05)"},onMouseEnter:e=>e.currentTarget.style.color="var(--danger)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"🚫"}),!o&&a&&(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),a(e.relativePath)},title:"Discard changes",style:{background:"none",border:"none",cursor:"pointer",fontSize:"0.65rem",color:"var(--muted)",padding:"1px 4px",borderRadius:"3px",backgroundColor:"rgba(255,255,255,0.05)"},onMouseEnter:e=>e.currentTarget.style.color="var(--danger)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"🗑️"}),(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),n(e.relativePath)},title:o?"Unstage Change":"Stage Change",style:{background:"none",border:"none",cursor:"pointer",fontSize:"0.65rem",color:"var(--muted)",padding:"1px 4px",borderRadius:"3px",backgroundColor:"rgba(255,255,255,0.05)"},onMouseEnter:e=>e.currentTarget.style.color="var(--foreground)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:o?"➖":"➕"})]}),(0,t.jsx)("span",{style:{fontSize:"0.6rem",padding:"0.1rem 0.3rem",borderRadius:"3px",backgroundColor:c+"22",color:c,fontWeight:700,width:"1.2rem",display:"inline-block",textAlign:"center"},children:p.substring(0,1)})]})]})}function eP({url:e}){let[o,n]=(0,r.useState)(e),[i,l]=(0,r.useState)(e),[a,s]=(0,r.useState)(0);(0,r.useEffect)(()=>{n(e),l(e)},[e]);let d=()=>{let e=o.trim();e&&!/^https?:\/\//i.test(e)&&(e="http://"+e),n(e),l(e)};return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",width:"100%",height:"100%",backgroundColor:"#0b101b"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.5rem",backgroundColor:"#05070a",borderBottom:"1px solid var(--border)"},children:[(0,t.jsx)("button",{onClick:()=>{s(e=>e+1)},title:"Hard Reload Frame",style:{background:"none",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--muted)",cursor:"pointer",fontSize:"0.85rem",padding:"0.25rem 0.5rem",display:"flex",alignItems:"center",backgroundColor:"rgba(255,255,255,0.02)"},onMouseEnter:e=>e.currentTarget.style.color="var(--foreground)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"🔄"}),(0,t.jsx)("input",{type:"text",value:o,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"===e.key&&d()},style:{flex:1,backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"4px",padding:"0.25rem 0.75rem",color:"#ffffff",fontSize:"0.8rem",outline:"none",fontFamily:"var(--font-mono), monospace"}}),(0,t.jsx)("button",{onClick:d,title:"Go to URL",style:{background:"none",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--primary)",cursor:"pointer",fontSize:"0.8rem",padding:"0.25rem 0.5rem",display:"flex",alignItems:"center",backgroundColor:"rgba(255,255,255,0.02)"},children:"➔"}),(0,t.jsx)("button",{onClick:()=>{window.open(i,"_blank")},title:"Open in External Browser",style:{background:"none",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--muted)",cursor:"pointer",fontSize:"0.85rem",padding:"0.25rem 0.5rem",display:"flex",alignItems:"center",backgroundColor:"rgba(255,255,255,0.02)"},onMouseEnter:e=>e.currentTarget.style.color="var(--foreground)",onMouseLeave:e=>e.currentTarget.style.color="var(--muted)",children:"🌐"})]}),(0,t.jsx)("div",{style:{flex:1,position:"relative",width:"100%",height:"100%",backgroundColor:"#ffffff"},children:(0,t.jsx)("iframe",{src:i,style:{width:"100%",height:"100%",border:"none",backgroundColor:"#ffffff"},sandbox:"allow-scripts allow-same-origin allow-popups allow-forms"},a)})]})}function eW({content:e,filePath:r}){let o=e.split(/\r?\n/),n=0,i=0,l=0,a=0,s=o.map(e=>{let t="normal",r=e,o=null,s=null;if(e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ "))t="header";else if(e.startsWith("@@")){t="hunk";let r=e.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);r&&(n=parseInt(r[1],10),i=parseInt(r[2],10))}else e.startsWith("+")?(t="addition",r=e.substring(1),s=i++,l++):e.startsWith("-")?(t="deletion",r=e.substring(1),o=n++,a++):(t="normal",e.startsWith(" ")&&(r=e.substring(1)),n>0&&(o=n++),i>0&&(s=i++));return{type:t,content:r,oldNum:o,newNum:s,raw:e}});return(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",backgroundColor:"#0b101b"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.5rem 1rem",backgroundColor:"#05070a",borderBottom:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,t.jsx)("span",{style:{fontSize:"1rem"},children:"📄"}),(0,t.jsx)("span",{style:{fontWeight:600,fontSize:"0.85rem",color:"var(--foreground)",fontFamily:"var(--font-mono)"},children:r})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem",fontSize:"0.75rem"},children:[l>0&&(0,t.jsxs)("span",{style:{color:"#4ade80",backgroundColor:"rgba(74, 222, 128, 0.1)",padding:"0.15rem 0.4rem",borderRadius:"4px",fontWeight:600},children:["+",l," lines"]}),a>0&&(0,t.jsxs)("span",{style:{color:"#f87171",backgroundColor:"rgba(248, 113, 113, 0.1)",padding:"0.15rem 0.4rem",borderRadius:"4px",fontWeight:600},children:["-",a," lines"]}),(0,t.jsxs)("span",{style:{color:"var(--muted)"},children:[s.length," lines in diff"]})]})]}),(0,t.jsx)("div",{style:{flex:1,overflow:"auto",padding:"0.5rem 0"},children:(0,t.jsx)("table",{style:{width:"100%",borderCollapse:"collapse",fontFamily:"var(--font-mono), monospace",fontSize:"0.8rem",lineHeight:1.5},children:(0,t.jsx)("tbody",{children:s.map((e,r)=>{if("header"===e.type)return(0,t.jsx)("tr",{style:{backgroundColor:"rgba(255,255,255,0.02)"},children:(0,t.jsx)("td",{colSpan:4,style:{color:"var(--muted)",padding:"0.25rem 1rem",fontSize:"0.75rem",borderBottom:"1px solid rgba(255,255,255,0.03)"},children:e.raw})},r);if("hunk"===e.type)return(0,t.jsxs)("tr",{style:{backgroundColor:"rgba(96, 165, 250, 0.05)"},children:[(0,t.jsx)("td",{colSpan:2,style:{width:"80px",textAlign:"center",color:"rgba(96, 165, 250, 0.6)",borderRight:"1px solid rgba(96, 165, 250, 0.15)",userSelect:"none",padding:"0.25rem 0",fontSize:"0.7rem"},children:"@@"}),(0,t.jsx)("td",{style:{width:"25px",borderRight:"1px solid rgba(255, 255, 255, 0.05)"}}),(0,t.jsx)("td",{style:{color:"#60a5fa",padding:"0.25rem 1rem",fontStyle:"italic",fontSize:"0.75rem"},children:e.raw})]},r);let o="transparent",n="var(--foreground)",i=" ",l="transparent";return"addition"===e.type?(o="rgba(74, 222, 128, 0.08)",n="#4ade80",i="+",l="rgba(74, 222, 128, 0.4)"):"deletion"===e.type&&(o="rgba(248, 113, 113, 0.08)",n="#f87171",i="-",l="rgba(248, 113, 113, 0.4)"),(0,t.jsxs)("tr",{style:{backgroundColor:o},children:[(0,t.jsx)("td",{style:{width:"40px",textAlign:"right",paddingRight:"0.75rem",color:"var(--muted)",opacity:e.oldNum?.6:.2,userSelect:"none",borderRight:"1px solid rgba(255, 255, 255, 0.05)",fontSize:"0.75rem"},children:e.oldNum||""}),(0,t.jsx)("td",{style:{width:"40px",textAlign:"right",paddingRight:"0.75rem",color:"var(--muted)",opacity:e.newNum?.6:.2,userSelect:"none",borderRight:"1px solid rgba(255, 255, 255, 0.05)",fontSize:"0.75rem"},children:e.newNum||""}),(0,t.jsx)("td",{style:{width:"25px",textAlign:"center",color:l,userSelect:"none",fontWeight:"bold",fontSize:"0.85rem",borderRight:"1px solid rgba(255, 255, 255, 0.05)"},children:i}),(0,t.jsx)("td",{style:{paddingLeft:"0.75rem",color:n,whiteSpace:"pre-wrap",wordBreak:"break-all"},children:e.content})]},r)})})})})]})}let eI={width:"100%",minHeight:"60px",backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"6px",padding:"0.5rem",color:"#e2e8f0",fontSize:"0.75rem",resize:"vertical",outline:"none",fontFamily:"var(--font-sans), sans-serif"},eL={width:"100%",padding:"0.35rem",backgroundColor:"var(--primary)",border:"none",color:"#ffffff",borderRadius:"6px",fontSize:"0.75rem",fontWeight:600,cursor:"pointer",transition:"opacity 0.1s ease"},eF={background:"none",border:"1px solid var(--border)",borderRadius:"4px",padding:"2px 5px",cursor:"pointer",fontSize:"0.7rem",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255,255,255,0.02)"},eO={background:"none",border:"none",cursor:"pointer",fontSize:"0.65rem",color:"var(--muted)",padding:"2px 4px",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"center"};e.s(["default",0,function({sessionId:e,workspaceRoot:l,scopedDirs:a,onClose:s,sessions:d,onSwitchSession:c,onRefreshSessions:p,wsPort:u=3001}){let m=JSON.stringify(a),h=d.find(t=>t.id===e),[g,f]=(0,r.useState)(null),[x,y]=(0,r.useState)([]),[b,v]=(0,r.useState)(!1),j=async t=>{try{let r=await fetch("/api/sessions/scope",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e,path:t,action:"add"})});if(r.ok)p&&p();else{let e=await r.json();alert(e.error||"Failed to add scoped folder.")}}catch(e){console.error(e),alert("Network error: failed to add scoped folder.")}},C=async t=>{try{let r=await fetch("/api/sessions/scope",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e,path:t,action:"remove"})});if(r.ok)p&&p();else{let e=await r.json();alert(e.error||"Failed to remove scoped folder.")}}catch(e){console.error(e),alert("Network error: failed to remove scoped folder.")}},[S,w]=(0,r.useState)({}),[k,z]=(0,r.useState)({}),T=S[e]||[],R=k[e]||null,P=(0,r.useCallback)(t=>{w(r=>{let o=r[e]||[],n="function"==typeof t?t(o):t;return{...r,[e]:n}})},[e]),eD=(0,r.useCallback)(t=>{z(r=>({...r,[e]:t}))},[e]),[eE,eB]=(0,r.useState)("edit"),[eM,eN]=(0,r.useState)(!0),[e$,eA]=(0,r.useState)("explorer"),[eU,eJ]=(0,r.useState)("http://localhost:3000"),[eV,eH]=(0,r.useState)(!1),[eG,eK]=(0,r.useState)(300),[e_,eY]=(0,r.useState)(!1),[eX,eq]=(0,r.useState)(380),[eQ,eZ]=(0,r.useState)(!1),e0=(0,r.useCallback)(e=>{e.preventDefault(),eY(!0)},[]),e5=(0,r.useCallback)(e=>{e.preventDefault(),eZ(!0)},[]);(0,r.useEffect)(()=>{let e=e=>{if(e_){let t=document.getElementById("loom-ide-container");if(t){let r=t.getBoundingClientRect(),o=e.clientX-r.left-50;o>150&&o<600&&eK(o)}}if(eQ){let t=document.getElementById("loom-ide-container");if(t){let r=t.getBoundingClientRect(),o=r.bottom-e.clientY;o>100&&o<r.height-150&&eq(o)}}},t=()=>{eY(!1),eZ(!1)};return(e_||eQ)&&(window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),document.body.style.cursor=e_?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t),document.body.style.cursor="",document.body.style.userSelect=""}},[e_,eQ]);let[e1,e2]=(0,r.useState)([]),[e7,e8]=(0,r.useState)(!1),[e3,e6]=(0,r.useState)(!1),[e4,e9]=(0,r.useState)(""),[te,tt]=(0,r.useState)({ahead:0,behind:0}),[tr,to]=(0,r.useState)(""),[tn,ti]=(0,r.useState)(null),[tl,ta]=(0,r.useState)(null),[ts,td]=(0,r.useState)(""),[tc,tp]=(0,r.useState)([]),[tu,tm]=(0,r.useState)(""),[th,tg]=(0,r.useState)(""),[tf,tx]=(0,r.useState)(null),ty=(0,r.useCallback)(async()=>{await new Promise(e=>setTimeout(e,0)),e6(!0);try{let e=await fetch(`/api/git?action=status&root=${encodeURIComponent(l)}`);if(e.ok){let t=await e.json();t.success&&(e8(t.isGit),e2(t.files||[]),e9(t.branch||""),tt({ahead:t.ahead||0,behind:t.behind||0}))}}catch(e){console.error("Failed to load git status:",e)}finally{e6(!1)}},[l]);(0,r.useEffect)(()=>{setTimeout(()=>{ty()},0);let e=setInterval(ty,5e3);return()=>clearInterval(e)},[ty]);let tb=async e=>{try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"stage",file:e,rootPath:l})})).ok&&await ty()}catch(e){console.error(e)}},tv=async e=>{try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ignore",file:e,rootPath:l})})).ok&&await ty()}catch(e){console.error(e)}},tj=async e=>{if(confirm(`Are you sure you want to discard changes in "${e}"? This action cannot be undone.`))try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"discard",file:e,rootPath:l})})).ok&&await ty()}catch(e){console.error(e)}},tC=async()=>{try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"stage",rootPath:l})})).ok&&await ty()}catch(e){console.error(e)}},tS=async e=>{try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"unstage",file:e,rootPath:l})})).ok&&await ty()}catch(e){console.error(e)}},tw=async()=>{try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"unstage",rootPath:l})})).ok&&await ty()}catch(e){console.error(e)}},tk=async()=>{if(tr.trim())try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"commit",message:tr,rootPath:l})});if(e.ok)to(""),await ty();else{let t=await e.json();alert(t.error||"Git commit failed")}}catch(e){console.error(e)}},tz=async()=>{try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"pull",rootPath:l})});if(e.ok){let t=await e.json();alert(t.output||"Git pull completed successfully."),await ty()}else{let t=await e.json();alert(t.error||"Git pull failed")}}catch(e){console.error(e)}},tT=async()=>{try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"push",rootPath:l})});if(e.ok){let t=await e.json();alert(t.output||"Git push completed successfully."),await ty()}else{let t=await e.json();alert(t.error||"Git push failed")}}catch(e){console.error(e)}},tR=async e=>{try{let t=await fetch(`/api/git?action=diff&file=${encodeURIComponent(e.relativePath)}&root=${encodeURIComponent(l)}`);if(t.ok){let r=await t.json();if(r.success){let t=`diff:${e.relativePath}`;T.some(e=>e.path===t)||P(o=>[...o,{name:`Diff: ${e.name}`,path:t,content:r.diff,isModified:!1}]),eD(t)}}}catch(e){console.error(e)}};(0,r.useEffect)(()=>{let t=async()=>{try{let t=await fetch(`/api/sessions?id=${e}`);if(t.ok){let e=await t.json();ti(e)}}catch(e){console.error("Failed to fetch session status:",e)}};t();let r=setInterval(t,3e3);return()=>clearInterval(r)},[e]),(0,r.useEffect)(()=>{let t=async()=>{try{let t=await fetch(`/api/sessions/stats?id=${e}`);if(t.ok){let e=await t.json();ta(e)}}catch(e){console.error("Failed to fetch container/process stats:",e)}};t();let r=setInterval(t,3e3);return()=>clearInterval(r)},[e]),(0,r.useEffect)(()=>{let e=localStorage.getItem("neural_loom_custom_commands");if(e)try{let t=JSON.parse(e);setTimeout(()=>{tp(t)},0)}catch{}},[]);let tP=e=>{tp(e),localStorage.setItem("neural_loom_custom_commands",JSON.stringify(e))},tW=async t=>{try{await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,command:t})})}catch(e){console.error("Failed to inject command:",e)}},tI=tn?.type?.includes("aider"),[tL,tF]=(0,r.useState)({type:null,targetPath:null,inputValue:"",error:null}),[tO,tD]=(0,r.useState)(!1),[tE,tB]=(0,r.useState)(""),[tM,tN]=(0,r.useState)([]),[t$,tA]=(0,r.useState)(0),tU=(0,r.useCallback)(async()=>{await new Promise(e=>setTimeout(e,0)),eH(!0);try{let e=a&&a.length>0?`&scoped=${encodeURIComponent(a.join(","))}`:"",t=await fetch(`/api/files?action=list&root=${encodeURIComponent(l)}${e}`);if(t.ok){let e=await t.json();e.success&&(f(e.workspace),y(e.scoped||[]))}}catch(e){console.error("Failed to load file explorer:",e)}finally{eH(!1)}},[l,m]);(0,r.useEffect)(()=>{tU();let e=setInterval(()=>{tU()},3e3);return()=>clearInterval(e)},[tU]);let tJ=(e,t)=>{tF({type:"file"===t?"create-file":"create-folder",targetPath:e,inputValue:"",error:null})},tV=e=>{let t=e.split(/[/\\]/).pop()||"";tF({type:"rename",targetPath:e,inputValue:t,error:null})},tH=e=>{tF({type:"delete",targetPath:e,inputValue:"",error:null})},tG=async e=>{if(e&&e.preventDefault(),tL.type&&tL.targetPath){tF(e=>({...e,error:null}));try{if("create-file"===tL.type||"create-folder"===tL.type){if(!tL.inputValue.trim())return void tF(e=>({...e,error:"Name cannot be empty"}));let e=`${tL.targetPath}/${tL.inputValue.trim()}`,t="create-file"===tL.type?"file":"directory",r=await fetch("/api/files",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create",path:e,type:t})});if(r.ok){let o=await r.json();o.success?(tF({type:null,targetPath:null,inputValue:"",error:null}),await tU(),"file"===t&&await t_(e)):tF(e=>({...e,error:o.error||"Failed to create item"}))}else{let e=await r.json();tF(t=>({...t,error:e.error||"Failed to create item"}))}}if("rename"===tL.type){if(!tL.inputValue.trim())return void tF(e=>({...e,error:"Name cannot be empty"}));let e=tL.targetPath.replace(/\\/g,"/"),t=e.substring(0,e.lastIndexOf("/")),r=t?`${t}/${tL.inputValue.trim()}`:tL.inputValue.trim(),o=await fetch("/api/files",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"rename",oldPath:tL.targetPath,newPath:r})});if(o.ok){let e=await o.json();e.success?(P(e=>e.map(e=>e.path===tL.targetPath?{...e,path:r,name:tL.inputValue.trim()}:e)),R===tL.targetPath&&eD(r),tF({type:null,targetPath:null,inputValue:"",error:null}),await tU()):tF(t=>({...t,error:e.error||"Failed to rename item"}))}else{let e=await o.json();tF(t=>({...t,error:e.error||"Failed to rename item"}))}}if("delete"===tL.type){let e=await fetch("/api/files",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",path:tL.targetPath})});if(e.ok){let t=await e.json();t.success?(tY(tL.targetPath),tF({type:null,targetPath:null,inputValue:"",error:null}),await tU()):tF(e=>({...e,error:t.error||"Failed to delete item"}))}else{let t=await e.json();tF(e=>({...e,error:t.error||"Failed to delete item"}))}}}catch(e){console.error("File operation failed:",e),tF(e=>({...e,error:"An unexpected error occurred"}))}}},tK=(0,r.useCallback)(async()=>{try{let e=a&&a.length>0?`&scoped=${encodeURIComponent(a.join(","))}`:"",t=await fetch(`/api/files?action=flat_list&root=${encodeURIComponent(l)}${e}`);if(t.ok){let e=await t.json();e.success&&e.files&&tN(e.files)}}catch(e){console.error("Failed to load flat files list:",e)}},[l,m]);(0,r.useEffect)(()=>{tO&&setTimeout(()=>{tB(""),tA(0),tK()},0)},[tO,tK]);let t_=async e=>{if(T.find(t=>t.path===e))return void eD(e);try{let t=await fetch(`/api/files?action=read&path=${encodeURIComponent(e)}`);if(t.ok){let r=await t.json();if(r.success){let t={name:e.split(/[/\\]/).pop()||"Untitled",path:e,content:r.content,isModified:!1};P([...T,t]),eD(e)}}}catch(t){console.error(`Failed to read file ${e}:`,t)}},tY=e=>{let t=T.filter(t=>t.path!==e);P(t),R===e&&eD(t.length>0?t[t.length-1].path:null)},tX=e=>{let t=e.trim();if(!t)return;let r=`browser:${t}`;T.find(e=>e.path===r)||P(e=>[...e,{name:`Browser: ${t.replace(/^https?:\/\//,"")}`,path:r,content:t,isModified:!1}]),eD(r)},tq=T.find(e=>e.path===R),tQ=!!tq&&tq.path.toLowerCase().endsWith(".md"),tZ=tQ?eE:"edit",t0=e1.filter(e=>e.indexStatus&&" "!==e.indexStatus&&"?"!==e.indexStatus),t5=e1.filter(e=>e.worktreeStatus&&" "!==e.worktreeStatus||"??"===e.status),t1=e=>{R&&P(T.map(t=>t.path===R?{...t,content:e,isModified:!0}:t))},t2=(0,r.useCallback)(async()=>{if(!(!tq||tq.path.startsWith("diff:")||tq.path.startsWith("browser:")))try{(await fetch("/api/files",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"write",path:tq.path,content:tq.content})})).ok&&P(e=>e.map(e=>e.path===R?{...e,isModified:!1}:e))}catch(e){console.error(`Failed to save file ${tq.path}:`,e)}},[tq,R,P]);(0,r.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&"s"===e.key&&(e.preventDefault(),t2()),(e.ctrlKey||e.metaKey)&&"p"===e.key&&(e.preventDefault(),tD(e=>!e))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t2]);let t7=tM.filter(e=>e.name.toLowerCase().includes(tE.toLowerCase())||e.relativePath.toLowerCase().includes(tE.toLowerCase())).slice(0,10);return(0,t.jsxs)("div",{id:"loom-ide-container",style:L,children:[(0,t.jsxs)("div",{style:F,children:[(0,t.jsxs)("div",{style:O,children:[(0,t.jsx)("div",{onClick:()=>{"explorer"===e$?eN(!eM):(eA("explorer"),eN(!0))},style:{...D,backgroundColor:"explorer"===e$&&eM?"rgba(255,255,255,0.08)":"transparent",borderLeft:"explorer"===e$&&eM?"2px solid var(--primary)":"2px solid transparent"},title:"File Explorer (Ctrl+P to search files)",children:"📁"}),(0,t.jsx)("div",{onClick:()=>{"git"===e$?eN(!eM):(eA("git"),eN(!0))},style:{...D,backgroundColor:"git"===e$&&eM?"rgba(255,255,255,0.08)":"transparent",borderLeft:"git"===e$&&eM?"2px solid var(--primary)":"2px solid transparent"},title:"Source Control (Git Changes)",children:"🌿"}),(0,t.jsx)("div",{onClick:()=>{"analytics"===e$?eN(!eM):(eA("analytics"),eN(!0))},style:{...D,backgroundColor:"analytics"===e$&&eM?"rgba(255,255,255,0.08)":"transparent",borderLeft:"analytics"===e$&&eM?"2px solid var(--primary)":"2px solid transparent"},title:"Token Usage & Cost Analytics",children:"📊"}),(0,t.jsx)("div",{onClick:()=>{"auditor"===e$?eN(!eM):(eA("auditor"),eN(!0))},style:{...D,backgroundColor:"auditor"===e$&&eM?"rgba(255,255,255,0.08)":"transparent",borderLeft:"auditor"===e$&&eM?"2px solid var(--primary)":"2px solid transparent"},title:"Session Log Auditor & Search",children:"🔍"}),(0,t.jsx)("div",{onClick:()=>{"browser"===e$?eN(!eM):(eA("browser"),eN(!0))},style:{...D,backgroundColor:"browser"===e$&&eM?"rgba(255,255,255,0.08)":"transparent",borderLeft:"browser"===e$&&eM?"2px solid var(--primary)":"2px solid transparent"},title:"Local Web Browser Test Preview",children:"🌐"}),(0,t.jsx)("div",{onClick:()=>{"database"===e$?eN(!eM):(eA("database"),eN(!0))},style:{...D,backgroundColor:"database"===e$&&eM?"rgba(255,255,255,0.08)":"transparent",borderLeft:"database"===e$&&eM?"2px solid var(--primary)":"2px solid transparent"},title:"Database Explorer & SQL Client",children:"🗄️"})]}),(0,t.jsx)("div",{onClick:s,style:{...D,color:"var(--danger)",fontSize:"1rem"},title:"Exit Session Layout",children:"✖"})]}),eM&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{...E,width:`${eG}px`,borderRight:"none"},children:[(0,t.jsxs)("div",{style:B,children:[(0,t.jsxs)("span",{style:{fontWeight:700,fontSize:"0.75rem",textTransform:"uppercase",letterSpacing:"0.05em"},children:["explorer"===e$&&"Workspace Explorer","git"===e$&&"Source Control","analytics"===e$&&"Telemetry & Cost","auditor"===e$&&"Session Auditor","browser"===e$&&"Browser Preview","database"===e$&&"Database Explorer"]}),"explorer"===e$&&(0,t.jsxs)("div",{style:{display:"flex",gap:"0.25rem"},children:[g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>tJ(g.path,"file"),style:ep,title:"New File at Root...",children:"📄+"}),(0,t.jsx)("button",{onClick:()=>tJ(g.path,"directory"),style:ep,title:"New Folder at Root...",children:"📁+"})]}),(0,t.jsx)("button",{onClick:tU,disabled:eV,style:ep,title:"Refresh tree",children:"🔄"})]}),"git"===e$&&(0,t.jsx)("button",{onClick:ty,disabled:e3,style:ep,title:"Refresh git status",children:"🔄"})]}),(0,t.jsxs)("div",{style:M,children:["explorer"===e$&&(0,t.jsxs)(t.Fragment,{children:[g?(0,t.jsxs)("div",{style:{marginBottom:"1.5rem"},children:[(0,t.jsxs)("div",{style:N,children:["💼 ",g.name," ",(0,t.jsx)("span",{style:$,title:g.path,children:"root"})]}),(0,t.jsx)("div",{style:{padding:"0.25rem 0.5rem"},children:g.tree.map(e=>(0,t.jsx)(en,{node:e,onSelect:t_,onCreate:tJ,onRename:tV,onDelete:tH,isReadOnly:!1},e.path))})]}):(0,t.jsx)("div",{style:{padding:"1rem",color:"var(--muted)",fontSize:"0.8rem"},children:"Scanning Workspace directory..."}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{...N,borderTop:"1px solid var(--border)",paddingTop:"1rem"},children:[(0,t.jsxs)("span",{children:["🔍 Scoped Folders (",x.length,")"]}),(0,t.jsx)("button",{onClick:()=>v(!0),style:ep,title:"Add Scoped Folder...",children:"➕"})]}),x.length>0?x.map(e=>(0,t.jsxs)("div",{style:{marginTop:"0.75rem",padding:"0 0.5rem"},children:[(0,t.jsxs)("div",{style:{...A,display:"flex",gap:"0.25rem",color:"#a855f7",fontSize:"0.75rem",fontWeight:700,padding:"0.25rem",justifyContent:"space-between",alignItems:"center"},title:e.path,children:[(0,t.jsxs)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:["🔗 ",e.name,"/"]}),(0,t.jsx)("button",{onClick:()=>C(e.path),style:{background:"none",border:"none",color:"var(--danger)",cursor:"pointer",fontSize:"0.75rem",padding:"0 0.25rem"},title:"Remove Scoped Folder",children:"✖"})]}),(0,t.jsx)("div",{style:{paddingLeft:"0.25rem"},children:e.tree.map(e=>(0,t.jsx)(en,{node:e,onSelect:t_,onCreate:tJ,onRename:tV,onDelete:tH,isReadOnly:!0},e.path))})]},e.path)):(0,t.jsx)("div",{style:{padding:"0.5rem 1rem",color:"var(--muted)",fontSize:"0.75rem",fontStyle:"italic"},children:"No extra scoped folders. Click [+] to mount a folder."})]})]}),"git"===e$&&(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{padding:"0.5rem 1rem",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"rgba(255,255,255,0.01)",flexShrink:0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.4rem",fontSize:"0.75rem",fontWeight:600,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1},children:[(0,t.jsx)("span",{style:{color:"var(--primary)",flexShrink:0},children:"🌿"}),(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:e4,children:e7?e4||"HEAD detached":"No Repository"})]}),e7&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.35rem",flexShrink:0},children:[te.ahead>0&&(0,t.jsxs)("span",{style:{fontSize:"0.65rem",color:"#10b981",fontWeight:700},title:"Commits ahead of remote",children:["↑",te.ahead]}),te.behind>0&&(0,t.jsxs)("span",{style:{fontSize:"0.65rem",color:"#ef4444",fontWeight:700},title:"Commits behind remote",children:["↓",te.behind]}),(0,t.jsx)("button",{onClick:tz,title:"Pull changes",style:eF,onMouseEnter:e=>e.currentTarget.style.backgroundColor="rgba(255,255,255,0.08)",onMouseLeave:e=>e.currentTarget.style.backgroundColor="rgba(255,255,255,0.02)",children:"📥"}),(0,t.jsx)("button",{onClick:tT,title:"Push commits",style:eF,onMouseEnter:e=>e.currentTarget.style.backgroundColor="rgba(255,255,255,0.08)",onMouseLeave:e=>e.currentTarget.style.backgroundColor="rgba(255,255,255,0.02)",children:"📤"})]})]}),e7?(0,t.jsxs)("div",{style:{flex:1,overflowY:"auto",padding:"0.5rem 1rem",display:"flex",flexDirection:"column",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.4rem"},children:[(0,t.jsx)("textarea",{value:tr,onChange:e=>to(e.target.value),placeholder:"Commit message (Ctrl+Enter to commit)...",style:eI,onKeyDown:e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),tk())}}),(0,t.jsx)("button",{onClick:tk,disabled:0===e1.length,style:{...eL,opacity:e1.length>0?1:.5,cursor:e1.length>0?"pointer":"not-allowed"},children:"✓ Commit"})]}),t0.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.35rem"},children:[(0,t.jsxs)("span",{style:{fontSize:"0.7rem",fontWeight:700,textTransform:"uppercase",color:"var(--muted)"},children:["Staged Changes (",t0.length,")"]}),(0,t.jsx)("button",{onClick:()=>tw(),title:"Unstage All",style:eO,children:"➖"})]}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:t0.map(e=>(0,t.jsx)(eR,{file:e,isStaged:!0,onAction:tS,onSelect:tR},e.relativePath))})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.35rem"},children:[(0,t.jsxs)("span",{style:{fontSize:"0.7rem",fontWeight:700,textTransform:"uppercase",color:"var(--muted)"},children:["Changes (",t5.length,")"]}),t5.length>0&&(0,t.jsx)("button",{onClick:()=>tC(),title:"Stage All",style:eO,children:"➕"})]}),0===t5.length&&0===t0.length?(0,t.jsx)("div",{style:{color:"var(--success)",fontSize:"0.75rem",padding:"0.5rem 0"},children:"✔ Workspace clean."}):0===t5.length?(0,t.jsx)("div",{style:{color:"var(--muted)",fontSize:"0.7rem",fontStyle:"italic",padding:"0.25rem 0"},children:"No unstaged changes."}):(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:t5.map(e=>(0,t.jsx)(eR,{file:e,isStaged:!1,onAction:tb,onSelect:tR,onIgnore:tv,onDiscard:tj},e.relativePath))})]})]}):(0,t.jsx)("div",{style:{padding:"1rem",color:"var(--muted)",fontSize:"0.75rem",fontStyle:"italic"},children:"Not a git repository."})]}),"browser"===e$&&(0,t.jsxs)("div",{style:{padding:"1rem",display:"flex",flexDirection:"column",gap:"1rem"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{style:{fontSize:"0.7rem",fontWeight:700,textTransform:"uppercase",color:"var(--muted)",display:"block",marginBottom:"0.4rem"},children:"Url Address"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"text",value:eU,onChange:e=>eJ(e.target.value),placeholder:"http://localhost:3000",style:{flex:1,backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"4px",padding:"0.35rem 0.5rem",color:"#ffffff",fontSize:"0.75rem",outline:"none"},onKeyDown:e=>{"Enter"===e.key&&tX(eU)}}),(0,t.jsx)("button",{onClick:()=>tX(eU),style:{backgroundColor:"var(--primary)",border:"none",color:"#ffffff",padding:"0.35rem 0.75rem",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},children:"Go"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{style:{fontSize:"0.7rem",fontWeight:700,textTransform:"uppercase",color:"var(--muted)",display:"block",marginBottom:"0.5rem"},children:"Quick Launch Ports"}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.35rem"},children:[{label:"Next.js App (3000)",url:"http://localhost:3000"},{label:"WebSocket Gateway (3001)",url:"http://localhost:3001"},{label:"Vite Server (5173)",url:"http://localhost:5173"}].map((e,r)=>(0,t.jsxs)("div",{onClick:()=>{eJ(e.url),tX(e.url)},style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.5rem 0.75rem",borderRadius:"4px",backgroundColor:"rgba(255,255,255,0.02)",border:"1px solid var(--border)",cursor:"pointer",fontSize:"0.75rem",transition:"all 0.15s ease"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="rgba(255,255,255,0.06)",onMouseLeave:e=>e.currentTarget.style.backgroundColor="rgba(255,255,255,0.02)",children:[(0,t.jsx)("span",{style:{color:"var(--foreground)"},children:e.label}),(0,t.jsx)("span",{style:{color:"var(--primary)",fontSize:"0.8rem"},children:"🌐➔"})]},r))})]}),(0,t.jsxs)("div",{style:{marginTop:"auto",padding:"0.5rem",borderRadius:"6px",backgroundColor:"rgba(234, 179, 8, 0.05)",border:"1px solid rgba(234, 179, 8, 0.15)",fontSize:"0.65rem",color:"var(--muted)",lineHeight:"1.4"},children:[(0,t.jsx)("span",{style:{color:"#eab308",fontWeight:700},children:"⚠️ Iframe CSP Note"}),": Some public websites (e.g. Google, GitHub) block loading inside frames via security headers. Use this tab primarily to preview and debug local development webservers."]})]}),"analytics"===e$&&(0,t.jsxs)("div",{style:{padding:"0.5rem 1rem",display:"flex",flexDirection:"column",gap:"1.25rem"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",color:"var(--muted)",marginBottom:"0.5rem"},children:"Token Usage"}),(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.5rem"},children:[(0,t.jsxs)("div",{style:ex,children:[(0,t.jsx)("div",{style:ey,children:"Input"}),(0,t.jsx)("div",{style:eb,children:(tn?.tokenUsage?.input??0).toLocaleString()})]}),(0,t.jsxs)("div",{style:ex,children:[(0,t.jsx)("div",{style:ey,children:"Output"}),(0,t.jsx)("div",{style:eb,children:(tn?.tokenUsage?.output??0).toLocaleString()})]}),(0,t.jsxs)("div",{style:{...ex,gridColumn:"span 2"},children:[(0,t.jsx)("div",{style:ey,children:"Cost"}),(0,t.jsxs)("div",{style:{...eb,color:"#10b981",fontSize:"1.25rem"},children:["$",(tn?.tokenUsage?.cost??0).toFixed(4)]})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",color:"var(--muted)",marginBottom:"0.5rem"},children:"Resource Telemetry"}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.7rem",marginBottom:"0.25rem"},children:[(0,t.jsx)("span",{children:"CPU Usage"}),(0,t.jsx)("span",{style:{fontWeight:600,color:"var(--primary)"},children:tl?.cpu??"0.0%"})]}),(0,t.jsx)("div",{style:ev,children:(0,t.jsx)("div",{style:{...ej,width:tl?.cpu||"0%",backgroundColor:"var(--primary)"}})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.7rem",marginBottom:"0.25rem"},children:[(0,t.jsx)("span",{children:"Memory Usage"}),(0,t.jsx)("span",{style:{fontWeight:600,color:"#eab308"},children:tl?.memory??"0.0MiB"})]}),(0,t.jsx)("div",{style:ev,children:(0,t.jsx)("div",{style:{...ej,width:tl?.memoryPercent||"0%",backgroundColor:"#eab308"}})})]}),(0,t.jsx)("div",{style:{fontSize:"0.6rem",color:"var(--muted)",marginTop:"0.25rem",fontStyle:"italic"},children:tl?.type?.includes("docker")?"🐳 Docker container statistics":"💻 Local process statistics"})]})]})]}),"auditor"===e$&&(0,t.jsxs)("div",{style:{padding:"0.5rem 1rem",display:"flex",flexDirection:"column",gap:"1rem",height:"100%"},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"text",placeholder:"Search logs...",value:ts,onChange:e=>td(e.target.value),style:{flex:1,backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"4px",padding:"0.25rem 0.5rem",color:"#ffffff",fontSize:"0.75rem",outline:"none"}}),(0,t.jsx)("button",{onClick:()=>{if(!tn?.logs)return;let t=new Blob([tn.logs.join("").replace(/\x1b\[[0-9;]*m/g,"")],{type:"text/plain;charset=utf-8"}),r=URL.createObjectURL(t),o=document.createElement("a");o.href=r,o.download=`session-${e}-logs.txt`,o.click(),URL.revokeObjectURL(r)},style:{backgroundColor:"rgba(59, 130, 246, 0.15)",border:"1px solid #3b82f6",color:"#3b82f6",padding:"0.25rem 0.5rem",borderRadius:"4px",fontSize:"0.7rem",fontWeight:600,cursor:"pointer"},children:"Export"})]}),(0,t.jsx)("div",{style:{height:"220px",overflowY:"auto",backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"6px",padding:"0.5rem",fontFamily:"var(--font-mono)",fontSize:"0.7rem",lineHeight:"1.4",whiteSpace:"pre-wrap",color:"#cbd5e1"},children:(()=>{if(!tn?.logs||0===tn.logs.length)return(0,t.jsx)("div",{style:{color:"var(--muted)",fontStyle:"italic",textAlign:"center"},children:"No logs captured."});let e=tn.logs.join("").replace(/\x1b\[[0-9;]*m/g,"").split(/\r?\n/),r=ts.trim()?e.filter(e=>e.toLowerCase().includes(ts.toLowerCase())):e;return 0===r.length?(0,t.jsx)("div",{style:{color:"var(--muted)",fontStyle:"italic",textAlign:"center"},children:"No matches."}):r.map((e,r)=>{if(!ts.trim())return(0,t.jsx)("div",{children:e},r);let o=e.split(RegExp(`(${ts})`,"gi"));return(0,t.jsx)("div",{children:o.map((e,r)=>e.toLowerCase()===ts.toLowerCase()?(0,t.jsx)("span",{style:{backgroundColor:"#eab308",color:"#000000",fontWeight:600},children:e},r):e)},r)})})()}),(0,t.jsxs)("div",{style:{borderTop:"1px solid var(--border)",paddingTop:"0.75rem"},children:[(0,t.jsx)("div",{style:{fontSize:"0.75rem",fontWeight:700,color:"var(--muted)",marginBottom:"0.5rem"},children:"Custom Buttons"}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.35rem"},children:[(0,t.jsx)("input",{type:"text",placeholder:"Button Name (e.g. /undo)",value:tu,onChange:e=>tm(e.target.value),style:{backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"4px",padding:"0.25rem 0.5rem",color:"#ffffff",fontSize:"0.7rem",outline:"none"}}),(0,t.jsx)("input",{type:"text",placeholder:"Injection Command",value:th,onChange:e=>tg(e.target.value),style:{backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"4px",padding:"0.25rem 0.5rem",color:"#ffffff",fontSize:"0.7rem",outline:"none"}}),(0,t.jsx)("button",{onClick:()=>{tu.trim()&&th.trim()&&(tP([...tc,{name:tu.trim(),command:th.trim()}]),tm(""),tg(""))},style:{backgroundColor:"rgba(168, 85, 247, 0.15)",border:"1px solid #a855f7",color:"#c084fc",padding:"0.3rem",borderRadius:"4px",fontSize:"0.7rem",fontWeight:600,cursor:"pointer"},children:"+ Add Button"}),tc.length>0&&(0,t.jsx)("div",{style:{marginTop:"0.25rem",maxHeight:"60px",overflowY:"auto"},children:tc.map((e,r)=>(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"0.65rem",backgroundColor:"rgba(255,255,255,0.02)",padding:"0.1rem 0.25rem",borderRadius:"3px",marginTop:"0.15rem"},children:[(0,t.jsx)("span",{style:{color:"#c084fc"},children:e.name}),(0,t.jsx)("span",{onClick:()=>{tP(tc.filter((e,t)=>t!==r))},style:{color:"var(--danger)",cursor:"pointer"},children:"✖"})]},r))})]})]})]}),"database"===e$&&(0,t.jsx)(W.default,{workspaceRoot:l})]})]}),(0,t.jsx)("div",{onMouseDown:e0,style:{width:"4px",cursor:"col-resize",backgroundColor:e_?"var(--primary)":"var(--border)",transition:"background-color 0.15s ease",zIndex:10,alignSelf:"stretch"},onMouseEnter:e=>{e_||(e.currentTarget.style.backgroundColor="var(--border-focus)")},onMouseLeave:e=>{e_||(e.currentTarget.style.backgroundColor="var(--border)")},title:"Drag to resize sidebar"})]}),(0,t.jsxs)("div",{style:U,children:[(0,t.jsx)("div",{style:ew,children:(0,t.jsx)("div",{style:{display:"flex",gap:"0.25rem",overflowX:"auto"},children:d.map(r=>{let o=r.id===e,n="running"===r.status?"#10b981":"rgba(255,255,255,0.2)";return(0,t.jsxs)("div",{onClick:()=>{tf===r.id&&tx(null),c(r.id)},style:{...ek,backgroundColor:o?"#0b101b":"rgba(8,12,20,0.6)",borderColor:o?"var(--border-focus)":"var(--border)",color:o?"var(--foreground)":"var(--muted)"},children:[(0,t.jsx)("span",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:n,display:"inline-block"}}),(0,t.jsx)("span",{style:{fontSize:"0.75rem",fontWeight:o?600:500},children:r.name}),(0,t.jsx)("span",{style:{fontSize:"0.6rem",color:"var(--muted)",backgroundColor:"rgba(255,255,255,0.05)",padding:"1px 4px",borderRadius:"3px"},children:r.type.replace("claude-","").replace("aider-","")}),"running"===r.status&&r.agentState&&(0,t.jsxs)("span",{style:{fontSize:"0.6rem",padding:"1px 4px",borderRadius:"3px",fontWeight:600,backgroundColor:"thinking"===r.agentState?"rgba(168, 85, 247, 0.2)":"needs-input"===r.agentState?"rgba(217, 119, 82, 0.2)":"complete"===r.agentState?"rgba(16, 185, 129, 0.2)":"rgba(255,255,255,0.05)",color:"thinking"===r.agentState?"#c084fc":"needs-input"===r.agentState?"#e0825f":"complete"===r.agentState?"#34d399":"var(--muted)",border:"thinking"===r.agentState?"1px solid rgba(168, 85, 247, 0.3)":"needs-input"===r.agentState?"1px solid rgba(217, 119, 82, 0.3)":"complete"===r.agentState?"1px solid rgba(16, 185, 129, 0.3)":"1px solid rgba(255,255,255,0.1)"},title:`Agent state: ${r.agentState}`,children:["thinking"===r.agentState&&`${I(r.type)} 💭 thinking`,"needs-input"===r.agentState&&`${I(r.type)} ⚠️ needs input`,"complete"===r.agentState&&`${I(r.type)} ✅ complete`,"idle"===r.agentState&&`${I(r.type)} 💤 idle`]})]},r.id)})})}),(0,t.jsxs)("div",{style:{...J,borderBottom:"none"},children:[(0,t.jsxs)("div",{style:V,children:[(0,t.jsx)("div",{style:H,children:T.map(e=>(0,t.jsxs)("div",{style:{...G,backgroundColor:R===e.path?"#0b101b":"rgba(8,12,20,0.4)",borderColor:R===e.path?"var(--border-focus)":"transparent",color:R===e.path?"var(--foreground)":"var(--muted)"},onClick:()=>eD(e.path),children:[(0,t.jsxs)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e.name," ",e.isModified&&(0,t.jsx)("span",{style:_,children:"●"})]}),(0,t.jsx)("span",{onClick:t=>{t.stopPropagation(),tY(e.path)},style:K,children:"✖"})]},e.path))}),tq&&!tq.path.startsWith("diff:")&&!tq.path.startsWith("browser:")&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[tQ&&(0,t.jsxs)("div",{style:ez,children:[(0,t.jsx)("button",{onClick:()=>eB("edit"),style:{...eT,backgroundColor:"edit"===tZ?"rgba(255,255,255,0.08)":"transparent",color:"edit"===tZ?"var(--foreground)":"var(--muted)",borderColor:"edit"===tZ?"var(--border-focus)":"transparent"},title:"Edit file",children:"✏️ Edit"}),(0,t.jsx)("button",{onClick:()=>eB("split"),style:{...eT,backgroundColor:"split"===tZ?"rgba(255,255,255,0.08)":"transparent",color:"split"===tZ?"var(--foreground)":"var(--muted)",borderColor:"split"===tZ?"var(--border-focus)":"transparent"},title:"Split editor & preview",children:"🥞 Split"}),(0,t.jsx)("button",{onClick:()=>eB("preview"),style:{...eT,backgroundColor:"preview"===tZ?"rgba(255,255,255,0.08)":"transparent",color:"preview"===tZ?"var(--foreground)":"var(--muted)",borderColor:"preview"===tZ?"var(--border-focus)":"transparent"},title:"Preview rendered document",children:"👁️ Preview"})]}),(0,t.jsx)("button",{onClick:t2,disabled:!tq.isModified,style:{...Y,opacity:tq.isModified?1:.5,cursor:tq.isModified?"pointer":"not-allowed"},children:"💾 Save (Ctrl+S)"})]})]}),(0,t.jsx)("div",{style:X,children:tq?tq.path.startsWith("browser:")?(0,t.jsx)(eP,{url:tq.content}):tq.path.startsWith("diff:")?(0,t.jsx)(eW,{content:tq.content,filePath:tq.path.substring(5)}):tQ?"preview"===tZ?(0,t.jsx)("div",{style:{height:"100%",overflow:"hidden"},children:(0,t.jsx)(i,{content:tq.content})}):"split"===tZ?(0,t.jsxs)("div",{style:{display:"flex",width:"100%",height:"100%",overflow:"hidden"},children:[(0,t.jsx)("div",{style:{flex:1,height:"100%"},children:(0,t.jsx)("textarea",{value:tq.content,onChange:e=>t1(e.target.value),style:q,spellCheck:!1})}),(0,t.jsx)("div",{style:{flex:1,height:"100%",overflow:"hidden"},children:(0,t.jsx)(i,{content:tq.content})})]}):(0,t.jsx)("textarea",{value:tq.content,onChange:e=>t1(e.target.value),style:q,spellCheck:!1}):(0,t.jsx)("textarea",{value:tq.content,onChange:e=>t1(e.target.value),style:q,spellCheck:!1}):(0,t.jsxs)("div",{style:Q,children:[(0,t.jsx)("div",{style:{fontSize:"2rem",marginBottom:"1rem"},children:"💻"}),(0,t.jsx)("h4",{style:{margin:0,fontWeight:600},children:"NeuralLoom Workspace Editor"}),(0,t.jsx)("p",{style:{margin:"0.5rem 0 0 0",color:"var(--muted)",fontSize:"0.8rem"},children:"Select files from the left explorer panel to view and edit. Use Ctrl+S to save changes."}),(0,t.jsxs)("p",{style:{margin:"0.5rem 0 0 0",color:"var(--muted)",fontSize:"0.75rem",fontStyle:"italic"},children:["Press ",(0,t.jsx)("kbd",{style:{background:"rgba(255,255,255,0.1)",padding:"2px 4px",borderRadius:"3px"},children:"Ctrl+P"})," to search files."]})]})})]}),(0,t.jsx)("div",{onMouseDown:e5,style:{height:"4px",cursor:"row-resize",backgroundColor:eQ?"var(--primary)":"var(--border)",transition:"background-color 0.15s ease",zIndex:10,width:"100%"},onMouseEnter:e=>{eQ||(e.currentTarget.style.backgroundColor="var(--border-focus)")},onMouseLeave:e=>{eQ||(e.currentTarget.style.backgroundColor="var(--border)")},title:"Drag to resize console"}),(0,t.jsxs)("div",{style:{...Z,flex:"none",height:`${eX}px`},children:[(0,t.jsxs)("div",{style:ee,children:[(0,t.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"0.5rem",fontWeight:600,fontSize:"0.8rem"},children:["🖥️ Session Console Bridge ",tf&&"(Split View Active)"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center"},children:[h?.status==="stopped"&&(0,t.jsx)("button",{onClick:async()=>{try{let t=await fetch("/api/sessions/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e})});if(t.ok)p&&p();else{let e=await t.json();alert(e.error||"Failed to restart session.")}}catch(e){console.error("Failed to restart session:",e),alert("Network error: failed to restart session.")}},style:{padding:"0.3rem 0.6rem",borderRadius:"4px",border:"1px solid #eab308",backgroundColor:"rgba(234, 179, 8, 0.15)",color:"#eab308",fontSize:"0.7rem",fontWeight:600,cursor:"pointer",boxShadow:"0 0 8px rgba(234, 179, 8, 0.2)"},title:"Restart the stopped session process runner",children:"⚡ Restart Session"}),(0,t.jsxs)("select",{onChange:e=>{tx(e.target.value||null)},value:tf||"",style:{backgroundColor:"#080c14",border:"1px solid var(--border)",borderRadius:"4px",padding:"0.2rem 0.5rem",color:"var(--foreground)",fontSize:"0.7rem",outline:"none",cursor:"pointer"},children:[(0,t.jsx)("option",{value:"",children:"🖥️ Single Terminal"}),d.filter(t=>t.id!==e&&"running"===t.status).map(e=>(0,t.jsxs)("option",{value:e.id,children:["🖥️|🖥️ Split: ",e.name," (",e.agentState||"idle",")"]},e.id))]}),(0,t.jsx)("button",{onClick:async()=>{await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,command:"/ccc"})})},style:et,children:"🚀 Mount Context (/ccc)"}),(0,t.jsx)("button",{onClick:async()=>{await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,command:"/ccp"})})},style:er,children:"⚡ Trigger Prompt (/ccp)"})]})]}),(0,t.jsxs)("div",{style:eC,children:[(0,t.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:700},children:"Quick Commands:"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.35rem",flexWrap:"wrap",alignItems:"center"},children:[tI?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>tW("/undo"),style:eS,title:"Aider: undo last commit",children:"/undo"}),(0,t.jsx)("button",{onClick:()=>tW("/diff"),style:eS,title:"Aider: show git diff",children:"/diff"}),(0,t.jsx)("button",{onClick:()=>tW("/commit"),style:eS,title:"Aider: commit edits",children:"/commit"}),(0,t.jsx)("button",{onClick:()=>tW("/test"),style:eS,title:"Aider: run tests",children:"/test"}),(0,t.jsx)("button",{onClick:()=>tW("/clear"),style:eS,title:"Clear terminal screen",children:"/clear"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>tW("/compact"),style:eS,title:"Claude Code: compact history",children:"/compact"}),(0,t.jsx)("button",{onClick:()=>tW("/history"),style:eS,title:"Claude Code: view history",children:"/history"}),(0,t.jsx)("button",{onClick:()=>tW("/reset"),style:eS,title:"Claude Code: reset conversation",children:"/reset"}),(0,t.jsx)("button",{onClick:()=>tW("/help"),style:eS,title:"Claude Code: show help",children:"/help"})]}),tc.map((e,r)=>(0,t.jsx)("button",{onClick:()=>tW(e.command),style:{...eS,borderColor:"rgba(168, 85, 247, 0.4)",color:"#c084fc"},title:`Inject command: ${e.command}`,children:e.name},r))]})]}),(0,t.jsxs)("div",{style:{...eo,display:"flex",width:"100%"},children:[(0,t.jsx)("div",{style:{flex:1,height:"100%",borderRight:tf?"1px solid var(--border)":"none",overflow:"hidden"},children:(0,t.jsx)(o.default,{sessionId:e,height:"100%",wsPort:u})}),tf&&(0,t.jsxs)("div",{style:{flex:1,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},children:[(0,t.jsxs)("div",{style:{padding:"0.25rem 0.5rem",backgroundColor:"#030406",fontSize:"0.7rem",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsxs)("span",{style:{color:"#a855f7",fontWeight:600},children:["🔗 Focused PTY Connection: ",d.find(e=>e.id===tf)?.name]}),(0,t.jsx)("button",{onClick:()=>tx(null),style:{background:"none",border:"none",color:"var(--danger)",cursor:"pointer",fontSize:"0.7rem"},children:"Close Split ✖"})]}),(0,t.jsx)("div",{style:{flex:1,overflow:"hidden"},children:(0,t.jsx)(o.default,{sessionId:tf,height:"100%",wsPort:u})})]})]})]})]}),tL.type&&(0,t.jsx)("div",{style:ei,children:(0,t.jsxs)("div",{style:el,children:[(0,t.jsxs)("h3",{style:{margin:"0 0 1rem 0",fontSize:"1rem",fontWeight:600},children:["create-file"===tL.type&&"Create New File","create-folder"===tL.type&&"Create New Folder","rename"===tL.type&&"Rename Item","delete"===tL.type&&"Confirm Deletion"]}),tL.error&&(0,t.jsxs)("div",{style:{color:"var(--danger)",fontSize:"0.8rem",marginBottom:"1rem"},children:["⚠️ ",tL.error]}),"delete"!==tL.type?(0,t.jsxs)("form",{onSubmit:tG,children:[(0,t.jsxs)("div",{style:{marginBottom:"0.5rem",fontSize:"0.75rem",color:"var(--muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:tL.targetPath||"",children:["Target: ",tL.targetPath]}),(0,t.jsx)("input",{type:"text",value:tL.inputValue,onChange:e=>tF({...tL,inputValue:e.target.value}),style:ea,autoFocus:!0,placeholder:"rename"===tL.type?"Enter new name":"Enter name"}),(0,t.jsxs)("div",{style:es,children:[(0,t.jsx)("button",{type:"button",onClick:()=>tF({type:null,targetPath:null,inputValue:"",error:null}),style:ed,children:"Cancel"}),(0,t.jsx)("button",{type:"submit",style:ec,children:"Submit"})]})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{fontSize:"0.85rem",marginBottom:"1.5rem",color:"var(--muted)",overflowWrap:"break-word"},children:["Are you sure you want to delete this item? This action is permanent.",(0,t.jsx)("div",{style:{marginTop:"0.5rem",color:"#e2e8f0",fontFamily:"var(--font-mono)",fontSize:"0.75rem",background:"rgba(255,255,255,0.05)",padding:"0.5rem",borderRadius:"4px"},children:tL.targetPath})]}),(0,t.jsxs)("div",{style:es,children:[(0,t.jsx)("button",{type:"button",onClick:()=>tF({type:null,targetPath:null,inputValue:"",error:null}),style:ed,children:"Cancel"}),(0,t.jsx)("button",{onClick:()=>tG(),style:{...ec,backgroundColor:"var(--danger)"},children:"Delete Permanently"})]})]})]})}),tO&&(0,t.jsx)("div",{style:eu,onClick:()=>tD(!1),children:(0,t.jsxs)("div",{style:em,onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("input",{type:"text",value:tE,onChange:e=>{tB(e.target.value),tA(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),tA(e=>(e+1)%Math.max(1,t7.length))):"ArrowUp"===e.key?(e.preventDefault(),tA(e=>(e-1+t7.length)%Math.max(1,t7.length))):"Enter"===e.key?(e.preventDefault(),t7[t$]&&(t_(t7[t$].path),tD(!1))):"Escape"===e.key&&(e.preventDefault(),tD(!1))},placeholder:"Search files by name or path...",style:eh,autoFocus:!0}),(0,t.jsx)("div",{style:eg,children:t7.length>0?t7.map((e,r)=>(0,t.jsxs)("div",{onClick:()=>{t_(e.path),tD(!1)},style:{...ef,backgroundColor:r===t$?"rgba(168, 85, 247, 0.15)":"transparent",borderLeft:r===t$?"3px solid var(--primary)":"3px solid transparent"},children:[(0,t.jsx)("span",{style:{fontSize:"0.85rem",fontWeight:600},children:e.name}),(0,t.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)",marginLeft:"0.5rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.relativePath})]},e.path)):(0,t.jsx)("div",{style:{padding:"0.75rem 1rem",color:"var(--muted)",fontSize:"0.8rem",textAlign:"center"},children:"No matching files found"})}),(0,t.jsx)("div",{style:{padding:"0.5rem 1rem",borderTop:"1px solid var(--border)",fontSize:"0.65rem",color:"var(--muted)",textAlign:"right"},children:"Use ↑↓ to navigate, Enter to select, Esc to close"})]})}),b&&(0,t.jsx)(n.default,{title:"Add Scoped Directory",initialPath:l,onClose:()=>v(!1),onSelect:e=>{j(e),v(!1)}})]})}],3839)},97722,e=>{e.n(e.i(3839))}]);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,66381,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(74080);let a={display:"flex",height:"100%",width:"100%",backgroundColor:"#05070a",color:"#cbd5e1",fontSize:"0.875rem",minHeight:0},n={width:"280px",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)"},h={display:"flex",flexDirection:"column",gap:"0.15rem",flex:1,minWidth:0},g={fontWeight:600,fontSize:"0.8rem",color:"#fff",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},x={fontSize:"0.7rem",color:"var(--muted)",textTransform:"uppercase"},f={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"},k={fontSize:"0.6rem",color:"var(--muted)",marginLeft:"0.25rem"},S={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"},W={flex:1,color:"var(--muted)",overflow:"hidden",textOverflow:"ellipsis"},R={fontSize:"0.65rem",color:"rgba(109, 40, 217, 0.75)",fontFamily:"monospace",paddingLeft:"0.5rem"},E={flex:1,display:"flex",flexDirection:"column",minHeight:0,backgroundColor:"#05070a"},T={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},P={fontSize:"0.75rem",color:"var(--muted)"},L={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)"},O={padding:"0.4rem 0.9rem",borderRadius:"6px",border:"none",backgroundColor:"var(--primary)",color:"#fff",fontSize:"0.8rem",fontWeight:600,transition:"all 0.2s ease"},D={height:"180px",borderBottom:"1px solid var(--border)",position:"relative",flexShrink:0},q={width:"100%",height:"100%",backgroundColor:"#080c14",border:"none",resize:"none",color:"#e2e8f0",fontFamily:"monospace",fontSize:"0.85rem",padding:"1rem",outline:"none",lineHeight:"1.4"},A={flex:1,display:"flex",flexDirection:"column",minHeight:0,padding:"1rem"},z={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"},F={marginTop:"1rem",padding:"0.75rem",borderRadius:"6px",backgroundColor:"rgba(0, 0, 0, 0.3)",border:"1px solid var(--border)"},M={display:"block",padding:"0.5rem",backgroundColor:"#090d16",borderRadius:"4px",fontFamily:"monospace",fontSize:"0.8rem",color:"var(--primary)",border:"1px solid var(--border)"},$={display:"flex",flexDirection:"column",height:"100%",minHeight:0},H={display:"flex",justifyContent:"space-between",fontSize:"0.75rem",color:"var(--muted)",marginBottom:"0.5rem"},G={flex:1,overflow:"auto",border:"1px solid var(--border)",borderRadius:"6px"},Y={width:"100%",borderCollapse:"collapse",fontFamily:"monospace",fontSize:"0.8rem"},U={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"},J={backgroundColor:"transparent"},K={backgroundColor:"rgba(255, 255, 255, 0.01)"},V={flex:1,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--muted)",fontSize:"0.8rem",textAlign:"center"},X={flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"1rem"},Z={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"},ee={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"},et={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},es={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)"},er={display:"flex",flexDirection:"column",gap:"0.35rem",marginBottom:"1rem"},ea={fontSize:"0.75rem",fontWeight:600,color:"var(--muted)"},en={padding:"0.5rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"#070a12",color:"#fff",outline:"none",fontSize:"0.8rem"},el={padding:"0.5rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"#070a12",color:"#fff",outline:"none",fontSize:"0.8rem"},eo={padding:"0.5rem",borderRadius:"6px",fontSize:"0.75rem",marginBottom:"1rem"},ei={display:"flex",justifyContent:"space-between",marginTop:"1.5rem"},ed={padding:"0.4rem 0.75rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--muted)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},ec={padding:"0.4rem 0.75rem",borderRadius:"6px",border:"none",backgroundColor:"transparent",color:"var(--muted)",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},eu={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
|
+
@keyframes spin {
|
|
3
|
+
0% { transform: rotate(0deg); }
|
|
4
|
+
100% { transform: rotate(360deg); }
|
|
5
|
+
}
|
|
6
|
+
`,document.head.appendChild(e)}e.s(["default",0,function({workspaceRoot:e}){let[ep,em]=(0,s.useState)({global:[],workspace:[]}),[eh,eg]=(0,s.useState)(null),[ex,ef]=(0,s.useState)(!0),[ey,eb]=(0,s.useState)([]),[ej,ev]=(0,s.useState)(null),[e_,ew]=(0,s.useState)({}),[ek,eS]=(0,s.useState)(!1),[eC,eN]=(0,s.useState)("SELECT * FROM sqlite_master;"),[eW,eR]=(0,s.useState)(!1),[eE,eT]=(0,s.useState)(null),[eP,eL]=(0,s.useState)(null),[eI,eO]=(0,s.useState)(!1),[eD,eq]=(0,s.useState)(!1),[eA,ez]=(0,s.useState)({id:"",name:"",type:"sqlite",filepath:"./dev.db",host:"localhost",port:5432,database:"postgres",username:"postgres",password:"",ssl:!1,readOnly:!0}),[eB,eF]=(0,s.useState)(!1),[eM,e$]=(0,s.useState)(null),eH=async()=>{try{let t=await fetch(`/api/sql/connections?root=${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();e.success&&(em({global:e.global||[],workspace:e.workspace||[]}),eg(e.activeId),ef(e.isActiveGlobal))}}catch(e){console.error("Failed to load connection profiles:",e)}},eG=async()=>{if(!eh)return void eb([]);eS(!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?(eb(e.tables||[]),eT(null)):eT(e.error||"Failed to load database schema.")}else{let e=await t.json();eT(e.error||"Failed to load database schema.")}}catch(e){console.error("Failed to load schema:",e)}finally{eS(!1)}},eY=async t=>{if(e_[t])return void ev(ej===t?null:t);try{let s=await fetch(`/api/sql/schema?action=describe_table&table=${encodeURIComponent(t)}&root=${encodeURIComponent(e)}`);if(s.ok){let e=await s.json();e.success&&(ew(s=>({...s,[t]:e.columns})),ev(t))}}catch(e){console.error(`Failed to load columns for table ${t}:`,e)}};(0,s.useEffect)(()=>{eH()},[e]),(0,s.useEffect)(()=>{eG(),eL(null),ev(null),ew({});let e=ex?ep.global.find(e=>e.id===eh):ep.workspace.find(e=>e.id===eh);e&&("sqlite"===e.type?eN("SELECT name, type FROM sqlite_master WHERE type='table';"):"mssql"===e.type?eN("SELECT * FROM sys.tables;"):eN("SELECT * FROM information_schema.tables LIMIT 10;"))},[eh,ex,ep.global.length,ep.workspace.length]);let eU=async(t,s)=>{try{(await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"set_active",profileId:t,isGlobal:s,root:e})})).ok&&(eg(t),ef(s))}catch(e){console.error("Failed to set active profile:",e)}},eQ=async()=>{e$(null);try{let t=await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"test",profile:eA,root:e})}),s=await t.json();s.success?e$({success:!0,message:"Connection test successful!"}):e$({success:!1,message:s.error||"Connection test failed."})}catch(e){e$({success:!1,message:e.message||"Failed to make test query."})}},eJ=async t=>{if(t.preventDefault(),!eA.name||!eA.type)return;eF(!0);let s=eA.id||`profile_${Math.random().toString(36).substring(7)}`,r={...eA,id:s,name:eA.name,type:eA.type};try{(await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"save",profile:r,isGlobal:eD,root:e})})).ok&&(await eH(),eO(!1),eh||eU(s,eD))}catch(e){console.error("Failed to save profile:",e)}finally{eF(!1)}},eK=async(t,s)=>{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:s,root:e})})).ok&&(await eH(),eh===t&&eg(null))}catch(e){console.error("Failed to delete connection profile:",e)}},eV=async()=>{if(eC.trim()&&eh){eR(!0),eT(null),eL(null);try{let t=await fetch("/api/sql/query",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sql:eC.trim(),root:e})}),s=await t.json();t.ok&&s.success?(eL({rows:s.rows||[],fields:s.fields||[],durationMs:s.durationMs||0,affectedRows:s.affectedRows}),(eC.toLowerCase().includes("create table")||eC.toLowerCase().includes("drop table")||eC.toLowerCase().includes("alter table"))&&eG()):eT(s.error||"Failed to execute query.")}catch(e){eT(e.message||"An unexpected error occurred during execution.")}finally{eR(!1)}}},eX=ex?ep.global.find(e=>e.id===eh):ep.workspace.find(e=>e.id===eh);return(0,t.jsxs)("div",{style:a,children:[(0,t.jsxs)("div",{style:n,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:()=>{e$(null),ez({id:"",name:"",type:"sqlite",filepath:"./dev.db",host:"localhost",port:5432,database:"postgres",username:"postgres",password:"",ssl:!1,readOnly:!0}),eq(!1),eO(!0)},title:"Add Database Connection Profile",children:"➕ Add"})]}),(0,t.jsxs)("div",{style:c,children:[0===ep.global.length&&0===ep.workspace.length&&(0,t.jsx)("div",{style:b,children:"No connections configured. Add one to start."}),ep.workspace.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:u,children:"WORKSPACE CONNECTIONS"}),ep.workspace.map(e=>(0,t.jsxs)("div",{style:{...p,...eh===e.id&&!ex?m:{}},onClick:()=>eU(e.id,!1),children:[(0,t.jsxs)("div",{style:h,children:[(0,t.jsxs)("span",{style:g,children:["📁 ",e.name]}),(0,t.jsx)("span",{style:x,children:e.type})]}),(0,t.jsx)("button",{style:f,onClick:t=>{t.stopPropagation(),eK(e.id,!1)},children:"✖"})]},e.id))]}),ep.global.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:u,children:"GLOBAL CONNECTIONS"}),ep.global.map(e=>(0,t.jsxs)("div",{style:{...p,...eh===e.id&&ex?m:{}},onClick:()=>eU(e.id,!0),children:[(0,t.jsxs)("div",{style:h,children:[(0,t.jsxs)("span",{style:g,children:["🌐 ",e.name]}),(0,t.jsx)("span",{style:x,children:e.type})]}),(0,t.jsx)("button",{style:f,onClick:t=>{t.stopPropagation(),eK(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"}),ek&&(0,t.jsx)("span",{style:ee})]}),(0,t.jsxs)("div",{style:y,children:[!eh&&(0,t.jsx)("div",{style:b,children:"Select an active connection to view tables."}),eh&&0===ey.length&&!ek&&(0,t.jsx)("div",{style:b,children:"No tables found in database schema."}),ey.map(e=>(0,t.jsxs)("div",{style:j,children:[(0,t.jsxs)("div",{style:v,onClick:()=>eY(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:k,children:ej===e.name?"▼":"▶"})]}),ej===e.name&&e_[e.name]&&(0,t.jsx)("div",{style:S,children:e_[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:W,title:e.type,children:e.name}),(0,t.jsx)("span",{style:R,children:e.type.toLowerCase().substring(0,12)})]},e.name))})]},e.name))]})]})]}),(0,t.jsxs)("div",{style:E,children:[(0,t.jsxs)("div",{style:T,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,t.jsx)("span",{style:P,children:"Active Connection:"}),eX?(0,t.jsxs)("span",{style:L,children:[ex?"🌐":"📁"," ",eX.name," (",eX.type,")",eX.readOnly&&(0,t.jsx)("span",{style:I,children:"Read-Only"})]}):(0,t.jsx)("span",{style:{...L,color:"var(--danger)"},children:"No Connection Selected"})]}),(0,t.jsx)("button",{style:{...O,opacity:!eh||eW?.6:1,cursor:!eh||eW?"not-allowed":"pointer"},onClick:eV,disabled:!eh||eW,children:eW?"⌛ Running...":"⚡ Execute Query (F5)"})]}),(0,t.jsx)("div",{style:D,children:(0,t.jsx)("textarea",{style:q,value:eC,onChange:e=>eN(e.target.value),placeholder:"Write your SQL query script here...",onKeyDown:e=>{("F5"===e.key||e.ctrlKey&&"Enter"===e.key)&&(e.preventDefault(),eV())}})}),(0,t.jsxs)("div",{style:A,children:[eE&&(0,t.jsxs)("div",{style:z,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:eE}),eE.includes("not installed")&&(0,t.jsxs)("div",{style:F,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:M,children:eX?.type==="sqlite"?"npm install better-sqlite3":eX?.type==="postgres"?"npm install pg":eX?.type==="mysql"?"npm install mysql2":"npm install mssql"})]})]}),eP&&(0,t.jsxs)("div",{style:$,children:[(0,t.jsxs)("div",{style:H,children:[(0,t.jsxs)("span",{children:["Query completed."," ",void 0!==eP.affectedRows?`Affected rows: ${eP.affectedRows}`:`Returned ${eP.rows.length} rows`]}),(0,t.jsxs)("span",{children:["Duration: ",eP.durationMs,"ms"]})]}),eP.rows.length>0?(0,t.jsx)("div",{style:G,children:(0,t.jsxs)("table",{style:Y,children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{children:eP.fields.map(e=>(0,t.jsx)("th",{style:U,children:e},e))})}),(0,t.jsx)("tbody",{children:eP.rows.map((e,s)=>(0,t.jsx)("tr",{style:s%2==0?J:K,children:eP.fields.map(s=>(0,t.jsx)("td",{style:Q,children:null===e[s]?"NULL":"object"==typeof e[s]?JSON.stringify(e[s]):String(e[s])},s))},s))})]})}):void 0===eP.affectedRows&&(0,t.jsx)("div",{style:V,children:"Query executed successfully, but returned 0 results."})]}),!eE&&!eP&&!eW&&(0,t.jsx)("div",{style:V,children:"Write a query script and click Execute to view table records."}),eW&&(0,t.jsxs)("div",{style:X,children:[(0,t.jsx)("span",{style:Z}),(0,t.jsx)("span",{style:{color:"var(--muted)"},children:"Running database statement..."})]})]})]}),eI&&"u">typeof document&&(0,r.createPortal)((0,t.jsx)("div",{style:et,children:(0,t.jsxs)("div",{style:es,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:()=>eO(!1),children:"✖"})]}),(0,t.jsxs)("form",{onSubmit:eJ,children:[(0,t.jsxs)("div",{style:er,children:[(0,t.jsx)("label",{style:ea,children:"Profile Name"}),(0,t.jsx)("input",{style:en,type:"text",required:!0,value:eA.name,onChange:e=>ez(t=>({...t,name:e.target.value})),placeholder:"e.g. Local Postgres, Dev SQLite"})]}),(0,t.jsxs)("div",{style:er,children:[(0,t.jsx)("label",{style:ea,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:!eD,onChange:()=>eq(!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:eD,onChange:()=>eq(!0)}),"Global User Profile"]})]})]}),(0,t.jsxs)("div",{style:er,children:[(0,t.jsx)("label",{style:ea,children:"Database Type"}),(0,t.jsxs)("select",{style:el,value:eA.type,onChange:e=>{let t=e.target.value,s=5432;"mysql"===t&&(s=3306),"mssql"===t&&(s=1433),ez(e=>({...e,type:t,filepath:"sqlite"===t?"./dev.db":void 0,port:"sqlite"!==t?s: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"===eA.type?(0,t.jsxs)("div",{style:er,children:[(0,t.jsx)("label",{style:ea,children:"Database File Path"}),(0,t.jsx)("input",{style:en,type:"text",required:!0,value:eA.filepath||"",onChange:e=>ez(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:{...er,flex:3},children:[(0,t.jsx)("label",{style:ea,children:"Host IP Address"}),(0,t.jsx)("input",{style:en,type:"text",required:!0,value:eA.host||"",onChange:e=>ez(t=>({...t,host:e.target.value})),placeholder:"localhost or IP"})]}),(0,t.jsxs)("div",{style:{...er,flex:1},children:[(0,t.jsx)("label",{style:ea,children:"Port"}),(0,t.jsx)("input",{style:en,type:"number",required:!0,value:eA.port||0,onChange:e=>ez(t=>({...t,port:parseInt(e.target.value)}))})]})]}),(0,t.jsxs)("div",{style:er,children:[(0,t.jsx)("label",{style:ea,children:"Database Name"}),(0,t.jsx)("input",{style:en,type:"text",required:!0,value:eA.database||"",onChange:e=>ez(t=>({...t,database:e.target.value}))})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{...er,flex:1},children:[(0,t.jsx)("label",{style:ea,children:"Username"}),(0,t.jsx)("input",{style:en,type:"text",required:!0,value:eA.username||"",onChange:e=>ez(t=>({...t,username:e.target.value}))})]}),(0,t.jsxs)("div",{style:{...er,flex:1},children:[(0,t.jsx)("label",{style:ea,children:"Password"}),(0,t.jsx)("input",{style:en,type:"password",value:eA.password||"",onChange:e=>ez(t=>({...t,password:e.target.value}))})]})]}),("postgres"===eA.type||"mssql"===eA.type)&&(0,t.jsx)("div",{style:er,children:(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"checkbox",checked:!!eA.ssl,onChange:e=>ez(t=>({...t,ssl:e.target.checked}))}),"Require SSL Secure Connection"]})})]}),(0,t.jsx)("div",{style:er,children:(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"checkbox",checked:!!eA.readOnly,onChange:e=>ez(t=>({...t,readOnly:e.target.checked}))}),"Enforce Read-Only Connection (Disable mutations)"]})}),eM&&(0,t.jsx)("div",{style:{...eo,backgroundColor:eM.success?"rgba(16, 185, 129, 0.12)":"rgba(239, 68, 68, 0.12)",border:eM.success?"1px solid var(--success)":"1px solid var(--danger)",color:eM.success?"var(--success)":"var(--danger)"},children:eM.message}),(0,t.jsxs)("div",{style:ei,children:[(0,t.jsx)("button",{type:"button",style:ed,onClick:eQ,children:"🔍 Test Connection"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{type:"button",style:ec,onClick:()=>eO(!1),children:"Cancel"}),(0,t.jsx)("button",{type:"submit",style:eu,disabled:eB,children:eB?"Saving...":"Save Profile"})]})]})]})]})}),document.body)]})}])},67585,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSR",{enumerable:!0,get:function(){return a}});let r=e.r(32061);function a({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new r.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,s)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"encodeURIPath",{enumerable:!0,get:function(){return r}})},52157,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return i}});let r=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 s=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;s.push(...e)}}if(0===s.length)return null;let d=(0,o.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:s.map(e=>{let s=`${t.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:s,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,a.preload)(s,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return d}});let r=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},s=(0,a.lazy)(()=>t.loader().then(o)),d=t.loading;function c(e){let o=d?(0,r.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,i=!t.ssr||!!t.loading,c=i?a.Suspense:a.Fragment,u=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(l.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(s,{...e})]}):(0,r.jsx)(n.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(s,{...e})});return(0,r.jsx)(c,{...i?{fallback:o}:{},children:u})}return c.displayName="LoadableComponent",c}},70703,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return a}});let r=e.r(55682)._(e.r(69093));function a(e,t){let s={};"function"==typeof e&&(s.loader=e);let a={...s,...t};return(0,r.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},20897,e=>{e.v({activeBorder:"page-module___8aEwW__activeBorder",agentBadge:"page-module___8aEwW__agentBadge",agentCard:"page-module___8aEwW__agentCard",agentGrid:"page-module___8aEwW__agentGrid",agentHeader:"page-module___8aEwW__agentHeader",agentName:"page-module___8aEwW__agentName",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),s=e.i(71645),r=e.i(70703),a=e.i(20897),n=e.i(66381);let l=e=>"mock"===e?"🧪":e.includes("-docker")?"🐳":e.includes("-ssh")?"🌐":"💻",o=(0,r.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,r.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,r.default)(()=>e.A(56915),{loadableGenerated:{modules:[99026]},ssr:!1}),c=(0,r.default)(()=>e.A(78716),{loadableGenerated:{modules:[9949]},ssr:!1}),u=(0,r.default)(()=>e.A(33789),{loadableGenerated:{modules:[20032]},ssr:!1}),p=(0,r.default)(()=>e.A(78003),{loadableGenerated:{modules:[97722]},ssr:!1});e.s(["default",0,function(){let[e,r]=(0,s.useState)([]),[m,h]=(0,s.useState)(null),[g,x]=(0,s.useState)(!1),[f,y]=(0,s.useState)(!1),[b,j]=(0,s.useState)(!1),[v,_]=(0,s.useState)(!1),[w,k]=(0,s.useState)(!1),[S,C]=(0,s.useState)(!1),[N,W]=(0,s.useState)(""),[R,E]=(0,s.useState)(3001),[T,P]=(0,s.useState)("0.2.19"),[L,I]=(0,s.useState)(null),O=e.filter(e=>"workspace-terminal"!==e.id),D=e.find(e=>e.id===m),q=O.some(e=>("claude-docker"===e.type||"aider-docker"===e.type)&&"running"===e.status),A=O.some(e=>"claude-ssh"===e.type&&"running"===e.status),z=async()=>{try{let e=await fetch("/api/sessions"),t=await e.json();t.sessions&&r(t.sessions),t.wsPort&&E(t.wsPort),t.originalCwd&&W(t.originalCwd),t.version&&P(t.version)}catch(e){console.error("Failed to fetch sessions:",e)}},B=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)}};(0,s.useEffect)(()=>{(async()=>{await z(),await B()})(),"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(z,4e3);return()=>clearInterval(e)},[]);let F=async(e,t,s,r)=>{x(!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:s,scopedDirs:r};if(("aider"===e||"aider-docker"===e)&&!s)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 z(),h(o.session.id),I({type:e,name:a,workspaceRoot:s,scopedDirs:r}))}catch(e){console.error("Failed to launch session:",e)}finally{x(!1)}},M=async(e,t=!1)=>{try{let s=await fetch("/api/sessions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,delete:t})});(await s.json()).success&&(t&&m===e&&h(null),await z())}catch(e){console.error("Failed to stop session:",e)}};return(0,t.jsxs)("div",{className:`${a.default.container} ${D?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"})]})]}),D?(0,t.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:(0,t.jsx)(p,{sessionId:D.id,workspaceRoot:D.workspaceRoot||"",scopedDirs:D.scopedDirs||[],onClose:()=>h(null),sessions:e,onSwitchSession:e=>h(e),onRefreshSessions:z,wsPort:R})}):(0,t.jsxs)("div",{className:a.default.dashboardGrid,children:[(0,t.jsxs)("main",{className:a.default.mainPanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Active AI Agents"}),0===O.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 in this workspace. Launch a Claude or Aider agent session to begin."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem",justifyContent:"center",flexWrap:"wrap"},children:[L&&(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{F(L.type,L.name,L.workspaceRoot,L.scopedDirs)},disabled:g,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none",maxWidth:"200px"},title:`Re-launch: ${L.name||L.type}`,children:"⚡ Re-launch Last Session"}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{C(!1),k(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none",maxWidth:"200px"},children:"Launch Claude PTY"}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{_(!1),j(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",maxWidth:"200px"},children:"Launch Aider PTY"})]}),(0,t.jsxs)("div",{style:{marginTop:"1.5rem",fontSize:"0.75rem",color:"var(--muted)"},children:["Want to verify layout features first?"," ",(0,t.jsx)("span",{onClick:()=>F("mock"),style:{color:"var(--primary)",cursor:"pointer",textDecoration:"underline"},children:"Start simulated sandbox session"})]})]}):(0,t.jsx)("div",{className:a.default.agentGrid,children:O.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)} 💭 thinking`,"needs-input"===e.agentState&&`${l(e.type)} ⚠️ needs input`,"complete"===e.agentState&&`${l(e.type)} ✅ complete`,"idle"===e.agentState&&`${l(e.type)} 💤 idle`]}),(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,children:[(0,t.jsxs)("p",{style:{fontSize:"0.825rem",color:"var(--muted)"},children:["ID: ",(0,t.jsx)("code",{style:{fontSize:"0.75rem"},children:e.id.substring(0,8)}),(0,t.jsx)("br",{}),"Type: ","claude"===e.type?"Claude Local PTY":"claude-docker"===e.type?"Claude Docker PTY":"claude-ssh"===e.type?"Claude SSH PTY":"aider"===e.type?"Aider Local PTY":"aider-docker"===e.type?"Aider Docker PTY":"mock"===e.type?"Simulated Mock PTY":"Unknown PTY",(0,t.jsx)("br",{}),"Logs: ",e.logsCount," captured lines"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",marginTop:"1rem"},children:["running"===e.status?(0,t.jsx)("button",{onClick:()=>M(e.id,!1),style:{flex:1,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"transparent",fontSize:"0.75rem",fontWeight:600,color:"var(--danger)"},children:"Stop"}):(0,t.jsx)("button",{onClick:()=>M(e.id,!0),style:{flex:1,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",fontSize:"0.75rem",fontWeight:600,color:"var(--muted)"},children:"Delete"}),(0,t.jsx)("button",{onClick:()=>h(e.id),style:{flex:2,padding:"0.4rem 0.6rem",borderRadius:"6px",border:"none",backgroundColor:m===e.id?"var(--border-focus)":"var(--primary)",fontSize:"0.75rem",fontWeight:600,color:"#fff"},children:m===e.id?"Connected":"Open Session"})]})]})]},e.id))})]}),m&&"workspace-terminal"!==m&&(0,t.jsxs)("section",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border-focus)"},children:[(0,t.jsxs)("div",{className:a.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(109, 40, 217, 0.08)"},children:[(0,t.jsxs)("span",{style:{fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:["🖥️ Console Bridge — ",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 e=await fetch("/api/sessions/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:m})});if(e.ok)await z();else{let t=await e.json();alert(t.error||"Failed to restart session.")}}catch(e){console.error("Failed to restart session:",e),alert("Network error: failed to restart session.")}},style:{padding:"0.2rem 0.5rem",borderRadius:"4px",border:"1px solid #eab308",backgroundColor:"rgba(234, 179, 8, 0.15)",color:"#eab308",fontSize:"0.7rem",fontWeight:600,cursor:"pointer",boxShadow:"0 0 8px rgba(234, 179, 8, 0.2)"},title:"Restart the stopped session process runner",children:"⚡ Restart Session"}),(0,t.jsx)("button",{onClick:()=>h(null),style:{border:"none",background:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.75rem"},children:"Close Panel ✖"})]})]}),(0,t.jsx)(o,{sessionId:m,wsPort:R})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Workspace Shell Terminal"}),(0,t.jsxs)("div",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border)",padding:0},children:[(0,t.jsxs)("div",{className:a.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(255, 255, 255, 0.02)"},children:[(0,t.jsxs)("span",{style:{fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem",fontSize:"0.85rem"},children:["💻 Local Workspace Shell (CWD: ",N||"root",")"]}),(0,t.jsx)("span",{style:{fontSize:"0.7rem",color:"var(--muted)"},children:"Pre-configured environment"})]}),(0,t.jsx)(o,{sessionId:"workspace-terminal",height:"300px",wsPort:R})]})]}),(0,t.jsxs)("section",{style:{marginTop:"2rem"},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 project files folder hierarchy 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 Context (/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 instructions written 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:"⚡ Trigger Prompt (/ccp)"})]})]}),(0,t.jsx)(i,{})]}),(0,t.jsxs)("section",{style:{marginTop:"2rem"},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:"480px",border:"1px solid var(--border)"},children:(0,t.jsx)(n.default,{workspaceRoot:N||""})})]})]}),(0,t.jsxs)("aside",{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,children:[(0,t.jsx)("span",{className:a.default.envName,children:"💻 Local host OS"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:"var(--success)"},children:"Active"})]}),(0,t.jsxs)("div",{className:a.default.envRow,style:{opacity:q?1:.6},children:[(0,t.jsx)("span",{className:a.default.envName,children:"🐳 Docker Sandbox"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:q?"var(--success)":"var(--muted)"},children:q?"Active":"Not Mounted"})]}),(0,t.jsxs)("div",{className:a.default.envRow,style:{opacity:A?1:.6},children:[(0,t.jsx)("span",{className:a.default.envName,children:"🌐 Remote VM (SSH)"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:A?"var(--success)":"var(--muted)"},children:A?"Active":"Disconnected"})]})]})]}),(0,t.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,t.jsxs)("button",{className:a.default.quickLaunchBtn,onClick:()=>{C(!1),k(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none"},children:[(0,t.jsx)("span",{children:"🤖"}),(0,t.jsx)("span",{children:"Launch Claude PTY"})]}),(0,t.jsxs)("button",{className:a.default.quickLaunchBtn,onClick:()=>{C(!0),k(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(170, 72%, 40%) 0%, hsl(195, 100%, 40%) 100%)",border:"none"},children:[(0,t.jsx)("span",{children:"🐳"}),(0,t.jsx)("span",{children:"Launch Docker PTY"})]}),(0,t.jsxs)("button",{className:a.default.quickLaunchBtn,onClick:()=>y(!0),disabled:g,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none"},children:[(0,t.jsx)("span",{children:"🌐"}),(0,t.jsx)("span",{children:"Launch SSH PTY"})]}),(0,t.jsxs)("button",{className:a.default.quickLaunchBtn,onClick:()=>{_(!1),j(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none"},children:[(0,t.jsx)("span",{children:"🐍"}),(0,t.jsx)("span",{children:"Launch Aider PTY"})]}),(0,t.jsxs)("button",{className:a.default.quickLaunchBtn,onClick:()=>{_(!0),j(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(195, 100%, 40%) 0%, hsl(262, 80%, 55%) 100%)",border:"none"},children:[(0,t.jsx)("span",{children:"🐳"}),(0,t.jsx)("span",{children:"Launch Aider Docker"})]})]}),(0,t.jsxs)("section",{className:"card",style:{padding:"1.5rem",display:"flex",flexDirection:"column",gap:"0.75rem"},children:[(0,t.jsx)("h3",{style:{fontSize:"1rem",fontWeight:700},children:"Quick Actions"}),(0,t.jsxs)("ul",{style:{listStyle:"none",fontSize:"0.875rem",display:"flex",flexDirection:"column",gap:"0.5rem",color:"var(--muted)"},children:[(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Configure global 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)("div",{style:{marginTop:"1.2rem",textAlign:"center",fontSize:"0.72rem",color:"var(--muted)"},children:["Need to troubleshoot?"," ",(0,t.jsx)("span",{onClick:()=>F("mock"),style:{color:"var(--primary)",cursor:"pointer",textDecoration:"underline"},children:"Launch simulated playground sandbox"})]})]})]})]}),(0,t.jsxs)("footer",{className:a.default.footer,children:[(0,t.jsxs)("span",{children:["NeuralLoom v",T," — Experimental AI Orchestrator Bridge"]}),(0,t.jsxs)("span",{children:["Directory: ",N||"Loading..."]})]}),f&&(0,t.jsx)(d,{onClose:()=>y(!1),onConfirmLaunch:()=>{y(!1),F("claude-ssh")}}),b&&(0,t.jsx)(c,{onClose:()=>j(!1),isDocker:v,onConfirmLaunch:()=>{j(!1),F(v?"aider-docker":"aider")}}),w&&(0,t.jsx)(u,{onClose:()=>k(!1),isDocker:S,onConfirmLaunch:(e,t,s)=>{k(!1),F(S?"claude-docker":"claude",e,t,s)}})]})}])},33779,e=>{e.v(t=>Promise.all(["static/chunks/03g6xpslyid3~.js","static/chunks/0-vb7c~yrtpon.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/0k2co3uj4w81_.js"].map(t=>e.l(t))).then(()=>t(9949)))},33789,e=>{e.v(t=>Promise.all(["static/chunks/076_b43_kienv.js"].map(t=>e.l(t))).then(()=>t(20032)))},78003,e=>{e.v(t=>Promise.all(["static/chunks/0eidfx-s54367.js","static/chunks/0-vb7c~yrtpon.js","static/chunks/0st7_hghhyuv4.js","static/chunks/0ga14ztvrhau2.css"].map(t=>e.l(t))).then(()=>t(97722)))}]);
|
package/.next/trace
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":244,"timestamp":115745857479,"id":4,"parentId":1,"tags":{},"startTime":1781595128650,"traceId":"214eb1e75be6517e"},{"name":"load-custom-routes","duration":393,"timestamp":115745857858,"id":5,"parentId":1,"tags":{},"startTime":1781595128650,"traceId":"214eb1e75be6517e"},{"name":"create-dist-dir","duration":574,"timestamp":115745858283,"id":6,"parentId":1,"tags":{},"startTime":1781595128651,"traceId":"214eb1e75be6517e"},{"name":"clean","duration":590,"timestamp":115745859845,"id":7,"parentId":1,"tags":{},"startTime":1781595128652,"traceId":"214eb1e75be6517e"},{"name":"discover-routes","duration":6045,"timestamp":115745882858,"id":8,"parentId":1,"tags":{},"startTime":1781595128675,"traceId":"214eb1e75be6517e"},{"name":"create-root-mapping","duration":57,"timestamp":115745888948,"id":9,"parentId":1,"tags":{},"startTime":1781595128681,"traceId":"214eb1e75be6517e"},{"name":"generate-route-types","duration":17600,"timestamp":115745890381,"id":10,"parentId":1,"tags":{},"startTime":1781595128683,"traceId":"214eb1e75be6517e"},{"name":"public-dir-conflict-check","duration":90,"timestamp":115745908112,"id":11,"parentId":1,"tags":{},"startTime":1781595128701,"traceId":"214eb1e75be6517e"},{"name":"generate-routes-manifest","duration":2606,"timestamp":115745908299,"id":12,"parentId":1,"tags":{},"startTime":1781595128701,"traceId":"214eb1e75be6517e"},{"name":"run-turbopack","duration":2459201,"timestamp":115745917497,"id":14,"parentId":1,"tags":{},"startTime":1781595128710,"traceId":"214eb1e75be6517e"},{"name":"turbopack-build-events","duration":61,"timestamp":115746195220,"id":15,"parentId":1,"tags":{},"startTime":1781595128988,"traceId":"214eb1e75be6517e"},{"name":"run-typescript","duration":4234716,"timestamp":115748386328,"id":16,"parentId":1,"tags":{},"startTime":1781595131179,"traceId":"214eb1e75be6517e"},{"name":"generate-required-server-files","duration":1485,"timestamp":115752621998,"id":18,"parentId":1,"tags":{},"startTime":1781595135414,"traceId":"214eb1e75be6517e"},{"name":"check-static-error-page","duration":8664,"timestamp":115752770812,"id":20,"parentId":19,"tags":{},"startTime":1781595135563,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":569183,"timestamp":115752783843,"id":44,"parentId":22,"tags":{},"startTime":1781595135576,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":579115,"timestamp":115752774073,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1781595135566,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":760076,"timestamp":115752785392,"id":54,"parentId":32,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":768755,"timestamp":115752776785,"id":32,"parentId":19,"tags":{"page":"/api/sessions/launch"},"startTime":1781595135569,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":762278,"timestamp":115752784980,"id":51,"parentId":29,"tags":{},"startTime":1781595135577,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":771186,"timestamp":115752776131,"id":29,"parentId":19,"tags":{"page":"/api/recents"},"startTime":1781595135569,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":766690,"timestamp":115752784088,"id":46,"parentId":24,"tags":{},"startTime":1781595135576,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":775992,"timestamp":115752774839,"id":24,"parentId":19,"tags":{"page":"/api/context/claude"},"startTime":1781595135567,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":767375,"timestamp":115752783617,"id":43,"parentId":21,"tags":{},"startTime":1781595135576,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":778653,"timestamp":115752772367,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1781595135565,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":778607,"timestamp":115752784722,"id":49,"parentId":27,"tags":{},"startTime":1781595135577,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":787797,"timestamp":115752775589,"id":27,"parentId":19,"tags":{"page":"/api/files"},"startTime":1781595135568,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":778238,"timestamp":115752785819,"id":59,"parentId":37,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":785919,"timestamp":115752778194,"id":37,"parentId":19,"tags":{"page":"/api/sessions/stop"},"startTime":1781595135571,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":783657,"timestamp":115752785862,"id":60,"parentId":38,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":791156,"timestamp":115752778419,"id":38,"parentId":19,"tags":{"page":"/api/sql/connections"},"startTime":1781595135571,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":787519,"timestamp":115752784489,"id":48,"parentId":26,"tags":{},"startTime":1781595135577,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":796697,"timestamp":115752775362,"id":26,"parentId":19,"tags":{"page":"/api/context/ssh"},"startTime":1781595135568,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":787707,"timestamp":115752785449,"id":55,"parentId":33,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":796197,"timestamp":115752776997,"id":33,"parentId":19,"tags":{"page":"/api/sessions"},"startTime":1781595135569,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":786145,"timestamp":115752790545,"id":64,"parentId":42,"tags":{},"startTime":1781595135583,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":797567,"timestamp":115752779169,"id":42,"parentId":19,"tags":{"page":"/"},"startTime":1781595135572,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":794233,"timestamp":115752785955,"id":63,"parentId":41,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":801239,"timestamp":115752778998,"id":41,"parentId":19,"tags":{"page":"/api/sql/schema"},"startTime":1781595135571,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":796390,"timestamp":115752784865,"id":50,"parentId":28,"tags":{},"startTime":1781595135577,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":805449,"timestamp":115752775851,"id":28,"parentId":19,"tags":{"page":"/api/git"},"startTime":1781595135568,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":796169,"timestamp":115752785324,"id":53,"parentId":31,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":804947,"timestamp":115752776583,"id":31,"parentId":19,"tags":{"page":"/api/sessions/input"},"startTime":1781595135569,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":795885,"timestamp":115752785927,"id":62,"parentId":40,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":803019,"timestamp":115752778822,"id":40,"parentId":19,"tags":{"page":"/api/sql/query"},"startTime":1781595135571,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":796969,"timestamp":115752785896,"id":61,"parentId":39,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":804255,"timestamp":115752778636,"id":39,"parentId":19,"tags":{"page":"/api/sql/mcp"},"startTime":1781595135571,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":800762,"timestamp":115752784370,"id":47,"parentId":25,"tags":{},"startTime":1781595135577,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":810052,"timestamp":115752775109,"id":25,"parentId":19,"tags":{"page":"/api/context"},"startTime":1781595135568,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":799542,"timestamp":115752785676,"id":57,"parentId":35,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":807731,"timestamp":115752777500,"id":35,"parentId":19,"tags":{"page":"/api/sessions/start"},"startTime":1781595135570,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":803288,"timestamp":115752785767,"id":58,"parentId":36,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":811144,"timestamp":115752777948,"id":36,"parentId":19,"tags":{"page":"/api/sessions/stats"},"startTime":1781595135570,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":806317,"timestamp":115752785515,"id":56,"parentId":34,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":814682,"timestamp":115752777188,"id":34,"parentId":19,"tags":{"page":"/api/sessions/scope"},"startTime":1781595135570,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":807416,"timestamp":115752785196,"id":52,"parentId":30,"tags":{},"startTime":1781595135578,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":816301,"timestamp":115752776341,"id":30,"parentId":19,"tags":{"page":"/api/sessions/inject"},"startTime":1781595135569,"traceId":"214eb1e75be6517e"},{"name":"is-page-static","duration":812614,"timestamp":115752784001,"id":45,"parentId":23,"tags":{},"startTime":1781595135576,"traceId":"214eb1e75be6517e"},{"name":"check-page","duration":822103,"timestamp":115752774550,"id":23,"parentId":19,"tags":{"page":"/api/context/aider"},"startTime":1781595135567,"traceId":"214eb1e75be6517e"},{"name":"static-check","duration":826302,"timestamp":115752770380,"id":19,"parentId":1,"tags":{},"startTime":1781595135563,"traceId":"214eb1e75be6517e"},{"name":"write-routes-manifest","duration":837,"timestamp":115753597671,"id":66,"parentId":1,"tags":{},"startTime":1781595136390,"traceId":"214eb1e75be6517e"},{"name":"load-dotenv","duration":32,"timestamp":115753613728,"id":69,"parentId":68,"tags":{},"startTime":1781595136406,"traceId":"214eb1e75be6517e"},{"name":"run-export-path-map","duration":430,"timestamp":115753618481,"id":70,"parentId":68,"tags":{},"startTime":1781595136411,"traceId":"214eb1e75be6517e"},{"name":"next-export","duration":685670,"timestamp":115753612734,"id":68,"parentId":1,"tags":{},"startTime":1781595136405,"traceId":"214eb1e75be6517e"},{"name":"move-exported-app-not-found-","duration":2277,"timestamp":115754300339,"id":71,"parentId":67,"tags":{},"startTime":1781595137093,"traceId":"214eb1e75be6517e"},{"name":"move-exported-app-global-error-","duration":1966,"timestamp":115754302855,"id":72,"parentId":67,"tags":{},"startTime":1781595137095,"traceId":"214eb1e75be6517e"},{"name":"static-generation","duration":705668,"timestamp":115753602781,"id":67,"parentId":1,"tags":{},"startTime":1781595136395,"traceId":"214eb1e75be6517e"},{"name":"write-routes-manifest","duration":908,"timestamp":115754308570,"id":73,"parentId":1,"tags":{},"startTime":1781595137101,"traceId":"214eb1e75be6517e"},{"name":"print-tree-view","duration":4022,"timestamp":115754324869,"id":74,"parentId":1,"tags":{},"startTime":1781595137117,"traceId":"214eb1e75be6517e"},{"name":"write-route-bundle-stats","duration":13518,"timestamp":115754328924,"id":75,"parentId":1,"tags":{},"startTime":1781595137121,"traceId":"214eb1e75be6517e"},{"name":"telemetry-flush","duration":168017,"timestamp":115754342474,"id":76,"parentId":1,"tags":{},"startTime":1781595137135,"traceId":"214eb1e75be6517e"},{"name":"next-build","duration":8703071,"timestamp":115745807443,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781595128600,"traceId":"214eb1e75be6517e"}]
|
|
1
|
+
[{"name":"generate-buildid","duration":225,"timestamp":35438280731,"id":4,"parentId":1,"tags":{},"startTime":1781951711762,"traceId":"2f29e5d45651efa7"},{"name":"load-custom-routes","duration":356,"timestamp":35438281070,"id":5,"parentId":1,"tags":{},"startTime":1781951711762,"traceId":"2f29e5d45651efa7"},{"name":"create-dist-dir","duration":600,"timestamp":35438281454,"id":6,"parentId":1,"tags":{},"startTime":1781951711763,"traceId":"2f29e5d45651efa7"},{"name":"clean","duration":589,"timestamp":35438282930,"id":7,"parentId":1,"tags":{},"startTime":1781951711764,"traceId":"2f29e5d45651efa7"},{"name":"discover-routes","duration":6348,"timestamp":35438305815,"id":8,"parentId":1,"tags":{},"startTime":1781951711787,"traceId":"2f29e5d45651efa7"},{"name":"create-root-mapping","duration":61,"timestamp":35438312213,"id":9,"parentId":1,"tags":{},"startTime":1781951711793,"traceId":"2f29e5d45651efa7"},{"name":"generate-route-types","duration":19926,"timestamp":35438313719,"id":10,"parentId":1,"tags":{},"startTime":1781951711795,"traceId":"2f29e5d45651efa7"},{"name":"public-dir-conflict-check","duration":104,"timestamp":35438333811,"id":11,"parentId":1,"tags":{},"startTime":1781951711815,"traceId":"2f29e5d45651efa7"},{"name":"generate-routes-manifest","duration":2439,"timestamp":35438334041,"id":12,"parentId":1,"tags":{},"startTime":1781951711815,"traceId":"2f29e5d45651efa7"},{"name":"run-turbopack","duration":2540005,"timestamp":35438353145,"id":14,"parentId":1,"tags":{},"startTime":1781951711834,"traceId":"2f29e5d45651efa7"},{"name":"turbopack-build-events","duration":65,"timestamp":35438678816,"id":15,"parentId":1,"tags":{},"startTime":1781951712160,"traceId":"2f29e5d45651efa7"},{"name":"run-typescript","duration":4531976,"timestamp":35440903690,"id":16,"parentId":1,"tags":{},"startTime":1781951714385,"traceId":"2f29e5d45651efa7"},{"name":"generate-required-server-files","duration":1275,"timestamp":35445436576,"id":18,"parentId":1,"tags":{},"startTime":1781951718918,"traceId":"2f29e5d45651efa7"},{"name":"check-static-error-page","duration":9499,"timestamp":35445588548,"id":20,"parentId":19,"tags":{},"startTime":1781951719070,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":636410,"timestamp":35445604245,"id":44,"parentId":22,"tags":{},"startTime":1781951719085,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":648285,"timestamp":35445592500,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1781951719074,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":770841,"timestamp":35445604335,"id":45,"parentId":23,"tags":{},"startTime":1781951719085,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":782273,"timestamp":35445592981,"id":23,"parentId":19,"tags":{"page":"/api/context/aider"},"startTime":1781951719074,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":804136,"timestamp":35445604503,"id":46,"parentId":24,"tags":{},"startTime":1781951719086,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":815411,"timestamp":35445593286,"id":24,"parentId":19,"tags":{"page":"/api/context/claude"},"startTime":1781951719074,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":806656,"timestamp":35445603944,"id":43,"parentId":21,"tags":{},"startTime":1781951719085,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":820094,"timestamp":35445590559,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1781951719072,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":812722,"timestamp":35445604748,"id":48,"parentId":26,"tags":{},"startTime":1781951719086,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":823725,"timestamp":35445593811,"id":26,"parentId":19,"tags":{"page":"/api/context/ssh"},"startTime":1781951719075,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":812994,"timestamp":35445606070,"id":57,"parentId":35,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":823192,"timestamp":35445595928,"id":35,"parentId":19,"tags":{"page":"/api/sessions/start"},"startTime":1781951719077,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":815318,"timestamp":35445605037,"id":49,"parentId":27,"tags":{},"startTime":1781951719086,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":826323,"timestamp":35445594085,"id":27,"parentId":19,"tags":{"page":"/api/files"},"startTime":1781951719075,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":819843,"timestamp":35445606199,"id":59,"parentId":37,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":829500,"timestamp":35445596595,"id":37,"parentId":19,"tags":{"page":"/api/sessions/stop"},"startTime":1781951719078,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":822075,"timestamp":35445606347,"id":63,"parentId":41,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":831066,"timestamp":35445597418,"id":41,"parentId":19,"tags":{"page":"/api/sql/schema"},"startTime":1781951719078,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":824879,"timestamp":35445605305,"id":51,"parentId":29,"tags":{},"startTime":1781951719086,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":835634,"timestamp":35445594598,"id":29,"parentId":19,"tags":{"page":"/api/recents"},"startTime":1781951719076,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":827706,"timestamp":35445604640,"id":47,"parentId":25,"tags":{},"startTime":1781951719086,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":838848,"timestamp":35445593550,"id":25,"parentId":19,"tags":{"page":"/api/context"},"startTime":1781951719075,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":824422,"timestamp":35445609734,"id":64,"parentId":42,"tags":{},"startTime":1781951719091,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":836550,"timestamp":35445597652,"id":42,"parentId":19,"tags":{"page":"/"},"startTime":1781951719079,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":834022,"timestamp":35445605699,"id":53,"parentId":31,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":844725,"timestamp":35445595050,"id":31,"parentId":19,"tags":{"page":"/api/sessions/input"},"startTime":1781951719076,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":834715,"timestamp":35445605188,"id":50,"parentId":28,"tags":{},"startTime":1781951719086,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":845580,"timestamp":35445594345,"id":28,"parentId":19,"tags":{"page":"/api/git"},"startTime":1781951719075,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":834083,"timestamp":35445605903,"id":56,"parentId":34,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":844361,"timestamp":35445595643,"id":34,"parentId":19,"tags":{"page":"/api/sessions/scope"},"startTime":1781951719077,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":834977,"timestamp":35445605777,"id":54,"parentId":32,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":845547,"timestamp":35445595248,"id":32,"parentId":19,"tags":{"page":"/api/sessions/launch"},"startTime":1781951719076,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":835414,"timestamp":35445606277,"id":61,"parentId":39,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":844757,"timestamp":35445596985,"id":39,"parentId":19,"tags":{"page":"/api/sql/mcp"},"startTime":1781951719078,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":840511,"timestamp":35445605560,"id":52,"parentId":30,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":851291,"timestamp":35445594823,"id":30,"parentId":19,"tags":{"page":"/api/sessions/inject"},"startTime":1781951719076,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":840424,"timestamp":35445606312,"id":62,"parentId":40,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":849602,"timestamp":35445597182,"id":40,"parentId":19,"tags":{"page":"/api/sql/query"},"startTime":1781951719078,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":847863,"timestamp":35445605832,"id":55,"parentId":33,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":858286,"timestamp":35445595453,"id":33,"parentId":19,"tags":{"page":"/api/sessions"},"startTime":1781951719076,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":851735,"timestamp":35445606142,"id":58,"parentId":36,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":861555,"timestamp":35445596364,"id":36,"parentId":19,"tags":{"page":"/api/sessions/stats"},"startTime":1781951719077,"traceId":"2f29e5d45651efa7"},{"name":"is-page-static","duration":857280,"timestamp":35445606243,"id":60,"parentId":38,"tags":{},"startTime":1781951719087,"traceId":"2f29e5d45651efa7"},{"name":"check-page","duration":866777,"timestamp":35445596790,"id":38,"parentId":19,"tags":{"page":"/api/sql/connections"},"startTime":1781951719078,"traceId":"2f29e5d45651efa7"},{"name":"static-check","duration":875502,"timestamp":35445588089,"id":19,"parentId":1,"tags":{},"startTime":1781951719069,"traceId":"2f29e5d45651efa7"},{"name":"write-routes-manifest","duration":824,"timestamp":35446464981,"id":66,"parentId":1,"tags":{},"startTime":1781951719946,"traceId":"2f29e5d45651efa7"},{"name":"load-dotenv","duration":38,"timestamp":35446482256,"id":69,"parentId":68,"tags":{},"startTime":1781951719963,"traceId":"2f29e5d45651efa7"},{"name":"run-export-path-map","duration":415,"timestamp":35446487252,"id":70,"parentId":68,"tags":{},"startTime":1781951719968,"traceId":"2f29e5d45651efa7"},{"name":"next-export","duration":695900,"timestamp":35446481346,"id":68,"parentId":1,"tags":{},"startTime":1781951719962,"traceId":"2f29e5d45651efa7"},{"name":"move-exported-app-not-found-","duration":2520,"timestamp":35447179404,"id":71,"parentId":67,"tags":{},"startTime":1781951720660,"traceId":"2f29e5d45651efa7"},{"name":"move-exported-app-global-error-","duration":1486,"timestamp":35447182066,"id":72,"parentId":67,"tags":{},"startTime":1781951720663,"traceId":"2f29e5d45651efa7"},{"name":"static-generation","duration":716386,"timestamp":35446470550,"id":67,"parentId":1,"tags":{},"startTime":1781951719952,"traceId":"2f29e5d45651efa7"},{"name":"write-routes-manifest","duration":799,"timestamp":35447187063,"id":73,"parentId":1,"tags":{},"startTime":1781951720668,"traceId":"2f29e5d45651efa7"},{"name":"print-tree-view","duration":3823,"timestamp":35447205293,"id":74,"parentId":1,"tags":{},"startTime":1781951720686,"traceId":"2f29e5d45651efa7"},{"name":"write-route-bundle-stats","duration":9111,"timestamp":35447209145,"id":75,"parentId":1,"tags":{},"startTime":1781951720690,"traceId":"2f29e5d45651efa7"},{"name":"telemetry-flush","duration":195722,"timestamp":35447218302,"id":76,"parentId":1,"tags":{},"startTime":1781951720699,"traceId":"2f29e5d45651efa7"},{"name":"next-build","duration":9186270,"timestamp":35438227778,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781951711709,"traceId":"2f29e5d45651efa7"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":2540005,"timestamp":35438353145,"id":14,"parentId":1,"tags":{},"startTime":1781951711834,"traceId":"2f29e5d45651efa7"},{"name":"turbopack-build-events","duration":65,"timestamp":35438678816,"id":15,"parentId":1,"tags":{},"startTime":1781951712160,"traceId":"2f29e5d45651efa7"},{"name":"run-typescript","duration":4531976,"timestamp":35440903690,"id":16,"parentId":1,"tags":{},"startTime":1781951714385,"traceId":"2f29e5d45651efa7"},{"name":"static-check","duration":875502,"timestamp":35445588089,"id":19,"parentId":1,"tags":{},"startTime":1781951719069,"traceId":"2f29e5d45651efa7"},{"name":"static-generation","duration":716386,"timestamp":35446470550,"id":67,"parentId":1,"tags":{},"startTime":1781951719952,"traceId":"2f29e5d45651efa7"},{"name":"telemetry-flush","duration":195722,"timestamp":35447218302,"id":76,"parentId":1,"tags":{},"startTime":1781951720699,"traceId":"2f29e5d45651efa7"},{"name":"next-build","duration":9186270,"timestamp":35438227778,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1781951711709,"traceId":"2f29e5d45651efa7"}]
|
package/README.md
CHANGED
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
NeuralLoom is a local Next.js orchestration cockpit and terminal bridge designed to manage multiple concurrent terminal agent sessions (such as **Claude Code** and **Aider**) in isolated or overlapping workspaces. It streams pseudo-terminal (PTY) streams to the browser over secure WebSockets, manages system prompt environments, compiles directory maps, tracks active token costs, and displays visual resource telemetry.
|
|
4
4
|
|
|
5
|
+
> [!TIP]
|
|
6
|
+
> **UI Capabilities & Gap Audit**: You can view the live interactive [UI Capabilities & Gap Audit Dashboard](http://localhost:3000/ui-audit.html) (or access it locally at `/ui-audit.html` on the server) to explore current layout components, read-only diff viewers, and the built-in database/terminal consoles.
|
|
7
|
+
|
|
5
8
|
---
|
|
6
9
|
|
|
10
|
+
|
|
7
11
|
## 🚀 Key Features
|
|
8
12
|
|
|
9
13
|
* **Multi-Session Workspace Switcher**: Swap between separate active workspaces via a top tab bar. The file explorer tree, git diff panel, terminal stream, and active files are cached independently per session so you never lose your context when swapping projects.
|