neural-loom 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/diagnostics/route-bundle-stats.json +1 -1
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page/react-loadable-manifest.json +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0tq0maq._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0tq0maq._.js.map +1 -1
- package/.next/server/middleware/middleware-manifest.json +5 -5
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/middleware-manifest.json +5 -5
- 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/{0_0n_2b22co72.js → 04ssoa5hzissa.js} +1 -1
- package/.next/static/chunks/{0533wcfvivshl.js → 0fq_ngmmf0c2l.js} +2 -2
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/package.json +1 -1
- package/src/app/components/TerminalConsole.tsx +69 -4
- /package/.next/static/{wn7__ONEk3TeI_maB5mxn → xOOWYBRGm6HPTemg5NWab}/_buildManifest.js +0 -0
- /package/.next/static/{wn7__ONEk3TeI_maB5mxn → xOOWYBRGm6HPTemg5NWab}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{wn7__ONEk3TeI_maB5mxn → xOOWYBRGm6HPTemg5NWab}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/139c54uo1w7.4.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/08o_~ynkkb9ph.js"/><script src="/_next/static/chunks/140ovxvjat1ch.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-06zh3hgrjcphg.js" async=""></script><script src="/_next/static/chunks/0dbhjjzl8qfwv.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>NeuralLoom - Unified AI Agent Orchestrator & Context Bridge</title><meta name="description" content="Advanced console dashboard and context staging manager for Claude Code and simulated AI agents."/><link rel="manifest" href="/manifest.json"/><link rel="shortcut icon" href="/logo.png"/><link rel="icon" href="/logo.png"/><link rel="apple-touch-icon" href="/logo.png"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/08o_~ynkkb9ph.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/139c54uo1w7.4.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/139c54uo1w7.4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0dbhjjzl8qfwv.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/139c54uo1w7.4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/139c54uo1w7.4.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/08o_~ynkkb9ph.js"/><script src="/_next/static/chunks/140ovxvjat1ch.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-06zh3hgrjcphg.js" async=""></script><script src="/_next/static/chunks/0dbhjjzl8qfwv.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>NeuralLoom - Unified AI Agent Orchestrator & Context Bridge</title><meta name="description" content="Advanced console dashboard and context staging manager for Claude Code and simulated AI agents."/><link rel="manifest" href="/manifest.json"/><link rel="shortcut icon" href="/logo.png"/><link rel="icon" href="/logo.png"/><link rel="apple-touch-icon" href="/logo.png"/><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/08o_~ynkkb9ph.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/139c54uo1w7.4.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/139c54uo1w7.4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0dbhjjzl8qfwv.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/139c54uo1w7.4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"xOOWYBRGm6HPTemg5NWab\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"NeuralLoom - Unified AI Agent Orchestrator \u0026 Context Bridge\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Advanced console dashboard and context staging manager for Claude Code and simulated AI agents.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/manifest.json\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"3\",{\"rel\":\"shortcut icon\",\"href\":\"/logo.png\"}],[\"$\",\"link\",\"4\",{\"rel\":\"icon\",\"href\":\"/logo.png\"}],[\"$\",\"link\",\"5\",{\"rel\":\"apple-touch-icon\",\"href\":\"/logo.png\"}],[\"$\",\"$Le\",\"6\",{}]]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/08o_~ynkkb9ph.js"/><script src="/_next/static/chunks/140ovxvjat1ch.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-06zh3hgrjcphg.js" async=""></script><script src="/_next/static/chunks/0dbhjjzl8qfwv.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/08o_~ynkkb9ph.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/08o_~ynkkb9ph.js"/><script src="/_next/static/chunks/140ovxvjat1ch.js" async=""></script><script src="/_next/static/chunks/07lhk_q6pmm3r.js" async=""></script><script src="/_next/static/chunks/turbopack-06zh3hgrjcphg.js" async=""></script><script src="/_next/static/chunks/0dbhjjzl8qfwv.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/08o_~ynkkb9ph.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/0dbhjjzl8qfwv.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"xOOWYBRGm6HPTemg5NWab\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"Vx3n6wxmUnlkbJylaoi4mb2abVX7b7sozfu3dS53UyY=\"\n}"
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
outline: 1px dashed rgba(255, 255, 255, 0.2);
|
|
9
9
|
}
|
|
10
10
|
`,document.head.appendChild(e)}e.s(["default",0,function({workspaceRoot:e}){let[eh,eg]=(0,r.useState)({global:[],workspace:[]}),[ex,ey]=(0,r.useState)(null),[eb,ej]=(0,r.useState)(!0),[ev,e_]=(0,r.useState)(!0),[ew,eS]=(0,r.useState)([]),[ek,eC]=(0,r.useState)(null),[eN,eR]=(0,r.useState)({}),[eE,eL]=(0,r.useState)(!1),[eW,eO]=(0,r.useState)("SELECT * FROM sqlite_master;"),[eT,eI]=(0,r.useState)(!1),[eP,eD]=(0,r.useState)(null),[ez,eq]=(0,r.useState)(null),[eA,eB]=(0,r.useState)(null),[e$,eF]=(0,r.useState)(null),[eM,eU]=(0,r.useState)(!1),[eH,eG]=(0,r.useState)(!1),[eJ,eQ]=(0,r.useState)({id:"",name:"",type:"sqlite",filepath:"./dev.db",host:"localhost",port:5432,database:"postgres",username:"postgres",password:"",ssl:!1,readOnly:!0}),[eK,eY]=(0,r.useState)(!1),[eV,eX]=(0,r.useState)(null),eZ=async()=>{try{let t=await fetch(`/api/sql/connections?root=${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();e.success&&(eg({global:e.global||[],workspace:e.workspace||[]}),ey(e.activeId),ej(e.isActiveGlobal))}}catch(e){console.error("Failed to load connection profiles:",e)}},e0=async()=>{if(!ex)return void eS([]);eL(!0);try{let t=await fetch(`/api/sql/schema?action=list_tables&root=${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();e.success?(eS(e.tables||[]),eD(null)):eD(e.error||"Failed to load database schema.")}else{let e=await t.json();eD(e.error||"Failed to load database schema.")}}catch(e){console.error("Failed to load schema:",e)}finally{eL(!1)}},e1=async t=>{if(eN[t])return void eC(ek===t?null:t);try{let r=await fetch(`/api/sql/schema?action=describe_table&table=${encodeURIComponent(t)}&root=${encodeURIComponent(e)}`);if(r.ok){let e=await r.json();e.success&&(eR(r=>({...r,[t]:e.columns})),eC(t))}}catch(e){console.error(`Failed to load columns for table ${t}:`,e)}};(0,r.useEffect)(()=>{eZ()},[e]),(0,r.useEffect)(()=>{e0(),eq(null),eC(null),eR({});let e=eb?eh.global.find(e=>e.id===ex):eh.workspace.find(e=>e.id===ex);e&&("sqlite"===e.type?eO("SELECT name, type FROM sqlite_master WHERE type='table';"):"mssql"===e.type?eO("SELECT * FROM sys.tables;"):eO("SELECT * FROM information_schema.tables LIMIT 10;"))},[ex,eb,eh.global.length,eh.workspace.length]);let e5=async(t,r)=>{try{(await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"set_active",profileId:t,isGlobal:r,root:e})})).ok&&(ey(t),ej(r))}catch(e){console.error("Failed to set active profile:",e)}},e2=async()=>{eX(null);try{let t=await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"test",profile:eJ,root:e})}),r=await t.json();r.success?eX({success:!0,message:"Connection test successful!"}):eX({success:!1,message:r.error||"Connection test failed."})}catch(e){eX({success:!1,message:e.message||"Failed to make test query."})}},e8=async t=>{if(t.preventDefault(),!eJ.name||!eJ.type)return;eY(!0);let r=eJ.id||`profile_${Math.random().toString(36).substring(7)}`,s={...eJ,id:r,name:eJ.name,type:eJ.type};try{(await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"save",profile:s,isGlobal:eH,root:e})})).ok&&(await eZ(),eU(!1),ex||e5(r,eH))}catch(e){console.error("Failed to save profile:",e)}finally{eY(!1)}},e6=async(t,r)=>{if(confirm("Are you sure you want to delete this connection profile?"))try{(await fetch("/api/sql/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",profileId:t,isGlobal:r,root:e})})).ok&&(await eZ(),ex===t&&ey(null))}catch(e){console.error("Failed to delete connection profile:",e)}},e7=async(t,r,s,a)=>{if(e3?.readOnly)return void alert("Database connection is Read-Only. Updates are disabled.");let n=(e=>{let t=e.match(/from\s+([a-zA-Z0-9_\`"\[\]\.]+)/i);if(!t)return null;let r=t[1].trim(),s=(r=r.replace(/[\`"\[\]]/g,"")).split(".");return s[s.length-1]})(eW);if(!n)return void alert("Could not extract table name from query for inline edit. Please ensure your query includes 'FROM tableName'.");eF({rowIndex:t,field:r,status:"saving"});try{let a=eN[n];if(!a){let t=await fetch(`/api/sql/schema?action=describe_table&table=${encodeURIComponent(n)}&root=${encodeURIComponent(e)}`);if(t.ok){let e=await t.json();e.success&&e.columns&&(a=e.columns,eR(t=>({...t,[n]:e.columns})))}}if(!a)throw Error(`Could not load schema columns for table "${n}".`);let l=a.find(e=>e.isPrimaryKey);if(!l)throw Error(`Table "${n}" does not have a primary key. Inline editing requires a primary key.`);let o=ez?.rows[t];if(!o||!(l.name in o))throw Error(`Primary key column "${l.name}" was not returned in the query results. Please include it in your SELECT statement.`);let i=o[l.name],d=a.find(e=>e.name===r);if(!d)throw Error(`Column "${r}" was not found in schema columns.`);let c=e=>{let t=e.toLowerCase();return t.includes("int")||t.includes("decimal")||t.includes("numeric")||t.includes("float")||t.includes("double")||t.includes("real")},u="";if("NULL"===s.toUpperCase())u=`${r} = NULL`;else if(c(d.type)){if(""===s||isNaN(Number(s)))throw Error(`Value "${s}" is not a valid number for column "${r}".`);u=`${r} = ${s}`}else u=`${r} = '${s.replace(/'/g,"''")}'`;let p="";p=c(l.type)?`${l.name} = ${i}`:`${l.name} = '${String(i).replace(/'/g,"''")}'`;let m=`UPDATE ${n} SET ${u} WHERE ${p};`,f=await fetch("/api/sql/query",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sql:m,root:e})}),h=await f.json();if(f.ok&&h.success){if(ez){let e=[...ez.rows],a=s;"NULL"===s.toUpperCase()?a=null:c(d.type)&&(a=Number(s)),e[t]={...e[t],[r]:a},eq({...ez,rows:e})}eF({rowIndex:t,field:r,status:"success"}),setTimeout(()=>eF(null),1500)}else throw Error(h.error||"Update database query failed.")}catch(e){eF({rowIndex:t,field:r,status:"error",message:e.message}),alert(`Inline Update Failed:
|
|
11
|
-
${e.message}`)}},e4=async()=>{if(eW.trim()&&ex){eI(!0),eD(null),eq(null);try{let t=await fetch("/api/sql/query",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sql:eW.trim(),root:e})}),r=await t.json();t.ok&&r.success?(eq({rows:r.rows||[],fields:r.fields||[],durationMs:r.durationMs||0,affectedRows:r.affectedRows}),(eW.toLowerCase().includes("create table")||eW.toLowerCase().includes("drop table")||eW.toLowerCase().includes("alter table"))&&e0()):eD(r.error||"Failed to execute query.")}catch(e){eD(e.message||"An unexpected error occurred during execution.")}finally{eI(!1)}}},e3=eb?eh.global.find(e=>e.id===ex):eh.workspace.find(e=>e.id===ex);return(0,t.jsxs)("div",{style:a,children:[(0,t.jsx)("div",{style:{...n,width:ev?"220px":"0px",borderRight:ev?"1px solid var(--border)":"none",overflow:"hidden",transition:"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)"},children:ev&&(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minWidth:"220px",minHeight:0},children:[(0,t.jsxs)("div",{style:l,children:[(0,t.jsxs)("div",{style:o,children:[(0,t.jsx)("span",{style:i,children:"Connections"}),(0,t.jsx)("button",{style:d,onClick:()=>{eX(null),eQ({id:"",name:"",type:"sqlite",filepath:"./dev.db",host:"localhost",port:5432,database:"postgres",username:"postgres",password:"",ssl:!1,readOnly:!0}),eG(!1),eU(!0)},title:"Add Database Connection Profile",children:"➕ Add"})]}),(0,t.jsxs)("div",{style:c,children:[0===eh.global.length&&0===eh.workspace.length&&(0,t.jsx)("div",{style:b,children:"No connections configured. Add one to start."}),eh.workspace.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:u,children:"WORKSPACE CONNECTIONS"}),eh.workspace.map(e=>(0,t.jsxs)("div",{style:{...p,...ex===e.id&&!eb?m:{}},onClick:()=>e5(e.id,!1),children:[(0,t.jsxs)("div",{style:f,children:[(0,t.jsxs)("span",{style:h,children:["📁 ",e.name]}),(0,t.jsx)("span",{style:g,children:e.type})]}),(0,t.jsx)("button",{style:x,onClick:t=>{t.stopPropagation(),e6(e.id,!1)},children:"✖"})]},e.id))]}),eh.global.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:u,children:"GLOBAL CONNECTIONS"}),eh.global.map(e=>(0,t.jsxs)("div",{style:{...p,...ex===e.id&&eb?m:{}},onClick:()=>e5(e.id,!0),children:[(0,t.jsxs)("div",{style:f,children:[(0,t.jsxs)("span",{style:h,children:["🌐 ",e.name]}),(0,t.jsx)("span",{style:g,children:e.type})]}),(0,t.jsx)("button",{style:x,onClick:t=>{t.stopPropagation(),e6(e.id,!0)},children:"✖"})]},e.id))]})]})]}),(0,t.jsxs)("div",{style:{...l,flex:1,borderTop:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{style:o,children:[(0,t.jsx)("span",{style:i,children:"Schema Tables"}),eE&&(0,t.jsx)("span",{style:es})]}),(0,t.jsxs)("div",{style:y,children:[!ex&&(0,t.jsx)("div",{style:b,children:"Select an active connection to view tables."}),ex&&0===ew.length&&!eE&&(0,t.jsx)("div",{style:b,children:"No tables found in database schema."}),ew.map(e=>(0,t.jsxs)("div",{style:j,children:[(0,t.jsxs)("div",{style:v,onClick:()=>e1(e.name),children:[(0,t.jsx)("span",{style:_,children:"view"===e.type?"👁️":"📊"}),(0,t.jsx)("span",{style:w,children:e.name}),(0,t.jsx)("span",{style:S,children:ek===e.name?"▼":"▶"})]}),ek===e.name&&eN[e.name]&&(0,t.jsx)("div",{style:k,children:eN[e.name].map(e=>(0,t.jsxs)("div",{style:C,children:[(0,t.jsx)("span",{style:N,children:e.isPrimaryKey?"🔑":e.isForeignKey?"🔗":"▫"}),(0,t.jsx)("span",{style:R,title:e.type,children:e.name}),(0,t.jsx)("span",{style:E,children:e.type.toLowerCase().substring(0,12)})]},e.name))})]},e.name))]})]})]})}),(0,t.jsxs)("div",{style:L,children:[(0,t.jsxs)("div",{style:W,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[(0,t.jsx)("button",{type:"button",onClick:()=>e_(!ev),style:{background:"rgba(255, 255, 255, 0.05)",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--muted)",cursor:"pointer",padding:"0.25rem 0.5rem",fontSize:"0.75rem",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.15s ease"},title:ev?"Collapse Connections List":"Expand Connections List",children:ev?"◀ Collapse":"📂 Schema Connections"}),(0,t.jsx)("span",{style:O,children:"Active Connection:"}),e3?(0,t.jsxs)("span",{style:T,children:[eb?"🌐":"📁"," ",e3.name," (",e3.type,")",e3.readOnly&&(0,t.jsx)("span",{style:I,children:"Read-Only"})]}):(0,t.jsx)("span",{style:{...T,color:"var(--danger)"},children:"No Connection Selected"})]}),(0,t.jsx)("button",{style:{...P,opacity:!ex||eT?.6:1,cursor:!ex||eT?"not-allowed":"pointer"},onClick:e4,disabled:!ex||eT,children:eT?"⌛ Running...":"⚡ Execute Query (F5)"})]}),(0,t.jsx)("div",{style:D,children:(0,t.jsx)("textarea",{style:z,value:eW,onChange:e=>eO(e.target.value),placeholder:"Write your SQL query script here...",onKeyDown:e=>{("F5"===e.key||e.ctrlKey&&"Enter"===e.key)&&(e.preventDefault(),e4())}})}),(0,t.jsxs)("div",{style:q,children:[eP&&(0,t.jsxs)("div",{style:A,children:[(0,t.jsx)("h4",{style:{margin:"0 0 0.5rem 0",color:"var(--danger)"},children:"⚠️ Execution Error"}),(0,t.jsx)("pre",{style:B,children:eP}),eP.includes("not installed")&&(0,t.jsxs)("div",{style:$,children:[(0,t.jsx)("p",{style:{margin:"0 0 0.5rem 0"},children:"To resolve this, run this installer command in your workspace terminal:"}),(0,t.jsx)("code",{style:F,children:e3?.type==="sqlite"?"npm install better-sqlite3":e3?.type==="postgres"?"npm install pg":e3?.type==="mysql"?"npm install mysql2":"npm install mssql"})]})]}),ez&&(0,t.jsxs)("div",{style:M,children:[(0,t.jsxs)("div",{style:U,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,t.jsxs)("span",{children:["Query completed."," ",void 0!==ez.affectedRows?`Affected rows: ${ez.affectedRows}`:`Returned ${ez.rows.length} rows`]}),(0,t.jsxs)("span",{children:["Duration: ",ez.durationMs,"ms"]})]}),ez.rows.length>0&&(0,t.jsxs)("div",{style:{display:"flex",gap:"0.4rem"},children:[(0,t.jsx)("button",{onClick:()=>{if(ez&&0!==ez.rows.length)try{let e=ez.fields.join(","),t=ez.rows.map(e=>ez.fields.map(t=>{let r=e[t];if(null===r)return"NULL";let s=String(r);return s.includes(",")||s.includes('"')||s.includes("\n")||s.includes("\r")?`"${s.replace(/"/g,'""')}"`:s}).join(",")),r=[e,...t].join("\r\n"),s=new Blob([r],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(s),n=document.createElement("a");n.setAttribute("href",a),n.setAttribute("download",`query-results-${Date.now()}.csv`),document.body.appendChild(n),n.click(),document.body.removeChild(n)}catch(e){console.error("Export CSV failed:",e),alert("Failed to export as CSV")}},style:K,children:"📥 Export CSV"}),(0,t.jsx)("button",{onClick:()=>{if(ez&&0!==ez.rows.length)try{let e=JSON.stringify(ez.rows,null,2),t=new Blob([e],{type:"application/json;charset=utf-8;"}),r=URL.createObjectURL(t),s=document.createElement("a");s.setAttribute("href",r),s.setAttribute("download",`query-results-${Date.now()}.json`),document.body.appendChild(s),s.click(),document.body.removeChild(s)}catch(e){console.error("Export JSON failed:",e),alert("Failed to export as JSON")}},style:K,children:"📥 Export JSON"})]})]}),ez.rows.length>0?(0,t.jsx)("div",{style:H,children:(0,t.jsxs)("table",{style:G,children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{children:ez.fields.map(e=>(0,t.jsx)("th",{style:J,children:e},e))})}),(0,t.jsx)("tbody",{children:ez.rows.map((e,r)=>(0,t.jsx)("tr",{style:r%2==0?X:Z,children:ez.fields.map(s=>{let a=eA&&eA.rowIndex===r&&eA.field===s,n=e$&&e$.rowIndex===r&&e$.field===s&&"saving"===e$.status,l=e$&&e$.rowIndex===r&&e$.field===s&&"success"===e$.status,o=e$&&e$.rowIndex===r&&e$.field===s&&"error"===e$.status,i={...Q,...V};return n?i={...i,backgroundColor:"rgba(168, 85, 247, 0.15)"}:l?i={...i,backgroundColor:"rgba(16, 185, 129, 0.25)"}:o&&(i={...i,backgroundColor:"rgba(239, 68, 68, 0.25)"}),(0,t.jsx)("td",{style:i,onDoubleClick:()=>{e3?.readOnly?alert("Database connection is Read-Only. Editing is disabled."):eB({rowIndex:r,field:s,value:null===e[s]?"NULL":String(e[s])})},className:"db-cell",title:"Double click to edit cell",children:a?(0,t.jsx)("input",{style:Y,value:eA.value,autoFocus:!0,onChange:e=>eB({...eA,value:e.target.value}),onKeyDown:async t=>{if("Enter"===t.key){t.preventDefault();let a=eA.value;eB(null),a!==(null===e[s]?"NULL":String(e[s]))&&await e7(r,s,a,e[s])}else"Escape"===t.key&&eB(null)},onBlur:async()=>{let t=eA.value;eB(null),t!==(null===e[s]?"NULL":String(e[s]))&&await e7(r,s,t,e[s])}}):null===e[s]?"NULL":"object"==typeof e[s]?JSON.stringify(e[s]):String(e[s])},s)})},r))})]})}):void 0===ez.affectedRows&&(0,t.jsx)("div",{style:ee,children:"Query executed successfully, but returned 0 results."})]}),!eP&&!ez&&!eT&&(0,t.jsx)("div",{style:ee,children:"Write a query script and click Execute to view table records."}),eT&&(0,t.jsxs)("div",{style:et,children:[(0,t.jsx)("span",{style:er}),(0,t.jsx)("span",{style:{color:"var(--muted)"},children:"Running database statement..."})]})]})]}),eM&&"u">typeof document&&(0,s.createPortal)((0,t.jsx)("div",{style:ea,children:(0,t.jsxs)("div",{style:en,children:[(0,t.jsxs)("h3",{style:{margin:"0 0 1rem 0",display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"🔌 Add Database Profile"}),(0,t.jsx)("span",{style:{cursor:"pointer"},onClick:()=>eU(!1),children:"✖"})]}),(0,t.jsxs)("form",{onSubmit:e8,children:[(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Profile Name"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.name,onChange:e=>eQ(t=>({...t,name:e.target.value})),placeholder:"e.g. Local Postgres, Dev SQLite"})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Scope Level"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"radio",checked:!eH,onChange:()=>eG(!1)}),"Workspace Local"]}),(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"radio",checked:eH,onChange:()=>eG(!0)}),"Global User Profile"]})]})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database Type"}),(0,t.jsxs)("select",{style:ed,value:eJ.type,onChange:e=>{let t=e.target.value,r=5432;"mysql"===t&&(r=3306),"mssql"===t&&(r=1433),eQ(e=>({...e,type:t,filepath:"sqlite"===t?"./dev.db":void 0,port:"sqlite"!==t?r:void 0,database:"sqlite"===t?void 0:"mssql"===t?"master":"postgres"===t?"postgres":"",username:"sqlite"===t?void 0:"mssql"===t?"sa":"postgres"===t?"postgres":"root"}))},children:[(0,t.jsx)("option",{value:"sqlite",children:"SQLite (Local File)"}),(0,t.jsx)("option",{value:"postgres",children:"PostgreSQL"}),(0,t.jsx)("option",{value:"mysql",children:"MySQL"}),(0,t.jsx)("option",{value:"mssql",children:"Microsoft SQL Server"})]})]}),"sqlite"===eJ.type?(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database File Path"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.filepath||"",onChange:e=>eQ(t=>({...t,filepath:e.target.value})),placeholder:"Relative (e.g. ./data/dev.db) or Absolute path"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{...el,flex:3},children:[(0,t.jsx)("label",{style:eo,children:"Host IP Address"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.host||"",onChange:e=>eQ(t=>({...t,host:e.target.value})),placeholder:"localhost or IP"})]}),(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Port"}),(0,t.jsx)("input",{style:ei,type:"number",required:!0,value:eJ.port||0,onChange:e=>eQ(t=>({...t,port:parseInt(e.target.value)}))})]})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database Name"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.database||"",onChange:e=>eQ(t=>({...t,database:e.target.value}))})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Username"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.username||"",onChange:e=>eQ(t=>({...t,username:e.target.value}))})]}),(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Password"}),(0,t.jsx)("input",{style:ei,type:"password",value:eJ.password||"",onChange:e=>eQ(t=>({...t,password:e.target.value}))})]})]}),("postgres"===eJ.type||"mssql"===eJ.type)&&(0,t.jsx)("div",{style:el,children:(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"checkbox",checked:!!eJ.ssl,onChange:e=>eQ(t=>({...t,ssl:e.target.checked}))}),"Require SSL Secure Connection"]})})]}),(0,t.jsx)("div",{style:el,children:(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"checkbox",checked:!!eJ.readOnly,onChange:e=>eQ(t=>({...t,readOnly:e.target.checked}))}),"Enforce Read-Only Connection (Disable mutations)"]})}),eV&&(0,t.jsx)("div",{style:{...ec,backgroundColor:eV.success?"rgba(16, 185, 129, 0.12)":"rgba(239, 68, 68, 0.12)",border:eV.success?"1px solid var(--success)":"1px solid var(--danger)",color:eV.success?"var(--success)":"var(--danger)"},children:eV.message}),(0,t.jsxs)("div",{style:eu,children:[(0,t.jsx)("button",{type:"button",style:ep,onClick:e2,children:"🔍 Test Connection"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{type:"button",style:em,onClick:()=>eU(!1),children:"Cancel"}),(0,t.jsx)("button",{type:"submit",style:ef,disabled:eK,children:eK?"Saving...":"Save Profile"})]})]})]})]})}),document.body)]})}])},20897,e=>{e.v({activeBorder:"page-module___8aEwW__activeBorder",agentBadge:"page-module___8aEwW__agentBadge",agentCard:"page-module___8aEwW__agentCard",agentGrid:"page-module___8aEwW__agentGrid",agentHeader:"page-module___8aEwW__agentHeader",agentName:"page-module___8aEwW__agentName",agentStateBadge:"page-module___8aEwW__agentStateBadge",ansiCyan:"page-module___8aEwW__ansiCyan",ansiGreen:"page-module___8aEwW__ansiGreen",ansiMagenta:"page-module___8aEwW__ansiMagenta",ansiRed:"page-module___8aEwW__ansiRed",ansiYellow:"page-module___8aEwW__ansiYellow",cardBody:"page-module___8aEwW__cardBody",container:"page-module___8aEwW__container",containerActive:"page-module___8aEwW__containerActive",contextDetails:"page-module___8aEwW__contextDetails",contextItem:"page-module___8aEwW__contextItem",contextList:"page-module___8aEwW__contextList",contextMeta:"page-module___8aEwW__contextMeta",contextTitle:"page-module___8aEwW__contextTitle",dashboardGrid:"page-module___8aEwW__dashboardGrid",envGrid:"page-module___8aEwW__envGrid",envName:"page-module___8aEwW__envName",envRow:"page-module___8aEwW__envRow",envStatus:"page-module___8aEwW__envStatus",footer:"page-module___8aEwW__footer",header:"page-module___8aEwW__header",logoArea:"page-module___8aEwW__logoArea",mainPanel:"page-module___8aEwW__mainPanel",pulse:"page-module___8aEwW__pulse","pulse-attention":"page-module___8aEwW__pulse-attention","pulse-thinking":"page-module___8aEwW__pulse-thinking",pulseDot:"page-module___8aEwW__pulseDot",quickLaunchBtn:"page-module___8aEwW__quickLaunchBtn",sectionTitle:"page-module___8aEwW__sectionTitle",sidePanel:"page-module___8aEwW__sidePanel","state-complete":"page-module___8aEwW__state-complete","state-idle":"page-module___8aEwW__state-idle","state-needs-input":"page-module___8aEwW__state-needs-input","state-thinking":"page-module___8aEwW__state-thinking",statusIndicator:"page-module___8aEwW__statusIndicator",stoppedBadge:"page-module___8aEwW__stoppedBadge",subtitle:"page-module___8aEwW__subtitle",terminalContainer:"page-module___8aEwW__terminalContainer",terminalInput:"page-module___8aEwW__terminalInput",terminalInputArea:"page-module___8aEwW__terminalInputArea",terminalLine:"page-module___8aEwW__terminalLine",terminalSendBtn:"page-module___8aEwW__terminalSendBtn",title:"page-module___8aEwW__title"})},52683,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(70703),a=e.i(20897),n=e.i(66381);let l=e=>"mock"===e?"🧪":e.includes("-docker")?"🐳":e.includes("-ssh")?"🌐":"💻",o=(0,s.default)(()=>e.A(45344),{loadableGenerated:{modules:[37314]},ssr:!1,loading:()=>(0,t.jsx)("div",{style:{height:"400px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#05070a",color:"var(--muted)",border:"1px solid var(--border)",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"},children:(0,t.jsx)("span",{children:"Initializing terminal emulator..."})})}),i=(0,s.default)(()=>e.A(39429),{loadableGenerated:{modules:[1985]},ssr:!1,loading:()=>(0,t.jsx)("div",{style:{height:"280px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--card)",border:"1px solid var(--border)",borderRadius:"12px",marginTop:"1.5rem"},children:(0,t.jsx)("span",{style:{color:"var(--muted)"},children:"Initializing prompt editor..."})})}),d=(0,s.default)(()=>e.A(56915),{loadableGenerated:{modules:[99026]},ssr:!1}),c=(0,s.default)(()=>e.A(78716),{loadableGenerated:{modules:[9949]},ssr:!1}),u=(0,s.default)(()=>e.A(33789),{loadableGenerated:{modules:[20032]},ssr:!1}),p=(0,s.default)(()=>e.A(78003),{loadableGenerated:{modules:[97722]},ssr:!1}),m=(0,s.default)(()=>e.A(66701),{loadableGenerated:{modules:[46877]},ssr:!1});e.s(["default",0,function(){let[e,s]=(0,r.useState)([]),[f,h]=(0,r.useState)(null),[g,x]=(0,r.useState)(!1),[y,b]=(0,r.useState)(!1),[j,v]=(0,r.useState)(!1),[_,w]=(0,r.useState)(!1),[S,k]=(0,r.useState)(!1),[C,N]=(0,r.useState)(!1),[R,E]=(0,r.useState)(!1),[L,W]=(0,r.useState)(""),[O,T]=(0,r.useState)(9601),[I,P]=(0,r.useState)("0.2.19"),[D,z]=(0,r.useState)(null),[q,A]=(0,r.useState)([]),B=e.filter(e=>"workspace-terminal"!==e.id),$=e.find(e=>e.id===f),F=B.some(e=>("claude-docker"===e.type||"aider-docker"===e.type)&&"running"===e.status),M=B.some(e=>"claude-ssh"===e.type&&"running"===e.status),U=async()=>{try{let e=await fetch("/api/sessions"),t=await e.json();t.sessions&&s(t.sessions),t.wsPort&&T(t.wsPort),t.originalCwd&&W(t.originalCwd),t.version&&P(t.version)}catch(e){console.error("Failed to fetch sessions:",e)}},H=async()=>{try{let e=await fetch("/api/recents");if(e.ok){let t=await e.json();t.success&&t.recents&&t.recents.lastSession&&z(t.recents.lastSession)}}catch(e){console.error("Failed to fetch recents:",e)}},G=async()=>{try{let e=await fetch("/api/configs");if(e.ok){let t=await e.json();t.configs&&A(t.configs)}}catch(e){console.error("Failed to fetch configs:",e)}};(0,r.useEffect)(()=>{(async()=>{await U(),await H(),await G()})(),"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(U,4e3);return()=>clearInterval(e)},[]);let J=async(e,t,r,s)=>{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:r,scopedDirs:s};if(("aider"===e||"aider-docker"===e)&&!r)try{let e=await fetch("/api/context/aider");if(e.ok){let t=await e.json();t.success&&t.config&&(n.workspaceRoot=t.config.workspaceRoot,n.scopedDirs=t.config.scopedDirs)}}catch(e){console.error("Failed to load aider configuration before launch:",e)}let l=await fetch("/api/sessions/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),o=await l.json();o.success&&(await U(),await G(),h(o.session.id),z({type:e,name:a,workspaceRoot:r,scopedDirs:s}))}catch(e){console.error("Failed to launch session:",e)}finally{x(!1)}},Q=async e=>{x(!0);try{let t=await fetch("/api/sessions/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:e.type,name:e.name,workspaceRoot:e.workspaceRoot,scopedDirs:e.scopedDirs})}),r=await t.json();r.success?(await U(),h(r.session.id)):alert(r.error||"Failed to launch configuration.")}catch(e){console.error(e),alert("Network error: failed to launch configuration.")}finally{x(!1)}},K=async e=>{if(window.confirm("Are you sure you want to delete this configuration template?"))try{(await fetch("/api/configs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",id:e})})).ok?await G():alert("Failed to delete configuration template.")}catch(e){console.error(e),alert("Network error: failed to delete configuration template.")}},Y=async(e,t=!1)=>{try{let r=await fetch("/api/sessions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,delete:t})});(await r.json()).success&&(t&&f===e&&h(null),await U())}catch(e){console.error("Failed to stop session:",e)}};return(0,t.jsxs)("div",{className:`${a.default.container} ${$?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",{style:{display:"flex",alignItems:"center",gap:"1rem"},children:[(0,t.jsxs)("div",{className:a.default.statusIndicator,children:[(0,t.jsx)("span",{className:a.default.pulseDot}),(0,t.jsx)("span",{children:"Orchestrator Online"})]}),(0,t.jsx)("button",{onClick:()=>b(!0),title:"Settings","aria-label":"Settings",style:{background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--muted)",cursor:"pointer",fontSize:"1.1rem",lineHeight:1,padding:"6px 10px"},children:"⚙️"})]})]}),y&&(0,t.jsx)(m,{onClose:()=>b(!1)}),$?(0,t.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:(0,t.jsx)(p,{sessionId:$.id,workspaceRoot:$.workspaceRoot||"",scopedDirs:$.scopedDirs||[],onClose:()=>h(null),sessions:e,onSwitchSession:e=>h(e),onRefreshSessions:U,wsPort:O})}):(0,t.jsxs)("div",{className:a.default.dashboardGrid,children:[(0,t.jsxs)("div",{className:a.default.mainPanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Built-in Database Explorer & SQL Client"}),(0,t.jsx)("div",{className:"card",style:{padding:0,overflow:"hidden",height:"450px",border:"1px solid var(--border)"},children:(0,t.jsx)(n.default,{workspaceRoot:L||""})})]}),(0,t.jsxs)("section",{style:{marginTop:"1.5rem"},children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Shared Context Hub & Slash Commands"}),(0,t.jsxs)("div",{className:a.default.contextList,children:[(0,t.jsxs)("div",{className:`${a.default.contextItem} card`,children:[(0,t.jsxs)("div",{className:a.default.contextMeta,children:[(0,t.jsx)("span",{className:a.default.contextTitle,children:"Staged Context & System Rules (/ccc)"}),(0,t.jsx)("span",{className:a.default.contextDetails,children:"Compiles AGENTS.md guidelines and files map."})]}),(0,t.jsx)("button",{onClick:async()=>{f&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f,command:"/ccc"})})},disabled:!f,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.75rem",fontWeight:600,opacity:f?1:.5,cursor:f?"pointer":"not-allowed"},children:"🚀 Mount (/ccc)"})]}),(0,t.jsxs)("div",{className:`${a.default.contextItem} card`,children:[(0,t.jsxs)("div",{className:a.default.contextMeta,children:[(0,t.jsx)("span",{className:a.default.contextTitle,children:"Staged Developer Prompt (/ccp)"}),(0,t.jsx)("span",{className:a.default.contextDetails,children:"Executes prompt in .ai/neural-loom/cprompt.md."})]}),(0,t.jsx)("button",{onClick:async()=>{f&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f,command:"/ccp"})})},disabled:!f,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--success)",backgroundColor:"transparent",color:"var(--success)",fontSize:"0.75rem",fontWeight:600,opacity:f?1:.5,cursor:f?"pointer":"not-allowed"},children:"⚡ Run (/ccp)"})]})]}),(0,t.jsx)(i,{})]})]}),(0,t.jsxs)("div",{className:a.default.mainPanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Active AI Agents"}),0===B.length?(0,t.jsxs)("div",{className:"card",style:{padding:"3rem 1.5rem",textAlign:"center"},children:[(0,t.jsx)("p",{style:{color:"var(--muted)",marginBottom:"1.5rem"},children:"No active agent sessions. Launch a Claude or Aider agent session to begin."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.75rem",flexDirection:"column"},children:[D&&(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{J(D.type,D.name,D.workspaceRoot,D.scopedDirs)},disabled:g,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none"},title:`Re-launch: ${D.name||D.type}`,children:"⚡ Re-launch Last Session"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{E(!1),N(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none",flex:1},children:"Launch Claude"}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{k(!1),w(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",flex:1},children:"Launch Aider"})]})]}),(0,t.jsxs)("div",{style:{marginTop:"1.5rem",fontSize:"0.75rem",color:"var(--muted)"},children:["Need a simulator?"," ",(0,t.jsx)("span",{onClick:()=>J("mock"),style:{color:"var(--primary)",cursor:"pointer",textDecoration:"underline"},children:"Start mock playground"})]})]}):(0,t.jsx)("div",{className:a.default.agentGrid,children:B.map(e=>(0,t.jsxs)("div",{className:`${a.default.agentCard} card ${f===e.id?a.default.activeBorder:""}`,children:[(0,t.jsxs)("div",{className:a.default.agentHeader,children:[(0,t.jsx)("span",{className:a.default.agentName,children:e.name}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.35rem",alignItems:"center"},children:["running"===e.status&&e.agentState&&(0,t.jsxs)("span",{className:`${a.default.agentStateBadge} ${a.default["state-"+e.agentState]}`,children:["thinking"===e.agentState&&`${l(e.type)} 💭`,"needs-input"===e.agentState&&`${l(e.type)} ⚠️`,"complete"===e.agentState&&`${l(e.type)} ✅`,"idle"===e.agentState&&`${l(e.type)} 💤`]}),(0,t.jsx)("span",{className:`${a.default.agentBadge} ${"stopped"===e.status?a.default.stoppedBadge:""}`,children:e.status})]})]}),(0,t.jsxs)("div",{className:a.default.cardBody,style:{padding:"1rem"},children:[(0,t.jsxs)("p",{style:{fontSize:"0.8rem",color:"var(--muted)",margin:0},children:["ID: ",(0,t.jsx)("code",{style:{fontSize:"0.72rem"},children:e.id.substring(0,8)})," | Type: ",e.type,(0,t.jsx)("br",{}),"Logs: ",e.logsCount," lines"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.75rem"},children:["running"===e.status?(0,t.jsx)("button",{onClick:()=>Y(e.id,!1),style:{flex:1,padding:"0.35rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"transparent",fontSize:"0.75rem",color:"var(--danger)",cursor:"pointer"},children:"Stop"}):(0,t.jsx)("button",{onClick:()=>Y(e.id,!0),style:{flex:1,padding:"0.35rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",fontSize:"0.75rem",color:"var(--muted)",cursor:"pointer"},children:"Delete"}),(0,t.jsx)("button",{onClick:()=>h(e.id),style:{flex:2,padding:"0.35rem",borderRadius:"6px",border:"none",backgroundColor:f===e.id?"var(--border-focus)":"var(--primary)",fontSize:"0.75rem",fontWeight:600,color:"#fff",cursor:"pointer"},children:f===e.id?"Connected":"Open Console"})]})]})]},e.id))})]}),f&&"workspace-terminal"!==f&&(0,t.jsxs)("section",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border-focus)",marginTop:"1rem"},children:[(0,t.jsxs)("div",{className:a.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(109, 40, 217, 0.08)",padding:"0.5rem 1rem"},children:[(0,t.jsxs)("span",{style:{fontWeight:600,fontSize:"0.85rem",display:"flex",alignItems:"center",gap:"0.5rem"},children:["🖥️ Console — ",e.find(e=>e.id===f)?.name]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center"},children:[e.find(e=>e.id===f)?.status==="stopped"&&(0,t.jsx)("button",{onClick:async()=>{try{let t=e.find(e=>e.id===f),r=t&&("claude"===t.type||"claude-docker"===t.type||"claude-ssh"===t.type),s=!1;r&&(s=window.confirm("Would you like to resume your previous Claude session?"));let a=await fetch("/api/sessions/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f,resume:s})});if(a.ok)await U();else{let e=await a.json();alert(e.error||"Failed to restart session.")}}catch(e){console.error("Failed to restart session:",e)}},style:{padding:"0.15rem 0.4rem",borderRadius:"4px",border:"1px solid #eab308",backgroundColor:"rgba(234, 179, 8, 0.15)",color:"#eab308",fontSize:"0.65rem",fontWeight:600,cursor:"pointer"},children:"⚡ Restart"}),(0,t.jsx)("button",{onClick:()=>h(null),style:{border:"none",background:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.75rem"},children:"✖"})]})]}),(0,t.jsx)(o,{sessionId:f,wsPort:O})]})]}),(0,t.jsxs)("div",{className:a.default.sidePanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Execution Environments"}),(0,t.jsxs)("div",{className:a.default.envGrid,children:[(0,t.jsxs)("div",{className:a.default.envRow,style:{padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:a.default.envName,children:"💻 Local Host"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:"var(--success)"},children:"Active"})]}),(0,t.jsxs)("div",{className:a.default.envRow,style:{opacity:F?1:.6,padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:a.default.envName,children:"🐳 Docker Sandbox"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:F?"var(--success)":"var(--muted)"},children:F?"Active":"Not Mounted"})]}),(0,t.jsxs)("div",{className:a.default.envRow,style:{opacity:M?1:.6,padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:a.default.envName,children:"🌐 Remote VM (SSH)"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:M?"var(--success)":"var(--muted)"},children:M?"Active":"Offline"})]})]})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Saved Configurations"}),(0,t.jsx)("div",{className:"card",style:{padding:"1rem",display:"flex",flexDirection:"column",gap:"0.75rem"},children:0===q.length?(0,t.jsx)("p",{style:{color:"var(--muted)",fontSize:"0.8rem",textAlign:"center",margin:"1rem 0"},children:"No configuration templates saved yet. Save a template from the Claude/Aider launch wizards."}):(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem",maxHeight:"200px",overflowY:"auto"},children:q.map(e=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(255, 255, 255, 0.02)",padding:"0.5rem",borderRadius:"6px",border:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.15rem",minWidth:0},children:[(0,t.jsx)("span",{style:{fontSize:"0.8rem",fontWeight:600,color:"var(--foreground)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.name}),(0,t.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)",textTransform:"uppercase"},children:e.type})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.25rem"},children:[(0,t.jsx)("button",{onClick:()=>Q(e),disabled:g,style:{padding:"0.2rem 0.4rem",borderRadius:"4px",backgroundColor:"var(--primary)",color:"#fff",border:"none",fontSize:"0.7rem",cursor:"pointer"},children:"Launch"}),(0,t.jsx)("button",{onClick:()=>K(e.id),style:{padding:"0.2rem 0.4rem",borderRadius:"4px",backgroundColor:"transparent",color:"var(--danger)",border:"1px solid var(--danger)",fontSize:"0.7rem",cursor:"pointer"},children:"Delete"})]})]},e.id))})})]}),(0,t.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{E(!1),N(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🤖 Claude Local"}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{E(!0),N(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(170, 72%, 40%) 0%, hsl(195, 100%, 40%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐳 Claude Docker"})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{k(!1),w(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐍 Aider Local"}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{k(!0),w(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(195, 100%, 40%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐳 Aider Docker"})]}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>v(!0),disabled:g,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem"},children:"🌐 Connect Remote SSH"})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Workspace Terminal"}),(0,t.jsxs)("div",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border)",padding:0},children:[(0,t.jsx)("div",{className:a.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(255, 255, 255, 0.02)",padding:"0.4rem 0.75rem"},children:(0,t.jsxs)("span",{style:{fontWeight:600,fontSize:"0.75rem"},children:["💻 Local Shell (CWD: ",L.split(/[/\\]/).pop()||"root",")"]})}),(0,t.jsx)(o,{sessionId:"workspace-terminal",height:"180px",wsPort:O})]})]}),(0,t.jsxs)("section",{className:"card",style:{padding:"1rem",display:"flex",flexDirection:"column",gap:"0.5rem"},children:[(0,t.jsx)("h3",{style:{fontSize:"0.9rem",fontWeight:700,margin:0},children:"Quick Actions"}),(0,t.jsxs)("ul",{style:{listStyle:"none",fontSize:"0.75rem",display:"flex",flexDirection:"column",gap:"0.35rem",color:"var(--muted)",padding:0,margin:0},children:[(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Configure API Keys"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Edit rules templates"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Inspect process locks"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]})]})]})]})]}),(0,t.jsxs)("footer",{className:a.default.footer,children:[(0,t.jsxs)("span",{children:["NeuralLoom v",I," — Experimental AI Orchestrator Bridge"]}),(0,t.jsxs)("span",{children:["Directory: ",L||"Loading..."]})]}),j&&(0,t.jsx)(d,{onClose:()=>v(!1),onConfirmLaunch:()=>{v(!1),J("claude-ssh")}}),_&&(0,t.jsx)(c,{onClose:()=>w(!1),isDocker:S,onConfirmLaunch:(e,t,r)=>{w(!1),J(S?"aider-docker":"aider",e,t,r)}}),C&&(0,t.jsx)(u,{onClose:()=>N(!1),isDocker:R,onConfirmLaunch:(e,t,r)=>{N(!1),J(R?"claude-docker":"claude",e,t,r)}})]})}])},45344,e=>{e.v(t=>Promise.all(["static/chunks/0zt~pql40pxuw.js","static/chunks/0533wcfvivshl.js","static/chunks/0ga14ztvrhau2.css"].map(t=>e.l(t))).then(()=>t(37314)))},39429,e=>{e.v(t=>Promise.all(["static/chunks/16w4~t4h7gk13.js"].map(t=>e.l(t))).then(()=>t(1985)))},56915,e=>{e.v(t=>Promise.all(["static/chunks/0lnobx4eh3~-_.js"].map(t=>e.l(t))).then(()=>t(99026)))},78716,e=>{e.v(t=>Promise.all(["static/chunks/0xhaghhxllgzs.js"].map(t=>e.l(t))).then(()=>t(9949)))},33789,e=>{e.v(t=>Promise.all(["static/chunks/15sigqif_v.mu.js"].map(t=>e.l(t))).then(()=>t(20032)))},78003,e=>{e.v(t=>Promise.all(["static/chunks/0zq.ybnbbtalq.js","static/chunks/0533wcfvivshl.js","static/chunks/11c6f8pb_6s91.js","static/chunks/0ga14ztvrhau2.css"].map(t=>e.l(t))).then(()=>t(97722)))},66701,e=>{e.v(t=>Promise.all(["static/chunks/0blzez3o_572u.js"].map(t=>e.l(t))).then(()=>t(46877)))}]);
|
|
11
|
+
${e.message}`)}},e4=async()=>{if(eW.trim()&&ex){eI(!0),eD(null),eq(null);try{let t=await fetch("/api/sql/query",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sql:eW.trim(),root:e})}),r=await t.json();t.ok&&r.success?(eq({rows:r.rows||[],fields:r.fields||[],durationMs:r.durationMs||0,affectedRows:r.affectedRows}),(eW.toLowerCase().includes("create table")||eW.toLowerCase().includes("drop table")||eW.toLowerCase().includes("alter table"))&&e0()):eD(r.error||"Failed to execute query.")}catch(e){eD(e.message||"An unexpected error occurred during execution.")}finally{eI(!1)}}},e3=eb?eh.global.find(e=>e.id===ex):eh.workspace.find(e=>e.id===ex);return(0,t.jsxs)("div",{style:a,children:[(0,t.jsx)("div",{style:{...n,width:ev?"220px":"0px",borderRight:ev?"1px solid var(--border)":"none",overflow:"hidden",transition:"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)"},children:ev&&(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minWidth:"220px",minHeight:0},children:[(0,t.jsxs)("div",{style:l,children:[(0,t.jsxs)("div",{style:o,children:[(0,t.jsx)("span",{style:i,children:"Connections"}),(0,t.jsx)("button",{style:d,onClick:()=>{eX(null),eQ({id:"",name:"",type:"sqlite",filepath:"./dev.db",host:"localhost",port:5432,database:"postgres",username:"postgres",password:"",ssl:!1,readOnly:!0}),eG(!1),eU(!0)},title:"Add Database Connection Profile",children:"➕ Add"})]}),(0,t.jsxs)("div",{style:c,children:[0===eh.global.length&&0===eh.workspace.length&&(0,t.jsx)("div",{style:b,children:"No connections configured. Add one to start."}),eh.workspace.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:u,children:"WORKSPACE CONNECTIONS"}),eh.workspace.map(e=>(0,t.jsxs)("div",{style:{...p,...ex===e.id&&!eb?m:{}},onClick:()=>e5(e.id,!1),children:[(0,t.jsxs)("div",{style:f,children:[(0,t.jsxs)("span",{style:h,children:["📁 ",e.name]}),(0,t.jsx)("span",{style:g,children:e.type})]}),(0,t.jsx)("button",{style:x,onClick:t=>{t.stopPropagation(),e6(e.id,!1)},children:"✖"})]},e.id))]}),eh.global.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:u,children:"GLOBAL CONNECTIONS"}),eh.global.map(e=>(0,t.jsxs)("div",{style:{...p,...ex===e.id&&eb?m:{}},onClick:()=>e5(e.id,!0),children:[(0,t.jsxs)("div",{style:f,children:[(0,t.jsxs)("span",{style:h,children:["🌐 ",e.name]}),(0,t.jsx)("span",{style:g,children:e.type})]}),(0,t.jsx)("button",{style:x,onClick:t=>{t.stopPropagation(),e6(e.id,!0)},children:"✖"})]},e.id))]})]})]}),(0,t.jsxs)("div",{style:{...l,flex:1,borderTop:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{style:o,children:[(0,t.jsx)("span",{style:i,children:"Schema Tables"}),eE&&(0,t.jsx)("span",{style:es})]}),(0,t.jsxs)("div",{style:y,children:[!ex&&(0,t.jsx)("div",{style:b,children:"Select an active connection to view tables."}),ex&&0===ew.length&&!eE&&(0,t.jsx)("div",{style:b,children:"No tables found in database schema."}),ew.map(e=>(0,t.jsxs)("div",{style:j,children:[(0,t.jsxs)("div",{style:v,onClick:()=>e1(e.name),children:[(0,t.jsx)("span",{style:_,children:"view"===e.type?"👁️":"📊"}),(0,t.jsx)("span",{style:w,children:e.name}),(0,t.jsx)("span",{style:S,children:ek===e.name?"▼":"▶"})]}),ek===e.name&&eN[e.name]&&(0,t.jsx)("div",{style:k,children:eN[e.name].map(e=>(0,t.jsxs)("div",{style:C,children:[(0,t.jsx)("span",{style:N,children:e.isPrimaryKey?"🔑":e.isForeignKey?"🔗":"▫"}),(0,t.jsx)("span",{style:R,title:e.type,children:e.name}),(0,t.jsx)("span",{style:E,children:e.type.toLowerCase().substring(0,12)})]},e.name))})]},e.name))]})]})]})}),(0,t.jsxs)("div",{style:L,children:[(0,t.jsxs)("div",{style:W,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[(0,t.jsx)("button",{type:"button",onClick:()=>e_(!ev),style:{background:"rgba(255, 255, 255, 0.05)",border:"1px solid var(--border)",borderRadius:"6px",color:"var(--muted)",cursor:"pointer",padding:"0.25rem 0.5rem",fontSize:"0.75rem",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.15s ease"},title:ev?"Collapse Connections List":"Expand Connections List",children:ev?"◀ Collapse":"📂 Schema Connections"}),(0,t.jsx)("span",{style:O,children:"Active Connection:"}),e3?(0,t.jsxs)("span",{style:T,children:[eb?"🌐":"📁"," ",e3.name," (",e3.type,")",e3.readOnly&&(0,t.jsx)("span",{style:I,children:"Read-Only"})]}):(0,t.jsx)("span",{style:{...T,color:"var(--danger)"},children:"No Connection Selected"})]}),(0,t.jsx)("button",{style:{...P,opacity:!ex||eT?.6:1,cursor:!ex||eT?"not-allowed":"pointer"},onClick:e4,disabled:!ex||eT,children:eT?"⌛ Running...":"⚡ Execute Query (F5)"})]}),(0,t.jsx)("div",{style:D,children:(0,t.jsx)("textarea",{style:z,value:eW,onChange:e=>eO(e.target.value),placeholder:"Write your SQL query script here...",onKeyDown:e=>{("F5"===e.key||e.ctrlKey&&"Enter"===e.key)&&(e.preventDefault(),e4())}})}),(0,t.jsxs)("div",{style:q,children:[eP&&(0,t.jsxs)("div",{style:A,children:[(0,t.jsx)("h4",{style:{margin:"0 0 0.5rem 0",color:"var(--danger)"},children:"⚠️ Execution Error"}),(0,t.jsx)("pre",{style:B,children:eP}),eP.includes("not installed")&&(0,t.jsxs)("div",{style:$,children:[(0,t.jsx)("p",{style:{margin:"0 0 0.5rem 0"},children:"To resolve this, run this installer command in your workspace terminal:"}),(0,t.jsx)("code",{style:F,children:e3?.type==="sqlite"?"npm install better-sqlite3":e3?.type==="postgres"?"npm install pg":e3?.type==="mysql"?"npm install mysql2":"npm install mssql"})]})]}),ez&&(0,t.jsxs)("div",{style:M,children:[(0,t.jsxs)("div",{style:U,children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,t.jsxs)("span",{children:["Query completed."," ",void 0!==ez.affectedRows?`Affected rows: ${ez.affectedRows}`:`Returned ${ez.rows.length} rows`]}),(0,t.jsxs)("span",{children:["Duration: ",ez.durationMs,"ms"]})]}),ez.rows.length>0&&(0,t.jsxs)("div",{style:{display:"flex",gap:"0.4rem"},children:[(0,t.jsx)("button",{onClick:()=>{if(ez&&0!==ez.rows.length)try{let e=ez.fields.join(","),t=ez.rows.map(e=>ez.fields.map(t=>{let r=e[t];if(null===r)return"NULL";let s=String(r);return s.includes(",")||s.includes('"')||s.includes("\n")||s.includes("\r")?`"${s.replace(/"/g,'""')}"`:s}).join(",")),r=[e,...t].join("\r\n"),s=new Blob([r],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(s),n=document.createElement("a");n.setAttribute("href",a),n.setAttribute("download",`query-results-${Date.now()}.csv`),document.body.appendChild(n),n.click(),document.body.removeChild(n)}catch(e){console.error("Export CSV failed:",e),alert("Failed to export as CSV")}},style:K,children:"📥 Export CSV"}),(0,t.jsx)("button",{onClick:()=>{if(ez&&0!==ez.rows.length)try{let e=JSON.stringify(ez.rows,null,2),t=new Blob([e],{type:"application/json;charset=utf-8;"}),r=URL.createObjectURL(t),s=document.createElement("a");s.setAttribute("href",r),s.setAttribute("download",`query-results-${Date.now()}.json`),document.body.appendChild(s),s.click(),document.body.removeChild(s)}catch(e){console.error("Export JSON failed:",e),alert("Failed to export as JSON")}},style:K,children:"📥 Export JSON"})]})]}),ez.rows.length>0?(0,t.jsx)("div",{style:H,children:(0,t.jsxs)("table",{style:G,children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{children:ez.fields.map(e=>(0,t.jsx)("th",{style:J,children:e},e))})}),(0,t.jsx)("tbody",{children:ez.rows.map((e,r)=>(0,t.jsx)("tr",{style:r%2==0?X:Z,children:ez.fields.map(s=>{let a=eA&&eA.rowIndex===r&&eA.field===s,n=e$&&e$.rowIndex===r&&e$.field===s&&"saving"===e$.status,l=e$&&e$.rowIndex===r&&e$.field===s&&"success"===e$.status,o=e$&&e$.rowIndex===r&&e$.field===s&&"error"===e$.status,i={...Q,...V};return n?i={...i,backgroundColor:"rgba(168, 85, 247, 0.15)"}:l?i={...i,backgroundColor:"rgba(16, 185, 129, 0.25)"}:o&&(i={...i,backgroundColor:"rgba(239, 68, 68, 0.25)"}),(0,t.jsx)("td",{style:i,onDoubleClick:()=>{e3?.readOnly?alert("Database connection is Read-Only. Editing is disabled."):eB({rowIndex:r,field:s,value:null===e[s]?"NULL":String(e[s])})},className:"db-cell",title:"Double click to edit cell",children:a?(0,t.jsx)("input",{style:Y,value:eA.value,autoFocus:!0,onChange:e=>eB({...eA,value:e.target.value}),onKeyDown:async t=>{if("Enter"===t.key){t.preventDefault();let a=eA.value;eB(null),a!==(null===e[s]?"NULL":String(e[s]))&&await e7(r,s,a,e[s])}else"Escape"===t.key&&eB(null)},onBlur:async()=>{let t=eA.value;eB(null),t!==(null===e[s]?"NULL":String(e[s]))&&await e7(r,s,t,e[s])}}):null===e[s]?"NULL":"object"==typeof e[s]?JSON.stringify(e[s]):String(e[s])},s)})},r))})]})}):void 0===ez.affectedRows&&(0,t.jsx)("div",{style:ee,children:"Query executed successfully, but returned 0 results."})]}),!eP&&!ez&&!eT&&(0,t.jsx)("div",{style:ee,children:"Write a query script and click Execute to view table records."}),eT&&(0,t.jsxs)("div",{style:et,children:[(0,t.jsx)("span",{style:er}),(0,t.jsx)("span",{style:{color:"var(--muted)"},children:"Running database statement..."})]})]})]}),eM&&"u">typeof document&&(0,s.createPortal)((0,t.jsx)("div",{style:ea,children:(0,t.jsxs)("div",{style:en,children:[(0,t.jsxs)("h3",{style:{margin:"0 0 1rem 0",display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"🔌 Add Database Profile"}),(0,t.jsx)("span",{style:{cursor:"pointer"},onClick:()=>eU(!1),children:"✖"})]}),(0,t.jsxs)("form",{onSubmit:e8,children:[(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Profile Name"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.name,onChange:e=>eQ(t=>({...t,name:e.target.value})),placeholder:"e.g. Local Postgres, Dev SQLite"})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Scope Level"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"radio",checked:!eH,onChange:()=>eG(!1)}),"Workspace Local"]}),(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"radio",checked:eH,onChange:()=>eG(!0)}),"Global User Profile"]})]})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database Type"}),(0,t.jsxs)("select",{style:ed,value:eJ.type,onChange:e=>{let t=e.target.value,r=5432;"mysql"===t&&(r=3306),"mssql"===t&&(r=1433),eQ(e=>({...e,type:t,filepath:"sqlite"===t?"./dev.db":void 0,port:"sqlite"!==t?r:void 0,database:"sqlite"===t?void 0:"mssql"===t?"master":"postgres"===t?"postgres":"",username:"sqlite"===t?void 0:"mssql"===t?"sa":"postgres"===t?"postgres":"root"}))},children:[(0,t.jsx)("option",{value:"sqlite",children:"SQLite (Local File)"}),(0,t.jsx)("option",{value:"postgres",children:"PostgreSQL"}),(0,t.jsx)("option",{value:"mysql",children:"MySQL"}),(0,t.jsx)("option",{value:"mssql",children:"Microsoft SQL Server"})]})]}),"sqlite"===eJ.type?(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database File Path"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.filepath||"",onChange:e=>eQ(t=>({...t,filepath:e.target.value})),placeholder:"Relative (e.g. ./data/dev.db) or Absolute path"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{...el,flex:3},children:[(0,t.jsx)("label",{style:eo,children:"Host IP Address"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.host||"",onChange:e=>eQ(t=>({...t,host:e.target.value})),placeholder:"localhost or IP"})]}),(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Port"}),(0,t.jsx)("input",{style:ei,type:"number",required:!0,value:eJ.port||0,onChange:e=>eQ(t=>({...t,port:parseInt(e.target.value)}))})]})]}),(0,t.jsxs)("div",{style:el,children:[(0,t.jsx)("label",{style:eo,children:"Database Name"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.database||"",onChange:e=>eQ(t=>({...t,database:e.target.value}))})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"1rem"},children:[(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Username"}),(0,t.jsx)("input",{style:ei,type:"text",required:!0,value:eJ.username||"",onChange:e=>eQ(t=>({...t,username:e.target.value}))})]}),(0,t.jsxs)("div",{style:{...el,flex:1},children:[(0,t.jsx)("label",{style:eo,children:"Password"}),(0,t.jsx)("input",{style:ei,type:"password",value:eJ.password||"",onChange:e=>eQ(t=>({...t,password:e.target.value}))})]})]}),("postgres"===eJ.type||"mssql"===eJ.type)&&(0,t.jsx)("div",{style:el,children:(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"checkbox",checked:!!eJ.ssl,onChange:e=>eQ(t=>({...t,ssl:e.target.checked}))}),"Require SSL Secure Connection"]})})]}),(0,t.jsx)("div",{style:el,children:(0,t.jsxs)("label",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:"0.25rem"},children:[(0,t.jsx)("input",{type:"checkbox",checked:!!eJ.readOnly,onChange:e=>eQ(t=>({...t,readOnly:e.target.checked}))}),"Enforce Read-Only Connection (Disable mutations)"]})}),eV&&(0,t.jsx)("div",{style:{...ec,backgroundColor:eV.success?"rgba(16, 185, 129, 0.12)":"rgba(239, 68, 68, 0.12)",border:eV.success?"1px solid var(--success)":"1px solid var(--danger)",color:eV.success?"var(--success)":"var(--danger)"},children:eV.message}),(0,t.jsxs)("div",{style:eu,children:[(0,t.jsx)("button",{type:"button",style:ep,onClick:e2,children:"🔍 Test Connection"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{type:"button",style:em,onClick:()=>eU(!1),children:"Cancel"}),(0,t.jsx)("button",{type:"submit",style:ef,disabled:eK,children:eK?"Saving...":"Save Profile"})]})]})]})]})}),document.body)]})}])},20897,e=>{e.v({activeBorder:"page-module___8aEwW__activeBorder",agentBadge:"page-module___8aEwW__agentBadge",agentCard:"page-module___8aEwW__agentCard",agentGrid:"page-module___8aEwW__agentGrid",agentHeader:"page-module___8aEwW__agentHeader",agentName:"page-module___8aEwW__agentName",agentStateBadge:"page-module___8aEwW__agentStateBadge",ansiCyan:"page-module___8aEwW__ansiCyan",ansiGreen:"page-module___8aEwW__ansiGreen",ansiMagenta:"page-module___8aEwW__ansiMagenta",ansiRed:"page-module___8aEwW__ansiRed",ansiYellow:"page-module___8aEwW__ansiYellow",cardBody:"page-module___8aEwW__cardBody",container:"page-module___8aEwW__container",containerActive:"page-module___8aEwW__containerActive",contextDetails:"page-module___8aEwW__contextDetails",contextItem:"page-module___8aEwW__contextItem",contextList:"page-module___8aEwW__contextList",contextMeta:"page-module___8aEwW__contextMeta",contextTitle:"page-module___8aEwW__contextTitle",dashboardGrid:"page-module___8aEwW__dashboardGrid",envGrid:"page-module___8aEwW__envGrid",envName:"page-module___8aEwW__envName",envRow:"page-module___8aEwW__envRow",envStatus:"page-module___8aEwW__envStatus",footer:"page-module___8aEwW__footer",header:"page-module___8aEwW__header",logoArea:"page-module___8aEwW__logoArea",mainPanel:"page-module___8aEwW__mainPanel",pulse:"page-module___8aEwW__pulse","pulse-attention":"page-module___8aEwW__pulse-attention","pulse-thinking":"page-module___8aEwW__pulse-thinking",pulseDot:"page-module___8aEwW__pulseDot",quickLaunchBtn:"page-module___8aEwW__quickLaunchBtn",sectionTitle:"page-module___8aEwW__sectionTitle",sidePanel:"page-module___8aEwW__sidePanel","state-complete":"page-module___8aEwW__state-complete","state-idle":"page-module___8aEwW__state-idle","state-needs-input":"page-module___8aEwW__state-needs-input","state-thinking":"page-module___8aEwW__state-thinking",statusIndicator:"page-module___8aEwW__statusIndicator",stoppedBadge:"page-module___8aEwW__stoppedBadge",subtitle:"page-module___8aEwW__subtitle",terminalContainer:"page-module___8aEwW__terminalContainer",terminalInput:"page-module___8aEwW__terminalInput",terminalInputArea:"page-module___8aEwW__terminalInputArea",terminalLine:"page-module___8aEwW__terminalLine",terminalSendBtn:"page-module___8aEwW__terminalSendBtn",title:"page-module___8aEwW__title"})},52683,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(70703),a=e.i(20897),n=e.i(66381);let l=e=>"mock"===e?"🧪":e.includes("-docker")?"🐳":e.includes("-ssh")?"🌐":"💻",o=(0,s.default)(()=>e.A(45344),{loadableGenerated:{modules:[37314]},ssr:!1,loading:()=>(0,t.jsx)("div",{style:{height:"400px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#05070a",color:"var(--muted)",border:"1px solid var(--border)",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"},children:(0,t.jsx)("span",{children:"Initializing terminal emulator..."})})}),i=(0,s.default)(()=>e.A(39429),{loadableGenerated:{modules:[1985]},ssr:!1,loading:()=>(0,t.jsx)("div",{style:{height:"280px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--card)",border:"1px solid var(--border)",borderRadius:"12px",marginTop:"1.5rem"},children:(0,t.jsx)("span",{style:{color:"var(--muted)"},children:"Initializing prompt editor..."})})}),d=(0,s.default)(()=>e.A(56915),{loadableGenerated:{modules:[99026]},ssr:!1}),c=(0,s.default)(()=>e.A(78716),{loadableGenerated:{modules:[9949]},ssr:!1}),u=(0,s.default)(()=>e.A(33789),{loadableGenerated:{modules:[20032]},ssr:!1}),p=(0,s.default)(()=>e.A(78003),{loadableGenerated:{modules:[97722]},ssr:!1}),m=(0,s.default)(()=>e.A(66701),{loadableGenerated:{modules:[46877]},ssr:!1});e.s(["default",0,function(){let[e,s]=(0,r.useState)([]),[f,h]=(0,r.useState)(null),[g,x]=(0,r.useState)(!1),[y,b]=(0,r.useState)(!1),[j,v]=(0,r.useState)(!1),[_,w]=(0,r.useState)(!1),[S,k]=(0,r.useState)(!1),[C,N]=(0,r.useState)(!1),[R,E]=(0,r.useState)(!1),[L,W]=(0,r.useState)(""),[O,T]=(0,r.useState)(9601),[I,P]=(0,r.useState)("0.2.19"),[D,z]=(0,r.useState)(null),[q,A]=(0,r.useState)([]),B=e.filter(e=>"workspace-terminal"!==e.id),$=e.find(e=>e.id===f),F=B.some(e=>("claude-docker"===e.type||"aider-docker"===e.type)&&"running"===e.status),M=B.some(e=>"claude-ssh"===e.type&&"running"===e.status),U=async()=>{try{let e=await fetch("/api/sessions"),t=await e.json();t.sessions&&s(t.sessions),t.wsPort&&T(t.wsPort),t.originalCwd&&W(t.originalCwd),t.version&&P(t.version)}catch(e){console.error("Failed to fetch sessions:",e)}},H=async()=>{try{let e=await fetch("/api/recents");if(e.ok){let t=await e.json();t.success&&t.recents&&t.recents.lastSession&&z(t.recents.lastSession)}}catch(e){console.error("Failed to fetch recents:",e)}},G=async()=>{try{let e=await fetch("/api/configs");if(e.ok){let t=await e.json();t.configs&&A(t.configs)}}catch(e){console.error("Failed to fetch configs:",e)}};(0,r.useEffect)(()=>{(async()=>{await U(),await H(),await G()})(),"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(U,4e3);return()=>clearInterval(e)},[]);let J=async(e,t,r,s)=>{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:r,scopedDirs:s};if(("aider"===e||"aider-docker"===e)&&!r)try{let e=await fetch("/api/context/aider");if(e.ok){let t=await e.json();t.success&&t.config&&(n.workspaceRoot=t.config.workspaceRoot,n.scopedDirs=t.config.scopedDirs)}}catch(e){console.error("Failed to load aider configuration before launch:",e)}let l=await fetch("/api/sessions/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),o=await l.json();o.success&&(await U(),await G(),h(o.session.id),z({type:e,name:a,workspaceRoot:r,scopedDirs:s}))}catch(e){console.error("Failed to launch session:",e)}finally{x(!1)}},Q=async e=>{x(!0);try{let t=await fetch("/api/sessions/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:e.type,name:e.name,workspaceRoot:e.workspaceRoot,scopedDirs:e.scopedDirs})}),r=await t.json();r.success?(await U(),h(r.session.id)):alert(r.error||"Failed to launch configuration.")}catch(e){console.error(e),alert("Network error: failed to launch configuration.")}finally{x(!1)}},K=async e=>{if(window.confirm("Are you sure you want to delete this configuration template?"))try{(await fetch("/api/configs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",id:e})})).ok?await G():alert("Failed to delete configuration template.")}catch(e){console.error(e),alert("Network error: failed to delete configuration template.")}},Y=async(e,t=!1)=>{try{let r=await fetch("/api/sessions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,delete:t})});(await r.json()).success&&(t&&f===e&&h(null),await U())}catch(e){console.error("Failed to stop session:",e)}};return(0,t.jsxs)("div",{className:`${a.default.container} ${$?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",{style:{display:"flex",alignItems:"center",gap:"1rem"},children:[(0,t.jsxs)("div",{className:a.default.statusIndicator,children:[(0,t.jsx)("span",{className:a.default.pulseDot}),(0,t.jsx)("span",{children:"Orchestrator Online"})]}),(0,t.jsx)("button",{onClick:()=>b(!0),title:"Settings","aria-label":"Settings",style:{background:"transparent",border:"1px solid var(--border)",borderRadius:"8px",color:"var(--muted)",cursor:"pointer",fontSize:"1.1rem",lineHeight:1,padding:"6px 10px"},children:"⚙️"})]})]}),y&&(0,t.jsx)(m,{onClose:()=>b(!1)}),$?(0,t.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:(0,t.jsx)(p,{sessionId:$.id,workspaceRoot:$.workspaceRoot||"",scopedDirs:$.scopedDirs||[],onClose:()=>h(null),sessions:e,onSwitchSession:e=>h(e),onRefreshSessions:U,wsPort:O})}):(0,t.jsxs)("div",{className:a.default.dashboardGrid,children:[(0,t.jsxs)("div",{className:a.default.mainPanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Built-in Database Explorer & SQL Client"}),(0,t.jsx)("div",{className:"card",style:{padding:0,overflow:"hidden",height:"450px",border:"1px solid var(--border)"},children:(0,t.jsx)(n.default,{workspaceRoot:L||""})})]}),(0,t.jsxs)("section",{style:{marginTop:"1.5rem"},children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Shared Context Hub & Slash Commands"}),(0,t.jsxs)("div",{className:a.default.contextList,children:[(0,t.jsxs)("div",{className:`${a.default.contextItem} card`,children:[(0,t.jsxs)("div",{className:a.default.contextMeta,children:[(0,t.jsx)("span",{className:a.default.contextTitle,children:"Staged Context & System Rules (/ccc)"}),(0,t.jsx)("span",{className:a.default.contextDetails,children:"Compiles AGENTS.md guidelines and files map."})]}),(0,t.jsx)("button",{onClick:async()=>{f&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f,command:"/ccc"})})},disabled:!f,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--primary)",backgroundColor:"transparent",color:"var(--primary)",fontSize:"0.75rem",fontWeight:600,opacity:f?1:.5,cursor:f?"pointer":"not-allowed"},children:"🚀 Mount (/ccc)"})]}),(0,t.jsxs)("div",{className:`${a.default.contextItem} card`,children:[(0,t.jsxs)("div",{className:a.default.contextMeta,children:[(0,t.jsx)("span",{className:a.default.contextTitle,children:"Staged Developer Prompt (/ccp)"}),(0,t.jsx)("span",{className:a.default.contextDetails,children:"Executes prompt in .ai/neural-loom/cprompt.md."})]}),(0,t.jsx)("button",{onClick:async()=>{f&&await fetch("/api/sessions/inject",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f,command:"/ccp"})})},disabled:!f,style:{padding:"0.4rem 0.8rem",borderRadius:"6px",border:"1px solid var(--success)",backgroundColor:"transparent",color:"var(--success)",fontSize:"0.75rem",fontWeight:600,opacity:f?1:.5,cursor:f?"pointer":"not-allowed"},children:"⚡ Run (/ccp)"})]})]}),(0,t.jsx)(i,{})]})]}),(0,t.jsxs)("div",{className:a.default.mainPanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Active AI Agents"}),0===B.length?(0,t.jsxs)("div",{className:"card",style:{padding:"3rem 1.5rem",textAlign:"center"},children:[(0,t.jsx)("p",{style:{color:"var(--muted)",marginBottom:"1.5rem"},children:"No active agent sessions. Launch a Claude or Aider agent session to begin."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.75rem",flexDirection:"column"},children:[D&&(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{J(D.type,D.name,D.workspaceRoot,D.scopedDirs)},disabled:g,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none"},title:`Re-launch: ${D.name||D.type}`,children:"⚡ Re-launch Last Session"}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{E(!1),N(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none",flex:1},children:"Launch Claude"}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{k(!1),w(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",flex:1},children:"Launch Aider"})]})]}),(0,t.jsxs)("div",{style:{marginTop:"1.5rem",fontSize:"0.75rem",color:"var(--muted)"},children:["Need a simulator?"," ",(0,t.jsx)("span",{onClick:()=>J("mock"),style:{color:"var(--primary)",cursor:"pointer",textDecoration:"underline"},children:"Start mock playground"})]})]}):(0,t.jsx)("div",{className:a.default.agentGrid,children:B.map(e=>(0,t.jsxs)("div",{className:`${a.default.agentCard} card ${f===e.id?a.default.activeBorder:""}`,children:[(0,t.jsxs)("div",{className:a.default.agentHeader,children:[(0,t.jsx)("span",{className:a.default.agentName,children:e.name}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.35rem",alignItems:"center"},children:["running"===e.status&&e.agentState&&(0,t.jsxs)("span",{className:`${a.default.agentStateBadge} ${a.default["state-"+e.agentState]}`,children:["thinking"===e.agentState&&`${l(e.type)} 💭`,"needs-input"===e.agentState&&`${l(e.type)} ⚠️`,"complete"===e.agentState&&`${l(e.type)} ✅`,"idle"===e.agentState&&`${l(e.type)} 💤`]}),(0,t.jsx)("span",{className:`${a.default.agentBadge} ${"stopped"===e.status?a.default.stoppedBadge:""}`,children:e.status})]})]}),(0,t.jsxs)("div",{className:a.default.cardBody,style:{padding:"1rem"},children:[(0,t.jsxs)("p",{style:{fontSize:"0.8rem",color:"var(--muted)",margin:0},children:["ID: ",(0,t.jsx)("code",{style:{fontSize:"0.72rem"},children:e.id.substring(0,8)})," | Type: ",e.type,(0,t.jsx)("br",{}),"Logs: ",e.logsCount," lines"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.75rem"},children:["running"===e.status?(0,t.jsx)("button",{onClick:()=>Y(e.id,!1),style:{flex:1,padding:"0.35rem",borderRadius:"6px",border:"1px solid var(--danger)",backgroundColor:"transparent",fontSize:"0.75rem",color:"var(--danger)",cursor:"pointer"},children:"Stop"}):(0,t.jsx)("button",{onClick:()=>Y(e.id,!0),style:{flex:1,padding:"0.35rem",borderRadius:"6px",border:"1px solid var(--border)",backgroundColor:"transparent",fontSize:"0.75rem",color:"var(--muted)",cursor:"pointer"},children:"Delete"}),(0,t.jsx)("button",{onClick:()=>h(e.id),style:{flex:2,padding:"0.35rem",borderRadius:"6px",border:"none",backgroundColor:f===e.id?"var(--border-focus)":"var(--primary)",fontSize:"0.75rem",fontWeight:600,color:"#fff",cursor:"pointer"},children:f===e.id?"Connected":"Open Console"})]})]})]},e.id))})]}),f&&"workspace-terminal"!==f&&(0,t.jsxs)("section",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border-focus)",marginTop:"1rem"},children:[(0,t.jsxs)("div",{className:a.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(109, 40, 217, 0.08)",padding:"0.5rem 1rem"},children:[(0,t.jsxs)("span",{style:{fontWeight:600,fontSize:"0.85rem",display:"flex",alignItems:"center",gap:"0.5rem"},children:["🖥️ Console — ",e.find(e=>e.id===f)?.name]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center"},children:[e.find(e=>e.id===f)?.status==="stopped"&&(0,t.jsx)("button",{onClick:async()=>{try{let t=e.find(e=>e.id===f),r=t&&("claude"===t.type||"claude-docker"===t.type||"claude-ssh"===t.type),s=!1;r&&(s=window.confirm("Would you like to resume your previous Claude session?"));let a=await fetch("/api/sessions/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f,resume:s})});if(a.ok)await U();else{let e=await a.json();alert(e.error||"Failed to restart session.")}}catch(e){console.error("Failed to restart session:",e)}},style:{padding:"0.15rem 0.4rem",borderRadius:"4px",border:"1px solid #eab308",backgroundColor:"rgba(234, 179, 8, 0.15)",color:"#eab308",fontSize:"0.65rem",fontWeight:600,cursor:"pointer"},children:"⚡ Restart"}),(0,t.jsx)("button",{onClick:()=>h(null),style:{border:"none",background:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.75rem"},children:"✖"})]})]}),(0,t.jsx)(o,{sessionId:f,wsPort:O})]})]}),(0,t.jsxs)("div",{className:a.default.sidePanel,children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Execution Environments"}),(0,t.jsxs)("div",{className:a.default.envGrid,children:[(0,t.jsxs)("div",{className:a.default.envRow,style:{padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:a.default.envName,children:"💻 Local Host"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:"var(--success)"},children:"Active"})]}),(0,t.jsxs)("div",{className:a.default.envRow,style:{opacity:F?1:.6,padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:a.default.envName,children:"🐳 Docker Sandbox"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:F?"var(--success)":"var(--muted)"},children:F?"Active":"Not Mounted"})]}),(0,t.jsxs)("div",{className:a.default.envRow,style:{opacity:M?1:.6,padding:"0.5rem 0.75rem"},children:[(0,t.jsx)("span",{className:a.default.envName,children:"🌐 Remote VM (SSH)"}),(0,t.jsx)("span",{className:a.default.envStatus,style:{color:M?"var(--success)":"var(--muted)"},children:M?"Active":"Offline"})]})]})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Saved Configurations"}),(0,t.jsx)("div",{className:"card",style:{padding:"1rem",display:"flex",flexDirection:"column",gap:"0.75rem"},children:0===q.length?(0,t.jsx)("p",{style:{color:"var(--muted)",fontSize:"0.8rem",textAlign:"center",margin:"1rem 0"},children:"No configuration templates saved yet. Save a template from the Claude/Aider launch wizards."}):(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem",maxHeight:"200px",overflowY:"auto"},children:q.map(e=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(255, 255, 255, 0.02)",padding:"0.5rem",borderRadius:"6px",border:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.15rem",minWidth:0},children:[(0,t.jsx)("span",{style:{fontSize:"0.8rem",fontWeight:600,color:"var(--foreground)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.name}),(0,t.jsx)("span",{style:{fontSize:"0.65rem",color:"var(--muted)",textTransform:"uppercase"},children:e.type})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.25rem"},children:[(0,t.jsx)("button",{onClick:()=>Q(e),disabled:g,style:{padding:"0.2rem 0.4rem",borderRadius:"4px",backgroundColor:"var(--primary)",color:"#fff",border:"none",fontSize:"0.7rem",cursor:"pointer"},children:"Launch"}),(0,t.jsx)("button",{onClick:()=>K(e.id),style:{padding:"0.2rem 0.4rem",borderRadius:"4px",backgroundColor:"transparent",color:"var(--danger)",border:"1px solid var(--danger)",fontSize:"0.7rem",cursor:"pointer"},children:"Delete"})]})]},e.id))})})]}),(0,t.jsxs)("section",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{E(!1),N(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(262, 83%, 60%) 0%, hsl(195, 100%, 45%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🤖 Claude Local"}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{E(!0),N(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(170, 72%, 40%) 0%, hsl(195, 100%, 40%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐳 Claude Docker"})]}),(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem"},children:[(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{k(!1),w(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(210, 80%, 45%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐍 Aider Local"}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>{k(!0),w(!0)},disabled:g,style:{background:"linear-gradient(135deg, hsl(195, 100%, 40%) 0%, hsl(262, 80%, 55%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem",flex:1},children:"🐳 Aider Docker"})]}),(0,t.jsx)("button",{className:a.default.quickLaunchBtn,onClick:()=>v(!0),disabled:g,style:{background:"linear-gradient(135deg, hsl(38, 92%, 50%) 0%, hsl(0, 84%, 60%) 100%)",border:"none",padding:"0.6rem",fontSize:"0.8rem"},children:"🌐 Connect Remote SSH"})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:a.default.sectionTitle,children:"Workspace Terminal"}),(0,t.jsxs)("div",{className:"card",style:{display:"flex",flexDirection:"column",border:"1px solid var(--border)",padding:0},children:[(0,t.jsx)("div",{className:a.default.agentHeader,style:{justifyContent:"space-between",background:"rgba(255, 255, 255, 0.02)",padding:"0.4rem 0.75rem"},children:(0,t.jsxs)("span",{style:{fontWeight:600,fontSize:"0.75rem"},children:["💻 Local Shell (CWD: ",L.split(/[/\\]/).pop()||"root",")"]})}),(0,t.jsx)(o,{sessionId:"workspace-terminal",height:"180px",wsPort:O})]})]}),(0,t.jsxs)("section",{className:"card",style:{padding:"1rem",display:"flex",flexDirection:"column",gap:"0.5rem"},children:[(0,t.jsx)("h3",{style:{fontSize:"0.9rem",fontWeight:700,margin:0},children:"Quick Actions"}),(0,t.jsxs)("ul",{style:{listStyle:"none",fontSize:"0.75rem",display:"flex",flexDirection:"column",gap:"0.35rem",color:"var(--muted)",padding:0,margin:0},children:[(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Configure API Keys"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Edit rules templates"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]}),(0,t.jsxs)("li",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:"Inspect process locks"}),(0,t.jsx)("span",{style:{color:"var(--primary)",cursor:"pointer"},children:"→"})]})]})]})]})]}),(0,t.jsxs)("footer",{className:a.default.footer,children:[(0,t.jsxs)("span",{children:["NeuralLoom v",I," — Experimental AI Orchestrator Bridge"]}),(0,t.jsxs)("span",{children:["Directory: ",L||"Loading..."]})]}),j&&(0,t.jsx)(d,{onClose:()=>v(!1),onConfirmLaunch:()=>{v(!1),J("claude-ssh")}}),_&&(0,t.jsx)(c,{onClose:()=>w(!1),isDocker:S,onConfirmLaunch:(e,t,r)=>{w(!1),J(S?"aider-docker":"aider",e,t,r)}}),C&&(0,t.jsx)(u,{onClose:()=>N(!1),isDocker:R,onConfirmLaunch:(e,t,r)=>{N(!1),J(R?"claude-docker":"claude",e,t,r)}})]})}])},45344,e=>{e.v(t=>Promise.all(["static/chunks/0zt~pql40pxuw.js","static/chunks/0fq_ngmmf0c2l.js","static/chunks/0ga14ztvrhau2.css"].map(t=>e.l(t))).then(()=>t(37314)))},39429,e=>{e.v(t=>Promise.all(["static/chunks/16w4~t4h7gk13.js"].map(t=>e.l(t))).then(()=>t(1985)))},56915,e=>{e.v(t=>Promise.all(["static/chunks/0lnobx4eh3~-_.js"].map(t=>e.l(t))).then(()=>t(99026)))},78716,e=>{e.v(t=>Promise.all(["static/chunks/0xhaghhxllgzs.js"].map(t=>e.l(t))).then(()=>t(9949)))},33789,e=>{e.v(t=>Promise.all(["static/chunks/15sigqif_v.mu.js"].map(t=>e.l(t))).then(()=>t(20032)))},78003,e=>{e.v(t=>Promise.all(["static/chunks/0zq.ybnbbtalq.js","static/chunks/0fq_ngmmf0c2l.js","static/chunks/11c6f8pb_6s91.js","static/chunks/0ga14ztvrhau2.css"].map(t=>e.l(t))).then(()=>t(97722)))},66701,e=>{e.v(t=>Promise.all(["static/chunks/0blzez3o_572u.js"].map(t=>e.l(t))).then(()=>t(46877)))}]);
|
|
@@ -11,8 +11,8 @@ WARNING: This link could potentially be dangerous`)){let t=window.open();if(t){t
|
|
|
11
11
|
`).trim(),t=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(e);B.register(n,t?.[2]??e,n)}return n},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(-1===i)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let r=this._deliveryQueue.current===this;if(2*this._size<=t.length){let e=0;for(let i=0;i<t.length;i++)t[i]?t[e++]=t[i]:r&&(this._deliveryQueue.end--,e<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=e}}_deliver(e,t){if(!e)return;let i=this._options?.onListenerError||c;try{e.value(t)}catch(e){i(e)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof F)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},N=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},U=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}});(j=M||={}).isCancellationToken=function(e){return e===j.None||e===j.Cancelled||e instanceof K||!!e&&"object"==typeof e&&"boolean"==typeof e.isCancellationRequested&&"function"==typeof e.onCancellationRequested},j.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:T.None}),j.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:U});var j,$,z,K=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?U:(this._emitter||(this._emitter=new W),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},q=!1,V="en",G=globalThis;"u">typeof G.vscode&&"u">typeof G.vscode.process?z=G.vscode.process:"u">typeof h.default&&"string"==typeof h.default?.versions?.node&&(z=h.default);var X="string"==typeof z?.versions?.electron&&z?.type==="renderer";if("object"==typeof z){z.platform,z.platform,"linux"===z.platform&&z.env.SNAP&&z.env.SNAP_REVISION,z.env.CI||z.env.BUILD_ARTIFACTSTAGINGDIRECTORY,V="en";let e=z.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,V=t.resolvedLanguage||"en",t.languagePack?.translationsConfigFile}catch{}}else"object"!=typeof navigator||X?console.error("Unable to resolve platform."):(($=navigator.userAgent).indexOf("Windows"),$.indexOf("Macintosh"),($.indexOf("Macintosh")>=0||$.indexOf("iPad")>=0||$.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,$.indexOf("Linux"),$?.indexOf("Mobi"),q=!0,V=globalThis._VSCODE_NLS_LANGUAGE||"en",navigator.language.toLowerCase());q&&"function"==typeof G.importScripts&&G.origin;var J,Y=$,Z=V;(t=J||={}).value=function(){return Z},t.isDefaultVariant=function(){return 2===Z.length?"en"===Z:Z.length>=3&&"e"===Z[0]&&"n"===Z[1]&&"-"===Z[2]},t.isDefault=function(){return"en"===Z};var Q="function"==typeof G.postMessage&&!G.importScripts,ee=(()=>{if(Q){let e=[];G.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,r=e.length;i<r;i++){let r=e[i];if(r.id===t.data.vscodeScheduleAsyncWork){e.splice(i,1),r.callback();return}}});let t=0;return i=>{let r=++t;e.push({id:r,callback:i}),G.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})(),et=!!(Y&&Y.indexOf("Chrome")>=0);function ei(e,t=0,i){let r=setTimeout(()=>{e(),i&&s.dispose()},t),s=S(()=>{clearTimeout(r),i?.deleteAndLeak(s)});return i?.add(s),s}Y&&Y.indexOf("Firefox"),!et&&Y&&Y.indexOf("Safari"),Y&&Y.indexOf("Edg/"),Y&&Y.indexOf("Android"),Symbol("MicrotaskDelay"),(i=r||={}).settled=async function(e){let t,i=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||(t=e)})));if("u">typeof t)throw t;return i},i.withAsyncBody=function(e){return new Promise(async(t,i)=>{try{await e(t,i)}catch(e){i(e)}})};var er=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let i of t)e.emitOne(i)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new W,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(1===this._state)return{done:!0,value:void 0};await T.toPromise(this._onStateChanged.event)}},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,i){return new e(async e=>{for await(let r of t)e.emitOne(i(r))})}map(t){return e.map(this,t)}static filter(t,i){return new e(async e=>{for await(let r of t)i(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let i of e)t.push(i);return t}toPromise(){return e.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}};er.EMPTY=er.fromArray([]);var es=class extends b{constructor(e){super(),this._terminal=e,this._linesCacheTimeout=this._register(new y),this._linesCacheDisposables=this._register(new y),this._register(S(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=m(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=ei(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(e){return this._linesCache?.[e]}setLineInCache(e,t){this._linesCache&&(this._linesCache[e]=t)}translateBufferLineToStringWithWrap(e,t){let i=[],r=[0],s=this._terminal.buffer.active.getLine(e);for(;s;){let n=this._terminal.buffer.active.getLine(e+1),o=!!n&&n.isWrapped,a=s.translateToString(!o&&t);if(o&&n){let e=s.getCell(s.length-1);e&&0===e.getCode()&&1===e.getWidth()&&n.getCell(0)?.getWidth()===2&&(a=a.slice(0,-1))}if(i.push(a),o)r.push(r[r.length-1]+a.length);else break;e++,s=n}return[i.join(""),r]}},en=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(e){this._cachedSearchTerm=e}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(e){this._lastSearchOptions=e}isValidSearchTerm(e){return!!(e&&e.length>0)}didOptionsChange(e){return!this._lastSearchOptions||!!e&&(this._lastSearchOptions.caseSensitive!==e.caseSensitive||this._lastSearchOptions.regex!==e.regex||this._lastSearchOptions.wholeWord!==e.wholeWord)}shouldUpdateHighlighting(e,t){return!!t?.decorations&&(void 0===this._cachedSearchTerm||e!==this._cachedSearchTerm||this.didOptionsChange(t))}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},eo=class{constructor(e,t){this._terminal=e,this._lineCache=t}find(e,t,i,r){if(!e||0===e.length)return void this._terminal.clearSelection();if(i>this._terminal.cols)throw Error(`Invalid col: ${i} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let s={startRow:t,startCol:i},n=this._findInLine(e,s,r);if(!n)for(let i=t+1;i<this._terminal.buffer.active.baseY+this._terminal.rows&&(s.startRow=i,s.startCol=0,!(n=this._findInLine(e,s,r)));i++);return n}findNextWithSelection(e,t,i){if(!e||0===e.length)return void this._terminal.clearSelection();let r=this._terminal.getSelectionPosition();this._terminal.clearSelection();let s=0,n=0;r&&(i===e?(s=r.end.x,n=r.end.y):(s=r.start.x,n=r.start.y)),this._lineCache.initLinesCache();let o={startRow:n,startCol:s},a=this._findInLine(e,o,t);if(!a)for(let i=n+1;i<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=i,o.startCol=0,!(a=this._findInLine(e,o,t)));i++);if(!a&&0!==n)for(let i=0;i<n&&(o.startRow=i,o.startCol=0,!(a=this._findInLine(e,o,t)));i++);return!a&&r&&(o.startRow=r.start.y,o.startCol=0,a=this._findInLine(e,o,t)),a}findPreviousWithSelection(e,t,i){if(!e||0===e.length)return void this._terminal.clearSelection();let r=this._terminal.getSelectionPosition();this._terminal.clearSelection();let s=this._terminal.buffer.active.baseY+this._terminal.rows-1,n=this._terminal.cols;this._lineCache.initLinesCache();let o={startRow:s,startCol:n},a;if(r&&(o.startRow=s=r.start.y,o.startCol=n=r.start.x,i!==e&&((a=this._findInLine(e,o,t,!1))||(o.startRow=s=r.end.y,o.startCol=n=r.end.x))),a||(a=this._findInLine(e,o,t,!0)),!a){o.startCol=Math.max(o.startCol,this._terminal.cols);for(let i=s-1;i>=0&&(o.startRow=i,!(a=this._findInLine(e,o,t,!0)));i--);}if(!a&&s!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let i=this._terminal.buffer.active.baseY+this._terminal.rows-1;i>=s&&(o.startRow=i,!(a=this._findInLine(e,o,t,!0)));i--);return a}_isWholeWord(e,t,i){return(0===e||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(t[e-1]))&&(e+i.length===t.length||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(t[e+i.length]))}_findInLine(e,t,i={},r=!1){let s=t.startRow,n=t.startCol;if(this._terminal.buffer.active.getLine(s)?.isWrapped){if(r){t.startCol+=this._terminal.cols;return}return t.startRow--,t.startCol+=this._terminal.cols,this._findInLine(e,t,i)}let o=this._lineCache.getLineFromCache(s);o||(o=this._lineCache.translateBufferLineToStringWithWrap(s,!0),this._lineCache.setLineInCache(s,o));let[a,h]=o,l=this._bufferColsToStringOffset(s,n),c=e,d=a;i.regex||(c=i.caseSensitive?e:e.toLowerCase(),d=i.caseSensitive?a:a.toLowerCase());let u=-1;if(i.regex){let t=RegExp(c,i.caseSensitive?"g":"gi"),s;if(r)for(;s=t.exec(d.slice(0,l));)u=t.lastIndex-s[0].length,e=s[0],t.lastIndex-=e.length-1;else(s=t.exec(d.slice(l)))&&s[0].length>0&&(u=l+(t.lastIndex-s[0].length),e=s[0])}else r?l-c.length>=0&&(u=d.lastIndexOf(c,l-c.length)):u=d.indexOf(c,l);if(u>=0){if(i.wholeWord&&!this._isWholeWord(u,d,e))return;let t=0;for(;t<h.length-1&&u>=h[t+1];)t++;let r=t;for(;r<h.length-1&&u+e.length>=h[r+1];)r++;let n=u-h[t],o=u+e.length-h[r],a=this._stringLengthToBufferSize(s+t,n),l=this._stringLengthToBufferSize(s+r,o)-a+this._terminal.cols*(r-t);return{term:e,col:a,row:s+t,size:l}}}_stringLengthToBufferSize(e,t){let i=this._terminal.buffer.active.getLine(e);if(!i)return 0;for(let e=0;e<t;e++){let r=i.getCell(e);if(!r)break;let s=r.getChars();s.length>1&&(t-=s.length-1);let n=i.getCell(e+1);n&&0===n.getWidth()&&t++}return t}_bufferColsToStringOffset(e,t){let i=e,r=0,s=this._terminal.buffer.active.getLine(i);for(;t>0&&s;){for(let e=0;e<t&&e<this._terminal.cols;e++){let t=s.getCell(e);if(!t)break;t.getWidth()&&(r+=0===t.getCode()?1:t.getChars().length)}if(i++,(s=this._terminal.buffer.active.getLine(i))&&!s.isWrapped)break;t-=this._terminal.cols}return r}},ea=class extends b{constructor(e){super(),this._terminal=e,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(S(()=>this.clearHighlightDecorations()))}createHighlightDecorations(e,t){for(let i of(this.clearHighlightDecorations(),e)){let e=this._createResultDecorations(i,t,!1);if(e)for(let t of e)this._storeDecoration(t,i)}}createActiveDecoration(e,t){let i=this._createResultDecorations(e,t,!0);if(i)return{decorations:i,match:e,dispose(){g(i)}}}clearHighlightDecorations(){g(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(e,t){this._highlightedLines.add(e.marker.line),this._highlightDecorations.push({decoration:e,match:t,dispose(){e.dispose()}})}_applyStyles(e,t,i){e.classList.contains("xterm-find-result-decoration")||(e.classList.add("xterm-find-result-decoration"),t&&(e.style.outline=`1px solid ${t}`)),i&&e.classList.add("xterm-find-active-result-decoration")}_createResultDecorations(e,t,i){let r=[],s=e.col,n=e.size,o=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+e.row;for(;n>0;){let e=Math.min(this._terminal.cols-s,n);r.push([o,s,e]),s=0,n-=e,o++}let a=[];for(let e of r){let r=this._terminal.registerMarker(e[0]),s=this._terminal.registerDecoration({marker:r,x:e[1],width:e[2],backgroundColor:i?t.activeMatchBackground:t.matchBackground,overviewRulerOptions:this._highlightedLines.has(r.line)?void 0:{color:i?t.activeMatchColorOverviewRuler:t.matchOverviewRuler,position:"center"}});if(s){let e=[];e.push(r),e.push(s.onRender(e=>this._applyStyles(e,i?t.activeMatchBorder:t.matchBorder,!1))),e.push(s.onDispose(()=>g(e))),a.push(s)}}return 0===a.length?void 0:a}},eh=class extends b{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new W)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(e){this._selectedDecoration=e}updateResults(e,t){this._searchResults=e.slice(0,t)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&(this._selectedDecoration.dispose(),this._selectedDecoration=void 0)}findResultIndex(e){for(let t=0;t<this._searchResults.length;t++){let i=this._searchResults[t];if(i.row===e.row&&i.col===e.col&&i.size===e.size)return t}return -1}fireResultsChanged(e){if(!e)return;let t=-1;this._selectedDecoration&&(t=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:t,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},el=class extends b{constructor(e){super(),this._highlightTimeout=this._register(new y),this._lineCache=this._register(new y),this._state=new en,this._resultTracker=this._register(new eh),this._highlightLimit=e?.highlightLimit??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(e){this._terminal=e,this._lineCache.value=new es(e),this._engine=new eo(e,this._lineCache.value),this._decorationManager=new ea(e),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(S(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=ei(()=>{let e=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(e,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(e){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),e||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(e,t,i){if(!this._terminal||!this._engine)throw Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let r=this._findNextAndSelect(e,t,i);return this._fireResults(t),this._state.cachedSearchTerm=e,r}_highlightAllMatches(e,t){if(!this._terminal||!this._engine||!this._decorationManager)throw Error("Cannot use addon until it has been loaded");if(!this._state.isValidSearchTerm(e))return void this.clearDecorations();this.clearDecorations(!0);let i=[],r,s=this._engine.find(e,0,0,t);for(;s&&(r?.row!==s.row||r?.col!==s.col)&&!(i.length>=this._highlightLimit);)r=s,i.push(r),s=this._engine.find(e,r.col+r.term.length>=this._terminal.cols?r.row+1:r.row,r.col+r.term.length>=this._terminal.cols?0:r.col+1,t);this._resultTracker.updateResults(i,this._highlightLimit),t.decorations&&this._decorationManager.createHighlightDecorations(i,t.decorations)}_findNextAndSelect(e,t,i){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let r=this._engine.findNextWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(r,t?.decorations,i?.noScroll)}findPrevious(e,t,i){if(!this._terminal||!this._engine)throw Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let r=this._findPreviousAndSelect(e,t,i);return this._fireResults(t),this._state.cachedSearchTerm=e,r}_fireResults(e){this._resultTracker.fireResultsChanged(!!e?.decorations)}_findPreviousAndSelect(e,t,i){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let r=this._engine.findPreviousWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(r,t?.decorations,i?.noScroll)}_selectResult(e,t,i){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!e)return this._terminal.clearSelection(),!1;if(this._terminal.select(e.col,e.row,e.size),t){let i=this._decorationManager.createActiveDecoration(e,t);i&&(this._resultTracker.selectedDecoration=i)}if(!i&&(e.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||e.row<this._terminal.buffer.active.viewportY)){let t=e.row-this._terminal.buffer.active.viewportY;t-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(t)}return!0}},ec=e.i(91156);class ed{buffer=[];seq=0;enabledOverride=null;subscribers=new Set;isEnabled(){return null!==this.enabledOverride?this.enabledOverride:(0,ec.loadSettings)().diag}enable(){this.enabledOverride=!0}disable(){this.enabledOverride=!1}log(e,t,i,r,s){if(!this.isEnabled())return;let n={ts:new Date().toISOString(),ch:e,lvl:t,ev:i,sid:r,seq:this.seq++,...s?{data:s}:{}};if(this.buffer.push(n),this.buffer.length>200&&this.buffer.splice(0,this.buffer.length-200),this.subscribers.size>0)for(let e of this.subscribers)try{e(n)}catch{}}paste(e,t,i,r="info"){this.log("paste",r,e,t,i)}copy(e,t,i,r="info"){this.log("copy",r,e,t,i)}ws(e,t,i,r="info"){this.log("ws",r,e,t,i)}focus(e,t,i,r="info"){this.log("focus",r,e,t,i)}clipboard(e,t,i,r="info"){this.log("clipboard",r,e,t,i)}ingest(e){this.isEnabled()&&(this.buffer.push(e),this.buffer.length>200&&this.buffer.splice(0,this.buffer.length-200))}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}snapshot(){return this.buffer.slice()}toJSONL(){return this.buffer.map(e=>JSON.stringify(e)).join("\n")+(this.buffer.length?"\n":"")}clear(){this.buffer=[]}}let eu=new ed;function e_(e){if(!e||!e.tagName)return"none";let t=e.tagName.toLowerCase(),i="string"==typeof e.className&&e.className?"."+e.className.trim().split(/\s+/).join("."):"";return`${t}${i}`}var ef=e.i(91376);async function ev(e){if(!e)return{ok:!1,error:"empty selection"};if(window.isSecureContext){if(!navigator.clipboard?.writeText)return{ok:!1,error:"Clipboard API unavailable in this browser"};try{return await navigator.clipboard.writeText(e),{ok:!0,method:"clipboard-api"}}catch(e){return{ok:!1,method:"clipboard-api",error:e instanceof Error?`${e.name}: ${e.message}`:String(e)}}}try{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let i=document.execCommand("copy");if(document.body.removeChild(t),i)return{ok:!0,method:"execCommand"};return{ok:!1,method:"execCommand",error:"execCommand returned false (use http://localhost for the Clipboard API)"}}catch(e){return{ok:!1,method:"execCommand",error:e instanceof Error?e.message:String(e)}}}e.s(["default",0,function({sessionId:e,height:t="400px",wsPort:i=9601}){let[r]=(0,ef.useSettings)(),h=r.diag,l=(0,n.useRef)(null),c=(0,n.useRef)(null),d=(0,n.useRef)(null),u=(0,n.useRef)(null),[_,f]=(0,n.useState)(!1),[v,p]=(0,n.useState)(0),g=(0,n.useRef)(!1),m=(0,n.useRef)([]),[S,C]=(0,n.useState)(!1),[b,y]=(0,n.useState)(""),[w,E]=(0,n.useState)(!1),x=(0,n.useRef)(null),[k,L]=(0,n.useState)(!1),[D,R]=(0,n.useState)(null),[A,T]=(0,n.useState)(""),B=(0,n.useRef)(null),M=(0,n.useRef)(""),O=(0,n.useCallback)((t,i=!1)=>{let r=c.current,s=(r?.getSelection()??"").trim(),n="";n=(window.getSelection?.()?.toString()??"").trim();let o=((t??"").trim()||s||n||M.current||"").trim();if(!o){eu.copy("copy-attempt",e,{explicit:i,len:0,result:"nothing-selected",xtLen:s.length,domLen:n.length}),i&&(R("Nothing selected to copy"),setTimeout(()=>R(null),2500));return}eu.copy("copy-attempt",e,{explicit:i,len:o.length,xtLen:s.length,domLen:n.length,secure:window.isSecureContext}),ev(o).then(t=>{eu.clipboard("writeText",e,{ok:t.ok,method:t.method??null,error:t.error??null,len:o.length},t.ok?"info":"error"),t.ok?(R(null),L(!0),B.current&&clearTimeout(B.current),B.current=setTimeout(()=>L(!1),1200)):(console.error("[TerminalConsole] copy failed:",t.error),R(t.error||"copy failed"))})},[e]),P=(0,n.useCallback)(async t=>{if(t)try{c.current?.write("\r\n\x1b[1;33m[System] Uploading pasted clipboard image to workspace...\x1b[0m\r\n");let i=await fetch("/api/sessions/upload-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e,base64Data:t,fileName:`pasted_image_${Date.now()}.png`})});if(i.ok){let e=await i.json();if(e.success&&e.path){c.current?.write(`\x1b[1;32m[System] Saved clipboard image to ${e.path}\x1b[0m\r
|
|
12
12
|
`);let t=d.current;t&&t.readyState===WebSocket.OPEN&&t.send(JSON.stringify({type:"input",data:e.path}))}else c.current?.write(`\x1b[1;31m[System Error] Failed to save image: ${e.error||"unknown"}\x1b[0m\r
|
|
13
13
|
`)}else c.current?.write("\x1b[1;31m[System Error] HTTP upload failed.\x1b[0m\r\n")}catch(t){let e=t instanceof Error?t.message:String(t);c.current?.write(`\x1b[1;31m[System Error] Upload failed: ${e}\x1b[0m\r
|
|
14
|
-
`)}},[e]),I=(0,n.useCallback)(()=>{let t=eu.toJSONL(),i=new Date().toISOString().replace(/[:.]/g,"-"),r=new Blob([t],{type:"application/x-ndjson"}),s=URL.createObjectURL(r),n=document.createElement("a");n.href=s,n.download=`terminal-diag-${e.substring(0,8)}-${i}.jsonl`,document.body.appendChild(n),n.click(),document.body.removeChild(n),setTimeout(()=>URL.revokeObjectURL(s),1e3)},[e]);(0,n.useEffect)(()=>()=>{B.current&&clearTimeout(B.current)},[]),(0,n.useEffect)(()=>{let e=d.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:h?"diag-enable":"diag-disable"}))},[h]),(0,n.useEffect)(()=>{S&&u.current&&(u.current.focus(),u.current.select())},[S]);let H=()=>{x.current&&b&&x.current.findNext(b,{caseSensitive:w,incremental:!1})},F=()=>{x.current&&b&&x.current.findPrevious(b,{caseSensitive:w,incremental:!1})};return(0,n.useEffect)(()=>{x.current&&b&&x.current.findNext(b,{caseSensitive:w,incremental:!0})},[b,w]),(0,n.useEffect)(()=>{if(f(!1),g.current=!1,m.current=[],p(0),C(!1),y(""),!l.current)return;let t=!1,r=new o.Terminal({cursorBlink:!0,fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontSize:13,lineHeight:1.2,scrollback:5e3,theme:{background:"#05070a",foreground:"#c9d1d9",cursor:"#a855f7",black:"#000000",red:"#ff5555",green:"#50fa7b",yellow:"#f1fa8c",blue:"#bd93f9",magenta:"#ff79c6",cyan:"#8be9fd",white:"#ffffff"}}),s=new a.FitAddon;r.loadAddon(s);let n=new el;r.loadAddon(n),x.current=n;try{let e=r._core?.coreMouseService||r._core?._coreMouseService;e&&Object.defineProperty(e,"activeProtocol",{get:()=>"NONE",set(){},configurable:!0})}catch(e){console.warn("Failed to disable terminal mouse tracking:",e)}r.open(l.current),r.focus();let
|
|
14
|
+
`)}},[e]),I=(0,n.useCallback)(()=>{let t=eu.toJSONL(),i=new Date().toISOString().replace(/[:.]/g,"-"),r=new Blob([t],{type:"application/x-ndjson"}),s=URL.createObjectURL(r),n=document.createElement("a");n.href=s,n.download=`terminal-diag-${e.substring(0,8)}-${i}.jsonl`,document.body.appendChild(n),n.click(),document.body.removeChild(n),setTimeout(()=>URL.revokeObjectURL(s),1e3)},[e]);(0,n.useEffect)(()=>()=>{B.current&&clearTimeout(B.current)},[]),(0,n.useEffect)(()=>{let e=d.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:h?"diag-enable":"diag-disable"}))},[h]),(0,n.useEffect)(()=>{S&&u.current&&(u.current.focus(),u.current.select())},[S]);let H=()=>{x.current&&b&&x.current.findNext(b,{caseSensitive:w,incremental:!1})},F=()=>{x.current&&b&&x.current.findPrevious(b,{caseSensitive:w,incremental:!1})};return(0,n.useEffect)(()=>{x.current&&b&&x.current.findNext(b,{caseSensitive:w,incremental:!0})},[b,w]),(0,n.useEffect)(()=>{if(f(!1),g.current=!1,m.current=[],p(0),C(!1),y(""),!l.current)return;let t=!1,r=new o.Terminal({cursorBlink:!0,fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontSize:13,lineHeight:1.2,scrollback:5e3,theme:{background:"#05070a",foreground:"#c9d1d9",cursor:"#a855f7",black:"#000000",red:"#ff5555",green:"#50fa7b",yellow:"#f1fa8c",blue:"#bd93f9",magenta:"#ff79c6",cyan:"#8be9fd",white:"#ffffff"}}),s=new a.FitAddon;r.loadAddon(s);let n=new el;r.loadAddon(n),x.current=n;let h=!1;try{let e=r._core?.coreMouseService||r._core?._coreMouseService;e&&Object.defineProperty(e,"activeProtocol",{get:()=>"NONE",set(e){h="NONE"!==e},configurable:!0})}catch(e){console.warn("Failed to disable terminal mouse tracking:",e)}r.open(l.current),r.focus();let u=l.current,_=t=>{if(2===t.button){let i=e_("u">typeof document?document.activeElement:null),s="u">typeof document?document.hasFocus():null;r.focus();let n=e_("u">typeof document?document.activeElement:null);eu.focus("right-click-mousedown",e,{button:t.button,hasFocus:s,activeBefore:i,activeAfter:n,focusRan:!0,hasSelection:r.hasSelection()}),r.hasSelection()&&t.stopPropagation()}},v=()=>{let e=(r.getSelection()??"").trim();if(e)return e;{let e=(window.getSelection?.()?.toString()??"").trim();if(e)return e}return""},S=e=>{if(2===e.button){v()&&e.stopPropagation();return}if(0===e.button){let e=v(),t=(r.getSelection()??"").length,i=(window.getSelection?.()?.toString()??"").length,s="u">typeof document&&document.hasFocus()?1:0,n=window.devicePixelRatio;T(`xt:${t} dom:${i} hs:${+!!r.hasSelection()} foc:${s} dpr:${n}`),e&&(M.current=e,O(e))}},b=t=>{eu.paste("contextmenu",e,{defaultPrevented:t.defaultPrevented,target:e_(t.target),hasSelection:r.hasSelection()})},w=t=>{let i=t.clipboardData?Array.from(t.clipboardData.types):[],r=0;try{r=t.clipboardData?.getData("text/plain")?.length??0}catch{r=-1}eu.paste("paste-event",e,{types:i,len:r,target:e_(t.target),hasFocus:"u">typeof document?document.hasFocus():null,wsState:d.current?.readyState??null})},E=u?.querySelector("textarea.xterm-helper-textarea")??null,k=()=>eu.focus("textarea-focus",e,{hasFocus:"u">typeof document?document.hasFocus():null}),L=()=>eu.focus("textarea-blur",e,{active:e_("u">typeof document?document.activeElement:null)}),D=()=>eu.focus("visibilitychange",e,{visibility:"u">typeof document?document.visibilityState:null,hasFocus:"u">typeof document?document.hasFocus():null}),R=e=>{if(!h||"alternate"!==r.buffer.active.type)return;let t=d.current;if(!t||t.readyState!==WebSocket.OPEN)return;e.preventDefault(),e.stopPropagation();let i=e.deltaY<0?64:65,s=Math.min(Math.max(1,Math.round(Math.abs(e.deltaY)/40)),5),n=1,o=1;try{let t=u?.querySelector(".xterm-screen")??null,i=t?.getBoundingClientRect(),s=r._core?._renderService?.dimensions?.css?.cell;i&&s&&s.width>0&&s.height>0&&(n=Math.min(Math.max(1,Math.floor((e.clientX-i.left)/s.width)+1),r.cols),o=Math.min(Math.max(1,Math.floor((e.clientY-i.top)/s.height)+1),r.rows))}catch{}let a="";for(let e=0;e<s;e++)a+=`\x1b[<${i};${n};${o}M`;try{t.send(JSON.stringify({type:"input",data:a}))}catch{}};u&&(u.addEventListener("mousedown",_,!0),u.addEventListener("mouseup",S),u.addEventListener("contextmenu",b),u.addEventListener("paste",w,!0),u.addEventListener("wheel",R,{capture:!0,passive:!1})),E&&(E.addEventListener("focus",k),E.addEventListener("blur",L)),document.addEventListener("visibilitychange",D);let A=r.onSelectionChange(()=>{let e=r.getSelection();e&&e.trim()&&(M.current=e)}),B=()=>{let e=window.getSelection?.();if(!e)return;let t=e.toString(),i=e.anchorNode;t&&t.trim()&&u&&i&&u.contains(i)&&(M.current=t)};document.addEventListener("selectionchange",B),r.attachCustomKeyEventHandler(t=>{if(t.ctrlKey&&"f"===t.key&&"keydown"===t.type)return t.preventDefault(),C(!0),!1;if((t.ctrlKey||t.metaKey)&&t.shiftKey&&("c"===t.key||"C"===t.key)&&"keydown"===t.type){let e=v();if(e)return O(e),!1}if((t.ctrlKey||t.metaKey)&&!t.shiftKey&&"c"===t.key&&"keydown"===t.type){let e=v();if(e)return O(e),!1}return!t.ctrlKey&&!t.metaKey||"v"!==t.key&&"V"!==t.key||"keydown"!==t.type||(eu.paste("ctrl-v-keydown",e,{key:t.key,ctrl:t.ctrlKey,meta:t.metaKey,shift:t.shiftKey,returned:!1,hasFocus:"u">typeof document?document.hasFocus():null,active:e_("u">typeof document?document.activeElement:null),wsState:d.current?.readyState??null}),!1)});try{let e=r._core;if(e){for(let t of[e.viewport,e._viewport,r.viewport,r._viewport].filter(Boolean)){let e=t._innerRefresh;if(e&&!t._innerRefresh.__patched){let i=function(...t){try{return e.apply(this,t)}catch(e){console.warn("Suppressed xterm viewport refresh error during unmount:",e)}};i.__patched=!0,t._innerRefresh=i}}for(let t of[e._renderService,e.renderService,r._renderService,r.renderService].filter(Boolean))t&&!t.__dimensionsPatched&&(t.__dimensionsPatched=!0,Object.defineProperty(t,"dimensions",{get(){try{if(this._renderer&&this._renderer.value)return this._renderer.value.dimensions}catch{}return{device:{cell:{width:0,height:0},canvas:{width:0,height:0}},css:{cell:{width:0,height:0},canvas:{width:0,height:0}}}},configurable:!0}))}}catch(e){console.warn("Failed to apply xterm monkeypatch:",e)}let P=setTimeout(()=>{if(!t)try{l.current&&l.current.clientWidth>0&&l.current.clientHeight>0&&s.fit()}catch(e){console.warn("Failed to fit terminal on mount",e)}},100);c.current=r;let I="https:"===window.location.protocol?"wss:":"ws:",H=`${I}//${window.location.hostname}:${i}`,F=new WebSocket(H);d.current=F;let W=eu.subscribe(e=>{if(eu.isEnabled()&&F.readyState===WebSocket.OPEN)try{F.send(JSON.stringify({type:"diag",event:e}))}catch{}});F.onopen=()=>{t||(eu.ws("ws-open",e,{url:H}),r.write("\r\n\x1b[1;36m[System] Console bridge connected to gateway WebSocket...\x1b[0m\r\n"),F.send(JSON.stringify({type:"handshake",sessionId:e})),eu.isEnabled()&&F.send(JSON.stringify({type:"diag-enable"})),F.send(JSON.stringify({type:"resize",cols:r.cols,rows:r.rows})),r.focus())},F.onmessage=e=>{if(!t)try{let t=JSON.parse(e.data);if("diag-server"===t.type){t.event&&eu.ingest(t.event);return}"handshake-ack"===t.type?(r.clear(),t.history&&r.write(t.history),r.focus()):"output"===t.type?g.current?(m.current.push({type:"output",data:t.data}),p(m.current.length)):r.write(t.data):"error"===t.type&&(g.current?(m.current.push({type:"error",message:t.message}),p(m.current.length)):r.write(`\r
|
|
15
15
|
\x1b[1;31m[System Error] ${t.message}\x1b[0m\r
|
|
16
|
-
`))}catch{g.current?(m.current.push({type:"raw",data:e.data}),p(m.current.length)):r.write(e.data)}},
|
|
16
|
+
`))}catch{g.current?(m.current.push({type:"raw",data:e.data}),p(m.current.length)):r.write(e.data)}},F.onclose=()=>{t||(eu.ws("ws-close",e,{}),r.write("\r\n\x1b[1;31m[System] Connection closed. Terminal session ended.\x1b[0m\r\n"))},F.onerror=()=>{eu.ws("ws-error",e,{readyState:F.readyState},"error")},r.onData(i=>{if(t)return;let r=F.readyState===WebSocket.OPEN,s=i.includes("\x1b[200~"),n=!1;if(r)try{F.send(JSON.stringify({type:"input",data:i})),n=!0}catch{n=!1}(s||i.length>1)&&eu.paste("ondata-to-pty",e,{bytes:i.length,bracketed:s,wsState:F.readyState,sent:n})}),r.onResize(({cols:e,rows:i})=>{t||F.readyState===WebSocket.OPEN&&F.send(JSON.stringify({type:"resize",cols:e,rows:i}))});let N=new ResizeObserver(()=>{if(!t)try{l.current&&l.current.isConnected&&l.current.clientWidth>0&&l.current.clientHeight>0&&s.fit()}catch{}});return N.observe(l.current),()=>{t=!0,clearTimeout(P),A.dispose(),W(),document.removeEventListener("selectionchange",B),document.removeEventListener("visibilitychange",D),N.disconnect(),F.close(),u&&(u.removeEventListener("mousedown",_,!0),u.removeEventListener("mouseup",S),u.removeEventListener("contextmenu",b),u.removeEventListener("paste",w,!0),u.removeEventListener("wheel",R,{capture:!0})),E&&(E.removeEventListener("focus",k),E.removeEventListener("blur",L));try{s.dispose(),r.dispose()}catch(e){console.warn("Error disposing terminal:",e)}}},[e,i,O]),(0,s.jsxs)("div",{onPaste:e=>{let t=e.clipboardData?.items;if(t)for(let i=0;i<t.length;i++){let r=t[i];if(-1!==r.type.indexOf("image")){let t=r.getAsFile();if(!t)continue;e.preventDefault();let i=new FileReader;i.onload=e=>{let t=e.target?.result;t&&P(t)},i.readAsDataURL(t);break}}},style:{width:"100%",height:t,backgroundColor:"#05070a",border:"1px solid var(--border)",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column",position:"relative"},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"6px 12px",backgroundColor:"#030406",borderBottom:"1px solid var(--border)",fontSize:"0.7rem",color:"var(--muted)",userSelect:"none"},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[(0,s.jsxs)("span",{children:["Session ID: ",(0,s.jsx)("strong",{style:{color:"#cbd5e1",fontFamily:"var(--font-mono)"},children:e.substring(0,8)})]}),_&&(0,s.jsxs)("span",{style:{backgroundColor:"rgba(217, 119, 82, 0.15)",color:"#e0825f",padding:"1px 6px",borderRadius:"3px",fontWeight:600,fontSize:"0.6rem",border:"1px solid rgba(217, 119, 82, 0.25)"},children:["⏸️ Scroll Paused (",v," queued)"]})]}),(0,s.jsxs)("div",{style:{display:"flex",gap:"0.35rem",alignItems:"center"},children:[h&&(0,s.jsxs)("span",{title:"Build + selection diagnostic — xt=xterm selection length, dom=native selection length, hs=hasSelection, foc=document focused, dpr=device pixel ratio",style:{color:"#7dd3fc",fontSize:"0.6rem",fontFamily:"var(--font-mono)",opacity:.8},children:["0.3.3",A?` ${A}`:""]}),k&&(0,s.jsx)("span",{style:{color:"#50fa7b",fontSize:"0.65rem",fontWeight:600},children:"✓ Copied"}),D&&(0,s.jsxs)("span",{title:D,style:{color:"#ff6b6b",fontSize:"0.65rem",fontWeight:600,maxWidth:"260px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["⚠ Copy failed: ",D]}),h&&(0,s.jsx)("button",{onClick:I,style:{padding:"2px 6px",borderRadius:"3px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--muted)",fontSize:"0.65rem",fontWeight:600,cursor:"pointer"},title:"Download terminal diagnostic log (.jsonl) — captures copy/paste/focus/ws events for debugging",children:"⬇ Diag"}),(0,s.jsx)("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>O(void 0,!0),style:{padding:"2px 6px",borderRadius:"3px",border:"1px solid var(--border)",backgroundColor:"transparent",color:"var(--muted)",fontSize:"0.65rem",fontWeight:600,cursor:"pointer"},title:"Copy selected terminal text (also auto-copies on selection)",children:"📋 Copy"}),(0,s.jsx)("button",{onClick:()=>{f(e=>{let t=!e;return g.current=t,t||(()=>{let e=m.current;m.current=[],p(0);let t=c.current;if(t)for(let i of e)"output"===i.type&&i.data?t.write(i.data):"error"===i.type&&i.message?t.write(`\r
|
|
17
17
|
\x1b[1;31m[System Error] ${i.message}\x1b[0m\r
|
|
18
18
|
`):"raw"===i.type&&i.data&&t.write(i.data)})(),t})},style:{padding:"2px 6px",borderRadius:"3px",border:_?"1px solid #d97706":"1px solid var(--border)",backgroundColor:_?"rgba(217, 119, 82, 0.15)":"transparent",color:_?"#e0825f":"var(--muted)",fontSize:"0.65rem",fontWeight:600,cursor:"pointer"},title:_?"Resume stdout scrolling":"Pause stdout scroll buffering",children:_?"▶️ Resume":"⏸️ Pause Scroll"}),(0,s.jsx)("button",{onClick:()=>C(!S),style:{padding:"2px 6px",borderRadius:"3px",border:S?"1px solid var(--primary)":"1px solid var(--border)",backgroundColor:S?"rgba(168, 85, 247, 0.15)":"transparent",color:S?"#c084fc":"var(--muted)",fontSize:"0.65rem",fontWeight:600,cursor:"pointer"},title:"Search console output (Ctrl+F)",children:"🔍 Search"})]})]}),(0,s.jsxs)("div",{style:{flex:1,position:"relative",minHeight:0},children:[S&&(0,s.jsxs)("div",{style:{position:"absolute",top:"8px",right:"24px",zIndex:50,backgroundColor:"#0b101b",border:"1px solid var(--border-focus)",borderRadius:"6px",padding:"6px 8px",display:"flex",alignItems:"center",gap:"0.35rem",boxShadow:"0 4px 12px rgba(0,0,0,0.5)"},children:[(0,s.jsx)("input",{ref:u,type:"text",value:b,onChange:e=>y(e.target.value),onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),e.shiftKey?F():H()):"Escape"===e.key&&(e.preventDefault(),C(!1),c.current?.focus())},placeholder:"Find...",style:{backgroundColor:"#05070a",border:"1px solid var(--border)",borderRadius:"4px",padding:"2px 6px",color:"#e2e8f0",fontSize:"0.7rem",outline:"none",width:"120px"}}),(0,s.jsx)("button",{onClick:F,style:{backgroundColor:"transparent",border:"1px solid var(--border)",color:"var(--foreground)",borderRadius:"3px",padding:"2px 4px",cursor:"pointer",fontSize:"0.65rem"},title:"Previous match (Shift+Enter)",children:"▲"}),(0,s.jsx)("button",{onClick:H,style:{backgroundColor:"transparent",border:"1px solid var(--border)",color:"var(--foreground)",borderRadius:"3px",padding:"2px 4px",cursor:"pointer",fontSize:"0.65rem"},title:"Next match (Enter)",children:"▼"}),(0,s.jsx)("button",{onClick:()=>E(!w),style:{border:w?"1px solid var(--primary)":"1px solid var(--border)",backgroundColor:w?"rgba(168, 85, 247, 0.15)":"transparent",color:w?"#c084fc":"var(--muted)",borderRadius:"3px",padding:"2px 4px",cursor:"pointer",fontSize:"0.65rem",fontWeight:600},title:"Match Case",children:"Aa"}),(0,s.jsx)("button",{onClick:()=>{C(!1),c.current?.focus()},style:{background:"none",border:"none",color:"var(--muted)",cursor:"pointer",fontSize:"0.75rem",padding:"0 2px"},title:"Close search panel",children:"✖"})]}),(0,s.jsx)("div",{ref:l,style:{width:"100%",height:"100%",padding:"8px"}})]})]})}],5991)}]);
|