antigravity-mobile-proxy 1.1.4 → 1.2.0
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/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +13 -12
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +6 -0
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +3 -3
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/artifacts/[convId]/[filename]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/artifacts/[convId]/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/artifacts/[convId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/artifacts/active/[filename]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/artifacts/active/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/artifacts/active/route.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/artifacts/active/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/artifacts/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/changes/accept-all/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/changes/active/route.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/changes/active/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/changes/diff/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/changes/reject-all/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/action/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/agent/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/approve/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/history/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/mode/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/monitor/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/new/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/reject/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/state/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/stop/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/chat/stream/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/conversations/active/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/conversations/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/conversations/select/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/debug/artifact-test/route.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/debug/artifact-test/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/v1/debug/artifact-test/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/debug/dom/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/debug/scrape/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/git/push/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/git/status/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/health/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/windows/cdp-start/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/windows/cdp-status/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/windows/close/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/windows/open/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/windows/recent/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/windows/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/windows/select/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/workspace/content/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/v1/workspace/files/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/debug/page.js +3 -3
- package/.next/standalone/.next/server/app/debug/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/debug/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page.js +3 -3
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/~offline/page.js +3 -3
- package/.next/standalone/.next/server/app/~offline/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/~offline/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +13 -12
- package/.next/standalone/.next/server/chunks/1565.js +1 -1
- package/.next/standalone/.next/server/chunks/8166.js +1 -1
- package/.next/standalone/.next/server/chunks/9814.js +3 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/pages/500.html +2 -2
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/366-0da170bc0fe1f16e.js +3 -0
- package/.next/static/chunks/8710-6b1b2eea72777418.js +1 -0
- package/.next/static/chunks/app/_global-error/page-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/_not-found/page-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/artifacts/[convId]/[filename]/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/artifacts/[convId]/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/artifacts/active/[filename]/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/artifacts/active/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/artifacts/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/changes/accept-all/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/changes/active/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/changes/diff/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/changes/reject-all/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/action/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/agent/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/approve/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/history/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/mode/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/monitor/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/new/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/reject/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/state/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/stop/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/stream/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/conversations/active/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/conversations/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/conversations/select/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/debug/artifact-test/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/debug/dom/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/debug/scrape/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/git/commit/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/git/diff/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/git/push/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/git/status/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/health/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/windows/cdp-start/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/windows/cdp-status/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/windows/close/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/windows/open/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/windows/recent/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/windows/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/windows/select/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/workspace/content/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/api/v1/workspace/files/route-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/{layout-7757590e84032b92.js → layout-8047c1c03b631ac3.js} +2 -2
- package/.next/static/chunks/app/not-found-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/app/page-04ba0cb0c37b893d.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-3dc2621e09be9619.js +1 -0
- package/.next/static/chunks/{webpack-503a6513e11f0c2a.js → webpack-fb7bae86ce0f828f.js} +1 -1
- package/.next/static/css/29db8a1a90fb87d6.css +1 -0
- package/.next/static/css/5eacd01f773eed7f.css +11 -0
- package/.next/static/css/ad4f1e7378df6d96.css +1 -0
- package/.next/static/v1.2.0/_buildManifest.js +1 -0
- package/package.json +17 -2
- package/public/sw.js +1 -1
- package/.next/standalone/.next/server/chunks/6368.js +0 -3
- package/.next/static/chunks/4855-d76c75aaf5497499.js +0 -1
- package/.next/static/chunks/7101-c5b762e6184b72a6.js +0 -3
- package/.next/static/chunks/app/_global-error/page-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/_not-found/page-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/artifacts/[convId]/[filename]/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/artifacts/[convId]/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/artifacts/active/[filename]/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/artifacts/active/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/artifacts/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/changes/accept-all/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/changes/active/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/changes/diff/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/changes/reject-all/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/action/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/agent/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/approve/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/history/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/mode/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/monitor/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/new/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/reject/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/state/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/stop/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/stream/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/conversations/active/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/conversations/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/conversations/select/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/debug/dom/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/debug/scrape/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/git/commit/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/git/diff/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/git/push/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/git/status/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/health/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/windows/cdp-start/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/windows/cdp-status/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/windows/close/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/windows/open/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/windows/recent/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/windows/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/windows/select/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/workspace/content/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/api/v1/workspace/files/route-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/not-found-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/app/page-b59642b4851f2952.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-cc79d4c747fe87b0.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-cc79d4c747fe87b0.js +0 -1
- package/.next/static/css/742a8e5707969683.css +0 -1
- package/.next/static/css/a9fb7d1761d6ce7a.css +0 -1
- package/.next/static/v1.1.4/_buildManifest.js +0 -1
- /package/.next/static/{v1.1.4 → v1.2.0}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{416:(e,t,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{416:(e,t,r)=>{"use strict";r.d(t,{default:()=>a});var n=r(5155),i=r(2115),o=r(5772);function a(){let[e,t]=(0,i.useState)(null),[r,a]=(0,i.useState)(!1),[s]=(0,i.useState)(()=>{let e=navigator.userAgent,t=/iPad|iPhone|iPod/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,r=/Safari/.test(e)&&!/CriOS|FxiOS|Chrome/.test(e);return t&&r}),[l]=(0,i.useState)(()=>window.matchMedia("(display-mode: standalone)").matches||!0===window.navigator.standalone);(0,i.useEffect)(()=>{if(l)return;let e=localStorage.getItem("pwa-install-dismissed");if(e){let t=parseInt(e,10);if((Date.now()-t)/864e5<7)return}if(s){let e=setTimeout(()=>a(!0),3e3);return()=>clearTimeout(e)}let r=e=>{e.preventDefault(),t(e),a(!0)};return window.addEventListener("beforeinstallprompt",r),window.addEventListener("appinstalled",()=>{a(!1),t(null)}),()=>{window.removeEventListener("beforeinstallprompt",r)}},[l,s]);let d=(0,i.useCallback)(async()=>{if(e){try{await e.prompt();let t=await e.userChoice;"accepted"===t.outcome&&a(!1)}catch(e){console.error("PWA install error:",e)}t(null)}},[e]),c=(0,i.useCallback)(()=>{a(!1),localStorage.setItem("pwa-install-dismissed",Date.now().toString())},[]);return!r||l?null:(0,n.jsxs)("div",{style:{position:"fixed",bottom:0,left:0,right:0,zIndex:9999,padding:"12px 16px",background:"linear-gradient(135deg, rgba(20, 20, 35, 0.98), rgba(30, 25, 50, 0.98))",backdropFilter:"blur(20px)",borderTop:"1px solid rgba(139, 92, 246, 0.3)",display:"flex",alignItems:"center",gap:"12px",animation:"slideUp 0.3s ease-out",boxShadow:"0 -4px 20px rgba(0, 0, 0, 0.4)"},children:[(0,n.jsx)("style",{children:`
|
|
2
2
|
@keyframes slideUp {
|
|
3
3
|
from { transform: translateY(100%); opacity: 0; }
|
|
4
4
|
to { transform: translateY(0); opacity: 1; }
|
|
5
5
|
}
|
|
6
|
-
`}),(0,n.jsx)("div",{style:{width:44,height:44,borderRadius:10,overflow:"hidden",flexShrink:0,border:"1px solid rgba(139, 92, 246, 0.2)"},children:(0,n.jsx)(
|
|
6
|
+
`}),(0,n.jsx)("div",{style:{width:44,height:44,borderRadius:10,overflow:"hidden",flexShrink:0,border:"1px solid rgba(139, 92, 246, 0.2)"},children:(0,n.jsx)(o.default,{src:"/icons/icon-192.png",alt:"Antigravity",width:44,height:44,style:{display:"block"}})}),(0,n.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,n.jsx)("div",{style:{color:"#f0f0f5",fontSize:"14px",fontWeight:600,fontFamily:"Inter, system-ui, sans-serif"},children:"Install Antigravity"}),(0,n.jsx)("div",{style:{color:"#9ca3af",fontSize:"12px",fontFamily:"Inter, system-ui, sans-serif",marginTop:2},children:s?'Tap the Share button, then "Add to Home Screen"':"Add to home screen for quick access"})]}),!s&&(0,n.jsx)("button",{onClick:d,style:{padding:"8px 16px",borderRadius:8,border:"none",background:"linear-gradient(135deg, #8b5cf6, #6d28d9)",color:"#fff",fontSize:"13px",fontWeight:600,fontFamily:"Inter, system-ui, sans-serif",cursor:"pointer",flexShrink:0,whiteSpace:"nowrap"},children:"Install"}),(0,n.jsx)("button",{onClick:c,style:{background:"none",border:"none",color:"#6b7280",fontSize:"18px",cursor:"pointer",padding:"4px",lineHeight:1,flexShrink:0},"aria-label":"Dismiss install prompt",children:"✕"})]})}},2026:(e,t,r)=>{"use strict";r.d(t,{default:()=>s});var n=r(5155),i=r(516);function o({children:e}){return(0,n.jsx)(i.Kq,{delayDuration:400,skipDelayDuration:300,children:e})}var a=r(6609);function s({children:e}){return(0,n.jsxs)(o,{children:[e,(0,n.jsx)(a.l$,{position:"top-center",toastOptions:{style:{background:"var(--surface-2)",border:"1px solid var(--border-1)",color:"var(--text-1)",fontSize:"13px"}},theme:"dark"})]})}},6872:()=>{},7675:(e,t,r)=>{Promise.resolve().then(r.bind(r,2026)),Promise.resolve().then(r.bind(r,416)),Promise.resolve().then(r.t.bind(r,1593,23)),Promise.resolve().then(r.t.bind(r,3238,23)),Promise.resolve().then(r.t.bind(r,6872,23))}},e=>{e.O(0,[1853,7513,366,8441,8928,7358],()=>e(e.s=7675)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{5035:(e,t,s)=>{Promise.resolve().then(s.bind(s,8668))},8668:(e,t,s)=>{"use strict";s.d(t,{default:()=>ee});var n=s(5155),a=s(2115),i=s(901),r=s(4855);let l="/api/v1",c=e=>fetch(e).then(e=>e.json()),o={windows:`${l}/windows`,cdpStatus:`${l}/windows/cdp-status`,conversations:`${l}/conversations`,recentProjects:`${l}/windows/recent`,artifacts:`${l}/artifacts/active`,changes:`${l}/changes/active`,git:`${l}/git/status`,workspace:`${l}/workspace/files`,history:`${l}/chat/history`,mode:`${l}/chat/mode`,agent:`${l}/chat/agent`,health:`${l}/health`},d="/api/v1",h="/api/v1";function x(e){if(!e)return"";let t=new Date(e),s=Math.floor((Date.now()-t.getTime())/6e4);if(s<1)return"now";if(s<60)return`${s}m ago`;let n=Math.floor(s/60);if(n<24)return`${n} hr${1!==n?"s":""} ago`;let a=Math.floor(n/24);if(a<7)return`${a} day${1!==a?"s":""} ago`;let i=Math.floor(a/7);return`${i} wk${1!==i?"s":""} ago`}function m({conversations:e,activeConversation:t,onSelect:s}){let[i,r]=(0,a.useState)(!1),[l,c]=(0,a.useState)(!1),o=(0,a.useRef)(null),d=(0,a.useCallback)(()=>{r(!1),c(!1)},[]);(0,a.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&d()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[d]);let h=e.find(e=>e.active)||null,m=[...e.filter(e=>!e.active)].sort((e,t)=>e.mtime||t.mtime?e.mtime?t.mtime?new Date(t.mtime).getTime()-new Date(e.mtime).getTime():-1:1:0),p=l?m:m.slice(0,5),g=m.length-5;return(0,n.jsxs)("div",{ref:o,className:`conv-selector-wrapper ${i?"open":""}`,children:[(0,n.jsxs)("button",{className:"conv-selector-btn",onClick:()=>r(!i),title:"Switch conversation",children:[(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),(0,n.jsx)("span",{children:t?.title?.substring(0,22)||"Select a conversation"}),(0,n.jsx)("svg",{className:"chevron",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),(0,n.jsxs)("div",{className:`conv-dropdown ${i?"open":""}`,children:[(0,n.jsx)("div",{className:"conv-dropdown-header",children:"Select a conversation"}),(0,n.jsxs)("div",{className:"conv-dropdown-list",children:[h&&(0,n.jsxs)("div",{className:"conv-section",children:[(0,n.jsx)("div",{className:"conv-section-label",children:"Current"}),(0,n.jsx)("button",{className:"conv-item active",onClick:()=>{-1!==h.index&&s(h.title),d()},children:(0,n.jsxs)("div",{className:"conv-item-header",children:[(0,n.jsx)("span",{className:"conv-item-title",children:h.title||"Untitled"}),h.mtime&&(0,n.jsx)("span",{className:"conv-item-time",children:x(h.mtime)}),(0,n.jsx)("span",{role:"button",tabIndex:0,className:"conv-item-action",title:"Current conversation",onClick:e=>e.stopPropagation(),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&e.stopPropagation()},children:(0,n.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,n.jsx)("path",{d:"M19 6l-1 14H6L5 6"}),(0,n.jsx)("path",{d:"M10 11v6M14 11v6"}),(0,n.jsx)("path",{d:"M9 6V4h6v2"})]})})]})})]}),p.length>0&&(0,n.jsxs)("div",{className:"conv-section",children:[(0,n.jsxs)("div",{className:"conv-section-label",children:["Recent",m.length>0&&(0,n.jsx)("span",{className:"conv-section-count",children:m.length})]}),p.map((e,t)=>{let a=e.title||e.id.substring(0,20)+"…";return(0,n.jsx)("button",{className:"conv-item",onClick:()=>{s(e.title),d()},children:(0,n.jsxs)("div",{className:"conv-item-header",children:[e.active&&(0,n.jsx)("span",{className:"conv-item-dot active"}),(0,n.jsx)("span",{className:"conv-item-title",children:a}),e.mtime&&(0,n.jsx)("span",{className:"conv-item-time",children:x(e.mtime)})]})},`conv-${t}`)}),!l&&g>0&&(0,n.jsxs)("button",{className:"conv-show-more",onClick:e=>{e.stopPropagation(),c(!0)},children:["Show ",g," more…"]})]}),0===e.length&&(0,n.jsx)("div",{className:"conv-dropdown-empty",children:"No conversations found"})]})]})]})}function p({statusState:e,statusText:t,windows:s,conversations:i,activeConversation:r,cdpStatus:l,recentProjects:c,onSelectWindow:o,onSelectConversation:d,onNewChat:h,onStartCdp:x,onOpenWindow:p,onCloseWindow:g}){let[u,j]=(0,a.useState)(!1),[v,f]=(0,a.useState)(""),[w,y]=(0,a.useState)(!1),[k,N]=(0,a.useState)(!1),[b,C]=(0,a.useState)(null),S=(0,a.useRef)(null),W=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=e=>{S.current&&!S.current.contains(e.target)&&j(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,a.useEffect)(()=>{if(b){let e=setTimeout(()=>C(null),4e3);return()=>clearTimeout(e)}},[b]);let $=async()=>{let e=c.length>0?c[0].path:".";N(!0),C(null);try{let t=await x(e,!0);C({text:t.message||(t.success?"CDP started!":"Failed to start CDP"),type:t.success?"success":"error"})}catch{C({text:"Failed to start CDP server",type:"error"})}finally{N(!1)}},A=async e=>{e.preventDefault();let t=v.trim();if(t&&!w){y(!0),C(null);try{let e=await p(t);C({text:e.message||(e.success?"Window opened!":"Failed to open"),type:e.success?"success":"error"}),e.success&&f("")}catch{C({text:"Failed to open window",type:"error"})}finally{y(!1)}}},B=async(e,t,n)=>{if(n.stopPropagation(),!window.confirm(`Close window "${s[e]?.title||e}"?`))return;let a=await g(e,t);C({text:a.message||(a.success?"Closed!":"Failed to close"),type:a.success?"success":"error"})};return(0,n.jsxs)("header",{className:"header",children:[(0,n.jsxs)("div",{className:"header-left",children:[(0,n.jsx)("div",{className:"logo",children:(0,n.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"url(#hg)",strokeWidth:"1.5",children:[(0,n.jsx)("defs",{children:(0,n.jsxs)("linearGradient",{id:"hg",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:"#6366f1"}),(0,n.jsx)("stop",{offset:"100%",stopColor:"#a855f7"})]})}),(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"}),(0,n.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"})]})}),(0,n.jsxs)("div",{className:"header-brand",children:[(0,n.jsx)("div",{className:"header-title",children:(0,n.jsx)("h1",{children:"Antigravity"})}),(0,n.jsx)("div",{className:`header-subtitle status-${e}`,children:t})]})]}),(0,n.jsxs)("div",{className:"header-right",children:[(0,n.jsx)(m,{conversations:i,activeConversation:r,onSelect:d}),(0,n.jsxs)("div",{ref:S,className:`window-selector-wrapper ${u?"open":""}`,children:[(0,n.jsxs)("button",{className:"window-selector-btn",onClick:()=>j(!u),title:"Manage Antigravity windows",children:[(0,n.jsx)("span",{className:`cdp-indicator ${l.active?"active":"inactive"}`}),(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",ry:"2"}),(0,n.jsx)("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),(0,n.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]}),(0,n.jsx)("span",{className:"window-selector-label",children:s.find(e=>e.active)?.title||"Windows"}),(0,n.jsx)("svg",{className:"chevron",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),(0,n.jsxs)("div",{className:`window-dropdown ${u?"open":""}`,children:[(0,n.jsxs)("div",{className:"wm-cdp-status",children:[(0,n.jsxs)("div",{className:"wm-cdp-info",children:[(0,n.jsx)("span",{className:`wm-cdp-dot ${l.active?"active":"inactive"}`}),(0,n.jsx)("span",{children:l.active?`CDP Active \xb7 ${l.windowCount} window${1!==l.windowCount?"s":""}`:"CDP Inactive"})]}),!l.active&&(0,n.jsxs)("button",{className:"wm-cdp-start-btn",onClick:$,disabled:k,title:"Start Antigravity with CDP",children:[k?(0,n.jsx)("span",{className:"wm-spinner"}):(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polygon",{points:"5 3 19 12 5 21 5 3"})}),k?"Starting...":"Start CDP"]})]}),(0,n.jsx)("div",{className:"window-dropdown-header",children:"Open Windows"}),s.map(e=>(0,n.jsxs)("div",{className:`window-item ${e.active?"active":""}`,children:[(0,n.jsxs)("button",{className:"window-item-select",onClick:()=>{o(e.index),j(!1)},children:[(0,n.jsx)("span",{className:"window-dot"}),(0,n.jsx)("span",{className:"window-item-title",children:e.title})]}),(0,n.jsx)("button",{className:"window-item-close",onClick:t=>B(e.index,e.targetId,t),title:`Close "${e.title}"`,children:(0,n.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},e.index)),0===s.length&&(0,n.jsx)("div",{style:{padding:"12px",color:"var(--text-muted)",fontSize:"12px"},children:"No windows detected"}),c.length>0&&(0,n.jsxs)("div",{className:"wm-recent-section",children:[(0,n.jsx)("div",{className:"wm-recent-header",children:"Recent Projects"}),c.map(e=>(0,n.jsxs)("button",{className:"wm-recent-item",onClick:async()=>{y(!0),C(null);try{let t=await p(e.path);C({text:t.message||(t.success?"Opened!":"Failed"),type:t.success?"success":"error"})}catch{C({text:"Failed to open",type:"error"})}finally{y(!1)}},disabled:w,title:e.path,children:[(0,n.jsx)("svg",{className:"wm-recent-icon",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),(0,n.jsxs)("div",{className:"wm-recent-info",children:[(0,n.jsx)("span",{className:"wm-recent-name",children:e.name}),(0,n.jsx)("span",{className:"wm-recent-path",children:e.path})]})]},e.path))]}),(0,n.jsxs)("div",{className:"wm-open-section",children:[(0,n.jsx)("div",{className:"wm-open-label",children:"Open New Window"}),(0,n.jsxs)("form",{className:"wm-open-form",onSubmit:A,children:[(0,n.jsx)("input",{ref:W,type:"text",className:"wm-open-input",value:v,onChange:e=>f(e.target.value),placeholder:"/path/to/project",disabled:w}),(0,n.jsx)("button",{type:"submit",className:"wm-open-btn",disabled:w||!v.trim(),title:"Open directory in Antigravity",children:w?(0,n.jsx)("span",{className:"wm-spinner"}):(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,n.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]})]}),b&&(0,n.jsx)("div",{className:`wm-action-message ${b.type}`,children:b.text})]})]}),(0,n.jsx)("button",{className:"icon-btn",onClick:h,title:"New Chat","aria-label":"New Chat",children:(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,n.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]})]})}let g=[{label:"List workspace files",prompt:"What files are in the current workspace?",icon:(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})},{label:"Explain architecture",prompt:"Explain the architecture of this project",icon:(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("rect",{x:"3",y:"3",width:"7",height:"7"}),(0,n.jsx)("rect",{x:"14",y:"3",width:"7",height:"7"}),(0,n.jsx)("rect",{x:"14",y:"14",width:"7",height:"7"}),(0,n.jsx)("rect",{x:"3",y:"14",width:"7",height:"7"})]})},{label:"Debug last error",prompt:"Help me debug the most recent error",icon:(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,n.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})},{label:"Review recent changes",prompt:"Review and summarize the most recent code changes",icon:(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("path",{d:"M12 20h9"}),(0,n.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"})]})}];function u({onQuickPrompt:e}){return(0,n.jsxs)("div",{className:"welcome-screen",children:[(0,n.jsxs)("div",{className:"welcome-logo-wrapper",children:[(0,n.jsx)("div",{className:"welcome-logo-glow"}),(0,n.jsx)("div",{className:"welcome-logo",children:(0,n.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"url(#wg)",strokeWidth:"1.5",children:[(0,n.jsx)("defs",{children:(0,n.jsxs)("linearGradient",{id:"wg",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:"#6366f1"}),(0,n.jsx)("stop",{offset:"100%",stopColor:"#a855f7"})]})}),(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"}),(0,n.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"})]})})]}),(0,n.jsx)("h2",{children:"Antigravity Agent"}),(0,n.jsx)("p",{children:"Ask anything — files, terminal, search, and more, all from your browser."}),(0,n.jsx)("div",{className:"quick-prompts",children:g.map(t=>(0,n.jsxs)("button",{className:"quick-prompt",onClick:()=>e(t.prompt),children:[(0,n.jsx)("div",{className:"quick-prompt-icon",children:t.icon}),(0,n.jsx)("span",{className:"quick-prompt-label",children:t.label})]},t.prompt))})]})}function j({content:e}){return(0,n.jsxs)("div",{className:"user-message",children:[(0,n.jsx)("div",{className:"message-content",children:e}),(0,n.jsx)("div",{className:"user-avatar","aria-hidden":"true",children:"U"})]})}let v={command:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/></svg>',file:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>',search:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',read:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',browser:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>',mcp:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2v6M12 22v-6M4.93 4.93l4.24 4.24M14.83 14.83l4.24 4.24M2 12h6M22 12h-6M4.93 19.07l4.24-4.24M14.83 9.17l4.24-4.24"/><circle cx="12" cy="12" r="4"/></svg>'},f='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>';function w(e){let t=e.toLowerCase();return"deny"===t||"block"===t||"reject"===t?"permission-btn deny":"allow"===t||"allow once"===t||"allow this conversation"===t?"permission-btn allow":"tool-footer-btn"}function y({data:e,onAction:t}){let s,a="permission required"===(s=(e.status||"").toLowerCase())?"permission":s.startsWith("running")||s.startsWith("editing")||s.startsWith("creating")||s.startsWith("search")?"running":s.startsWith("ran")||s.startsWith("edited")||s.startsWith("created")||s.startsWith("read")||s.startsWith("viewed")||s.startsWith("analyzed")||s.startsWith("wrote")||s.startsWith("replaced")||s.startsWith("deleted")?"done":s.includes("error")||s.includes("fail")?"error":s.startsWith("mcp")?"mcp":"running",i="permission"===a,r=i?f:v[e.type]||v.file,l=async s=>{if(t)return void t(e.id,s);try{await fetch("/api/v1/chat/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolId:e.id,buttonText:s})})}catch{}};return i?(0,n.jsxs)("div",{className:"permission-card","data-tool-index":e.index,children:[(0,n.jsxs)("div",{className:"permission-header",children:[(0,n.jsx)("span",{className:"permission-icon",dangerouslySetInnerHTML:{__html:f}}),(0,n.jsx)("span",{className:"permission-title",children:"Permission Required"})]}),e.path?(0,n.jsxs)("div",{className:"permission-description",children:["The agent needs access to: ",(0,n.jsx)("code",{className:"permission-path",children:e.path})]}):(0,n.jsx)("div",{className:"permission-description",children:"The agent is requesting your approval to proceed."}),e.footerButtons&&e.footerButtons.length>0&&(0,n.jsx)("div",{className:"permission-actions",children:e.footerButtons.map((e,t)=>(0,n.jsx)("button",{className:w(e),onClick:()=>l(e),children:e},t))})]}):(0,n.jsxs)("div",{className:`tool-call-card ${a}`,"data-tool-index":e.index,children:[(0,n.jsxs)("div",{className:"tool-header",children:[(0,n.jsx)("span",{className:"tool-icon",dangerouslySetInnerHTML:{__html:r}}),(0,n.jsx)("span",{className:"tool-status-text",children:e.status}),e.path&&(0,n.jsx)("span",{className:"tool-path",title:e.path,children:e.path})]}),e.command&&(0,n.jsx)("div",{className:"tool-command",children:(0,n.jsx)("code",{children:e.command})}),(e.additions||e.deletions)&&(0,n.jsxs)("div",{className:"tool-file-changes",children:[e.additions&&(0,n.jsx)("span",{className:"tool-additions",children:e.additions}),e.deletions&&(0,n.jsx)("span",{className:"tool-deletions",children:e.deletions})]}),e.exitCode&&(0,n.jsx)("div",{className:"tool-exit-code",children:e.exitCode}),e.terminalOutput&&(0,n.jsx)("div",{className:"tool-terminal",children:e.terminalOutput}),e.footerButtons&&e.footerButtons.length>0&&(0,n.jsx)("div",{className:"tool-footer-actions",children:e.footerButtons.map((e,t)=>(0,n.jsx)("button",{className:w(e),onClick:()=>l(e),children:e},t))})]})}function k({time:e}){return(0,n.jsxs)("div",{className:"thinking-block",children:[(0,n.jsx)("span",{className:"thinking-icon",children:"\uD83D\uDCAD"}),(0,n.jsx)("span",{children:e})]})}function N(){return(0,n.jsxs)("div",{className:"typing-indicator",children:[(0,n.jsx)("div",{className:"typing-dot"}),(0,n.jsx)("div",{className:"typing-dot"}),(0,n.jsx)("div",{className:"typing-dot"})]})}function b(){return(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"url(#ag-av)",strokeWidth:"1.5",children:[(0,n.jsx)("defs",{children:(0,n.jsxs)("linearGradient",{id:"ag-av",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:"#6366f1"}),(0,n.jsx)("stop",{offset:"100%",stopColor:"#a855f7"})]})}),(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"}),(0,n.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"})]})}function C({content:e,steps:t,isStreaming:s,onRetry:a}){return(0,n.jsxs)("div",{className:`agent-message ${s?"streaming":""}`,children:[(0,n.jsx)("div",{className:"agent-avatar","aria-hidden":"true",children:(0,n.jsx)(b,{})}),(0,n.jsxs)("div",{className:"agent-message-body",children:[(0,n.jsxs)("div",{className:"agent-steps",children:[t.map((e,t)=>{switch(e.type){case"thinking":return(0,n.jsx)(k,{time:e.data.time},`step-${t}`);case"tool_call":return(0,n.jsx)(y,{data:e.data},`step-${t}`);case"hitl":case"notification":default:return null;case"file_change":return(0,n.jsxs)("div",{className:"file-change-indicator",children:[(0,n.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),(0,n.jsx)("polyline",{points:"14 2 14 8 20 8"})]}),(0,n.jsx)("span",{className:"file-change-name",children:e.data.fileName})]},`step-${t}`);case"error":return(0,n.jsxs)("div",{className:"error-banner",children:[(0,n.jsxs)("div",{style:{marginBottom:!s&&a?"8px":"0"},children:[(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{display:"inline",verticalAlign:"middle",marginRight:6},children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,n.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),String(e.data.message)]}),!s&&a&&(0,n.jsx)("button",{style:{padding:"6px 14px",background:"rgba(239,68,68,0.12)",border:"1px solid rgba(239,68,68,0.35)",borderRadius:8,color:"#fca5a5",fontSize:12,fontWeight:600,cursor:"pointer"},onClick:a,children:"Try Again"})]},`step-${t}`)}}),s&&(0,n.jsx)(N,{})]}),e&&(0,n.jsx)("div",{className:"agent-response",dangerouslySetInnerHTML:{__html:e}})]})]})}function S({messages:e,currentSteps:t,currentResponse:s,isStreaming:a,onRetry:i}){return(0,n.jsxs)(n.Fragment,{children:[e.map((e,t)=>"user"===e.role?(0,n.jsx)(j,{content:e.content},`msg-${t}`):(0,n.jsx)(C,{content:e.content,steps:e.steps||[],isStreaming:!1,onRetry:i},`msg-${t}`)),a&&(0,n.jsx)(C,{content:s,steps:t,isStreaming:!0,onRetry:i})]})}function W({onSend:e,onStop:t,isStreaming:s,currentMode:i,onToggleMode:r,currentAgent:l,agents:c,isLoadingAgents:o,onFetchAgents:d,onSwitchAgent:h,onToggleArtifacts:x,artifactCount:m,artifactPanelOpen:p,onToggleChanges:g,changesCount:u,changesPanelOpen:j,onToggleGit:v,gitChangedCount:f,gitPanelOpen:w,onToggleWorkspace:y,workspacePanelOpen:k}){let[N,b]=(0,a.useState)(""),[C,S]=(0,a.useState)(!1),W=(0,a.useRef)(null),$=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=e=>{$.current&&!$.current.contains(e.target)&&S(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,a.useEffect)(()=>{W.current?.focus()},[]);let A=l?l.replace(/^(Claude\s+|Google\s+|OpenAI\s+)/i,"").substring(0,20):"Agent";return(0,n.jsxs)("footer",{className:"input-area",children:[(0,n.jsxs)("div",{className:"input-toolbar",children:[(0,n.jsxs)("div",{ref:$,className:"agent-selector-wrapper",children:[(0,n.jsxs)("button",{className:"agent-selector-btn",onClick:()=>{C||d(),S(!C)},title:l?`Agent: ${l} — Click to switch`:"Select AI agent","aria-label":`Switch agent (currently ${l||"unknown"})`,type:"button",children:[(0,n.jsx)("span",{className:"agent-icon",children:(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("path",{d:"M12 2a4 4 0 0 1 4 4v2a4 4 0 0 1-8 0V6a4 4 0 0 1 4-4z"}),(0,n.jsx)("path",{d:"M20 21v-2a4 4 0 0 0-3-3.87"}),(0,n.jsx)("path",{d:"M4 21v-2a4 4 0 0 1 3-3.87"}),(0,n.jsx)("circle",{cx:"12",cy:"17",r:"1"}),(0,n.jsx)("path",{d:"M9 17h6"})]})}),(0,n.jsx)("span",{className:"agent-label",children:A}),(0,n.jsx)("svg",{className:`agent-chevron ${C?"open":""}`,width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),(0,n.jsxs)("div",{className:`agent-dropdown ${C?"open":""}`,children:[(0,n.jsx)("div",{className:"agent-dropdown-header",children:"Select Agent"}),o?(0,n.jsxs)("div",{className:"agent-dropdown-loading",children:[(0,n.jsx)("span",{className:"wm-spinner"}),(0,n.jsx)("span",{children:"Loading agents..."})]}):0===c.length?(0,n.jsx)("div",{className:"agent-dropdown-empty",children:"No agents detected. Make sure the IDE has a workbench open."}):(0,n.jsx)("div",{className:"agent-dropdown-list",children:c.map((e,t)=>(0,n.jsxs)("button",{className:`agent-option ${e.active?"active":""} ${l===e.name?"current":""}`,onClick:()=>{h(e.name),S(!1)},type:"button",children:[(0,n.jsx)("span",{className:"agent-option-name",children:e.name}),e.description&&(0,n.jsx)("span",{className:"agent-option-desc",children:e.description}),(e.active||l===e.name)&&(0,n.jsx)("svg",{className:"agent-check",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})})]},t))})]})]}),(0,n.jsxs)("button",{className:`mode-toggle ${i}`,onClick:r,title:`Mode: ${"planning"===i?"Planning":"Fast"} — Click to switch`,"aria-label":`Switch mode (currently ${i})`,type:"button",children:[(0,n.jsx)("span",{className:"mode-icon",children:"planning"===i?(0,n.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),(0,n.jsx)("polyline",{points:"14 2 14 8 20 8"}),(0,n.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),(0,n.jsx)("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]}):(0,n.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}),(0,n.jsx)("span",{className:"mode-label",children:"planning"===i?"Plan":"Fast"})]}),(0,n.jsxs)("button",{className:`artifact-toggle-btn ${p?"active":""}`,onClick:x,title:`Artifacts${m>0?` (${m})`:""}`,"aria-label":"Toggle artifacts panel",type:"button",children:[(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),(0,n.jsx)("polyline",{points:"14 2 14 8 20 8"}),(0,n.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),(0,n.jsx)("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]}),m>0&&(0,n.jsx)("span",{className:"artifact-badge",children:m})]}),(0,n.jsxs)("button",{className:`changes-toggle-btn ${j?"active":""}`,onClick:g,title:`Changes${u>0?` (${u})`:""}`,"aria-label":"Toggle changes panel",type:"button",children:[(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("path",{d:"M12 20h9"}),(0,n.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"})]}),u>0&&(0,n.jsx)("span",{className:"changes-badge",children:u})]}),(0,n.jsxs)("button",{className:`git-toggle-btn ${w?"active":""}`,onClick:v,title:`Git${f>0?` (${f} changed)`:""}`,"aria-label":"Toggle git panel",type:"button",children:[(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("circle",{cx:"18",cy:"18",r:"3"}),(0,n.jsx)("circle",{cx:"6",cy:"6",r:"3"}),(0,n.jsx)("path",{d:"M13 6h3a2 2 0 0 1 2 2v7"}),(0,n.jsx)("line",{x1:"6",y1:"9",x2:"6",y2:"21"})]}),f>0&&(0,n.jsx)("span",{className:"git-badge",children:f})]}),(0,n.jsx)("button",{className:`workspace-toggle-btn ${k?"active":""}`,onClick:y,title:"Working Directory","aria-label":"Toggle working directory panel",type:"button",children:(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})})]}),(0,n.jsxs)("div",{className:"input-wrapper",children:[(0,n.jsx)("textarea",{ref:W,value:N,onChange:e=>{b(e.target.value);let t=e.target;t.style.height="auto",t.style.height=Math.min(t.scrollHeight,150)+"px"},onKeyDown:n=>{if("Escape"===n.key&&s){n.preventDefault(),t();return}"Enter"===n.key&&(n.shiftKey||n.ctrlKey||n.metaKey)&&(n.preventDefault(),N.trim()?(e(N),b(""),W.current&&(W.current.style.height="auto")):s&&t())},placeholder:"Ask the Antigravity agent...",rows:1,"aria-label":"Chat message input",enterKeyHint:"enter",autoComplete:"off"}),(0,n.jsx)("button",{className:`send-btn${s&&N.trim()?" send-btn--interrupt":s?" send-btn--stop":""}`,onClick:()=>{N.trim()?(e(N),b(""),W.current&&(W.current.style.height="auto")):s&&t()},disabled:!s&&!N.trim(),"aria-label":s&&N.trim()?"Interrupt and send new message":s?"Stop generation":"Send message",title:s&&N.trim()?"Interrupt agent and send new message":s?"Stop generation (Esc)":"Send message",children:s&&!N.trim()?(0,n.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"3"})}):(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,n.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,n.jsx)("div",{className:"input-hint",children:(0,n.jsx)("span",{children:"Shift+Enter to send \xb7 Enter for new line \xb7 Ctrl+N for new chat \xb7 Esc to stop"})})]})}function $({open:e,onClose:t,activeConversation:s,files:i}){let[r,l]=(0,a.useState)(null),[c,o]=(0,a.useState)(""),[d,h]=(0,a.useState)(!1),[x,m]=(0,a.useState)("text/plain"),p=async e=>{h(!0),l(e);try{let t=await fetch(`/api/v1/artifacts/active/${encodeURIComponent(e)}`);if(!t.ok){let e=await t.json().catch(()=>({error:"Unknown error"}));o(`Error: ${e.error||t.statusText}`);return}let s=t.headers.get("Content-Type")||"text/plain";if(m(s),s.includes("image")){let e=await t.arrayBuffer(),s="",n=new Uint8Array(e),a=n.byteLength;for(let e=0;e<a;e++)s+=String.fromCharCode(n[e]);let i=window.btoa(s);o(i)}else{let e=await t.text();o(e)}}catch(e){o(`Error loading file: ${e.message}`)}finally{h(!1)}};return(0,n.jsxs)("div",{className:`artifact-panel ${e?"open":""}`,children:[(0,n.jsxs)("div",{className:"artifact-panel-header",children:[(0,n.jsx)("button",{className:"icon-btn",onClick:t,title:"Close panel",children:(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,n.jsx)("h3",{children:"Artifacts"})]}),s?(0,n.jsxs)("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--border-subtle)",background:"rgba(99,102,241,0.04)"},children:[(0,n.jsx)("div",{style:{fontSize:"13px",fontWeight:600,color:"var(--text-primary)",marginBottom:"2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.title||"Untitled"}),(0,n.jsxs)("div",{style:{fontSize:"10px",fontFamily:"'JetBrains Mono', monospace",color:"var(--text-muted)"},children:[i.length," artifact",1!==i.length?"s":""]})]}):i.length>0?(0,n.jsx)("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--border-subtle)",background:"rgba(99,102,241,0.04)"},children:(0,n.jsxs)("div",{style:{fontSize:"10px",fontFamily:"'JetBrains Mono', monospace",color:"var(--text-muted)"},children:[i.length," artifact",1!==i.length?"s":""]})}):(0,n.jsx)("div",{style:{padding:"24px 16px",textAlign:"center",color:"var(--text-muted)",fontSize:"13px"},children:"No active conversation"}),r?(0,n.jsxs)("div",{className:"artifact-viewer",children:[(0,n.jsxs)("div",{className:"artifact-viewer-header",children:[(0,n.jsx)("button",{className:"artifact-back-btn",onClick:()=>{l(null),o("")},children:"← Back"}),(0,n.jsx)("span",{className:"artifact-viewer-title",children:r})]}),(0,n.jsx)("div",{className:"artifact-viewer-body",children:d?(0,n.jsx)("div",{style:{color:"var(--text-muted)",padding:"16px"},children:"Loading..."}):x.includes("markdown")?(0,n.jsx)("div",{className:"agent-response",dangerouslySetInnerHTML:{__html:c.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/`([^`]+)`/g,"<code>$1</code>").replace(/^- (.*$)/gim,"<li>$1</li>").replace(/\n\n/g,"</p><p>").replace(/\n/g,"<br/>")}}):x.includes("image")?(0,n.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"20px"},children:(0,n.jsx)("img",{src:`data:${x};base64,${c}`,style:{maxWidth:"100%",borderRadius:"8px",border:"1px solid var(--border-subtle)"},alt:r})}):(0,n.jsx)("pre",{style:{margin:0,fontSize:"12px",lineHeight:1.6,color:"var(--text-secondary)",fontFamily:"'JetBrains Mono', monospace",whiteSpace:"pre-wrap",wordBreak:"break-all"},children:c})})]}):(0,n.jsxs)("div",{className:"artifact-file-list",children:[i.map(e=>{var t;let s;return(0,n.jsxs)("button",{className:"artifact-file-item ",onClick:()=>{p(e.name)},disabled:!1,title:`Open ${e.name}`,children:[(0,n.jsx)("span",{className:"artifact-file-icon",children:(s=e.name).endsWith(".md")?"\uD83D\uDCC4":s.endsWith(".json")?"\uD83D\uDCCB":s.endsWith(".ts")||s.endsWith(".tsx")?"\uD83D\uDCD8":s.endsWith(".css")?"\uD83C\uDFA8":s.endsWith(".js")||s.endsWith(".jsx")?"\uD83D\uDCDC":"\uD83D\uDCC4"}),(0,n.jsxs)("div",{style:{flex:1,overflow:"hidden"},children:[(0,n.jsx)("div",{className:"artifact-file-name",children:e.name}),(0,n.jsx)("div",{style:{fontSize:"10px",color:"var(--text-muted)"},children:(e=>{if(e.includes("T")||e.includes("-")){let t=new Date(e);if(!isNaN(t.getTime()))return t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})+" \xb7 "+t.toLocaleDateString()}return e})(e.mtime)})]}),(0,n.jsx)("span",{className:"artifact-file-size",children:(t=e.size)<=0?"":t<1024?`${t}B`:t<1048576?`${(t/1024).toFixed(1)}KB`:`${(t/1048576).toFixed(1)}MB`})]},e.name)}),0===i.length&&(0,n.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"var(--text-muted)",fontSize:"13px"},children:"No artifacts in this conversation"})]})]})}function A({open:e,onClose:t,changes:s,onAcceptAll:i,onRejectAll:r,isAccepting:l,isRejecting:c}){let[o,d]=(0,a.useState)(null),[h,x]=(0,a.useState)([]),[m,p]=(0,a.useState)(!1),[g,u]=(0,a.useState)(""),[j,v]=(0,a.useState)(null),f=s.reduce((e,t)=>e+t.additions,0),w=s.reduce((e,t)=>e+t.deletions,0),y=async e=>{p(!0),d(e.filepath),u(e.filename),x([]);try{let t=await fetch(`/api/v1/changes/diff?filepath=${encodeURIComponent(e.filepath)}`),s=await t.json();s.diff?x(function(e){let t=[],s=0,n=0;for(let a of e.split("\n"))if(a.startsWith("diff --git")||a.startsWith("index ")||a.startsWith("new file")||a.startsWith("deleted file"))t.push({type:"meta",content:a});else if(a.startsWith("---")||a.startsWith("+++"))t.push({type:"meta",content:a});else if(a.startsWith("@@")){let e=a.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);e&&(n=parseInt(e[1]),s=parseInt(e[2])),t.push({type:"header",content:a})}else a.startsWith("+")?t.push({type:"add",content:a.substring(1),lineNum:s++}):a.startsWith("-")?t.push({type:"del",content:a.substring(1),lineNum:n++}):a.startsWith(" ")&&(t.push({type:"context",content:a.substring(1),lineNum:s}),s++,n++);return t}(s.diff)):x([{type:"meta",content:s.message||"No diff available"}])}catch(e){x([{type:"meta",content:`Error: ${e.message}`}])}finally{p(!1)}},k=async()=>{v(null);let e=await i();e?.success?v({type:"success",text:"All changes accepted ✓"}):v({type:"error",text:e?.error||"Failed to accept changes"}),setTimeout(()=>v(null),3e3)},N=async()=>{v(null);let e=await r();e?.success?v({type:"success",text:"All changes rejected ✓"}):v({type:"error",text:e?.error||"Failed to reject changes"}),setTimeout(()=>v(null),3e3)},b=l||c;return(0,n.jsxs)("div",{className:`changes-panel ${e?"open":""}`,children:[(0,n.jsxs)("div",{className:"changes-panel-header",children:[(0,n.jsx)("button",{className:"icon-btn",onClick:t,title:"Close panel",children:(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,n.jsx)("h3",{children:"Changes Overview"})]}),o?(0,n.jsxs)("div",{className:"diff-viewer",children:[(0,n.jsxs)("div",{className:"diff-viewer-header",children:[(0,n.jsx)("button",{className:"diff-back-btn",onClick:()=>{d(null),x([]),u("")},children:"← Back"}),(0,n.jsx)("span",{className:"diff-viewer-title",children:g}),(0,n.jsx)("span",{className:"diff-viewer-path",children:o})]}),(0,n.jsx)("div",{className:"diff-viewer-body",children:m?(0,n.jsx)("div",{style:{color:"var(--text-muted)",padding:"16px",fontStyle:"italic"},children:"Loading diff..."}):0===h.length?(0,n.jsx)("div",{style:{color:"var(--text-muted)",padding:"16px"},children:"No changes found"}):(0,n.jsx)("div",{className:"diff-lines",children:h.map((e,t)=>(0,n.jsxs)("div",{className:`diff-line diff-line-${e.type}`,children:[(0,n.jsx)("span",{className:"diff-line-num",children:void 0!==e.lineNum?e.lineNum:""}),(0,n.jsx)("span",{className:"diff-line-indicator",children:"add"===e.type?"+":"del"===e.type?"-":"header"===e.type?"@@":""}),(0,n.jsx)("span",{className:"diff-line-content",children:e.content})]},t))})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"changes-summary",children:[(0,n.jsxs)("span",{className:"changes-count",children:[s.length," file",1!==s.length?"s":""," changed"]}),(0,n.jsxs)("div",{className:"changes-stats",children:[f>0&&(0,n.jsxs)("span",{className:"changes-additions",children:["+",f]}),w>0&&(0,n.jsxs)("span",{className:"changes-deletions",children:["-",w]})]})]}),s.length>0&&(0,n.jsxs)("div",{className:"changes-action-bar",children:[(0,n.jsx)("button",{className:"changes-reject-all-btn",onClick:N,disabled:b,title:"Reject all file changes",children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("svg",{className:"changes-action-spinner",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M21 12a9 9 0 11-6.219-8.56"})}),"Rejecting…"]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),"Reject All"]})}),(0,n.jsx)("button",{className:"changes-accept-all-btn",onClick:k,disabled:b,title:"Accept all file changes",children:l?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("svg",{className:"changes-action-spinner",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M21 12a9 9 0 11-6.219-8.56"})}),"Accepting…"]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})}),"Accept All"]})})]}),j&&(0,n.jsx)("div",{className:`changes-action-message changes-action-message--${j.type}`,children:j.text}),(0,n.jsxs)("div",{className:"changes-file-list",children:[s.map(e=>{var t;return(0,n.jsxs)("button",{className:"changes-file-item",onClick:()=>y(e),title:`View diff: ${e.filepath}`,children:[(0,n.jsx)("span",{className:"changes-file-icon",children:(t=e.filename).endsWith(".tsx")||t.endsWith(".jsx")?"⚛️":t.endsWith(".ts")||t.endsWith(".js")?"\uD83D\uDCD8":t.endsWith(".css")?"\uD83C\uDFA8":t.endsWith(".md")?"\uD83D\uDCC4":t.endsWith(".json")?"\uD83D\uDCCB":"\uD83D\uDCDD"}),(0,n.jsxs)("div",{className:"changes-file-info",children:[(0,n.jsx)("div",{className:"changes-file-name",children:e.filename}),(0,n.jsx)("div",{className:"changes-file-path",children:e.filepath})]}),(0,n.jsxs)("div",{className:"changes-file-diff",children:[e.additions>0&&(0,n.jsxs)("span",{className:"changes-additions",children:["+",e.additions]}),e.deletions>0&&(0,n.jsxs)("span",{className:"changes-deletions",children:["-",e.deletions]})]})]},e.filepath)}),0===s.length&&(0,n.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"var(--text-muted)",fontSize:"13px"},children:"No file changes in this conversation"})]})]})]})}let B={modified:{label:"M",color:"#fbbf24"},added:{label:"A",color:"#34d399"},deleted:{label:"D",color:"#ef4444"},renamed:{label:"R",color:"#a78bfa"},copied:{label:"C",color:"#60a5fa"},untracked:{label:"U",color:"#94a3b8"},unmerged:{label:"!",color:"#f97316"}};function T({status:e}){let{label:t,color:s}=B[e]||{label:"?",color:"#94a3b8"};return(0,n.jsx)("span",{className:"git-file-status-badge",style:{color:s,borderColor:`${s}44`,background:`${s}18`},children:t})}function M({open:e,onClose:t,gitStatus:s,onRefresh:i}){let[r,l]=(0,a.useState)("changes"),[c,o]=(0,a.useState)(null),[d,h]=(0,a.useState)([]),[x,m]=(0,a.useState)(!1),[p,g]=(0,a.useState)(!1),[u,j]=(0,a.useState)(""),[v,f]=(0,a.useState)(!1),[w,y]=(0,a.useState)(!1),[k,N]=(0,a.useState)(null),b=(e,t)=>{N({text:e,type:t}),setTimeout(()=>N(null),4e3)},C=async()=>{if(u.trim()&&!v){f(!0);try{let e=await fetch("/api/v1/git/commit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:u.trim(),stageAll:!0})}),t=await e.json();t.success?(j(""),b("Committed successfully","success"),i()):b(t.error||"Commit failed","error")}catch(e){b(`Error: ${e.message}`,"error")}finally{f(!1)}}},S=async()=>{if(!w){y(!0);try{let e=await fetch("/api/v1/git/push",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),t=await e.json();t.success?(b("Pushed to origin","success"),i()):b(t.error||"Push failed","error")}catch(e){b(`Error: ${e.message}`,"error")}finally{y(!1)}}},W=async(e,t)=>{m(!0),o({path:e.path,staged:t,untracked:"untracked"===e.status}),h([]);try{let s=new URLSearchParams({filepath:e.path,staged:String(t),untracked:String("untracked"===e.status)}),n=await fetch(`/api/v1/git/diff?${s}`),a=await n.json();a.diff?h(function(e){let t=[],s=0,n=0;for(let a of e.split("\n"))if(a.startsWith("diff --git")||a.startsWith("index ")||a.startsWith("new file")||a.startsWith("deleted file"))t.push({type:"meta",content:a});else if(a.startsWith("---")||a.startsWith("+++"))t.push({type:"meta",content:a});else if(a.startsWith("@@")){let e=a.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);e&&(n=parseInt(e[1]),s=parseInt(e[2])),t.push({type:"header",content:a})}else a.startsWith("+")?t.push({type:"add",content:a.substring(1),lineNum:s++}):a.startsWith("-")?t.push({type:"del",content:a.substring(1),lineNum:n++}):a.startsWith(" ")&&(t.push({type:"context",content:a.substring(1),lineNum:s}),s++,n++);return t}(a.diff)):h([{type:"meta",content:a.error||"No diff available"}])}catch(e){h([{type:"meta",content:`Error: ${e.message}`}])}finally{m(!1)}},$=async()=>{g(!0),i(),await new Promise(e=>setTimeout(e,600)),g(!1)},A=e=>e.endsWith(".tsx")||e.endsWith(".jsx")?"⚛️":e.endsWith(".ts")||e.endsWith(".js")?"\uD83D\uDCD8":e.endsWith(".css")||e.endsWith(".scss")?"\uD83C\uDFA8":e.endsWith(".md")?"\uD83D\uDCC4":e.endsWith(".json")?"\uD83D\uDCCB":e.endsWith(".py")?"\uD83D\uDC0D":e.endsWith(".go")?"\uD83D\uDD39":e.endsWith(".sh")?"⚙️":"\uD83D\uDCDD",B=e=>{let t=e.split("/");return t.length<=2?e:`…/${t.slice(-2).join("/")}`},M=s?(s.staged?.length||0)+(s.unstaged?.length||0)+(s.untracked?.length||0):0;return(0,n.jsxs)("div",{className:`git-panel ${e?"open":""}`,role:"complementary","aria-label":"Git Panel",children:[(0,n.jsxs)("div",{className:"git-panel-header",children:[(0,n.jsxs)("div",{className:"git-panel-title-row",children:[(0,n.jsx)("button",{className:"icon-btn",onClick:t,title:"Close git panel",children:(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,n.jsxs)("div",{className:"git-panel-title",children:[(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("circle",{cx:"18",cy:"18",r:"3"}),(0,n.jsx)("circle",{cx:"6",cy:"6",r:"3"}),(0,n.jsx)("path",{d:"M13 6h3a2 2 0 0 1 2 2v7"}),(0,n.jsx)("line",{x1:"6",y1:"9",x2:"6",y2:"21"})]}),(0,n.jsx)("span",{children:"Git"})]}),(0,n.jsx)("button",{className:`git-refresh-btn ${p?"spinning":""}`,onClick:$,title:"Refresh git status",children:(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("polyline",{points:"23 4 23 10 17 10"}),(0,n.jsx)("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})})]}),s?.isGitRepo&&(0,n.jsxs)("div",{className:"git-branch-bar",children:[(0,n.jsxs)("div",{className:"git-branch-badge",children:[(0,n.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),(0,n.jsx)("circle",{cx:"18",cy:"6",r:"3"}),(0,n.jsx)("circle",{cx:"6",cy:"18",r:"3"}),(0,n.jsx)("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),(0,n.jsx)("span",{children:s.branch})]}),s.remoteBranch&&(0,n.jsxs)("div",{className:"git-sync-badges",children:[s.ahead>0&&(0,n.jsxs)("span",{className:"git-sync-badge git-sync-badge--ahead",children:["↑",s.ahead]}),s.behind>0&&(0,n.jsxs)("span",{className:"git-sync-badge git-sync-badge--behind",children:["↓",s.behind]}),0===s.ahead&&0===s.behind&&(0,n.jsx)("span",{className:"git-sync-badge git-sync-badge--synced",children:"✓ synced"})]}),s.stashCount>0&&(0,n.jsxs)("span",{className:"git-stash-badge",title:`${s.stashCount} stash entries`,children:["\uD83D\uDCE6 ",s.stashCount]})]})]}),s?.isGitRepo&&!c&&(0,n.jsxs)("div",{className:"git-commit-bar",children:[(0,n.jsx)("div",{className:"git-commit-input-row",children:(0,n.jsx)("textarea",{className:"git-commit-textarea",placeholder:"Commit message…",value:u,onChange:e=>j(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),C())},rows:2,disabled:v})}),(0,n.jsxs)("div",{className:"git-commit-actions",children:[(0,n.jsxs)("button",{className:"git-commit-btn",onClick:C,disabled:!u.trim()||v,title:"Stage all & commit (Ctrl+Enter)",children:[v?(0,n.jsx)("span",{className:"wm-spinner"}):(0,n.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,n.jsx)("path",{d:"M12 2v7M12 15v7M2 12h7M15 12h7"})]}),v?"Committing…":"Commit All"]}),(0,n.jsxs)("button",{className:"git-push-btn",onClick:S,disabled:w||!s?.branch,title:s?.ahead>0?`Push ${s.ahead} commit(s)`:"Push to remote",children:[w?(0,n.jsx)("span",{className:"wm-spinner"}):(0,n.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"5"}),(0,n.jsx)("polyline",{points:"5 12 12 5 19 12"})]}),w?"Pushing…":s?.ahead>0?`Push (${s.ahead})`:"Push"]})]}),k&&(0,n.jsxs)("div",{className:`git-action-feedback git-action-feedback--${k.type}`,children:["success"===k.type?(0,n.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})}):(0,n.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,n.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),(0,n.jsx)("span",{children:k.text})]})]}),s&&!s.isGitRepo&&(0,n.jsxs)("div",{className:"git-not-repo",children:[(0,n.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,n.jsx)("circle",{cx:"18",cy:"18",r:"3"}),(0,n.jsx)("circle",{cx:"6",cy:"6",r:"3"}),(0,n.jsx)("path",{d:"M13 6h3a2 2 0 0 1 2 2v7"}),(0,n.jsx)("line",{x1:"6",y1:"9",x2:"6",y2:"21"})]}),(0,n.jsx)("p",{children:"No git repository detected"}),(0,n.jsx)("span",{children:"Open a git project in the IDE"})]}),!s&&(0,n.jsxs)("div",{className:"git-loading",children:[(0,n.jsx)("div",{className:"git-loading-dot"}),(0,n.jsx)("span",{children:"Loading git status…"})]}),c&&s?.isGitRepo&&(0,n.jsxs)("div",{className:"diff-viewer",children:[(0,n.jsxs)("div",{className:"diff-viewer-header",children:[(0,n.jsx)("button",{className:"diff-back-btn",onClick:()=>{o(null),h([])},children:"← Back"}),(0,n.jsx)("span",{className:"diff-viewer-title",children:c.path.split("/").pop()}),(0,n.jsx)("span",{className:"diff-viewer-path",title:c.path,children:B(c.path)}),(0,n.jsx)("span",{className:`diff-viewer-badge ${c.staged?"staged":"unstaged"}`,children:c.staged?"staged":c.untracked?"untracked":"unstaged"})]}),(0,n.jsx)("div",{className:"diff-viewer-body",children:x?(0,n.jsx)("div",{className:"diff-loading",children:"Loading diff…"}):0===d.length?(0,n.jsx)("div",{className:"diff-empty",children:"No diff available"}):(0,n.jsx)("div",{className:"diff-lines",children:d.map((e,t)=>(0,n.jsxs)("div",{className:`diff-line diff-line-${e.type}`,children:[(0,n.jsx)("span",{className:"diff-line-num",children:void 0!==e.lineNum?e.lineNum:""}),(0,n.jsx)("span",{className:"diff-line-indicator",children:"add"===e.type?"+":"del"===e.type?"-":"header"===e.type?"@@":""}),(0,n.jsx)("span",{className:"diff-line-content",children:e.content})]},t))})})]}),s?.isGitRepo&&!c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"git-summary-bar",children:[(0,n.jsxs)("span",{className:"git-summary-stat",children:[(0,n.jsx)("span",{className:"git-summary-dot git-summary-dot--changed"}),M," changed"]}),s.staged.length>0&&(0,n.jsxs)("span",{className:"git-summary-stat",children:[(0,n.jsx)("span",{className:"git-summary-dot git-summary-dot--staged"}),s.staged.length," staged"]})]}),(0,n.jsxs)("div",{className:"git-tabs",children:[(0,n.jsxs)("button",{className:`git-tab ${"changes"===r?"active":""}`,onClick:()=>l("changes"),children:["Changes",M>0&&(0,n.jsx)("span",{className:"git-tab-badge",children:M})]}),(0,n.jsxs)("button",{className:`git-tab ${"commits"===r?"active":""}`,onClick:()=>l("commits"),children:["Commits",s.commits.length>0&&(0,n.jsx)("span",{className:"git-tab-badge git-tab-badge--neutral",children:s.commits.length})]})]}),"changes"===r&&(0,n.jsxs)("div",{className:"git-file-list",children:[s.staged.length>0&&(0,n.jsxs)("div",{className:"git-section",children:[(0,n.jsxs)("div",{className:"git-section-header",children:[(0,n.jsx)("span",{className:"git-section-dot git-section-dot--staged"}),(0,n.jsx)("span",{children:"Staged Changes"}),(0,n.jsx)("span",{className:"git-section-count",children:s.staged.length})]}),s.staged.map((e,t)=>(0,n.jsxs)("button",{className:"git-file-item git-file-item--staged",onClick:()=>W(e,!0),title:`View staged diff: ${e.path}`,children:[(0,n.jsx)("span",{className:"git-file-icon",children:A(e.path)}),(0,n.jsxs)("div",{className:"git-file-info",children:[(0,n.jsx)("div",{className:"git-file-name",children:e.path.split("/").pop()}),(0,n.jsx)("div",{className:"git-file-path",children:B(e.path)})]}),(0,n.jsx)(T,{status:e.status})]},`staged-${t}`))]}),s.unstaged.length>0&&(0,n.jsxs)("div",{className:"git-section",children:[(0,n.jsxs)("div",{className:"git-section-header",children:[(0,n.jsx)("span",{className:"git-section-dot git-section-dot--unstaged"}),(0,n.jsx)("span",{children:"Changes"}),(0,n.jsx)("span",{className:"git-section-count",children:s.unstaged.length})]}),s.unstaged.map((e,t)=>(0,n.jsxs)("button",{className:"git-file-item",onClick:()=>W(e,!1),title:`View diff: ${e.path}`,children:[(0,n.jsx)("span",{className:"git-file-icon",children:A(e.path)}),(0,n.jsxs)("div",{className:"git-file-info",children:[(0,n.jsx)("div",{className:"git-file-name",children:e.path.split("/").pop()}),(0,n.jsx)("div",{className:"git-file-path",children:B(e.path)})]}),(0,n.jsx)(T,{status:e.status})]},`unstaged-${t}`))]}),s.untracked.length>0&&(0,n.jsxs)("div",{className:"git-section",children:[(0,n.jsxs)("div",{className:"git-section-header",children:[(0,n.jsx)("span",{className:"git-section-dot git-section-dot--untracked"}),(0,n.jsx)("span",{children:"Untracked"}),(0,n.jsx)("span",{className:"git-section-count",children:s.untracked.length})]}),s.untracked.map((e,t)=>(0,n.jsxs)("button",{className:"git-file-item git-file-item--untracked",onClick:()=>W(e,!1),title:`View file: ${e.path}`,children:[(0,n.jsx)("span",{className:"git-file-icon",children:A(e.path)}),(0,n.jsxs)("div",{className:"git-file-info",children:[(0,n.jsx)("div",{className:"git-file-name",children:e.path.split("/").pop()}),(0,n.jsx)("div",{className:"git-file-path",children:B(e.path)})]}),(0,n.jsx)(T,{status:"untracked"})]},`untracked-${t}`))]}),0===M&&(0,n.jsxs)("div",{className:"git-empty",children:[(0,n.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,n.jsx)("p",{children:"Working tree clean"}),(0,n.jsx)("span",{children:"No uncommitted changes"})]})]}),"commits"===r&&(0,n.jsx)("div",{className:"git-commit-list",children:0===s.commits.length?(0,n.jsx)("div",{className:"git-empty",children:(0,n.jsx)("p",{children:"No commits yet"})}):s.commits.map((e,t)=>(0,n.jsxs)("div",{className:"git-commit-item",children:[(0,n.jsx)("div",{className:"git-commit-hash",children:e.shortHash}),(0,n.jsxs)("div",{className:"git-commit-info",children:[(0,n.jsx)("div",{className:"git-commit-subject",children:e.subject}),(0,n.jsxs)("div",{className:"git-commit-meta",children:[(0,n.jsx)("span",{className:"git-commit-author",children:e.author}),(0,n.jsx)("span",{className:"git-commit-dot",children:"\xb7"}),(0,n.jsx)("span",{className:"git-commit-date",children:e.relativeDate})]})]})]},t))})]})]})}var O=s(7067);s(2620);var P=s(9583),L=s(3015),R=s(7297),E=s(8327),F=s(7774),z=s(2345),D=s(2462),I=s(6370),_=s(1783),H=s(7860),V=s(858),J=s(6682),q=s(2375);O.A.registerLanguage("javascript",P.A),O.A.registerLanguage("typescript",L.A),O.A.registerLanguage("xml",R.A),O.A.registerLanguage("css",E.A),O.A.registerLanguage("json",F.A),O.A.registerLanguage("markdown",z.A),O.A.registerLanguage("python",D.A),O.A.registerLanguage("bash",I.A),O.A.registerLanguage("yaml",_.A),O.A.registerLanguage("sql",H.A),O.A.registerLanguage("go",V.A),O.A.registerLanguage("rust",J.A),O.A.registerLanguage("diff",q.A);let G={ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",py:"python",rb:"ruby",rs:"rust",go:"go",css:"css",scss:"css",sass:"css",html:"xml",htm:"xml",svg:"xml",xml:"xml",json:"json",yaml:"yaml",yml:"yaml",toml:"yaml",md:"markdown",mdx:"markdown",sh:"bash",bash:"bash",zsh:"bash",sql:"sql",graphql:"graphql",diff:"diff",patch:"diff",typescript:"typescript",javascript:"javascript",python:"python"},K={ts:"\uD83D\uDCD8",tsx:"⚛️",js:"\uD83D\uDCDC",jsx:"⚛️",json:"\uD83D\uDCCB",md:"\uD83D\uDCC4",mdx:"\uD83D\uDCC4",css:"\uD83C\uDFA8",scss:"\uD83C\uDFA8",sass:"\uD83C\uDFA8",py:"\uD83D\uDC0D",go:"\uD83D\uDD39",rs:"\uD83E\uDD80",sh:"⚙️",bash:"⚙️",zsh:"⚙️",sql:"\uD83D\uDDC4️",graphql:"\uD83D\uDD37",gql:"\uD83D\uDD37",yaml:"\uD83D\uDCD0",yml:"\uD83D\uDCD0",toml:"\uD83D\uDCD0",env:"\uD83D\uDD11",svg:"\uD83D\uDDBC️",png:"\uD83D\uDDBC️",jpg:"\uD83D\uDDBC️",jpeg:"\uD83D\uDDBC️",gif:"\uD83D\uDDBC️",webp:"\uD83D\uDDBC️",lock:"\uD83D\uDD12",gitignore:"\uD83D\uDC41️"};function U(e){return void 0===e?"":e<1024?`${e}B`:e<1048576?`${(e/1024).toFixed(1)}K`:`${(e/1048576).toFixed(1)}M`}function Q({node:e,depth:t,expandedPaths:s,onToggle:i,onFileOpen:r,selectedPath:l}){let c=s.has(e.path),o="dir"===e.type,d=l===e.path,h=12+14*t,x=(0,a.useCallback)(()=>{o?i(e.path):r(e)},[o,e,i,r]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{className:`workspace-tree-node ${o?"is-dir":"is-file"} ${d?"selected":""}`,style:{paddingLeft:h},onClick:x,title:o?c?"Collapse":"Expand":e.path,children:[o?(0,n.jsx)("svg",{className:`workspace-arrow ${c?"open":""}`,width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"6 9 12 15 18 9"})}):(0,n.jsx)("span",{className:"workspace-arrow-spacer"}),(0,n.jsx)("span",{className:"workspace-node-icon",children:"dir"===e.type?"\uD83D\uDCC1":K[e.ext||""]||"\uD83D\uDCDD"}),(0,n.jsx)("span",{className:"workspace-node-name",children:e.name}),!o&&void 0!==e.size&&(0,n.jsx)("span",{className:"workspace-node-size",children:U(e.size)}),o&&void 0!==e.children&&(0,n.jsx)("span",{className:"workspace-node-count",children:e.children.length})]}),o&&c&&e.children&&(0,n.jsx)("div",{className:"workspace-tree-children",children:0===e.children.length?(0,n.jsx)("div",{className:"workspace-empty-dir",style:{paddingLeft:h+14},children:"empty"}):e.children.map(e=>(0,n.jsx)(Q,{node:e,depth:t+1,expandedPaths:s,onToggle:i,onFileOpen:r,selectedPath:l},e.path))})]})}function X({view:e,onClose:t,onCopyPath:s,workspacePath:i}){let[r,l]=(0,a.useState)(!1),c=(0,a.useMemo)(()=>e.content?function(e,t){let s,n,a,i=(a=G[n=t.toLowerCase().replace(/^\./,"")])&&O.A.getLanguage(a)?a:O.A.getLanguage(n)?n:void 0;try{s=i?O.A.highlight(e,{language:i}).value:O.A.highlightAuto(e).value}catch{s=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}return s.split("\n").map((e,t)=>({num:t+1,html:e}))}(e.content,e.lang||""):[],[e.content,e.lang]);return(0,n.jsxs)("div",{className:"workspace-file-viewer",children:[(0,n.jsxs)("div",{className:"workspace-viewer-header",children:[(0,n.jsxs)("button",{className:"workspace-viewer-back",onClick:t,title:"Back to file tree",children:[(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"15 18 9 12 15 6"})}),(0,n.jsx)("span",{children:"Back"})]}),(0,n.jsxs)("div",{className:"workspace-viewer-title",children:[(0,n.jsx)("span",{className:"workspace-viewer-name",children:e.name}),e.lang&&"plaintext"!==e.lang&&(0,n.jsx)("span",{className:"workspace-viewer-lang",children:e.lang})]}),(0,n.jsxs)("div",{className:"workspace-viewer-actions",children:[e.content&&(0,n.jsx)("button",{className:"workspace-viewer-action-btn",onClick:()=>{e.content&&(navigator.clipboard.writeText(e.content).catch(()=>{}),l(!0),setTimeout(()=>l(!1),2e3))},title:"Copy file content",children:r?(0,n.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})}):(0,n.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,n.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}),(0,n.jsx)("button",{className:"workspace-viewer-action-btn",onClick:()=>{s(e.path)},title:"Copy file path",children:(0,n.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,n.jsx)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})})]})]}),(0,n.jsxs)("div",{className:"workspace-viewer-meta",children:[(0,n.jsx)("span",{className:"workspace-viewer-path",title:`${i}/${e.path}`,children:e.path}),!e.loading&&!e.error&&e.content&&(0,n.jsxs)("span",{className:"workspace-viewer-stats",children:[e.lines," lines \xb7 ",U(e.size)]})]}),(0,n.jsxs)("div",{className:"workspace-viewer-body",children:[e.loading&&(0,n.jsxs)("div",{className:"git-loading",children:[(0,n.jsx)("div",{className:"git-loading-dot"}),(0,n.jsx)("span",{children:"Loading…"})]}),!e.loading&&e.error&&(0,n.jsxs)("div",{className:"workspace-viewer-error",children:[(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,n.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),(0,n.jsx)("p",{children:e.error}),e.binary&&(0,n.jsx)("span",{children:"Binary files cannot be displayed as text."}),e.tooLarge&&(0,n.jsx)("span",{children:"Try opening the file directly in the IDE."})]}),!e.loading&&!e.error&&null!==e.content&&(0,n.jsx)("div",{className:"workspace-code-scroll",children:(0,n.jsx)("table",{className:"workspace-code-table",children:(0,n.jsx)("tbody",{children:c.map(({num:e,html:t})=>(0,n.jsxs)("tr",{className:"workspace-code-row",children:[(0,n.jsx)("td",{className:"workspace-line-num",children:e}),(0,n.jsx)("td",{className:"workspace-line-code",children:(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:t||"\xa0"}})})]},e))})})})]})]})}function Y({open:e,onClose:t,workspaceTree:s,workspaceLoading:i,onRefresh:r}){let[l,c]=(0,a.useState)(new Set),[o,d]=(0,a.useState)(!1),[h,x]=(0,a.useState)(""),[m,p]=(0,a.useState)(null),[g,u]=(0,a.useState)(null);(0,a.useEffect)(()=>{e||u(null)},[e]);let j=(0,a.useCallback)(e=>{c(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),v=(0,a.useCallback)(e=>{let t=s?`${s.workspacePath}/${e}`:e;navigator.clipboard.writeText(t).catch(()=>{}),p(e),setTimeout(()=>p(null),2e3)},[s]),f=(0,a.useCallback)(async e=>{u({path:e.path,name:e.name,content:null,lang:"",lines:0,size:e.size||0,error:null,loading:!0});try{let t=await fetch(`/api/v1/workspace/content?path=${encodeURIComponent(e.path)}`),s=await t.json();!t.ok||s.error?u(e=>e?{...e,loading:!1,error:s.error||"Failed to load file",binary:s.binary,tooLarge:s.tooLarge}:null):u({path:e.path,name:s.name,content:s.content,lang:s.lang,lines:s.lines,size:s.size,error:null,loading:!1})}catch(e){u(t=>t?{...t,loading:!1,error:`Network error: ${e.message}`}:null)}},[]),w=async()=>{d(!0),r(),await new Promise(e=>setTimeout(e,700)),d(!1)},y=(0,a.useMemo)(()=>{if(!s)return[];var e=s.tree;if(!h)return e;let t=h.toLowerCase(),n=e=>{if(e.name.toLowerCase().includes(t))return e;if("dir"===e.type&&e.children){let t=e.children.map(n).filter(Boolean);if(t.length>0)return{...e,children:t}}return null};return e.map(n).filter(Boolean)},[s,h]),k=s?.rootLabel||s?.workspacePath?.split("/").pop()||"Workspace",N=s?.workspacePath||"",b=g?g.path:null;return(0,n.jsxs)("div",{className:`workspace-panel ${e?"open":""}`,role:"complementary","aria-label":"Workspace Panel",children:[g&&(0,n.jsx)(X,{view:g,onClose:()=>u(null),onCopyPath:v,workspacePath:N}),!g&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"workspace-panel-header",children:[(0,n.jsxs)("div",{className:"workspace-panel-title-row",children:[(0,n.jsx)("button",{className:"icon-btn",onClick:t,title:"Close workspace panel",children:(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,n.jsxs)("div",{className:"workspace-panel-title",children:[(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),(0,n.jsx)("span",{children:"Working Directory"})]}),(0,n.jsx)("button",{className:`git-refresh-btn ${o?"spinning":""}`,onClick:w,title:"Refresh file tree",children:(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("polyline",{points:"23 4 23 10 17 10"}),(0,n.jsx)("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})})]}),N&&(0,n.jsxs)("div",{className:"workspace-path-bar",title:N,children:[(0,n.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,n.jsx)("path",{d:"M12 2v4M12 18v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M2 12h4M18 12h4M4.22 19.78l2.83-2.83M16.95 7.05l2.83-2.83"})]}),(0,n.jsx)("span",{className:"workspace-path-text",children:N})]})]}),s&&(0,n.jsxs)("div",{className:"workspace-search-bar",children:[(0,n.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,n.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),(0,n.jsx)("input",{className:"workspace-search-input",type:"text",placeholder:`Filter in ${k}…`,value:h,onChange:e=>x(e.target.value)}),h&&(0,n.jsx)("button",{className:"workspace-search-clear",onClick:()=>x(""),title:"Clear filter",children:(0,n.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),i&&!s&&(0,n.jsxs)("div",{className:"git-loading",children:[(0,n.jsx)("div",{className:"git-loading-dot"}),(0,n.jsx)("span",{children:"Loading workspace…"})]}),!i&&!s&&(0,n.jsxs)("div",{className:"git-not-repo",children:[(0,n.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,n.jsx)("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),(0,n.jsx)("p",{children:"No workspace detected"}),(0,n.jsx)("span",{children:"Open a project in the IDE"})]}),m&&(0,n.jsxs)("div",{className:"workspace-copy-toast",children:[(0,n.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})}),"Path copied!"]}),s&&(0,n.jsxs)("div",{className:"workspace-tree",children:[(0,n.jsxs)("div",{className:"workspace-root-label",children:[(0,n.jsx)("span",{className:"workspace-root-icon",children:"\uD83D\uDDC2️"}),(0,n.jsx)("span",{className:"workspace-root-name",children:k}),(0,n.jsx)("span",{className:"workspace-node-count",children:s.tree.length})]}),0===y.length?(0,n.jsx)("div",{className:"git-empty",children:(0,n.jsx)("p",{children:h?"No matches":"Directory is empty"})}):(0,n.jsx)("div",{className:"workspace-tree-list",children:y.map(e=>{let t,s;return(0,n.jsx)(Q,{node:e,depth:0,expandedPaths:h?new Set((t=[],s=e=>{"dir"===e.type&&(t.push(e.path),e.children?.forEach(s))},y.forEach(s),t)):l,onToggle:j,onFileOpen:f,selectedPath:b},e.path)})})]})]})]})}function Z({networkOnline:e,isConnected:t}){let[s,i]=(0,a.useState)(!1),[r,l]=(0,a.useState)(!1),c=!e||!t;return((0,a.useEffect)(()=>{if(c)i(!0),l(!1);else if(s){l(!0);let e=setTimeout(()=>{i(!1),l(!1)},2500);return()=>clearTimeout(e)}},[c]),s)?(0,n.jsxs)("div",{className:`network-banner ${r?"recovered":"offline"}`,role:"status","aria-live":"polite",children:[(0,n.jsx)("span",{className:"network-banner-pulse"}),r?"✅ Connection restored":e?"\uD83D\uDD04 Reconnecting to server…":"\uD83D\uDCE1 No network — waiting for connection…"]}):null}function ee(){let{statusState:e,statusText:t,windows:s,conversations:l,activeConversation:x,cdpStatus:m,recentProjects:g,selectWindow:j,selectConversation:v,startNewChat:f,startCdpServer:w,openNewWindow:y,closeWindowByIndex:k,networkOnline:N,isConnected:b,isLoadingHistory:C,showWelcome:B,messages:T,currentSteps:O,currentResponse:P,isStreaming:L,sendMessage:R,stopStreaming:E,currentMode:F,toggleMode:z,currentAgent:D,agents:I,isLoadingAgents:_,fetchAgentList:H,switchAgent:V,toggleArtifactPanel:J,artifactFiles:q,artifactPanelOpen:G,toggleChangesPanel:K,changeFiles:U,changesPanelOpen:Q,acceptAllChanges:X,rejectAllChanges:ee,isAccepting:et,isRejecting:es,gitStatus:en,gitPanelOpen:ea,gitChangedCount:ei,toggleGitPanel:er,refreshGit:el,workspaceTree:ec,workspacePanelOpen:eo,workspaceLoading:ed,toggleWorkspacePanel:eh,refreshWorkspace:ex,messagesEndRef:em}=function(){let[e,t]=(0,a.useState)([]),[s,n]=(0,a.useState)(!1),[l,x]=(0,a.useState)(!1),[m,p]=(0,a.useState)("Agent"),[g,u]=(0,a.useState)("connected"),[j,v]=(0,a.useState)(!0),[f,w]=(0,a.useState)(!1),[y,k]=(0,a.useState)([]),[N,b]=(0,a.useState)(""),[C,S]=(0,a.useState)("planning"),[W,$]=(0,a.useState)(null),[A,B]=(0,a.useState)([]),[T,M]=(0,a.useState)(!1),[O,P]=(0,a.useState)(!1),[L,R]=(0,a.useState)(!1),[E,F]=(0,a.useState)(!0);(0,a.useEffect)(()=>{F(navigator.onLine);let e=()=>F(!0),t=()=>F(!1);return window.addEventListener("online",e),window.addEventListener("offline",t),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}},[]);let z=(0,a.useRef)(null),D=(0,a.useRef)(null),I=(0,a.useRef)(null),_=(0,a.useRef)(""),H=(0,a.useRef)([]),{mutate:V}=(0,i.iX)(),J=(0,a.useCallback)(()=>{requestAnimationFrame(()=>{I.current?.scrollIntoView({behavior:"smooth"})})},[]),q=(0,a.useCallback)((e,t)=>{u(e),p(t)},[]),{data:G,mutate:K}=(0,r.Ay)(o.health,c,{refreshInterval:E?3e4:5e3,revalidateOnFocus:!0,revalidateOnReconnect:!0,onSuccess:e=>{x(e.connected),E||F(!0),q(e.connected?"connected":"disconnected",e.connected?"Agent":!1===e.network?"Offline":"Reconnecting…")},onError:()=>{x(!1),q("disconnected",E?"Reconnecting…":"Offline")}});(0,a.useEffect)(()=>{E&&K()},[E]);let{mutate:U}=(0,r.Ay)(o.mode,c,{revalidateOnFocus:!1,onSuccess:e=>{e.mode&&S(e.mode)}}),{mutate:Q}=(0,r.Ay)(o.agent,c,{revalidateOnFocus:!1,onSuccess:e=>{e.agent&&$(e.agent)}}),{mutate:X}=(0,r.Ay)(o.history,c,{revalidateOnFocus:!1,revalidateOnMount:!0,onSuccess:e=>{w(!1),e.turns&&e.turns.length>0?(v(!1),t(e.turns.map(e=>({role:e.role,content:e.content})))):v(!0)},onError:()=>{w(!1)}}),Y=(0,a.useCallback)(()=>{w(!0),t([]),X()},[X]),{artifactFiles:Z,artifactPanelOpen:ee,toggleArtifactPanel:et,openArtifactPanel:es,loadArtifacts:en}=function(e){let[t,s]=(0,a.useState)(!1),{data:n,mutate:i}=(0,r.Ay)(o.artifacts,c,{refreshInterval:t?3e3:8e3,revalidateOnFocus:!0,revalidateOnReconnect:!0,dedupingInterval:2e3}),l=n?.files||[],d=(0,a.useCallback)(()=>{s(e=>!e)},[]),h=(0,a.useCallback)(()=>{s(!0)},[]);return(0,a.useEffect)(()=>{},[void 0,i]),{artifactFiles:l,artifactPanelOpen:t,toggleArtifactPanel:d,openArtifactPanel:h,loadArtifacts:i}}(),{changeFiles:ea,changesPanelOpen:ei,toggleChangesPanel:er,loadChanges:el,acceptAllChanges:ec,rejectAllChanges:eo,isAccepting:ed,isRejecting:eh}=function(){let[e,t]=(0,a.useState)(!1),[s,n]=(0,a.useState)(!1),[i,l]=(0,a.useState)(!1),{data:d,mutate:h}=(0,r.Ay)(o.changes,c,{refreshInterval:e?3e3:8e3,revalidateOnFocus:!0,revalidateOnReconnect:!0,dedupingInterval:2e3}),x=d?.changes||[],m=(0,a.useCallback)(()=>{t(e=>!e)},[]),p=(0,a.useCallback)(async()=>{n(!0);try{let e=await fetch("/api/v1/changes/accept-all",{method:"POST"}),t=await e.json();return await new Promise(e=>setTimeout(e,500)),await h(),t}catch(e){return{success:!1,error:e.message}}finally{n(!1)}},[h]),g=(0,a.useCallback)(async()=>{l(!0);try{let e=await fetch("/api/v1/changes/reject-all",{method:"POST"}),t=await e.json();return await new Promise(e=>setTimeout(e,500)),await h(),t}catch(e){return{success:!1,error:e.message}}finally{l(!1)}},[h]);return{changeFiles:x,changesPanelOpen:e,toggleChangesPanel:m,loadChanges:h,acceptAllChanges:p,rejectAllChanges:g,isAccepting:s,isRejecting:i}}(),{gitStatus:ex,gitPanelOpen:em,gitChangedCount:ep,toggleGitPanel:eg,refreshGit:eu}=function(){let[e,t]=(0,a.useState)(!1),{data:s,mutate:n}=(0,r.Ay)(o.git,c,{refreshInterval:e?4e3:15e3,revalidateOnFocus:!0,revalidateOnReconnect:!0,dedupingInterval:2e3}),i=s?.isGitRepo!==void 0?s:null,l=i?(i.staged?.length||0)+(i.unstaged?.length||0)+(i.untracked?.length||0):0;return{gitStatus:i,gitPanelOpen:e,gitChangedCount:l,toggleGitPanel:(0,a.useCallback)(()=>{t(e=>!e)},[]),refreshGit:(0,a.useCallback)(()=>{n()},[n])}}(),{workspaceTree:ej,workspacePanelOpen:ev,workspaceLoading:ef,toggleWorkspacePanel:ew,refreshWorkspace:ey}=function(){let[e,t]=(0,a.useState)(!1),{data:s,mutate:n,isLoading:i}=(0,r.Ay)(o.workspace,c,{refreshInterval:e?5e3:6e4,revalidateOnFocus:e,revalidateOnReconnect:!0,dedupingInterval:3e3}),l=s?.workspacePath?s:null;return{workspaceTree:l,workspacePanelOpen:e,workspaceLoading:i,toggleWorkspacePanel:(0,a.useCallback)(()=>{t(e=>!e)},[]),refreshWorkspace:(0,a.useCallback)(()=>{n()},[n])}}(),{windows:ek,conversations:eN,activeConversation:eb,cdpStatus:eC,recentProjects:eS,loadWindows:eW,selectWindow:e$,loadConversations:eA,selectConversation:eB,checkCdpStatus:eT,startCdpServer:eM,openNewWindow:eO,closeWindowByIndex:eP,loadRecentProjects:eL}=function(e,t,s){let{data:n,mutate:i}=(0,r.Ay)(o.windows,c,{revalidateOnFocus:!0}),l=n?.windows||[],{data:h,mutate:x}=(0,r.Ay)(o.cdpStatus,c,{refreshInterval:15e3,revalidateOnFocus:!0}),m={active:h?.active??!1,windowCount:h?.windowCount??0,error:h?.error??null},{data:p,mutate:g}=(0,r.Ay)(o.conversations,c,{revalidateOnFocus:!0}),u=p?.conversations||[],j=u.find(e=>e.active)||null,{data:v,mutate:f}=(0,r.Ay)(o.recentProjects,c,{revalidateOnFocus:!0}),w=v?.recentProjects||[],y=(0,a.useCallback)(async(e,t)=>{try{let s=await fetch(`${d}/windows/cdp-start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectDir:e||".",killExisting:t||!1})}),n=await s.json();return n.success&&(x(),i()),n}catch(e){return{success:!1,message:e.message||"Failed to start CDP server"}}},[x,i]),k=(0,a.useCallback)(async e=>{try{let t=await fetch(`${d}/windows/open`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectDir:e})}),s=await t.json();return s.success&&(i(),x()),s}catch(e){return{success:!1,message:e.message||"Failed to open window"}}},[i,x]),N=(0,a.useCallback)(async(e,t)=>{try{let s=await fetch(`${d}/windows/close`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t?{targetId:t}:{index:e})}),n=await s.json();return n.success&&(i(),x()),n}catch(e){return{success:!1,message:e.message||"Failed to close window"}}},[i,x]),b=(0,a.useCallback)(async n=>{try{t(!0),await fetch(`${d}/windows/select`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({index:n})}),i(),e(),setTimeout(()=>g(),300),setTimeout(()=>g(),1500),s?.()}catch{}},[i,e,t,g,s]),C=(0,a.useCallback)(async n=>{try{let a=await fetch(`${d}/conversations/select`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:n})});if((await a.json()).success){t(!1);let a=0,i=async()=>{a++;try{let t=await fetch(`${d}/conversations`),i=(await t.json()).conversations||[],r=i.find(e=>e.active);if(r&&r.title===n||a>10){g({conversations:i},{revalidate:!1}),e(),s?.();return}}catch{}setTimeout(i,500)};i()}}catch{}},[e,t,g,s]);return{windows:l,conversations:u,activeConversation:j,cdpStatus:m,recentProjects:w,loadWindows:i,selectWindow:b,loadConversations:g,selectConversation:C,checkCdpStatus:x,startCdpServer:y,openNewWindow:k,closeWindowByIndex:N,loadRecentProjects:f}}(Y,v,(0,a.useCallback)(()=>{en(),el()},[en,el])),eR=(0,a.useCallback)(async()=>{let e="planning"===C?"fast":"planning";S(e);try{let t=await fetch(`${h}/chat/mode`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e})}),s=await t.json();s.mode&&S(s.mode),U()}catch{S(C)}},[C,U]),eE=(0,a.useCallback)(async()=>{M(!0);try{let e=await fetch(`${h}/chat/agent`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"list"})}),t=await e.json();t.agents&&B(t.agents),t.currentAgent&&$(t.currentAgent)}catch{}M(!1)},[]),eF=(0,a.useCallback)(async e=>{$(e);try{let t=await fetch(`${h}/chat/agent`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"switch",agent:e})}),s=await t.json();s.agent?$(s.agent):s.success||$(W),Q()}catch{$(W)}},[W,Q]),ez=(0,a.useCallback)(e=>{let{type:t,...s}=e;switch(t){case"tool_call":k(e=>{let n,a=e.findIndex(e=>"tool_call"===e.type&&e.data?.id===s.id);return a>=0?(n=[...e])[a]={type:t,data:s}:n=[...e,{type:t,data:s}],H.current=n,n});break;case"thinking":case"hitl":case"error":case"notification":k(e=>{let n=[...e,{type:t,data:s}];return H.current=n,n});break;case"file_change":k(e=>{let n=[...e,{type:t,data:s}];return H.current=n,n}),en(),el();break;case"response":b(s.content||""),_.current=s.content||"";break;case"status":q(s.isRunning?"streaming":"connected",s.isRunning?"Agent working...":"Agent");break;case"done":s.finalResponse&&(b(s.finalResponse),_.current=s.finalResponse),q("connected","Agent"),n(!1),en(),el()}J()},[q,J,en,el]),eD=(0,a.useCallback)(async e=>{if(!e.trim())return;z.current&&(z.current.abort(),z.current=null,fetch(`${h}/chat/stop`,{method:"POST"}).catch(()=>{})),D.current&&(await D.current,D.current=null),v(!1);let s=e.trim();t(e=>[...e,{role:"user",content:s}]),n(!0),k([]),b(""),_.current="",H.current=[],q("streaming","Agent typing...");let a=new AbortController;z.current=a,D.current=(async()=>{try{let e="",t=0;for(;t<=5;){let n=!1;try{let i={"Content-Type":"application/json"};e&&(i["Last-Event-ID"]=e);let r=(await fetch(`${h}/chat/stream`,{method:"POST",headers:i,body:JSON.stringify({message:s}),signal:a.signal})).body.getReader(),l=new TextDecoder,c="",o=!1;for(;;){let{done:t,value:s}=await r.read();if(t){n=!0;break}let a=(c+=l.decode(s,{stream:!0})).split("\n");for(let t of(c=a.pop(),a)){if(!t.startsWith(":")){if(t.startsWith("id: ")){e=t.slice(4).trim();continue}if(!t.startsWith("retry:")&&t.startsWith("data: "))try{let e=JSON.parse(t.slice(6));ez(e),"done"===e.type&&(o=!0)}catch{}}}if(o)break}if(o||!n||++t>5)break;console.warn(`[SSE] Stream dropped (attempt ${t}/5), reconnecting in 2000ms...`),await new Promise(e=>setTimeout(e,2e3))}catch(e){if("AbortError"===e.name||++t>5)throw e;console.warn(`[SSE] Fetch error (attempt ${t}/5):`,e.message),await new Promise(e=>setTimeout(e,2e3))}}}catch(e){"AbortError"!==e.name&&(k(t=>[...t,{type:"error",data:{message:e.message}}]),q("error","Error"))}finally{let e=_.current,s=[...H.current];n(!1),z.current===a&&(z.current=null),(e||s.length>0)&&t(t=>[...t,{role:"agent",content:e,steps:s}]),q("connected","Agent")}})(),await D.current},[ez,q]),eI=(0,a.useCallback)(async()=>{z.current&&z.current.abort(),t([]),k([]),b(""),v(!0);try{let e=await fetch(`${h}/chat/new`,{method:"POST"});(await e.json()).success&&q("connected","New Chat")}catch{}},[q]),e_=(0,a.useCallback)(()=>{z.current&&(z.current.abort(),z.current=null),fetch(`${h}/chat/stop`,{method:"POST"}).catch(()=>{})},[]),eH=(0,a.useCallback)(async()=>{try{await fetch(`${h}/chat/approve`,{method:"POST"}),q("streaming","Agent")}catch{}},[q]),eV=(0,a.useCallback)(async()=>{try{await fetch(`${h}/chat/reject`,{method:"POST"})}catch{}},[]),eJ=(0,a.useRef)(s);eJ.current=s;let{isMonitoring:eq}=function(e={}){let{onEvent:t,onActivityStart:s,onActivityEnd:n,onTurnChange:i,onModeChange:r,onSync:l,autoConnect:c=!0}=e,[o,d]=(0,a.useState)(!1),[h,x]=(0,a.useState)(null),m=(0,a.useRef)(null),p=(0,a.useRef)(null),g=(0,a.useRef)(!1),u=(0,a.useRef)(t),j=(0,a.useRef)(s),v=(0,a.useRef)(n),f=(0,a.useRef)(i),w=(0,a.useRef)(r),y=(0,a.useRef)(l);u.current=t,j.current=s,v.current=n,f.current=i,w.current=r,y.current=l;let k=(0,a.useCallback)(()=>{p.current&&(clearTimeout(p.current),p.current=null),m.current&&(m.current.abort(),m.current=null),d(!1),g.current=!1},[]),N=(0,a.useCallback)(async()=>{if(g.current||m.current)return;g.current=!0;let e=new AbortController;m.current=e;try{let t=await fetch("/api/v1/chat/monitor",{signal:e.signal});if(!t.ok||!t.body)throw Error(`Monitor connection failed: ${t.status}`);d(!0),g.current=!1;let s=t.body.getReader(),n=new TextDecoder,a="";for(;;){let{done:e,value:t}=await s.read();if(e)break;let i=(a+=n.decode(t,{stream:!0})).split("\n");for(let e of(a=i.pop(),i))if(!(e.startsWith(":")||e.startsWith("retry:")||e.startsWith("id:"))&&e.startsWith("data: "))try{let{type:t,...s}=JSON.parse(e.slice(6));switch(u.current?.({type:t,...s}),t){case"activity_start":j.current?.();break;case"activity_end":v.current?.(s);break;case"turn_change":f.current?.(s);break;case"mode_change":w.current?.(s);break;case"sync":x(Date.now()),y.current?.(s)}}catch{}}}catch(e){if("AbortError"===e.name)return;console.warn("[Monitor] Connection lost:",e.message)}finally{m.current=null,g.current=!1,d(!1),e.signal.aborted||(p.current=setTimeout(()=>{p.current=null,N()},3e3))}},[]);return(0,a.useEffect)(()=>(c&&N(),()=>{k()}),[c,N,k]),{isMonitoring:o,lastSyncTime:h,connect:N,disconnect:k}}({autoConnect:!0,onActivityStart:()=>{P(!0),eJ.current||(u("streaming"),p("Agent working..."))},onActivityEnd:()=>{P(!1),eJ.current||(u("connected"),p("Agent"),X(),en(),el())},onTurnChange:()=>{eJ.current||(v(!1),X())},onModeChange:({newMode:e})=>{S(e)},onSync:e=>{"boolean"==typeof e.isRunning&&P(e.isRunning)},onEvent:e=>{eJ.current||"tool_call"!==e.type&&"response"!==e.type&&"thinking"!==e.type&&"hitl"!==e.type&&"notification"!==e.type||ez(e)}});return(0,a.useEffect)(()=>{R(eq)},[eq]),(0,a.useEffect)(J,[e,y,N,J]),{messages:e,isStreaming:s,isConnected:l,statusText:m,statusState:g,showWelcome:j,isLoadingHistory:f,currentSteps:y,currentResponse:N,windows:ek,conversations:eN,activeConversation:eb,artifactFiles:Z,artifactPanelOpen:ee,changeFiles:ea,changesPanelOpen:ei,acceptAllChanges:ec,rejectAllChanges:eo,isAccepting:ed,isRejecting:eh,gitStatus:ex,gitPanelOpen:em,gitChangedCount:ep,toggleGitPanel:eg,refreshGit:eu,workspaceTree:ej,workspacePanelOpen:ev,workspaceLoading:ef,toggleWorkspacePanel:ew,refreshWorkspace:ey,currentMode:C,currentAgent:W,agents:A,isLoadingAgents:T,cdpStatus:eC,recentProjects:eS,isAgentBusy:O,isMonitorConnected:L,networkOnline:E,sendMessage:eD,stopStreaming:e_,startNewChat:eI,approve:eH,reject:eV,selectWindow:e$,selectConversation:eB,toggleArtifactPanel:et,openArtifactPanel:es,toggleChangesPanel:er,toggleMode:eR,fetchAgentList:eE,switchAgent:eF,startCdpServer:eM,openNewWindow:eO,closeWindowByIndex:eP,messagesEndRef:I,setShowWelcome:v}}(),ep=(0,a.useCallback)(async()=>{try{await fetch("/api/v1/health"),window.location.reload()}catch{}},[]);return(0,a.useEffect)(()=>{let e=e=>{"n"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),f())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[f]),(0,n.jsxs)("div",{className:"app-container",children:[(0,n.jsx)(p,{statusState:e,statusText:t,windows:s,conversations:l,activeConversation:x,cdpStatus:m,recentProjects:g,onSelectWindow:j,onSelectConversation:v,onNewChat:f,onStartCdp:w,onOpenWindow:y,onCloseWindow:k}),(0,n.jsx)(Z,{networkOnline:N,isConnected:b}),(0,n.jsxs)("main",{className:"messages-area",role:"log","aria-live":"polite",children:[C?(0,n.jsxs)("div",{className:"history-loading",children:[(0,n.jsxs)("div",{className:"history-loading-header",children:[(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-avatar"}),(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"45%"}})]}),(0,n.jsxs)("div",{className:"history-loading-block",children:[(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"80%"}}),(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"65%"}}),(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"72%"}})]}),(0,n.jsx)("div",{className:"history-loading-header right",children:(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"35%"}})}),(0,n.jsxs)("div",{className:"history-loading-block",children:[(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"90%"}}),(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"55%"}}),(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"68%"}}),(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"40%"}})]}),(0,n.jsxs)("div",{className:"history-loading-header",children:[(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-avatar"}),(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"50%"}})]}),(0,n.jsxs)("div",{className:"history-loading-block",children:[(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"75%"}}),(0,n.jsx)("div",{className:"skeleton-shimmer skeleton-line",style:{width:"60%"}})]}),(0,n.jsx)("p",{className:"history-loading-text",children:"Loading conversation history…"})]}):B?(0,n.jsx)(u,{onQuickPrompt:R}):(0,n.jsx)(S,{messages:T,currentSteps:O,currentResponse:P,isStreaming:L,onRetry:ep}),(0,n.jsx)("div",{ref:em})]}),(0,n.jsx)(W,{onSend:R,onStop:E,isStreaming:L,currentMode:F,onToggleMode:z,currentAgent:D,agents:I,isLoadingAgents:_,onFetchAgents:H,onSwitchAgent:V,onToggleArtifacts:J,artifactCount:q.length,artifactPanelOpen:G,onToggleChanges:K,changesCount:U.length,changesPanelOpen:Q,onToggleGit:er,gitChangedCount:ei,gitPanelOpen:ea,onToggleWorkspace:eh,workspacePanelOpen:eo}),(0,n.jsx)($,{open:G,onClose:J,activeConversation:x,files:q}),(0,n.jsx)(A,{open:Q,onClose:K,changes:U,onAcceptAll:X,onRejectAll:ee,isAccepting:et,isRejecting:es}),(0,n.jsx)(M,{open:ea,onClose:er,gitStatus:en,onRefresh:el}),(0,n.jsx)(Y,{open:eo,onClose:eh,workspaceTree:ec,workspaceLoading:ed,onRefresh:ex})]})}}},e=>{e.O(0,[1973,8710,8441,8928,7358],()=>e(e.s=5035)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-3dc2621e09be9619.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[579,912,2159,2647,2653,2682,3074,3081,3250,3265,3488,3570,3620,3648,3791,3950,4345,4445,4797,4815,4896,4970,5198,5603,5671,5734,5963,5996,6217,6237,6701,6819,6988,7131,7236,8136,8167,8560,8608,8704,9279,9301,9399,9428,9492,9576,9712],{4441:()=>{}},_=>{_.O(0,[8441,8928,7358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t,r,o,n,i,a,u,l={},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}},o=!0;try{l[e](r,r.exports,s),o=!1}finally{o&&delete c[e]}return r.exports}s.m=l,e=[],s.O=(t,r,o,n)=>{if(r){n=n||0;for(var i=e.length;i>0&&e[i-1][2]>n;i--)e[i]=e[i-1];e[i]=[r,o,n];return}for(var a=1/0,i=0;i<e.length;i++){for(var[r,o,n]=e[i],u=!0,l=0;l<r.length;l++)(!1&n||a>=n)&&Object.keys(s.O).every(e=>s.O[e](r[l]))?r.splice(l--,1):(u=!1,n<a&&(a=n));if(u){e.splice(i--,1);var c=o();void 0!==c&&(t=c)}}return t},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);s.r(n);var i={};t=t||[null,r({}),r([]),r(r)];for(var a=2&o&&e;"object"==typeof a&&!~t.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,s.d(n,i),n},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>{},s.miniCssF=e=>{},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},s.l=(e,t,r,n)=>{if(o[e])return void o[e].push(t);if(void 0!==r)for(var i,a,u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var c=u[l];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="_N_E:"+r){i=c;break}}i||(a=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-webpack","_N_E:"+r),i.src=s.tu(e)),o[e]=[t];var f=(t,r)=>{i.onerror=i.onload=null,clearTimeout(d);var n=o[e];if(delete o[e],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach(e=>e(r)),t)return t(r)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),a&&document.head.appendChild(i)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.tt=()=>(void 0===n&&(n={createScriptURL:e=>e},"u">typeof trustedTypes&&trustedTypes.createPolicy&&(n=trustedTypes.createPolicy("nextjs#bundler",n))),n),s.tu=e=>s.tt().createScriptURL(e),s.p="/_next/",i={8068:0,
|
|
1
|
+
(()=>{"use strict";var e,t,r,o,n,i,a,u,l={},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}},o=!0;try{l[e](r,r.exports,s),o=!1}finally{o&&delete c[e]}return r.exports}s.m=l,e=[],s.O=(t,r,o,n)=>{if(r){n=n||0;for(var i=e.length;i>0&&e[i-1][2]>n;i--)e[i]=e[i-1];e[i]=[r,o,n];return}for(var a=1/0,i=0;i<e.length;i++){for(var[r,o,n]=e[i],u=!0,l=0;l<r.length;l++)(!1&n||a>=n)&&Object.keys(s.O).every(e=>s.O[e](r[l]))?r.splice(l--,1):(u=!1,n<a&&(a=n));if(u){e.splice(i--,1);var c=o();void 0!==c&&(t=c)}}return t},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);s.r(n);var i={};t=t||[null,r({}),r([]),r(r)];for(var a=2&o&&e;"object"==typeof a&&!~t.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,s.d(n,i),n},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>{},s.miniCssF=e=>{},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},s.l=(e,t,r,n)=>{if(o[e])return void o[e].push(t);if(void 0!==r)for(var i,a,u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var c=u[l];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="_N_E:"+r){i=c;break}}i||(a=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-webpack","_N_E:"+r),i.src=s.tu(e)),o[e]=[t];var f=(t,r)=>{i.onerror=i.onload=null,clearTimeout(d);var n=o[e];if(delete o[e],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach(e=>e(r)),t)return t(r)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),a&&document.head.appendChild(i)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.tt=()=>(void 0===n&&(n={createScriptURL:e=>e},"u">typeof trustedTypes&&trustedTypes.createPolicy&&(n=trustedTypes.createPolicy("nextjs#bundler",n))),n),s.tu=e=>s.tt().createScriptURL(e),s.p="/_next/",i={8068:0,1853:0,7513:0,1973:0},s.f.j=(e,t)=>{var r=s.o(i,e)?i[e]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^((185|197|751)3|8068)$/.test(e))i[e]=0;else{var o=new Promise((t,o)=>r=i[e]=[t,o]);t.push(r[2]=o);var n=s.p+s.u(e),a=Error();s.l(n,t=>{if(s.o(i,e)&&(0!==(r=i[e])&&(i[e]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,r[1](a)}},"chunk-"+e,e)}},s.O.j=e=>0===i[e],a=(e,t)=>{var r,o,[n,a,u]=t,l=0;if(n.some(e=>0!==i[e])){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(u)var c=u(s)}for(e&&e(t);l<n.length;l++)o=n[l],s.o(i,o)&&i[o]&&i[o][0](),i[o]=0;return s.O(c)},(u=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(a.bind(null,0)),u.push=a.bind(null,u.push.bind(u))})();
|