@goldenlustre/agent-studio 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +11 -11
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/server/app/dashboard.html +1 -1
- package/.next/server/app/dashboard.rsc +3 -3
- package/.next/server/app/dashboard.segments/_full.segment.rsc +3 -3
- package/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/dashboard.segments/dashboard/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +4 -4
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +11 -11
- package/.next/server/chunks/6763.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/6210-3e8922fee87bfe1f.js +1 -0
- package/.next/static/chunks/app/{layout-122ba415116b228a.js → layout-5faf0c882dfcc520.js} +1 -1
- package/.next/static/chunks/app/{page-e6777d803bacfae9.js → page-4b63784cf5fe163a.js} +2 -2
- package/.next/trace +41 -39
- package/.next/trace-build +1 -1
- package/package.json +1 -1
- package/.next/static/chunks/6210-25387318cf08f9ac.js +0 -1
- /package/.next/static/{Q5qAKqQm7gIeAZrKS_iN_ → EmuU1f7la3J3ZtEmFSuCi}/_buildManifest.js +0 -0
- /package/.next/static/{Q5qAKqQm7gIeAZrKS_iN_ → EmuU1f7la3J3ZtEmFSuCi}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"21278":{"*":{"id":"93080","name":"*","chunks":[],"async":false}},"27123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"42309":{"*":{"id":"28447","name":"*","chunks":[],"async":false}},"56901":{"*":{"id":"23909","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"57788":{"*":{"id":"19102","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}},"92624":{"*":{"id":"58362","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/components/PwaRegistration.tsx":{"id":57788,"name":"*","chunks":["7177","static/chunks/app/layout-
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"21278":{"*":{"id":"93080","name":"*","chunks":[],"async":false}},"27123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"42309":{"*":{"id":"28447","name":"*","chunks":[],"async":false}},"56901":{"*":{"id":"23909","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"57788":{"*":{"id":"19102","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}},"92624":{"*":{"id":"58362","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/components/PwaRegistration.tsx":{"id":57788,"name":"*","chunks":["7177","static/chunks/app/layout-5faf0c882dfcc520.js"],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"Noto_Sans_Mono\",\"arguments\":[{\"subsets\":[\"latin\",\"cyrillic\"],\"variable\":\"--font-noto-mono\",\"display\":\"swap\"}],\"variableName\":\"notoSansMono\"}":{"id":83683,"name":"*","chunks":["7177","static/chunks/app/layout-5faf0c882dfcc520.js"],"async":false},"/home/share/dev/agent-studio-deploy/node_modules/katex/dist/katex.min.css":{"id":84559,"name":"*","chunks":["7177","static/chunks/app/layout-5faf0c882dfcc520.js"],"async":false},"/home/share/dev/agent-studio-deploy/app/globals.css":{"id":66872,"name":"*","chunks":["7177","static/chunks/app/layout-5faf0c882dfcc520.js"],"async":false},"/home/share/dev/agent-studio-deploy/app/settings.css":{"id":39979,"name":"*","chunks":["7177","static/chunks/app/layout-5faf0c882dfcc520.js"],"async":false},"/home/share/dev/agent-studio-deploy/app/dashboard/page.tsx":{"id":92624,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/app/login/page.tsx":{"id":42309,"name":"*","chunks":[],"async":false},"/home/share/dev/agent-studio-deploy/components/AppShell.tsx":{"id":56901,"name":"*","chunks":["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5772","static/chunks/5772-ddd18c0d4b7715e5.js","5957","static/chunks/5957-b660df0f813517f8.js","1278","static/chunks/1278-bfacfce6a4683b1d.js","6210","static/chunks/6210-3e8922fee87bfe1f.js","8974","static/chunks/app/page-4b63784cf5fe163a.js"],"async":false},"/home/share/dev/agent-studio-deploy/hooks/useI18n.tsx":{"id":21278,"name":"*","chunks":["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","3888","static/chunks/e868780c-1584512c612787d7.js","5772","static/chunks/5772-ddd18c0d4b7715e5.js","5957","static/chunks/5957-b660df0f813517f8.js","1278","static/chunks/1278-bfacfce6a4683b1d.js","6210","static/chunks/6210-3e8922fee87bfe1f.js","8974","static/chunks/app/page-4b63784cf5fe163a.js"],"async":false}},"entryCSSFiles":{"/home/share/dev/agent-studio-deploy/":[],"/home/share/dev/agent-studio-deploy/app/layout":[{"inlined":false,"path":"static/css/88714c00e109ce28.css"},{"inlined":false,"path":"static/css/d71318cebb94818f.css"},{"inlined":false,"path":"static/css/bb9361c7f832a89d.css"}],"/home/share/dev/agent-studio-deploy/app/page":[{"inlined":false,"path":"static/css/4cbedad236d913cb.css"}]},"rscModuleMapping":{"21278":{"*":{"id":"73884","name":"*","chunks":[],"async":false}},"27123":{"*":{"id":"95547","name":"*","chunks":[],"async":false}},"39979":{"*":{"id":"77261","name":"*","chunks":[],"async":false}},"42309":{"*":{"id":"69613","name":"*","chunks":[],"async":false}},"56901":{"*":{"id":"35790","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"98099","name":"*","chunks":[],"async":false}},"57788":{"*":{"id":"81276","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"15098","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"33859","name":"*","chunks":[],"async":false}},"66872":{"*":{"id":"82704","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"16237","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"47644","name":"*","chunks":[],"async":false}},"84559":{"*":{"id":"25319","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"36675","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"98562","name":"*","chunks":[],"async":false}},"92624":{"*":{"id":"45948","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}};
|
|
@@ -22,40 +22,40 @@
|
|
|
22
22
|
"/favicon.ico/route": "app/favicon.ico/route.js",
|
|
23
23
|
"/manifest.webmanifest/route": "app/manifest.webmanifest/route.js",
|
|
24
24
|
"/api/agent/[id]/events/route": "app/api/agent/[id]/events/route.js",
|
|
25
|
-
"/api/app-update/route": "app/api/app-update/route.js",
|
|
26
25
|
"/api/agent/running/route": "app/api/agent/running/route.js",
|
|
27
|
-
"/api/auth/api-key/[provider]/route": "app/api/auth/api-key/[provider]/route.js",
|
|
28
26
|
"/api/agent/new/route": "app/api/agent/new/route.js",
|
|
27
|
+
"/api/app-update/route": "app/api/app-update/route.js",
|
|
28
|
+
"/api/auth/api-key/[provider]/route": "app/api/auth/api-key/[provider]/route.js",
|
|
29
|
+
"/api/auth/login/[provider]/route": "app/api/auth/login/[provider]/route.js",
|
|
29
30
|
"/api/auth/logout/[provider]/route": "app/api/auth/logout/[provider]/route.js",
|
|
30
31
|
"/api/auth/providers/route": "app/api/auth/providers/route.js",
|
|
31
|
-
"/api/auth/login/[provider]/route": "app/api/auth/login/[provider]/route.js",
|
|
32
|
-
"/api/models-config/route": "app/api/models-config/route.js",
|
|
33
32
|
"/api/models-config/catalog/route": "app/api/models-config/catalog/route.js",
|
|
33
|
+
"/api/models-config/route": "app/api/models-config/route.js",
|
|
34
34
|
"/api/models-config/discover/route": "app/api/models-config/discover/route.js",
|
|
35
|
+
"/api/models-config/test/route": "app/api/models-config/test/route.js",
|
|
35
36
|
"/api/plugins/check/route": "app/api/plugins/check/route.js",
|
|
36
37
|
"/api/models/route": "app/api/models/route.js",
|
|
37
|
-
"/api/
|
|
38
|
-
"/api/provider-usage/query/route": "app/api/provider-usage/query/route.js",
|
|
38
|
+
"/api/plugins/route": "app/api/plugins/route.js",
|
|
39
39
|
"/api/project-trust/route": "app/api/project-trust/route.js",
|
|
40
40
|
"/api/push/config/route": "app/api/push/config/route.js",
|
|
41
|
+
"/api/provider-usage/query/route": "app/api/provider-usage/query/route.js",
|
|
41
42
|
"/api/push/subscribe/route": "app/api/push/subscribe/route.js",
|
|
42
|
-
"/api/plugins/route": "app/api/plugins/route.js",
|
|
43
43
|
"/api/sessions/route": "app/api/sessions/route.js",
|
|
44
44
|
"/api/sessions/[id]/export/route": "app/api/sessions/[id]/export/route.js",
|
|
45
45
|
"/api/sessions/search/route": "app/api/sessions/search/route.js",
|
|
46
|
+
"/api/sessions/[id]/route": "app/api/sessions/[id]/route.js",
|
|
46
47
|
"/api/skills/check/route": "app/api/skills/check/route.js",
|
|
47
48
|
"/api/skills/install/route": "app/api/skills/install/route.js",
|
|
48
49
|
"/api/skills/route": "app/api/skills/route.js",
|
|
49
|
-
"/api/sessions/[id]/route": "app/api/sessions/[id]/route.js",
|
|
50
50
|
"/api/skills/update/route": "app/api/skills/update/route.js",
|
|
51
51
|
"/api/subagents/[id]/route": "app/api/subagents/[id]/route.js",
|
|
52
52
|
"/api/skills/search/route": "app/api/skills/search/route.js",
|
|
53
|
-
"/api/subagents/settings/route": "app/api/subagents/settings/route.js",
|
|
54
53
|
"/api/subagents/profiles/route": "app/api/subagents/profiles/route.js",
|
|
55
|
-
"/api/
|
|
54
|
+
"/api/subagents/settings/route": "app/api/subagents/settings/route.js",
|
|
56
55
|
"/api/terminal/[id]/route": "app/api/terminal/[id]/route.js",
|
|
57
|
-
"/api/terminal/route": "app/api/terminal/route.js",
|
|
56
|
+
"/api/terminal/[id]/events/route": "app/api/terminal/[id]/events/route.js",
|
|
58
57
|
"/api/tools/settings/route": "app/api/tools/settings/route.js",
|
|
58
|
+
"/api/terminal/route": "app/api/terminal/route.js",
|
|
59
59
|
"/api/web-auth/route": "app/api/web-auth/route.js",
|
|
60
60
|
"/dashboard/page": "app/dashboard/page.js",
|
|
61
61
|
"/login/page": "app/login/page.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=6763,exports.ids=[6763],exports.modules={19099:(a,b,c)=>{var d=c(54839);c.o(d,"useRouter")&&c.d(b,{useRouter:function(){return d.useRouter}}),c.o(d,"useSearchParams")&&c.d(b,{useSearchParams:function(){return d.useSearchParams}})},33730:(a,b,c)=>{c.d(b,{HL:()=>o,Jn:()=>i,QJ:()=>r,as:()=>l,b2:()=>p,eG:()=>m,m5:()=>j,qs:()=>q,wx:()=>n});var d=c(33873),e=c.n(d);let f=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(\..*)?$/i,g=/[<>:"|?*]/,h=/[\u0000-\u001f\u007f]/;function i(a){let b=a.trim();return!!b&&(b.startsWith("/")||b.startsWith("~")||b.startsWith("./")||b.startsWith("../")||b.includes("/")||b.includes("\\")||/^[a-zA-Z]:/.test(b))}function j(a){let b=a.replace(/[\\/]+$/,""),c=Math.max(b.lastIndexOf("/"),b.lastIndexOf("\\"));return(c>=0?b.slice(c+1):b)||a}function k(a){return/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")}function l(a,b){return(k(a)?e().win32:e().posix).join(a,b)}function m(a,b=process.platform){let c=a.trim();if(!c)return{ok:!1,error:"empty"};if(c.includes("/")||c.includes("\\"))return{ok:!1,error:"separator"};if("."===c||".."===c)return{ok:!1,error:"relative"};if(h.test(c))return{ok:!1,error:"control"};if(c.length>255)return{ok:!1,error:"tooLong"};if("win32"===b){if(g.test(c))return{ok:!1,error:"windowsChars"};if(f.test(c))return{ok:!1,error:"windowsReserved"};if(/[. ]$/.test(c))return{ok:!1,error:"windowsChars"}}return{ok:!0,name:c}}function n(a,b,c=8){let d=new Set(b),e=new Map;for(let b of a){let a=b.modified??"";for(let c of[b.projectRoot??void 0,b.cwd]){if(!c||d.has(c))continue;let b=e.get(c);b?(b.count+=1,a>b.modified&&(b.modified=a)):e.set(c,{modified:a,count:1})}}return[...e.entries()].sort((a,b)=>b[1].modified.localeCompare(a[1].modified)).slice(0,c).map(([a,b])=>({path:a,label:j(a),hint:String(b.count),kind:"recent"}))}function o(a,b=3){let c=new Set,d=[];for(let f of a){if(!f)continue;let a=k(f)?e().win32.dirname(f):e().posix.dirname(f);if(a&&a!==f&&"."!==a&&"/"!==a&&!c.has(a)&&(c.add(a),d.push(a),d.length>=b))break}return d}function p(a){return!!(!a||a.startsWith("."))||"node_modules"===a||"__pycache__"===a||"dist"===a||"build"===a}function q(a,b){let c=b.trim().toLowerCase();return c?a.filter(a=>a.label.toLowerCase().includes(c)||a.path.toLowerCase().includes(c)):[...a]}function r(a,b=[]){let c=new Set(b),d=new Set,e=[];for(let b of a)!b.path||c.has(b.path)||d.has(b.path)||(d.add(b.path),e.push(b));return e}},47083:(a,b,c)=>{c.d(b,{O$:()=>h,Vi:()=>f,_A:()=>i,tu:()=>g});let d="pi-web:last-open-by-workspace";function e(a){let b=a.getItem(d);if(!b)return{};try{let a=JSON.parse(b);return null===a||"object"!=typeof a||Array.isArray(a)?{}:a}catch{return{}}}function f(a,b=null){if(!b)return null;try{let c=e(b)[a];return"string"==typeof c&&c.length>0?c:null}catch{return null}}function g(a,b,c=null){if(c)try{let f=e(c);f[a]=b,c.setItem(d,JSON.stringify(f))}catch{}}function h(a,b=null){if(b)try{let c=e(b);if(!(a in c))return;delete c[a],0===Object.keys(c).length?b.removeItem(d):b.setItem(d,JSON.stringify(c))}catch{}}function i(a){return a.projectKey??a.projectRoot??a.cwd}},52483:(a,b,c)=>{c.d(b,{OW:()=>f,QZ:()=>g,TU:()=>h,wy:()=>e});var d=c(47083);function e(a,b=new Set,c=new Set){let f=new Map;for(let e of a){let a=(0,d._A)(e);if(!a)continue;let g=e.projectRoot??e.cwd;if(!g)continue;let h=f.get(a);h||(h={id:a,name:function(a){let b=a.replace(/[\\/]+$/,""),c=Math.max(b.lastIndexOf("/"),b.lastIndexOf("\\"));return(c>=0?b.slice(c+1):b)||b||a}(g),path:g,createdAt:e.created,lastAccessed:e.modified,sessionCount:0,runningCount:0,unreadCount:0,status:"idle",gitBranch:e.branch,isFavorite:!1,messageTotal:0,worktreeCount:0,worktrees:[],subagentCount:0,earliestCreated:e.created,lastTitleAt:"",lastTitleIsSubagent:!1},f.set(a,h));let i=e.relation?.kind==="subagent";h.sessionCount+=1,h.messageTotal+=Number.isFinite(e.messageCount)?e.messageCount:0,e.modified>h.lastAccessed&&(h.lastAccessed=e.modified),e.created<h.earliestCreated&&(h.earliestCreated=e.created),i&&(h.subagentCount+=1),b.has(e.id)&&(h.runningCount+=1),c.has(e.id)&&(h.unreadCount+=1),!h.gitBranch&&e.branch&&(h.gitBranch=e.branch),e.cwd&&!h.worktrees.includes(e.cwd)&&h.worktrees.push(e.cwd);let j=function(a){let b=a.name?.trim();if(b)return b;let c=a.firstMessage?.trim().replace(/\s+/g," ");if(c)return c.length>80?`${c.slice(0,80)}…`:c}(e);j&&(!h.lastSessionTitle||h.lastTitleIsSubagent&&!i||h.lastTitleIsSubagent===i&&e.modified>h.lastTitleAt)&&(h.lastSessionTitle=j,h.lastTitleAt=e.modified,h.lastTitleIsSubagent=i)}return[...f.values()].map(a=>{let b=a.worktrees.filter(b=>b!==a.path).sort(),c={id:a.id,name:a.name,path:a.path,createdAt:a.earliestCreated,lastAccessed:a.lastAccessed,sessionCount:a.sessionCount,runningCount:a.runningCount,unreadCount:a.unreadCount,status:a.runningCount>0?"active":"idle",isFavorite:a.isFavorite,messageTotal:a.messageTotal,worktreeCount:b.length+1,worktrees:b,subagentCount:a.subagentCount};return a.gitBranch&&(c.gitBranch=a.gitBranch),a.lastSessionTitle&&(c.lastSessionTitle=a.lastSessionTitle),c}).sort((a,b)=>b.lastAccessed.localeCompare(a.lastAccessed))}function f(a,b){switch(b){case"active":return a.filter(a=>a.runningCount>0);case"unread":return a.filter(a=>a.unreadCount>0);default:return[...a]}}function g(a,b){let c=b.trim().toLowerCase();return c?a.filter(a=>a.name.toLowerCase().includes(c)||(a.alias?.toLowerCase().includes(c)??!1)||(a.note?.toLowerCase().includes(c)??!1)||a.path.toLowerCase().includes(c)||(a.lastSessionTitle?.toLowerCase().includes(c)??!1)):[...a]}function h(a,b,c){let d=[...a];return d.sort((a,d)=>{let e;switch(b){case"name":e=i(a).localeCompare(i(d));break;case"sessionCount":e=a.sessionCount-d.sessionCount;break;case"runningCount":e=a.runningCount-d.runningCount;break;case"messageTotal":e=a.messageTotal-d.messageTotal;break;default:e=a.lastAccessed.localeCompare(d.lastAccessed)}return"desc"===c?-e:e}),d}function i(a){return(a.alias?.trim()||a.name).toLowerCase()}},94513:(a,b,c)=>{c.d(b,{wo:()=>x,JE:()=>E,wy:()=>v.wy});var d=c(48249),e=c(67484);function f(a){return a.alias?.trim()||a.name}var g=c(93080),h=c(81996);let i={display:"flex",alignItems:"center",justifyContent:"center",width:22,height:22,padding:0,background:"none",border:"none",borderRadius:5,cursor:"pointer"};function j({label:a,value:b}){return(0,d.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:3,whiteSpace:"nowrap"},children:[(0,d.jsx)("span",{style:{color:"var(--text-dim)"},children:a}),(0,d.jsx)("span",{style:{color:"var(--text-muted)",fontVariantNumeric:"tabular-nums"},children:b})]})}function k({projects:a,selectedProjects:b,onSelectProject:c,onToggleFavorite:l,onSelectionChange:m,onEditProject:n,onContextMenu:o}){let{locale:p,t:q}=(0,g.s)(),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(null);return(0,d.jsx)("div",{"data-testid":"project-grid",style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(230px, 1fr))",gap:10},children:a.map(a=>{let e=b.includes(a.id),g=r===a.id,k=f(a),v=a.note||a.lastSessionTitle;return(0,d.jsxs)("div",{"data-testid":"project-card","data-project-id":a.id,role:"button",tabIndex:0,"aria-label":q("projectDashboard.ctxOpen")+": "+k,onMouseEnter:()=>s(a.id),onMouseLeave:()=>s(null),onClick:()=>c(a),onKeyDown:b=>{"Enter"!==b.key&&" "!==b.key||b.target===b.currentTarget&&(b.preventDefault(),c(a))},onContextMenu:b=>o(a,b),style:{position:"relative",padding:11,background:"var(--bg-panel)",border:`1px solid ${e?"var(--accent)":"var(--border)"}`,borderRadius:9,cursor:"pointer",transition:"transform 0.15s, box-shadow 0.15s",transform:g?"translateY(-1px)":"none",boxShadow:g?"0 6px 16px rgba(0,0,0,0.14)":"none"},children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[(0,d.jsx)("input",{type:"checkbox",checked:e,title:q("projectDashboard.selectProject"),"aria-label":q("projectDashboard.selectProject"),onClick:a=>a.stopPropagation(),onChange:c=>{m(c.target.checked?[...b,a.id]:b.filter(b=>b!==a.id))},style:{width:14,height:14,marginTop:9,flexShrink:0,cursor:"pointer",opacity:g||e?1:.45}}),(0,d.jsx)("div",{style:{width:32,height:32,borderRadius:7,flexShrink:0,background:a.color||(a.runningCount>0?"var(--accent)":"var(--bg-subtle)"),color:a.color||a.runningCount>0?"white":"var(--text-muted)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:600},children:k.charAt(0).toUpperCase()}),(0,d.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,d.jsx)("h3",{title:k,style:{margin:0,fontSize:13,fontWeight:600,color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:k}),a.alias&&(0,d.jsxs)("span",{style:{fontSize:10,color:"var(--text-dim)",flexShrink:0},children:["(",a.name,")"]})]}),(0,d.jsx)("p",{title:a.path,style:{margin:"1px 0 0",fontSize:10.5,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.path})]}),(0,d.jsxs)("div",{style:{display:"flex",gap:1,flexShrink:0},children:[(0,d.jsx)("button",{onClick:b=>{b.stopPropagation(),n(a)},"data-testid":"project-edit",title:q("projectDashboard.editProject"),"aria-label":q("projectDashboard.editProject"),style:{...i,color:"var(--text-muted)",opacity:+!!g},children:(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,d.jsx)("path",{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"})})}),(0,d.jsx)("button",{onClick:b=>{b.stopPropagation(),l(a.id)},title:a.isFavorite?q("projectDashboard.removeFavorite"):q("projectDashboard.addFavorite"),"aria-label":a.isFavorite?q("projectDashboard.removeFavorite"):q("projectDashboard.addFavorite"),style:{...i,color:a.isFavorite?"#F59E0B":"var(--text-muted)",fontSize:14,lineHeight:1,opacity:a.isFavorite||g?1:0},children:a.isFavorite?"★":"☆"})]})]}),(v||a.gitBranch)&&(0,d.jsxs)("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:4},children:[v&&(0,d.jsx)("p",{title:v,style:{margin:0,fontSize:11.5,color:"var(--text-muted)",lineHeight:1.35,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:a.note?v:`${q("projectDashboard.lastSession")}: ${v}`}),a.gitBranch&&(0,d.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:3,fontSize:10.5,color:"var(--text-dim)",minWidth:0},children:[(0,d.jsxs)("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[(0,d.jsx)("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),(0,d.jsx)("circle",{cx:"18",cy:"6",r:"3"}),(0,d.jsx)("circle",{cx:"6",cy:"18",r:"3"}),(0,d.jsx)("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),(0,d.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.gitBranch})]})]}),(0,d.jsxs)("div",{style:{marginTop:8,display:"flex",alignItems:"center",gap:5,flexWrap:"wrap"},children:[(0,d.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"1px 7px",borderRadius:999,fontSize:10.5,fontWeight:500,background:a.runningCount>0?"rgba(16,185,129,0.14)":"var(--bg-subtle)",color:a.runningCount>0?"#10B981":"var(--text-muted)"},children:[(0,d.jsx)("span",{style:{width:5,height:5,borderRadius:"50%",background:a.runningCount>0?"#10B981":"#6B7280"}}),a.runningCount>0?`${a.runningCount} ${q("projectDashboard.running")}`:q("projectDashboard.status.idle")]}),a.unreadCount>0&&(0,d.jsxs)("span",{style:{padding:"1px 7px",borderRadius:999,fontSize:10.5,fontWeight:500,background:"var(--bg-selected)",color:"var(--accent)"},children:[a.unreadCount," ",q("projectDashboard.unread")]})]}),(0,d.jsxs)("div",{style:{marginTop:8,paddingTop:8,borderTop:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6,fontSize:10.5,flexWrap:"wrap"},children:[(0,d.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,d.jsx)(j,{label:q("projectDashboard.statSessions"),value:a.sessionCount}),(0,d.jsx)(j,{label:q("projectDashboard.statMessages"),value:a.messageTotal}),a.worktreeCount>1&&(0,d.jsxs)("button",{onClick:b=>{b.stopPropagation(),u(t===a.id?null:a.id)},style:{display:"inline-flex",alignItems:"center",gap:3,background:"none",border:"none",padding:0,cursor:"pointer",color:"var(--accent)",fontSize:10.5},children:[(0,d.jsx)(j,{label:q("projectDashboard.statWorktrees"),value:a.worktreeCount}),(0,d.jsx)("span",{style:{color:"var(--text-dim)"},children:t===a.id?"▾":"▸"})]}),a.subagentCount>0&&(0,d.jsx)(j,{label:q("projectDashboard.statSubagents"),value:a.subagentCount})]}),(0,d.jsx)("span",{title:a.lastAccessed,style:{color:"var(--text-dim)",whiteSpace:"nowrap"},children:(0,h.fw)(a.lastAccessed,p)})]}),t===a.id&&a.worktrees.length>0&&(0,d.jsx)("div",{style:{marginTop:6,display:"flex",flexDirection:"column",gap:2},children:a.worktrees.map(a=>(0,d.jsx)("div",{title:a,style:{fontSize:10.5,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingLeft:8,borderLeft:"2px solid var(--border)"},children:a},a))})]},a.id)})})}function l({projects:a,selectedProjects:b,onSelectProject:c,onToggleFavorite:i,onSelectionChange:j,onEditProject:k,onContextMenu:m}){let{locale:n,t:o}=(0,g.s)(),{ref:p,width:q}=function(){let a=(0,e.useRef)(null),[b,c]=(0,e.useState)(0);return{ref:a,width:b}}(),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(null),v=0===q||q>=460,w=v?"28px minmax(0,1.4fr) minmax(0,1fr) 84px 48px 54px 44px 74px 30px":"28px minmax(0,1fr) 84px 44px 30px",x=a.length>0&&b.length===a.length,y={fontSize:10.5,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:.4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};return(0,d.jsxs)("div",{ref:p,"data-testid":"project-list",style:{background:"var(--bg-panel)",borderRadius:9,border:"1px solid var(--border)",overflow:"hidden"},children:[(0,d.jsxs)("div",{style:{display:"grid",gridTemplateColumns:w,gap:8,padding:"8px 12px",background:"var(--bg-subtle)",borderBottom:"1px solid var(--border)",alignItems:"center"},children:[(0,d.jsx)("div",{children:(0,d.jsx)("input",{type:"checkbox",checked:x,"aria-label":o("projectDashboard.selectAll"),onChange:b=>j(b.target.checked?a.map(a=>a.id):[]),style:{width:14,height:14,cursor:"pointer"}})}),(0,d.jsx)("div",{style:y,children:o("projectDashboard.project")}),v&&(0,d.jsx)("div",{style:y,children:o("projectDashboard.lastSession")}),(0,d.jsx)("div",{style:y,children:o("projectDashboard.statusLabel")}),(0,d.jsx)("div",{style:y,children:o("projectDashboard.statSessions")}),v&&(0,d.jsx)("div",{style:y,children:o("projectDashboard.statMessages")}),v&&(0,d.jsx)("div",{style:y,children:o("projectDashboard.statWorktrees")}),v&&(0,d.jsx)("div",{style:y,children:o("projectDashboard.lastAccessed")}),(0,d.jsx)("div",{})]}),a.map((e,g)=>{let l=b.includes(e.id),p=f(e),q=e.note||e.lastSessionTitle;return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{"data-testid":"project-card","data-project-id":e.id,role:"button",tabIndex:0,"aria-label":o("projectDashboard.ctxOpen")+": "+p,onMouseEnter:()=>s(e.id),onMouseLeave:()=>s(null),onClick:()=>c(e),onKeyDown:a=>{"Enter"!==a.key&&" "!==a.key||a.target===a.currentTarget&&(a.preventDefault(),c(e))},onContextMenu:a=>m(e,a),style:{display:"grid",gridTemplateColumns:w,gap:8,padding:"8px 12px",alignItems:"center",borderBottom:g<a.length-1||t===e.id?"1px solid var(--border)":"none",background:l?"var(--bg-selected)":r===e.id?"var(--bg-hover)":"transparent",cursor:"pointer",transition:"background 0.12s"},children:[(0,d.jsx)("div",{children:(0,d.jsx)("input",{type:"checkbox",checked:l,onClick:a=>a.stopPropagation(),onChange:a=>{j(a.target.checked?[...b,e.id]:b.filter(a=>a!==e.id))},style:{width:14,height:14,cursor:"pointer"}})}),(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[(0,d.jsx)("div",{style:{width:24,height:24,borderRadius:6,flexShrink:0,background:e.color||(e.runningCount>0?"var(--accent)":"var(--bg-subtle)"),color:e.color||e.runningCount>0?"white":"var(--text-muted)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:600},children:p.charAt(0).toUpperCase()}),(0,d.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,d.jsx)("span",{style:{fontSize:12.5,fontWeight:500,color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p}),(0,d.jsx)("button",{onClick:a=>{a.stopPropagation(),k(e)},title:o("projectDashboard.editProject"),"aria-label":o("projectDashboard.editProject"),style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"var(--text-dim)",display:"flex",flexShrink:0,opacity:+(r===e.id)},children:(0,d.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,d.jsx)("path",{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"})})})]}),(0,d.jsx)("div",{title:e.path,style:{fontSize:10.5,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.path}),!v&&q&&(0,d.jsx)("div",{title:q,style:{fontSize:10.5,color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.note?q:`${o("projectDashboard.lastSession")}: ${q}`})]})]}),v&&(0,d.jsx)("div",{title:q,style:{fontSize:11.5,color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q||"—"}),(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:11,color:e.runningCount>0?"#10B981":"var(--text-muted)",minWidth:0},children:[(0,d.jsx)("span",{style:{width:5,height:5,borderRadius:"50%",background:e.runningCount>0?"#10B981":"#6B7280",flexShrink:0}}),(0,d.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.runningCount>0?`${e.runningCount} ${o("projectDashboard.running")}`:o("projectDashboard.status.idle")}),e.unreadCount>0&&(0,d.jsx)("span",{style:{color:"var(--accent)"},title:`${e.unreadCount} ${o("projectDashboard.unread")}`,children:"•"})]}),(0,d.jsx)("div",{style:{fontSize:11.5,color:"var(--text)",fontVariantNumeric:"tabular-nums"},children:e.sessionCount}),v&&(0,d.jsx)("div",{style:{fontSize:11.5,color:"var(--text)",fontVariantNumeric:"tabular-nums"},children:e.messageTotal}),v&&(0,d.jsxs)("div",{style:{fontSize:11.5,color:"var(--text-muted)",fontVariantNumeric:"tabular-nums",display:"flex",alignItems:"center",gap:3},children:[e.worktreeCount,e.worktreeCount>1&&(0,d.jsx)("button",{onClick:a=>{a.stopPropagation(),u(t===e.id?null:e.id)},"aria-label":o("projectDashboard.toggleWorktrees"),style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"var(--accent)",fontSize:10},children:t===e.id?"▾":"▸"})]}),v&&(0,d.jsx)("div",{title:e.lastAccessed,style:{fontSize:10.5,color:"var(--text-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(0,h.fw)(e.lastAccessed,n)}),(0,d.jsx)("div",{children:(0,d.jsx)("button",{onClick:a=>{a.stopPropagation(),i(e.id)},title:e.isFavorite?o("projectDashboard.removeFavorite"):o("projectDashboard.addFavorite"),"aria-label":e.isFavorite?o("projectDashboard.removeFavorite"):o("projectDashboard.addFavorite"),style:{background:"none",border:"none",cursor:"pointer",padding:0,color:e.isFavorite?"#F59E0B":"var(--text-muted)",fontSize:13,lineHeight:1},children:e.isFavorite?"★":"☆"})})]}),t===e.id&&e.worktrees.length>0&&(0,d.jsx)("div",{style:{padding:"6px 12px 8px 48px",background:"var(--bg-subtle)",display:"flex",flexDirection:"column",gap:2},children:e.worktrees.map(a=>(0,d.jsx)("div",{title:a,style:{fontSize:10.5,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a},a))})]},e.id)})]})}function m({stats:a,quickFilter:b,sortBy:c,sortOrder:e,onQuickFilterChange:f,onSortToggle:h}){let{t:i}=(0,g.s)(),j=a=>c===a?"desc"===e?"↓":"↑":void 0,k=[{key:"all",label:i("projectDashboard.chipProjects"),count:a.totalProjects,title:i("projectDashboard.chipProjectsHint"),active:"all"===b,onClick:()=>f("all")},{key:"active",label:i("projectDashboard.chipActive"),count:a.activeProjects,title:i("projectDashboard.chipActiveHint"),active:"active"===b,onClick:()=>f("active"===b?"all":"active")},{key:"unread",label:i("projectDashboard.chipUnread"),count:a.totalUnread,title:i("projectDashboard.chipUnreadHint"),active:"unread"===b,onClick:()=>f("unread"===b?"all":"unread")},{key:"sessions",label:i("projectDashboard.chipSessions"),count:a.totalSessions,title:i("projectDashboard.chipSessionsHint"),active:"all"===b&&"sessionCount"===c,onClick:()=>h("sessionCount"),sortIndicator:j("sessionCount")},{key:"messages",label:i("projectDashboard.chipMessages"),count:a.totalMessages,title:i("projectDashboard.chipMessagesHint"),active:"all"===b&&"messageTotal"===c,onClick:()=>h("messageTotal"),sortIndicator:j("messageTotal")}];return(0,d.jsx)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 16px",borderBottom:"1px solid var(--border)",overflowX:"auto",overflowY:"hidden",flexShrink:0,scrollbarWidth:"thin"},children:k.map(a=>(0,d.jsxs)("button",{onClick:a.onClick,"data-testid":`dashboard-chip-${a.key}`,title:a.title,"aria-pressed":a.active,style:{display:"inline-flex",alignItems:"center",gap:4,flexShrink:0,padding:"3px 9px",borderRadius:999,border:`1px solid ${a.active?"var(--accent)":"var(--border)"}`,background:a.active?"var(--bg-selected)":"var(--bg-panel)",color:a.active?"var(--accent)":"var(--text-muted)",fontSize:11,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap",transition:"background 0.12s, color 0.12s, border-color 0.12s"},children:[(0,d.jsx)("span",{children:a.label}),(0,d.jsx)("span",{style:{fontVariantNumeric:"tabular-nums"},children:a.count}),a.sortIndicator&&(0,d.jsx)("span",{"aria-hidden":!0,children:a.sortIndicator})]},a.key))})}function n({viewMode:a,sortBy:b,sortOrder:c,searchQuery:e,onViewModeChange:f,onSortChange:h,onSearchChange:i}){let{t:j}=(0,g.s)();return(0,d.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",padding:"8px 16px",borderBottom:"1px solid var(--border)",flexShrink:0,overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin"},children:[(0,d.jsxs)("div",{style:{position:"relative",width:148,flexShrink:0},children:[(0,d.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:10,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)",pointerEvents:"none"},children:[(0,d.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,d.jsx)("path",{d:"M21 21l-4.35-4.35"})]}),(0,d.jsx)("input",{type:"text",placeholder:j("projectDashboard.searchPlaceholder"),value:e,onChange:a=>i(a.target.value),style:{width:"100%",padding:"7px 10px 7px 32px",background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:7,fontSize:13,color:"var(--text)",outline:"none"}})]}),(0,d.jsxs)("select",{value:b,onChange:a=>h(a.target.value,c),title:j("projectDashboard.sortBy"),style:{padding:"7px 8px",background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:7,fontSize:13,color:"var(--text)",cursor:"pointer",outline:"none",flexShrink:0},children:[(0,d.jsx)("option",{value:"lastAccessed",children:j("projectDashboard.sortLastAccessed")}),(0,d.jsx)("option",{value:"name",children:j("projectDashboard.sortName")}),(0,d.jsx)("option",{value:"sessionCount",children:j("projectDashboard.sortSessions")}),(0,d.jsx)("option",{value:"runningCount",children:j("projectDashboard.sortRunning")}),(0,d.jsx)("option",{value:"messageTotal",children:j("projectDashboard.sortMessages")})]}),(0,d.jsx)("button",{onClick:()=>h(b,"asc"===c?"desc":"asc"),title:j("asc"===c?"projectDashboard.ascending":"projectDashboard.descending"),style:{padding:7,background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:7,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--text-muted)",flexShrink:0},children:(0,d.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:"asc"===c?"rotate(180deg)":"none",transition:"transform 0.2s"},children:(0,d.jsx)("path",{d:"M12 5v14M19 12l-7 7-7-7"})})}),(0,d.jsxs)("div",{style:{display:"flex",background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:7,overflow:"hidden",flexShrink:0},children:[(0,d.jsx)("button",{onClick:()=>f("grid"),"data-testid":"view-mode-grid",title:j("projectDashboard.gridView"),style:{padding:"7px 9px",background:"grid"===a?"var(--accent)":"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",color:"grid"===a?"white":"var(--text-muted)"},children:(0,d.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,d.jsx)("rect",{x:"3",y:"3",width:"7",height:"7"}),(0,d.jsx)("rect",{x:"14",y:"3",width:"7",height:"7"}),(0,d.jsx)("rect",{x:"14",y:"14",width:"7",height:"7"}),(0,d.jsx)("rect",{x:"3",y:"14",width:"7",height:"7"})]})}),(0,d.jsx)("button",{onClick:()=>f("list"),"data-testid":"view-mode-list",title:j("projectDashboard.listView"),style:{padding:"7px 9px",background:"list"===a?"var(--accent)":"transparent",border:"none",borderLeft:"1px solid var(--border)",cursor:"pointer",display:"flex",alignItems:"center",color:"list"===a?"white":"var(--text-muted)"},children:(0,d.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,d.jsx)("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),(0,d.jsx)("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),(0,d.jsx)("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),(0,d.jsx)("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),(0,d.jsx)("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),(0,d.jsx)("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]})})]})]})}function o({x:a,y:b,items:c,onClose:f}){let g=(0,e.useRef)(null),[h,i]=(0,e.useState)({left:a,top:b});return(0,d.jsx)("div",{ref:g,"data-testid":"project-context-menu",role:"menu",style:{position:"fixed",left:h.left,top:h.top,zIndex:3200,minWidth:168,padding:4,background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:8,boxShadow:"0 12px 32px rgba(0,0,0,0.32)",display:"flex",flexDirection:"column",gap:1},children:c.map(a=>(0,d.jsx)("button",{role:"menuitem",disabled:a.disabled,onClick:()=>{a.disabled||(a.onSelect(),f())},style:{display:"flex",alignItems:"center",gap:8,padding:"7px 10px",background:"none",border:"none",borderRadius:6,textAlign:"left",fontSize:13,color:a.disabled?"var(--text-dim)":a.danger?"#ef4444":"var(--text)",cursor:a.disabled?"default":"pointer",width:"100%"},onMouseEnter:b=>{a.disabled||(b.currentTarget.style.background=a.danger?"rgba(239,68,68,0.1)":"var(--bg-hover)")},onMouseLeave:a=>{a.currentTarget.style.background="none"},children:a.label},a.key))})}let p=["#3B82F6","#10B981","#F59E0B","#8B5CF6","#EC4899","#EF4444","#14B8A6","#6B7280"];function q({title:a,onClose:b,children:c,wide:f,testId:g}){let[h]=(0,e.useState)(()=>Symbol("modal"));return(0,d.jsx)("div",{onClick:b,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:3e3,padding:16},children:(0,d.jsxs)("div",{onClick:a=>a.stopPropagation(),"data-testid":g,role:"dialog","aria-modal":"true","aria-label":a,style:{background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:12,width:"100%",maxWidth:f?560:420,maxHeight:"85vh",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 18px 48px rgba(0,0,0,0.35)"},children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid var(--border)",flexShrink:0},children:[(0,d.jsx)("h2",{style:{margin:0,fontSize:15,fontWeight:600,color:"var(--text)"},children:a}),(0,d.jsx)("button",{onClick:b,"aria-label":"Close",style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",fontSize:20,lineHeight:1,padding:4},children:"\xd7"})]}),(0,d.jsx)("div",{style:{padding:16,overflowY:"auto"},children:c})]})})}let r={width:"100%",padding:"8px 10px",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:7,fontSize:13,color:"var(--text)",outline:"none",fontFamily:"inherit"},s={display:"block",fontSize:12,fontWeight:500,color:"var(--text-muted)",marginBottom:6};function t({project:a,meta:b,onSave:c,onClose:f}){let{t:h}=(0,g.s)(),[i,j]=(0,e.useState)(b.alias??""),[k,l]=(0,e.useState)(b.note??""),[m,n]=(0,e.useState)(b.color??"");return(0,d.jsxs)(q,{title:h("projectDashboard.editProject"),onClose:f,testId:"project-note-editor",children:[(0,d.jsx)("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:14,wordBreak:"break-all"},children:a.path}),(0,d.jsxs)("div",{style:{marginBottom:14},children:[(0,d.jsx)("label",{style:s,htmlFor:"project-alias",children:h("projectDashboard.alias")}),(0,d.jsx)("input",{id:"project-alias","data-testid":"project-alias-input",value:i,onChange:a=>j(a.target.value),placeholder:a.name,style:r,autoFocus:!0}),(0,d.jsx)("div",{style:{fontSize:11,color:"var(--text-dim)",marginTop:4},children:h("projectDashboard.aliasHint")})]}),(0,d.jsxs)("div",{style:{marginBottom:14},children:[(0,d.jsx)("label",{style:s,htmlFor:"project-note",children:h("projectDashboard.note")}),(0,d.jsx)("textarea",{id:"project-note","data-testid":"project-note-input",value:k,onChange:a=>l(a.target.value),placeholder:h("projectDashboard.notePlaceholder"),rows:4,style:{...r,resize:"vertical",minHeight:80}})]}),(0,d.jsxs)("div",{style:{marginBottom:18},children:[(0,d.jsx)("span",{style:s,children:h("projectDashboard.color")}),(0,d.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[(0,d.jsx)("button",{onClick:()=>n(""),title:h("projectDashboard.colorDefault"),style:{width:26,height:26,borderRadius:6,cursor:"pointer",background:"var(--bg-subtle)",border:""===m?"2px solid var(--accent)":"1px solid var(--border)"}}),p.map(a=>(0,d.jsx)("button",{onClick:()=>n(a),title:a,style:{width:26,height:26,borderRadius:6,cursor:"pointer",background:a,border:m===a?"2px solid var(--text)":"1px solid var(--border)"}},a))]})]}),(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:8},children:[(0,d.jsx)("button",{onClick:()=>{c({alias:void 0,note:void 0,color:void 0}),f()},style:{padding:"7px 12px",background:"none",border:"1px solid var(--border)",borderRadius:7,color:"var(--text-muted)",fontSize:13,cursor:"pointer"},children:h("projectDashboard.clearMeta")}),(0,d.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,d.jsx)("button",{onClick:f,style:{padding:"7px 14px",background:"var(--bg-hover)",border:"1px solid var(--border)",borderRadius:7,color:"var(--text)",fontSize:13,cursor:"pointer"},children:h("projectDashboard.cancel")}),(0,d.jsx)("button",{onClick:()=>{c({alias:i.trim()||void 0,note:k.trim()||void 0,color:m||void 0}),f()},"data-testid":"project-save",style:{padding:"7px 14px",background:"var(--accent)",border:"none",borderRadius:7,color:"white",fontSize:13,fontWeight:500,cursor:"pointer"},children:h("projectDashboard.save")})]})]})]})}function u({projects:a,metaMap:b,onSave:c,onClose:h}){let{t:i}=(0,g.s)(),[j,k]=(0,e.useState)(null),l=a.filter(a=>b[a.id]?.note||b[a.id]?.alias||b[a.id]?.color).length;return(0,d.jsxs)(q,{title:i("projectDashboard.manageTitle"),onClose:h,wide:!0,testId:"project-settings-panel",children:[(0,d.jsx)("p",{style:{margin:"0 0 14px",fontSize:12,color:"var(--text-muted)"},children:i("projectDashboard.manageHint",{total:a.length,annotated:l})}),0===a.length?(0,d.jsx)("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-muted)",fontSize:13},children:i("projectDashboard.noProjectsFound")}):(0,d.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:a.map(a=>{let c=b[a.id]??{};return(0,d.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:10,border:"1px solid var(--border)",borderRadius:8,background:"var(--bg)"},children:[(0,d.jsx)("span",{style:{width:10,height:10,borderRadius:3,marginTop:4,flexShrink:0,background:c.color||"var(--accent)"}}),(0,d.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,d.jsx)("div",{style:{fontSize:13,fontWeight:500,color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f({...a,...c})}),(0,d.jsx)("div",{style:{fontSize:11,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:a.path,children:a.path}),c.note&&(0,d.jsx)("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:4,whiteSpace:"pre-wrap"},children:c.note})]}),(0,d.jsx)("button",{onClick:()=>k(a),style:{flexShrink:0,padding:"4px 10px",background:"var(--bg-hover)",border:"1px solid var(--border)",borderRadius:6,color:"var(--text)",fontSize:12,cursor:"pointer"},children:i("projectDashboard.edit")})]},a.id)})}),j&&(0,d.jsx)(t,{project:j,meta:b[j.id]??{},onSave:a=>c(j.id,a),onClose:()=>k(null)})]})}var v=c(52483);function w(a,b){}function x({projects:a,onSelectProject:b,onNewSessionInProject:c,onRequestCreateProject:f}){let{t:h}=(0,g.s)(),[i,j]=(0,e.useState)("grid"),[p,q]=(0,e.useState)("lastAccessed"),[r,s]=(0,e.useState)("desc"),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)("all"),[C,D]=(0,e.useState)([]),[E,F]=(0,e.useState)(null),[G,H]=(0,e.useState)({}),I=(0,e.useRef)(null),[J,K]=(0,e.useState)(null),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(null),P=function({storageKey:a,defaultHeight:b,minTop:c,minBottom:d,maxTop:f,keyboardStep:g=16}){let h=(0,e.useRef)(null),i=(0,e.useRef)(null),j=(0,e.useRef)(b);(0,e.useRef)(!1);let[k,l]=(0,e.useState)(b),[m,n]=(0,e.useState)(!1),o=(0,e.useCallback)(()=>{let a=h.current;return a?a.getBoundingClientRect().height:0},[]),p=(0,e.useCallback)(a=>(function(a,b){let{containerHeight:c,minTop:d,minBottom:e,maxTop:f}=b,g=Number.isFinite(a)?Math.round(a):d;if(!Number.isFinite(c)||c<=0)return Math.max(d,g);let h=Math.min(f??1/0,Math.max(d,c-e));return Math.round(Math.max(d,Math.min(h,g)))})(a,{containerHeight:o(),minTop:c,minBottom:d,maxTop:f}),[f,o,d,c]),q=(0,e.useCallback)((b,c=!0)=>{let d=p(b);return j.current=d,l(d),c&&w(a,d),d},[p,a]),r=(0,e.useCallback)(()=>{q(b)},[q,b]),s=(0,e.useCallback)(a=>{document.body.style.cursor=a.previousCursor,document.body.style.userSelect=a.previousUserSelect},[]),t=(0,e.useCallback)(a=>{let b=i.current;if(b&&b.pointerId===a){i.current=null,s(b),n(!1),j.current;try{b.target.hasPointerCapture(a)&&b.target.releasePointerCapture(a)}catch{}}},[s,a]),u=(0,e.useCallback)(a=>{if("mouse"===a.pointerType&&0!==a.button)return;a.preventDefault();let b=i.current;b&&t(b.pointerId);let c=a.currentTarget;c.focus({preventScroll:!0}),c.setPointerCapture(a.pointerId),i.current={pointerId:a.pointerId,startY:a.clientY,startHeight:j.current,target:c,previousCursor:document.body.style.cursor,previousUserSelect:document.body.style.userSelect},document.body.style.cursor="row-resize",document.body.style.userSelect="none",n(!0)},[t]),v=(0,e.useCallback)(a=>{let b=i.current;if(!b||b.pointerId!==a.pointerId)return;if("mouse"===a.pointerType&&0===a.buttons)return void t(a.pointerId);a.preventDefault();let c=p(b.startHeight+(a.clientY-b.startY));j.current=c,l(c),a.currentTarget.setAttribute("aria-valuenow",String(c)),a.currentTarget.setAttribute("aria-valuetext",`${c} px`)},[p,t]),x=(0,e.useCallback)(a=>{t(a.pointerId)},[t]),y=(0,e.useCallback)(a=>{let b=a.shiftKey?2*g:g;"ArrowDown"===a.key?(a.preventDefault(),q(j.current+b)):"ArrowUp"===a.key?(a.preventDefault(),q(j.current-b)):"Home"===a.key?(a.preventDefault(),q(c)):"End"===a.key?(a.preventDefault(),q(f??1/0)):"Enter"===a.key&&(a.preventDefault(),r())},[q,g,f,c,r]),z=Math.max(c,o()-d);return{containerRef:h,height:k,isResizing:m,setHeight:a=>{q(a)},resetHeight:r,separatorProps:{role:"separator",tabIndex:0,"aria-label":"Resize project details","aria-orientation":"horizontal","aria-valuemin":c,"aria-valuemax":z,"aria-valuenow":k,"aria-valuetext":`${k} px`,onDoubleClick:r,onKeyDown:y,onLostPointerCapture:x,onPointerCancel:x,onPointerDown:u,onPointerMove:v,onPointerUp:x}}}({storageKey:"agent-studio:project-dashboard-split",defaultHeight:132,minTop:40,minBottom:180}),Q=P.height<=42,R=(0,e.useCallback)((a,b)=>{let c=function(a,b,c){let d={...a},e={...d[b]};for(let a of["alias","note","color"]){var f;if(!(a in c))continue;let b="string"==typeof(f=c[a])&&f.trim().length>0?f:void 0;void 0===b?delete e[a]:e[a]=b}return"favorite"in c&&(c.favorite?e.favorite=!0:delete e.favorite),0===Object.keys(e).length?delete d[b]:d[b]=e,d}(G,a,b);H(c)},[G]),S=(0,e.useCallback)(a=>{R(a,{favorite:!G[a]?.favorite})},[R,G]),T=(0,e.useMemo)(()=>a.map(a=>{let b=G[a.id],c={...a,isFavorite:!!b?.favorite};return b?.alias&&(c.alias=b.alias),b?.note&&(c.note=b.note),b?.color&&(c.color=b.color),c}),[a,G]),U=(0,e.useMemo)(()=>{let a=T.reduce((a,b)=>a+b.sessionCount,0),b=T.reduce((a,b)=>a+b.messageTotal,0);return{totalProjects:T.length,activeProjects:T.filter(a=>a.runningCount>0).length,totalSessions:a,totalRunning:T.reduce((a,b)=>a+b.runningCount,0),totalUnread:T.reduce((a,b)=>a+b.unreadCount,0),totalMessages:b,averageSessionsPerProject:T.length>0?a/T.length:0,mostActiveProject:[...T].sort((a,b)=>b.sessionCount-a.sessionCount)[0]}},[T]),V=(0,e.useMemo)(()=>(0,v.TU)((0,v.QZ)((0,v.OW)(T,A),y),p,r),[T,A,y,p,r]),W=(0,e.useMemo)(()=>new Map(T.map(a=>[a.id,a])),[T]),X=(0,e.useCallback)(a=>{B("all"),p===a?s(a=>"desc"===a?"asc":"desc"):(q(a),s("desc"))},[p]),Y=(0,e.useCallback)(a=>{F(a),null!==I.current&&window.clearTimeout(I.current),I.current=window.setTimeout(()=>{I.current=null,F(null)},1600)},[]),Z=(0,e.useCallback)(async a=>{try{if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(a),Y(h("projectDashboard.copied"));return}let b=document.createElement("textarea");b.value=a,b.setAttribute("readonly",""),b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select();let c=document.execCommand("copy");document.body.removeChild(b),Y(h(c?"projectDashboard.copied":"projectDashboard.copyFailed"))}catch{Y(h("projectDashboard.copyFailed"))}},[Y,h]),$=N?W.get(N.projectId):void 0,_=$?[{key:"open",label:h("projectDashboard.ctxOpen"),onSelect:()=>b($)},{key:"new",label:h("projectDashboard.ctxNewSession"),disabled:!c,onSelect:()=>c?.($)},{key:"copy",label:h("projectDashboard.ctxCopyPath"),onSelect:()=>void Z($.path)},{key:"edit",label:h("projectDashboard.ctxEdit"),onSelect:()=>K($.id)},{key:"fav",label:$.isFavorite?h("projectDashboard.removeFavorite"):h("projectDashboard.addFavorite"),onSelect:()=>S($.id)}]:[],aa=(0,e.useCallback)((a,b)=>{b.preventDefault(),b.stopPropagation(),O({projectId:a.id,x:b.clientX,y:b.clientY})},[]),ab=J?W.get(J):void 0;return(0,d.jsxs)("div",{ref:P.containerRef,"data-testid":"project-dashboard",style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,overflow:"hidden"},children:[(0,d.jsxs)("div",{"data-testid":"dashboard-top-pane",style:{height:P.height,flexShrink:0,minHeight:0,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column"},children:[(0,d.jsxs)("div",{style:{padding:"12px 16px 10px",display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:8},children:[(0,d.jsxs)("div",{style:{minWidth:0},children:[(0,d.jsx)("h2",{style:{margin:0,fontSize:15,fontWeight:600,color:"var(--text)"},children:h("projectDashboard.title")}),(0,d.jsx)("p",{style:{margin:"2px 0 0",fontSize:12,color:"var(--text-muted)"},children:h("projectDashboard.subtitle")})]}),(0,d.jsxs)("div",{style:{display:"flex",gap:6,flexShrink:0},children:[(0,d.jsxs)("button",{onClick:f,"data-testid":"new-project-button",title:h("projectDashboard.newProject"),style:{display:"flex",alignItems:"center",gap:4,padding:"5px 9px",background:"var(--accent)",color:"white",border:"none",borderRadius:6,fontSize:12,fontWeight:500,cursor:"pointer"},children:[(0,d.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,d.jsx)("path",{d:"M12 5v14M5 12h14"})}),h("projectDashboard.newProject")]}),(0,d.jsx)("button",{onClick:()=>M(!0),"data-testid":"project-settings-open",title:h("projectDashboard.manage"),"aria-label":h("projectDashboard.manage"),style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:0,background:"var(--bg-hover)",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:"pointer"},children:(0,d.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,d.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6h.09A1.65 1.65 0 0 0 10.6 3.09V3a2 2 0 0 1 4 0v.09A1.65 1.65 0 0 0 16.11 4.6h.09a1.65 1.65 0 0 0 1.51-1.51l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 20.4 9v.09a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z"})]})}),(0,d.jsx)("button",{onClick:()=>P.setHeight(Q?132:40),"data-testid":"dashboard-toggle-details",title:Q?h("projectDashboard.expandDetails"):h("projectDashboard.collapseDetails"),"aria-label":Q?h("projectDashboard.expandDetails"):h("projectDashboard.collapseDetails"),style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:0,background:"var(--bg-hover)",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:"pointer"},children:(0,d.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:Q?"rotate(180deg)":"none",transition:"transform 0.15s"},children:(0,d.jsx)("path",{d:"m6 15 6-6 6 6"})})})]})]}),(0,d.jsx)(m,{stats:U,quickFilter:A,sortBy:p,sortOrder:r,onQuickFilterChange:B,onSortToggle:X}),(0,d.jsx)(n,{viewMode:i,sortBy:p,sortOrder:r,searchQuery:y,onViewModeChange:j,onSortChange:(a,b)=>{q(a),s(b)},onSearchChange:z})]}),(0,d.jsx)("div",{...P.separatorProps,"data-testid":"dashboard-split-handle",title:h("projectDashboard.splitHint"),style:{height:10,flexShrink:0,cursor:"row-resize",display:"flex",alignItems:"center",justifyContent:"center",background:P.isResizing?"var(--bg-selected)":"transparent",borderTop:"1px solid var(--border)",borderBottom:"1px solid var(--border)",outline:"none",touchAction:"none"},children:(0,d.jsx)("div",{style:{width:44,height:3,borderRadius:2,background:P.isResizing?"var(--accent)":"var(--text-dim)",opacity:P.isResizing?1:.5,transition:"background 0.12s, opacity 0.12s"}})}),(0,d.jsxs)("div",{"data-testid":"dashboard-bottom-pane",style:{flex:1,minHeight:0,overflowY:"auto",padding:"12px 16px"},children:[(0,d.jsxs)("button",{type:"button","data-testid":"add-project-row",onClick:f,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6,width:"100%",padding:"8px 10px",marginBottom:10,background:"none",border:"1px dashed var(--border)",borderRadius:8,color:"var(--text-muted)",fontSize:12.5,fontWeight:500,cursor:"pointer"},children:[(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,d.jsx)("path",{d:"M12 5v14M5 12h14"})}),h("projectDashboard.addProjectRow")]}),"grid"===i?(0,d.jsx)(k,{projects:V,selectedProjects:C,onSelectProject:b,onToggleFavorite:S,onSelectionChange:D,onEditProject:a=>K(a.id),onContextMenu:aa}):(0,d.jsx)(l,{projects:V,selectedProjects:C,onSelectProject:b,onToggleFavorite:S,onSelectionChange:D,onEditProject:a=>K(a.id),onContextMenu:aa}),0===V.length&&(0,d.jsxs)("div",{style:{textAlign:"center",padding:"32px 16px",color:"var(--text-muted)"},children:[(0,d.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",style:{marginBottom:10,opacity:.5},children:(0,d.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,d.jsx)("h3",{style:{margin:"0 0 6px",fontSize:14,fontWeight:500},children:h("projectDashboard.noProjectsFound")}),(0,d.jsx)("p",{style:{margin:0,fontSize:12},children:h("projectDashboard.noProjectsHint")})]})]}),ab&&(0,d.jsx)(t,{project:ab,meta:G[ab.id]??{},onSave:a=>R(ab.id,a),onClose:()=>K(null)}),L&&(0,d.jsx)(u,{projects:T,metaMap:G,onSave:R,onClose:()=>M(!1)}),$&&(0,d.jsx)(o,{x:N?.x??0,y:N?.y??0,items:_,onClose:()=>O(null)}),E&&(0,d.jsx)("div",{role:"status",style:{position:"fixed",bottom:18,left:"50%",transform:"translateX(-50%)",padding:"7px 14px",background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:999,fontSize:12,color:"var(--text)",boxShadow:"0 8px 24px rgba(0,0,0,0.28)",zIndex:3400,pointerEvents:"none"},children:E})]})}var y=c(33730);let z={padding:"7px 14px",background:"var(--accent)",border:"none",borderRadius:7,color:"white",fontSize:13,fontWeight:500,cursor:"pointer"},A={display:"inline-flex",alignItems:"center",gap:6,padding:"6px 10px",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:7,color:"var(--text)",fontSize:12.5,cursor:"pointer"},B={width:"100%",padding:"7px 10px",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:7,fontSize:13,color:"var(--text)",outline:"none",fontFamily:"inherit"},C={fontSize:10.5,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:.5,padding:"6px 9px 4px"},D={display:"flex",alignItems:"center",gap:8,width:"100%",padding:"7px 9px",background:"none",border:"1px solid transparent",borderRadius:7,cursor:"pointer",textAlign:"left"};function E({open:a,onClose:b,onSubmit:c,onBrowse:f,existingPaths:h,recentDirectories:i,startDirectory:j}){let{t:k}=(0,g.s)(),[l,m]=(0,e.useState)(""),[n,o]=(0,e.useState)([]),[p,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(0),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(null),[F,G]=(0,e.useState)(null),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(j),[L,M]=(0,e.useState)(""),N=(0,e.useRef)(null),O=(0,e.useMemo)(()=>(0,y.HL)([...h,...i.map(a=>a.path)],3),[h,i]);O.join("\0"),(0,e.useRef)(h).current=h;let P=(0,e.useMemo)(()=>(0,y.QJ)([{path:j,label:(0,y.m5)(j),kind:"recent"},...i,...O.map(a=>({path:a,label:(0,y.m5)(a),kind:"sibling"}))]),[j,i,O]),Q=J||P[0]?.path||"",R=(0,e.useMemo)(()=>(0,y.qs)((0,y.QJ)([...i,...n],h),l),[i,n,h,l]),S=R.filter(a=>"recent"===a.kind),T=R.filter(a=>"sibling"===a.kind),U=(0,y.Jn)(l)?l.trim():"",V=!!U&&0===R.length,W=(0,e.useCallback)(async a=>{v(!0),x(null);try{let d=await fetch("/api/cwd/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:a})}),e=await d.json().catch(()=>({}));if(d.ok&&e.cwd){c(e.cwd),b();return}let f=a.replace(/[\\/]+$/,""),g=Math.max(f.lastIndexOf("/"),f.lastIndexOf("\\"));if(g>0){let b=f.slice(0,g),c=f.slice(g+1);if((0,y.eG)(c).ok)return void G({parent:b,name:c,path:a})}x(e.error??k("projectDashboard.pathInvalid"))}catch(a){x(a instanceof Error?a.message:String(a))}finally{v(!1)}},[b,c,k]),X=(0,e.useCallback)(async(a,d)=>{let e=(0,y.eG)(d);if(!e.ok)return void x(k(function(a){switch(a){case"empty":return"projectDashboard.folderNameEmpty";case"separator":case"relative":return"projectDashboard.folderNameSeparator";default:return"projectDashboard.folderNameInvalid"}}(e.error)));v(!0),x(null);try{let d=await fetch("/api/cwd/mkdir",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parent:a,name:e.name})}),f=await d.json().catch(()=>({}));if(!d.ok||!f.cwd)return void x(f.error??k("projectDashboard.folderCreateFailed"));c(f.cwd),b()}catch(a){x(a instanceof Error?a.message:String(a))}finally{v(!1)}},[b,c,k]),Y=(0,e.useCallback)(a=>{let b=R[a];b&&W(b.path)},[R,W]),Z=(0,e.useCallback)(a=>{if("ArrowDown"===a.key)a.preventDefault(),t(a=>Math.min(a+1,Math.max(R.length-1,0)));else if("ArrowUp"===a.key)a.preventDefault(),t(a=>Math.max(a-1,0));else if("Enter"===a.key){if(a.preventDefault(),u)return;F?X(F.parent,F.name):R.length>0?Y(Math.min(s,R.length-1)):U?W(U):H&&L.trim()&&X(Q,L)}},[Y,s,u,X,Q,R,H,L,U,F,W]);if(!a)return null;let $=(a,b)=>{let c=b===s;return(0,d.jsxs)("button",{type:"button","data-testid":"quick-create-candidate","data-candidate-path":a.path,onMouseEnter:()=>t(b),onClick:()=>Y(b),style:{...D,background:c?"var(--bg-selected)":"none",borderColor:c?"var(--accent)":"transparent"},children:[(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",style:{flexShrink:0,color:"var(--text-muted)"},children:(0,d.jsx)("path",{d:"M1.5 3h4l1.5 2h7.5v7.5h-13z"})}),(0,d.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,d.jsx)("span",{style:{display:"block",fontSize:13,color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.label}),(0,d.jsx)("span",{style:{display:"block",fontSize:10.5,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.path})]}),a.hint&&(0,d.jsxs)("span",{style:{flexShrink:0,fontSize:10.5,color:"var(--text-dim)"},children:[a.hint," ",k("projectDashboard.sessions")]})]},a.path)};return(0,d.jsxs)(q,{title:k("projectDashboard.newProjectTitle"),onClose:b,wide:!0,testId:"quick-create-panel",children:[(0,d.jsx)("input",{ref:N,"data-testid":"quick-create-input",value:l,onChange:a=>{m(a.target.value),t(0),G(null)},onKeyDown:Z,placeholder:k("projectDashboard.searchOrPath"),style:{...B,marginBottom:10}}),F&&(0,d.jsxs)("div",{"data-testid":"quick-create-confirm",style:{display:"flex",alignItems:"center",gap:8,padding:10,marginBottom:10,background:"var(--bg-subtle)",border:"1px solid var(--border)",borderRadius:8},children:[(0,d.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,d.jsx)("div",{style:{fontSize:12.5,color:"var(--text)"},children:k("projectDashboard.pathNotFound")}),(0,d.jsx)("div",{style:{fontSize:11,color:"var(--text-dim)",wordBreak:"break-all"},children:F.path})]}),(0,d.jsx)("button",{type:"button","data-testid":"quick-create-confirm-create",disabled:u,onClick:()=>void X(F.parent,F.name),style:{...z,opacity:u?.6:1},children:k("projectDashboard.createThisFolder")}),(0,d.jsx)("button",{type:"button",onClick:()=>G(null),style:A,children:k("projectDashboard.cancel")})]}),V&&!F&&(0,d.jsxs)("button",{type:"button","data-testid":"quick-create-use-path",onClick:()=>void W(U),disabled:u,style:{...D,background:"var(--bg-selected)",borderColor:"var(--accent)",marginBottom:10},children:[(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",style:{flexShrink:0},children:(0,d.jsx)("path",{d:"M1.5 3h4l1.5 2h7.5v7.5h-13z"})}),(0,d.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,d.jsx)("span",{style:{display:"block",fontSize:12,color:"var(--text-muted)"},children:k("projectDashboard.useThisPath")}),(0,d.jsx)("span",{style:{display:"block",fontSize:12.5,color:"var(--text)",wordBreak:"break-all"},children:U})]}),(0,d.jsx)("span",{style:{flexShrink:0,fontSize:11,color:"var(--text-dim)"},children:"⏎"})]}),(0,d.jsxs)("div",{style:{maxHeight:300,overflowY:"auto"},children:[S.length>0&&(0,d.jsxs)("div",{style:{marginBottom:8},children:[(0,d.jsx)("div",{style:C,children:k("projectDashboard.recentUsed")}),S.map(a=>$(a,R.indexOf(a)))]}),(T.length>0||p)&&(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{style:C,children:k("projectDashboard.siblingDirs")}),p&&0===T.length&&(0,d.jsx)("div",{style:{padding:"6px 9px",fontSize:12,color:"var(--text-dim)"},children:k("projectDashboard.scanning")}),T.map(a=>$(a,R.indexOf(a)))]}),0===R.length&&!V&&!F&&(0,d.jsx)("div",{style:{padding:"18px 8px",textAlign:"center",fontSize:12.5,color:"var(--text-muted)"},children:k("projectDashboard.noMatches")})]}),H&&(0,d.jsxs)("div",{"data-testid":"quick-create-folder-form",style:{marginTop:10,padding:10,background:"var(--bg-subtle)",border:"1px solid var(--border)",borderRadius:8,display:"flex",flexDirection:"column",gap:8},children:[(0,d.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,d.jsx)("select",{value:Q,onChange:a=>K(a.target.value),"aria-label":k("projectDashboard.parentDir"),style:{...B,flex:1,cursor:"pointer"},children:P.map(a=>(0,d.jsx)("option",{value:a.path,children:a.path},a.path))}),(0,d.jsx)("input",{"data-testid":"quick-create-folder-name",value:L,onChange:a=>M(a.target.value),onKeyDown:Z,placeholder:k("projectDashboard.folderName"),style:{...B,flex:1}})]}),(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[(0,d.jsx)("button",{type:"button",onClick:()=>I(!1),style:A,children:k("projectDashboard.cancel")}),(0,d.jsx)("button",{type:"button","data-testid":"quick-create-folder-submit",disabled:u||!L.trim()||!Q,onClick:()=>void X(Q,L),style:{...z,opacity:u||!L.trim()?.6:1},children:k("projectDashboard.create")})]}),(0,d.jsx)("div",{style:{fontSize:11,color:"var(--text-dim)"},children:(0,y.as)(Q,L.trim()||"…")})]}),w&&(0,d.jsx)("div",{"data-testid":"quick-create-error",style:{marginTop:10,fontSize:12,color:"#ef4444"},children:w}),(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginTop:12},children:[(0,d.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,d.jsxs)("button",{type:"button","data-testid":"quick-create-browse",onClick:f,style:A,children:[(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",children:(0,d.jsx)("path",{d:"M1.5 3h4l1.5 2h7.5v7.5h-13z"})}),k("projectDashboard.browse")]}),(0,d.jsxs)("button",{type:"button","data-testid":"quick-create-new-folder",onClick:()=>I(a=>!a),style:A,children:[(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,d.jsx)("path",{d:"M12 5v14M5 12h14"})}),k("projectDashboard.newFolder")]})]}),(0,d.jsx)("span",{style:{fontSize:11,color:"var(--text-dim)",whiteSpace:"nowrap"},children:k("projectDashboard.keyboardHint")})]})]})}}};
|
|
1
|
+
"use strict";exports.id=6763,exports.ids=[6763],exports.modules={19099:(a,b,c)=>{var d=c(54839);c.o(d,"useRouter")&&c.d(b,{useRouter:function(){return d.useRouter}}),c.o(d,"useSearchParams")&&c.d(b,{useSearchParams:function(){return d.useSearchParams}})},33730:(a,b,c)=>{c.d(b,{HL:()=>o,Jn:()=>i,QJ:()=>r,as:()=>l,b2:()=>p,eG:()=>m,m5:()=>j,qs:()=>q,wx:()=>n});var d=c(33873),e=c.n(d);let f=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(\..*)?$/i,g=/[<>:"|?*]/,h=/[\u0000-\u001f\u007f]/;function i(a){let b=a.trim();return!!b&&(b.startsWith("/")||b.startsWith("~")||b.startsWith("./")||b.startsWith("../")||b.includes("/")||b.includes("\\")||/^[a-zA-Z]:/.test(b))}function j(a){let b=a.replace(/[\\/]+$/,""),c=Math.max(b.lastIndexOf("/"),b.lastIndexOf("\\"));return(c>=0?b.slice(c+1):b)||a}function k(a){return/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")}function l(a,b){return(k(a)?e().win32:e().posix).join(a,b)}function m(a,b=process.platform){let c=a.trim();if(!c)return{ok:!1,error:"empty"};if(c.includes("/")||c.includes("\\"))return{ok:!1,error:"separator"};if("."===c||".."===c)return{ok:!1,error:"relative"};if(h.test(c))return{ok:!1,error:"control"};if(c.length>255)return{ok:!1,error:"tooLong"};if("win32"===b){if(g.test(c))return{ok:!1,error:"windowsChars"};if(f.test(c))return{ok:!1,error:"windowsReserved"};if(/[. ]$/.test(c))return{ok:!1,error:"windowsChars"}}return{ok:!0,name:c}}function n(a,b,c=8){let d=new Set(b),e=new Map;for(let b of a){let a=b.modified??"";for(let c of[b.projectRoot??void 0,b.cwd]){if(!c||d.has(c))continue;let b=e.get(c);b?(b.count+=1,a>b.modified&&(b.modified=a)):e.set(c,{modified:a,count:1})}}return[...e.entries()].sort((a,b)=>b[1].modified.localeCompare(a[1].modified)).slice(0,c).map(([a,b])=>({path:a,label:j(a),hint:String(b.count),kind:"recent"}))}function o(a,b=3){let c=new Set,d=[];for(let f of a){if(!f)continue;let a=k(f)?e().win32.dirname(f):e().posix.dirname(f);if(a&&a!==f&&"."!==a&&"/"!==a&&!c.has(a)&&(c.add(a),d.push(a),d.length>=b))break}return d}function p(a){return!!(!a||a.startsWith("."))||"node_modules"===a||"__pycache__"===a||"dist"===a||"build"===a}function q(a,b){let c=b.trim().toLowerCase();return c?a.filter(a=>a.label.toLowerCase().includes(c)||a.path.toLowerCase().includes(c)):[...a]}function r(a,b=[]){let c=new Set(b),d=new Set,e=[];for(let b of a)!b.path||c.has(b.path)||d.has(b.path)||(d.add(b.path),e.push(b));return e}},47083:(a,b,c)=>{c.d(b,{O$:()=>h,Vi:()=>f,_A:()=>i,tu:()=>g});let d="pi-web:last-open-by-workspace";function e(a){let b=a.getItem(d);if(!b)return{};try{let a=JSON.parse(b);return null===a||"object"!=typeof a||Array.isArray(a)?{}:a}catch{return{}}}function f(a,b=null){if(!b)return null;try{let c=e(b)[a];return"string"==typeof c&&c.length>0?c:null}catch{return null}}function g(a,b,c=null){if(c)try{let f=e(c);f[a]=b,c.setItem(d,JSON.stringify(f))}catch{}}function h(a,b=null){if(b)try{let c=e(b);if(!(a in c))return;delete c[a],0===Object.keys(c).length?b.removeItem(d):b.setItem(d,JSON.stringify(c))}catch{}}function i(a){return a.projectKey??a.projectRoot??a.cwd}},52483:(a,b,c)=>{c.d(b,{OW:()=>f,QZ:()=>g,TU:()=>h,wy:()=>e});var d=c(47083);function e(a,b=new Set,c=new Set){let f=new Map;for(let e of a){let a=(0,d._A)(e);if(!a)continue;let g=e.projectRoot??e.cwd;if(!g)continue;let h=f.get(a);h||(h={id:a,name:function(a){let b=a.replace(/[\\/]+$/,""),c=Math.max(b.lastIndexOf("/"),b.lastIndexOf("\\"));return(c>=0?b.slice(c+1):b)||b||a}(g),path:g,createdAt:e.created,lastAccessed:e.modified,sessionCount:0,runningCount:0,unreadCount:0,status:"idle",gitBranch:e.branch,isFavorite:!1,messageTotal:0,worktreeCount:0,worktrees:[],subagentCount:0,earliestCreated:e.created,lastTitleAt:"",lastTitleIsSubagent:!1},f.set(a,h));let i=e.relation?.kind==="subagent";h.sessionCount+=1,h.messageTotal+=Number.isFinite(e.messageCount)?e.messageCount:0,e.modified>h.lastAccessed&&(h.lastAccessed=e.modified),e.created<h.earliestCreated&&(h.earliestCreated=e.created),i&&(h.subagentCount+=1),b.has(e.id)&&(h.runningCount+=1),c.has(e.id)&&(h.unreadCount+=1),!h.gitBranch&&e.branch&&(h.gitBranch=e.branch),e.cwd&&!h.worktrees.includes(e.cwd)&&h.worktrees.push(e.cwd);let j=function(a){let b=a.name?.trim();if(b)return b;let c=a.firstMessage?.trim().replace(/\s+/g," ");if(c)return c.length>80?`${c.slice(0,80)}…`:c}(e);j&&(!h.lastSessionTitle||h.lastTitleIsSubagent&&!i||h.lastTitleIsSubagent===i&&e.modified>h.lastTitleAt)&&(h.lastSessionTitle=j,h.lastTitleAt=e.modified,h.lastTitleIsSubagent=i)}return[...f.values()].map(a=>{let b=a.worktrees.filter(b=>b!==a.path).sort(),c={id:a.id,name:a.name,path:a.path,createdAt:a.earliestCreated,lastAccessed:a.lastAccessed,sessionCount:a.sessionCount,runningCount:a.runningCount,unreadCount:a.unreadCount,status:a.runningCount>0?"active":"idle",isFavorite:a.isFavorite,messageTotal:a.messageTotal,worktreeCount:b.length+1,worktrees:b,subagentCount:a.subagentCount};return a.gitBranch&&(c.gitBranch=a.gitBranch),a.lastSessionTitle&&(c.lastSessionTitle=a.lastSessionTitle),c}).sort((a,b)=>b.lastAccessed.localeCompare(a.lastAccessed))}function f(a,b){switch(b){case"active":return a.filter(a=>a.runningCount>0);case"unread":return a.filter(a=>a.unreadCount>0);default:return[...a]}}function g(a,b){let c=b.trim().toLowerCase();return c?a.filter(a=>a.name.toLowerCase().includes(c)||(a.alias?.toLowerCase().includes(c)??!1)||(a.note?.toLowerCase().includes(c)??!1)||a.path.toLowerCase().includes(c)||(a.lastSessionTitle?.toLowerCase().includes(c)??!1)):[...a]}function h(a,b,c){let d=[...a];return d.sort((a,d)=>{let e;switch(b){case"name":e=i(a).localeCompare(i(d));break;case"sessionCount":e=a.sessionCount-d.sessionCount;break;case"runningCount":e=a.runningCount-d.runningCount;break;case"messageTotal":e=a.messageTotal-d.messageTotal;break;default:e=a.lastAccessed.localeCompare(d.lastAccessed)}return"desc"===c?-e:e}),d}function i(a){return(a.alias?.trim()||a.name).toLowerCase()}},94513:(a,b,c)=>{c.d(b,{wo:()=>x,JE:()=>E,wy:()=>v.wy});var d=c(48249),e=c(67484);function f(a){return a.alias?.trim()||a.name}var g=c(93080),h=c(81996);let i={display:"flex",alignItems:"center",justifyContent:"center",width:22,height:22,padding:0,background:"none",border:"none",borderRadius:5,cursor:"pointer"};function j({label:a,value:b}){return(0,d.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:3,whiteSpace:"nowrap"},children:[(0,d.jsx)("span",{style:{color:"var(--text-dim)"},children:a}),(0,d.jsx)("span",{style:{color:"var(--text-muted)",fontVariantNumeric:"tabular-nums"},children:b})]})}function k({projects:a,selectedProjects:b,onSelectProject:c,onToggleFavorite:l,onSelectionChange:m,onEditProject:n,onContextMenu:o}){let{locale:p,t:q}=(0,g.s)(),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(null);return(0,d.jsx)("div",{"data-testid":"project-grid",style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(230px, 1fr))",gap:10},children:a.map(a=>{let e=b.includes(a.id),g=r===a.id,k=f(a),v=a.note||a.lastSessionTitle;return(0,d.jsxs)("div",{"data-testid":"project-card","data-project-id":a.id,role:"button",tabIndex:0,"aria-label":q("projectDashboard.ctxOpen")+": "+k,onMouseEnter:()=>s(a.id),onMouseLeave:()=>s(null),onClick:()=>c(a),onKeyDown:b=>{"Enter"!==b.key&&" "!==b.key||b.target===b.currentTarget&&(b.preventDefault(),c(a))},onContextMenu:b=>o(a,b),style:{position:"relative",padding:11,background:"var(--bg-panel)",border:`1px solid ${e?"var(--accent)":"var(--border)"}`,borderRadius:9,cursor:"pointer",transition:"transform 0.15s, box-shadow 0.15s",transform:g?"translateY(-1px)":"none",boxShadow:g?"0 6px 16px rgba(0,0,0,0.14)":"none"},children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[(0,d.jsx)("input",{type:"checkbox",checked:e,title:q("projectDashboard.selectProject"),"aria-label":q("projectDashboard.selectProject"),onClick:a=>a.stopPropagation(),onChange:c=>{m(c.target.checked?[...b,a.id]:b.filter(b=>b!==a.id))},style:{width:14,height:14,marginTop:9,flexShrink:0,cursor:"pointer",opacity:g||e?1:.45}}),(0,d.jsx)("div",{style:{width:32,height:32,borderRadius:7,flexShrink:0,background:a.color||(a.runningCount>0?"var(--accent)":"var(--bg-subtle)"),color:a.color||a.runningCount>0?"white":"var(--text-muted)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:600},children:k.charAt(0).toUpperCase()}),(0,d.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,d.jsx)("h3",{title:k,style:{margin:0,fontSize:13,fontWeight:600,color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:k}),a.alias&&(0,d.jsxs)("span",{style:{fontSize:10,color:"var(--text-dim)",flexShrink:0},children:["(",a.name,")"]})]}),(0,d.jsx)("p",{title:a.path,style:{margin:"1px 0 0",fontSize:10.5,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.path})]}),(0,d.jsxs)("div",{style:{display:"flex",gap:1,flexShrink:0},children:[(0,d.jsx)("button",{onClick:b=>{b.stopPropagation(),n(a)},"data-testid":"project-edit",title:q("projectDashboard.editProject"),"aria-label":q("projectDashboard.editProject"),style:{...i,color:"var(--text-muted)",opacity:+!!g},children:(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,d.jsx)("path",{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"})})}),(0,d.jsx)("button",{onClick:b=>{b.stopPropagation(),l(a.id)},title:a.isFavorite?q("projectDashboard.removeFavorite"):q("projectDashboard.addFavorite"),"aria-label":a.isFavorite?q("projectDashboard.removeFavorite"):q("projectDashboard.addFavorite"),style:{...i,color:a.isFavorite?"#F59E0B":"var(--text-muted)",fontSize:14,lineHeight:1,opacity:a.isFavorite||g?1:0},children:a.isFavorite?"★":"☆"})]})]}),(v||a.gitBranch)&&(0,d.jsxs)("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:4},children:[v&&(0,d.jsx)("p",{title:v,style:{margin:0,fontSize:11.5,color:"var(--text-muted)",lineHeight:1.35,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:a.note?v:`${q("projectDashboard.lastSession")}: ${v}`}),a.gitBranch&&(0,d.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:3,fontSize:10.5,color:"var(--text-dim)",minWidth:0},children:[(0,d.jsxs)("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[(0,d.jsx)("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),(0,d.jsx)("circle",{cx:"18",cy:"6",r:"3"}),(0,d.jsx)("circle",{cx:"6",cy:"18",r:"3"}),(0,d.jsx)("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),(0,d.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.gitBranch})]})]}),(0,d.jsxs)("div",{style:{marginTop:8,display:"flex",alignItems:"center",gap:5,flexWrap:"wrap"},children:[(0,d.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"1px 7px",borderRadius:999,fontSize:10.5,fontWeight:500,background:a.runningCount>0?"rgba(16,185,129,0.14)":"var(--bg-subtle)",color:a.runningCount>0?"#10B981":"var(--text-muted)"},children:[(0,d.jsx)("span",{style:{width:5,height:5,borderRadius:"50%",background:a.runningCount>0?"#10B981":"#6B7280"}}),a.runningCount>0?`${a.runningCount} ${q("projectDashboard.running")}`:q("projectDashboard.status.idle")]}),a.unreadCount>0&&(0,d.jsxs)("span",{style:{padding:"1px 7px",borderRadius:999,fontSize:10.5,fontWeight:500,background:"var(--bg-selected)",color:"var(--accent)"},children:[a.unreadCount," ",q("projectDashboard.unread")]})]}),(0,d.jsxs)("div",{style:{marginTop:8,paddingTop:8,borderTop:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6,fontSize:10.5,flexWrap:"wrap"},children:[(0,d.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,d.jsx)(j,{label:q("projectDashboard.statSessions"),value:a.sessionCount}),(0,d.jsx)(j,{label:q("projectDashboard.statMessages"),value:a.messageTotal}),a.worktreeCount>1&&(0,d.jsxs)("button",{onClick:b=>{b.stopPropagation(),u(t===a.id?null:a.id)},style:{display:"inline-flex",alignItems:"center",gap:3,background:"none",border:"none",padding:0,cursor:"pointer",color:"var(--accent)",fontSize:10.5},children:[(0,d.jsx)(j,{label:q("projectDashboard.statWorktrees"),value:a.worktreeCount}),(0,d.jsx)("span",{style:{color:"var(--text-dim)"},children:t===a.id?"▾":"▸"})]}),a.subagentCount>0&&(0,d.jsx)(j,{label:q("projectDashboard.statSubagents"),value:a.subagentCount})]}),(0,d.jsx)("span",{title:a.lastAccessed,style:{color:"var(--text-dim)",whiteSpace:"nowrap"},children:(0,h.fw)(a.lastAccessed,p)})]}),t===a.id&&a.worktrees.length>0&&(0,d.jsx)("div",{style:{marginTop:6,display:"flex",flexDirection:"column",gap:2},children:a.worktrees.map(a=>(0,d.jsx)("div",{title:a,style:{fontSize:10.5,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingLeft:8,borderLeft:"2px solid var(--border)"},children:a},a))})]},a.id)})})}function l({projects:a,selectedProjects:b,onSelectProject:c,onToggleFavorite:i,onSelectionChange:j,onEditProject:k,onContextMenu:m}){let{locale:n,t:o}=(0,g.s)(),{ref:p,width:q}=function(){let a=(0,e.useRef)(null),[b,c]=(0,e.useState)(0);return{ref:a,width:b}}(),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(null),v=0===q||q>=460,w=v?"28px minmax(0,1.4fr) minmax(0,1fr) 84px 48px 54px 44px 74px 30px":"28px minmax(0,1fr) 84px 44px 30px",x=a.map(a=>a.id),y=x.length>0&&x.every(a=>b.includes(a)),z={fontSize:10.5,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:.4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};return(0,d.jsxs)("div",{ref:p,"data-testid":"project-list",style:{background:"var(--bg-panel)",borderRadius:9,border:"1px solid var(--border)",overflow:"hidden"},children:[(0,d.jsxs)("div",{style:{display:"grid",gridTemplateColumns:w,gap:8,padding:"8px 12px",background:"var(--bg-subtle)",borderBottom:"1px solid var(--border)",alignItems:"center"},children:[(0,d.jsx)("div",{children:(0,d.jsx)("input",{type:"checkbox",checked:y,"aria-label":o("projectDashboard.selectAll"),onChange:b=>j(b.target.checked?a.map(a=>a.id):[]),style:{width:14,height:14,cursor:"pointer"}})}),(0,d.jsx)("div",{style:z,children:o("projectDashboard.project")}),v&&(0,d.jsx)("div",{style:z,children:o("projectDashboard.lastSession")}),(0,d.jsx)("div",{style:z,children:o("projectDashboard.statusLabel")}),(0,d.jsx)("div",{style:z,children:o("projectDashboard.statSessions")}),v&&(0,d.jsx)("div",{style:z,children:o("projectDashboard.statMessages")}),v&&(0,d.jsx)("div",{style:z,children:o("projectDashboard.statWorktrees")}),v&&(0,d.jsx)("div",{style:z,children:o("projectDashboard.lastAccessed")}),(0,d.jsx)("div",{})]}),a.map((e,g)=>{let l=b.includes(e.id),p=f(e),q=e.note||e.lastSessionTitle;return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{"data-testid":"project-card","data-project-id":e.id,role:"button",tabIndex:0,"aria-label":o("projectDashboard.ctxOpen")+": "+p,onMouseEnter:()=>s(e.id),onMouseLeave:()=>s(null),onClick:()=>c(e),onKeyDown:a=>{"Enter"!==a.key&&" "!==a.key||a.target===a.currentTarget&&(a.preventDefault(),c(e))},onContextMenu:a=>m(e,a),style:{display:"grid",gridTemplateColumns:w,gap:8,padding:"8px 12px",alignItems:"center",borderBottom:g<a.length-1||t===e.id?"1px solid var(--border)":"none",background:l?"var(--bg-selected)":r===e.id?"var(--bg-hover)":"transparent",cursor:"pointer",transition:"background 0.12s"},children:[(0,d.jsx)("div",{children:(0,d.jsx)("input",{type:"checkbox",checked:l,onClick:a=>a.stopPropagation(),onChange:a=>{j(a.target.checked?[...b,e.id]:b.filter(a=>a!==e.id))},style:{width:14,height:14,cursor:"pointer"}})}),(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[(0,d.jsx)("div",{style:{width:24,height:24,borderRadius:6,flexShrink:0,background:e.color||(e.runningCount>0?"var(--accent)":"var(--bg-subtle)"),color:e.color||e.runningCount>0?"white":"var(--text-muted)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:600},children:p.charAt(0).toUpperCase()}),(0,d.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,d.jsx)("span",{style:{fontSize:12.5,fontWeight:500,color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p}),(0,d.jsx)("button",{onClick:a=>{a.stopPropagation(),k(e)},title:o("projectDashboard.editProject"),"aria-label":o("projectDashboard.editProject"),style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"var(--text-dim)",display:"flex",flexShrink:0,opacity:+(r===e.id)},children:(0,d.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,d.jsx)("path",{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"})})})]}),(0,d.jsx)("div",{title:e.path,style:{fontSize:10.5,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.path}),!v&&q&&(0,d.jsx)("div",{title:q,style:{fontSize:10.5,color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.note?q:`${o("projectDashboard.lastSession")}: ${q}`})]})]}),v&&(0,d.jsx)("div",{title:q,style:{fontSize:11.5,color:"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q||"—"}),(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:11,color:e.runningCount>0?"#10B981":"var(--text-muted)",minWidth:0},children:[(0,d.jsx)("span",{style:{width:5,height:5,borderRadius:"50%",background:e.runningCount>0?"#10B981":"#6B7280",flexShrink:0}}),(0,d.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.runningCount>0?`${e.runningCount} ${o("projectDashboard.running")}`:o("projectDashboard.status.idle")}),e.unreadCount>0&&(0,d.jsx)("span",{style:{color:"var(--accent)"},title:`${e.unreadCount} ${o("projectDashboard.unread")}`,children:"•"})]}),(0,d.jsx)("div",{style:{fontSize:11.5,color:"var(--text)",fontVariantNumeric:"tabular-nums"},children:e.sessionCount}),v&&(0,d.jsx)("div",{style:{fontSize:11.5,color:"var(--text)",fontVariantNumeric:"tabular-nums"},children:e.messageTotal}),v&&(0,d.jsxs)("div",{style:{fontSize:11.5,color:"var(--text-muted)",fontVariantNumeric:"tabular-nums",display:"flex",alignItems:"center",gap:3},children:[e.worktreeCount,e.worktreeCount>1&&(0,d.jsx)("button",{onClick:a=>{a.stopPropagation(),u(t===e.id?null:e.id)},"aria-label":o("projectDashboard.toggleWorktrees"),style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"var(--accent)",fontSize:10},children:t===e.id?"▾":"▸"})]}),v&&(0,d.jsx)("div",{title:e.lastAccessed,style:{fontSize:10.5,color:"var(--text-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:(0,h.fw)(e.lastAccessed,n)}),(0,d.jsx)("div",{children:(0,d.jsx)("button",{onClick:a=>{a.stopPropagation(),i(e.id)},title:e.isFavorite?o("projectDashboard.removeFavorite"):o("projectDashboard.addFavorite"),"aria-label":e.isFavorite?o("projectDashboard.removeFavorite"):o("projectDashboard.addFavorite"),style:{background:"none",border:"none",cursor:"pointer",padding:0,color:e.isFavorite?"#F59E0B":"var(--text-muted)",fontSize:13,lineHeight:1},children:e.isFavorite?"★":"☆"})})]}),t===e.id&&e.worktrees.length>0&&(0,d.jsx)("div",{style:{padding:"6px 12px 8px 48px",background:"var(--bg-subtle)",display:"flex",flexDirection:"column",gap:2},children:e.worktrees.map(a=>(0,d.jsx)("div",{title:a,style:{fontSize:10.5,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a},a))})]},e.id)})]})}function m({stats:a,quickFilter:b,sortBy:c,sortOrder:e,onQuickFilterChange:f,onSortToggle:h}){let{t:i}=(0,g.s)(),j=a=>c===a?"desc"===e?"↓":"↑":void 0,k=[{key:"all",label:i("projectDashboard.chipProjects"),count:a.totalProjects,title:i("projectDashboard.chipProjectsHint"),active:"all"===b,onClick:()=>f("all")},{key:"active",label:i("projectDashboard.chipActive"),count:a.activeProjects,title:i("projectDashboard.chipActiveHint"),active:"active"===b,onClick:()=>f("active"===b?"all":"active")},{key:"unread",label:i("projectDashboard.chipUnread"),count:a.totalUnread,title:i("projectDashboard.chipUnreadHint"),active:"unread"===b,onClick:()=>f("unread"===b?"all":"unread")},{key:"sessions",label:i("projectDashboard.chipSessions"),count:a.totalSessions,title:i("projectDashboard.chipSessionsHint"),active:"all"===b&&"sessionCount"===c,onClick:()=>h("sessionCount"),sortIndicator:j("sessionCount")},{key:"messages",label:i("projectDashboard.chipMessages"),count:a.totalMessages,title:i("projectDashboard.chipMessagesHint"),active:"all"===b&&"messageTotal"===c,onClick:()=>h("messageTotal"),sortIndicator:j("messageTotal")}];return(0,d.jsx)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"8px 16px",borderBottom:"1px solid var(--border)",overflowX:"auto",overflowY:"hidden",flexShrink:0,scrollbarWidth:"thin"},children:k.map(a=>(0,d.jsxs)("button",{onClick:a.onClick,"data-testid":`dashboard-chip-${a.key}`,title:a.title,"aria-pressed":a.active,style:{display:"inline-flex",alignItems:"center",gap:4,flexShrink:0,padding:"3px 9px",borderRadius:999,border:`1px solid ${a.active?"var(--accent)":"var(--border)"}`,background:a.active?"var(--bg-selected)":"var(--bg-panel)",color:a.active?"var(--accent)":"var(--text-muted)",fontSize:11,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap",transition:"background 0.12s, color 0.12s, border-color 0.12s"},children:[(0,d.jsx)("span",{children:a.label}),(0,d.jsx)("span",{style:{fontVariantNumeric:"tabular-nums"},children:a.count}),a.sortIndicator&&(0,d.jsx)("span",{"aria-hidden":!0,children:a.sortIndicator})]},a.key))})}function n({viewMode:a,sortBy:b,sortOrder:c,searchQuery:e,onViewModeChange:f,onSortChange:h,onSearchChange:i}){let{t:j}=(0,g.s)();return(0,d.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",padding:"8px 16px",borderBottom:"1px solid var(--border)",flexShrink:0,overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin"},children:[(0,d.jsxs)("div",{style:{position:"relative",width:148,flexShrink:0},children:[(0,d.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:10,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)",pointerEvents:"none"},children:[(0,d.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,d.jsx)("path",{d:"M21 21l-4.35-4.35"})]}),(0,d.jsx)("input",{type:"text",placeholder:j("projectDashboard.searchPlaceholder"),value:e,onChange:a=>i(a.target.value),style:{width:"100%",padding:"7px 10px 7px 32px",background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:7,fontSize:13,color:"var(--text)",outline:"none"}})]}),(0,d.jsxs)("select",{value:b,onChange:a=>h(a.target.value,c),title:j("projectDashboard.sortBy"),style:{padding:"7px 8px",background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:7,fontSize:13,color:"var(--text)",cursor:"pointer",outline:"none",flexShrink:0},children:[(0,d.jsx)("option",{value:"lastAccessed",children:j("projectDashboard.sortLastAccessed")}),(0,d.jsx)("option",{value:"name",children:j("projectDashboard.sortName")}),(0,d.jsx)("option",{value:"sessionCount",children:j("projectDashboard.sortSessions")}),(0,d.jsx)("option",{value:"runningCount",children:j("projectDashboard.sortRunning")}),(0,d.jsx)("option",{value:"messageTotal",children:j("projectDashboard.sortMessages")})]}),(0,d.jsx)("button",{onClick:()=>h(b,"asc"===c?"desc":"asc"),title:j("asc"===c?"projectDashboard.ascending":"projectDashboard.descending"),style:{padding:7,background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:7,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--text-muted)",flexShrink:0},children:(0,d.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:"asc"===c?"rotate(180deg)":"none",transition:"transform 0.2s"},children:(0,d.jsx)("path",{d:"M12 5v14M19 12l-7 7-7-7"})})}),(0,d.jsxs)("div",{style:{display:"flex",background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:7,overflow:"hidden",flexShrink:0},children:[(0,d.jsx)("button",{onClick:()=>f("grid"),"data-testid":"view-mode-grid",title:j("projectDashboard.gridView"),style:{padding:"7px 9px",background:"grid"===a?"var(--accent)":"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",color:"grid"===a?"white":"var(--text-muted)"},children:(0,d.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,d.jsx)("rect",{x:"3",y:"3",width:"7",height:"7"}),(0,d.jsx)("rect",{x:"14",y:"3",width:"7",height:"7"}),(0,d.jsx)("rect",{x:"14",y:"14",width:"7",height:"7"}),(0,d.jsx)("rect",{x:"3",y:"14",width:"7",height:"7"})]})}),(0,d.jsx)("button",{onClick:()=>f("list"),"data-testid":"view-mode-list",title:j("projectDashboard.listView"),style:{padding:"7px 9px",background:"list"===a?"var(--accent)":"transparent",border:"none",borderLeft:"1px solid var(--border)",cursor:"pointer",display:"flex",alignItems:"center",color:"list"===a?"white":"var(--text-muted)"},children:(0,d.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,d.jsx)("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),(0,d.jsx)("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),(0,d.jsx)("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),(0,d.jsx)("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),(0,d.jsx)("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),(0,d.jsx)("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]})})]})]})}function o({x:a,y:b,items:c,onClose:f}){let g=(0,e.useRef)(null),[h,i]=(0,e.useState)({left:a,top:b});return(0,d.jsx)("div",{ref:g,"data-testid":"project-context-menu",role:"menu",style:{position:"fixed",left:h.left,top:h.top,zIndex:3200,minWidth:168,padding:4,background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:8,boxShadow:"0 12px 32px rgba(0,0,0,0.32)",display:"flex",flexDirection:"column",gap:1},children:c.map(a=>(0,d.jsx)("button",{role:"menuitem",disabled:a.disabled,onClick:()=>{a.disabled||(a.onSelect(),f())},style:{display:"flex",alignItems:"center",gap:8,padding:"7px 10px",background:"none",border:"none",borderRadius:6,textAlign:"left",fontSize:13,color:a.disabled?"var(--text-dim)":a.danger?"#ef4444":"var(--text)",cursor:a.disabled?"default":"pointer",width:"100%"},onMouseEnter:b=>{a.disabled||(b.currentTarget.style.background=a.danger?"rgba(239,68,68,0.1)":"var(--bg-hover)")},onMouseLeave:a=>{a.currentTarget.style.background="none"},children:a.label},a.key))})}let p=["#3B82F6","#10B981","#F59E0B","#8B5CF6","#EC4899","#EF4444","#14B8A6","#6B7280"];function q({title:a,onClose:b,children:c,wide:f,testId:g}){let[h]=(0,e.useState)(()=>Symbol("modal"));return(0,d.jsx)("div",{onClick:b,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:3e3,padding:16},children:(0,d.jsxs)("div",{onClick:a=>a.stopPropagation(),"data-testid":g,role:"dialog","aria-modal":"true","aria-label":a,style:{background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:12,width:"100%",maxWidth:f?560:420,maxHeight:"85vh",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 18px 48px rgba(0,0,0,0.35)"},children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid var(--border)",flexShrink:0},children:[(0,d.jsx)("h2",{style:{margin:0,fontSize:15,fontWeight:600,color:"var(--text)"},children:a}),(0,d.jsx)("button",{onClick:b,"aria-label":"Close",style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",fontSize:20,lineHeight:1,padding:4},children:"\xd7"})]}),(0,d.jsx)("div",{style:{padding:16,overflowY:"auto"},children:c})]})})}let r={width:"100%",padding:"8px 10px",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:7,fontSize:13,color:"var(--text)",outline:"none",fontFamily:"inherit"},s={display:"block",fontSize:12,fontWeight:500,color:"var(--text-muted)",marginBottom:6};function t({project:a,meta:b,onSave:c,onClose:f}){let{t:h}=(0,g.s)(),[i,j]=(0,e.useState)(b.alias??""),[k,l]=(0,e.useState)(b.note??""),[m,n]=(0,e.useState)(b.color??"");return(0,d.jsxs)(q,{title:h("projectDashboard.editProject"),onClose:f,testId:"project-note-editor",children:[(0,d.jsx)("div",{style:{fontSize:12,color:"var(--text-muted)",marginBottom:14,wordBreak:"break-all"},children:a.path}),(0,d.jsxs)("div",{style:{marginBottom:14},children:[(0,d.jsx)("label",{style:s,htmlFor:"project-alias",children:h("projectDashboard.alias")}),(0,d.jsx)("input",{id:"project-alias","data-testid":"project-alias-input",value:i,onChange:a=>j(a.target.value),placeholder:a.name,style:r,autoFocus:!0}),(0,d.jsx)("div",{style:{fontSize:11,color:"var(--text-dim)",marginTop:4},children:h("projectDashboard.aliasHint")})]}),(0,d.jsxs)("div",{style:{marginBottom:14},children:[(0,d.jsx)("label",{style:s,htmlFor:"project-note",children:h("projectDashboard.note")}),(0,d.jsx)("textarea",{id:"project-note","data-testid":"project-note-input",value:k,onChange:a=>l(a.target.value),placeholder:h("projectDashboard.notePlaceholder"),rows:4,style:{...r,resize:"vertical",minHeight:80}})]}),(0,d.jsxs)("div",{style:{marginBottom:18},children:[(0,d.jsx)("span",{style:s,children:h("projectDashboard.color")}),(0,d.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[(0,d.jsx)("button",{onClick:()=>n(""),title:h("projectDashboard.colorDefault"),style:{width:26,height:26,borderRadius:6,cursor:"pointer",background:"var(--bg-subtle)",border:""===m?"2px solid var(--accent)":"1px solid var(--border)"}}),p.map(a=>(0,d.jsx)("button",{onClick:()=>n(a),title:a,style:{width:26,height:26,borderRadius:6,cursor:"pointer",background:a,border:m===a?"2px solid var(--text)":"1px solid var(--border)"}},a))]})]}),(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:8},children:[(0,d.jsx)("button",{onClick:()=>{c({alias:void 0,note:void 0,color:void 0}),f()},style:{padding:"7px 12px",background:"none",border:"1px solid var(--border)",borderRadius:7,color:"var(--text-muted)",fontSize:13,cursor:"pointer"},children:h("projectDashboard.clearMeta")}),(0,d.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,d.jsx)("button",{onClick:f,style:{padding:"7px 14px",background:"var(--bg-hover)",border:"1px solid var(--border)",borderRadius:7,color:"var(--text)",fontSize:13,cursor:"pointer"},children:h("projectDashboard.cancel")}),(0,d.jsx)("button",{onClick:()=>{c({alias:i.trim()||void 0,note:k.trim()||void 0,color:m||void 0}),f()},"data-testid":"project-save",style:{padding:"7px 14px",background:"var(--accent)",border:"none",borderRadius:7,color:"white",fontSize:13,fontWeight:500,cursor:"pointer"},children:h("projectDashboard.save")})]})]})]})}function u({projects:a,metaMap:b,onSave:c,onClose:h}){let{t:i}=(0,g.s)(),[j,k]=(0,e.useState)(null),l=a.filter(a=>b[a.id]?.note||b[a.id]?.alias||b[a.id]?.color).length;return(0,d.jsxs)(q,{title:i("projectDashboard.manageTitle"),onClose:h,wide:!0,testId:"project-settings-panel",children:[(0,d.jsx)("p",{style:{margin:"0 0 14px",fontSize:12,color:"var(--text-muted)"},children:i("projectDashboard.manageHint",{total:a.length,annotated:l})}),0===a.length?(0,d.jsx)("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-muted)",fontSize:13},children:i("projectDashboard.noProjectsFound")}):(0,d.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:a.map(a=>{let c=b[a.id]??{};return(0,d.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:10,border:"1px solid var(--border)",borderRadius:8,background:"var(--bg)"},children:[(0,d.jsx)("span",{style:{width:10,height:10,borderRadius:3,marginTop:4,flexShrink:0,background:c.color||"var(--accent)"}}),(0,d.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,d.jsx)("div",{style:{fontSize:13,fontWeight:500,color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f({...a,...c})}),(0,d.jsx)("div",{style:{fontSize:11,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:a.path,children:a.path}),c.note&&(0,d.jsx)("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:4,whiteSpace:"pre-wrap"},children:c.note})]}),(0,d.jsx)("button",{onClick:()=>k(a),style:{flexShrink:0,padding:"4px 10px",background:"var(--bg-hover)",border:"1px solid var(--border)",borderRadius:6,color:"var(--text)",fontSize:12,cursor:"pointer"},children:i("projectDashboard.edit")})]},a.id)})}),j&&(0,d.jsx)(t,{project:j,meta:b[j.id]??{},onSave:a=>c(j.id,a),onClose:()=>k(null)})]})}var v=c(52483);function w(a,b){}function x({projects:a,onSelectProject:b,onNewSessionInProject:c,onRequestCreateProject:f}){let{t:h}=(0,g.s)(),[i,j]=(0,e.useState)("grid"),[p,q]=(0,e.useState)("lastAccessed"),[r,s]=(0,e.useState)("desc"),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)("all"),[C,D]=(0,e.useState)([]),[E,F]=(0,e.useState)(null),[G,H]=(0,e.useState)({}),I=(0,e.useRef)(null),[J,K]=(0,e.useState)(null),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(null),P=function({storageKey:a,defaultHeight:b,minTop:c,minBottom:d,maxTop:f,keyboardStep:g=16}){let h=(0,e.useRef)(null),i=(0,e.useRef)(null),j=(0,e.useRef)(b);(0,e.useRef)(!1);let[k,l]=(0,e.useState)(b),[m,n]=(0,e.useState)(!1),o=(0,e.useCallback)(()=>{let a=h.current;return a?a.getBoundingClientRect().height:0},[]),p=(0,e.useCallback)(a=>(function(a,b){let{containerHeight:c,minTop:d,minBottom:e,maxTop:f}=b,g=Number.isFinite(a)?Math.round(a):d;if(!Number.isFinite(c)||c<=0)return Math.max(d,g);let h=Math.min(f??1/0,Math.max(d,c-e));return Math.round(Math.max(d,Math.min(h,g)))})(a,{containerHeight:o(),minTop:c,minBottom:d,maxTop:f}),[f,o,d,c]),q=(0,e.useCallback)((b,c=!0)=>{let d=p(b);return j.current=d,l(d),c&&w(a,d),d},[p,a]),r=(0,e.useCallback)(()=>{q(b)},[q,b]),s=(0,e.useCallback)(a=>{document.body.style.cursor=a.previousCursor,document.body.style.userSelect=a.previousUserSelect},[]),t=(0,e.useCallback)(a=>{let b=i.current;if(b&&b.pointerId===a){i.current=null,s(b),n(!1),j.current;try{b.target.hasPointerCapture(a)&&b.target.releasePointerCapture(a)}catch{}}},[s,a]),u=(0,e.useCallback)(a=>{if("mouse"===a.pointerType&&0!==a.button)return;a.preventDefault();let b=i.current;b&&t(b.pointerId);let c=a.currentTarget;c.focus({preventScroll:!0}),c.setPointerCapture(a.pointerId),i.current={pointerId:a.pointerId,startY:a.clientY,startHeight:j.current,target:c,previousCursor:document.body.style.cursor,previousUserSelect:document.body.style.userSelect},document.body.style.cursor="row-resize",document.body.style.userSelect="none",n(!0)},[t]),v=(0,e.useCallback)(a=>{let b=i.current;if(!b||b.pointerId!==a.pointerId)return;if("mouse"===a.pointerType&&0===a.buttons)return void t(a.pointerId);a.preventDefault();let c=p(b.startHeight+(a.clientY-b.startY));j.current=c,l(c),a.currentTarget.setAttribute("aria-valuenow",String(c)),a.currentTarget.setAttribute("aria-valuetext",`${c} px`)},[p,t]),x=(0,e.useCallback)(a=>{t(a.pointerId)},[t]),y=(0,e.useCallback)(a=>{let b=a.shiftKey?2*g:g;"ArrowDown"===a.key?(a.preventDefault(),q(j.current+b)):"ArrowUp"===a.key?(a.preventDefault(),q(j.current-b)):"Home"===a.key?(a.preventDefault(),q(c)):"End"===a.key?(a.preventDefault(),q(f??1/0)):"Enter"===a.key&&(a.preventDefault(),r())},[q,g,f,c,r]),z=Math.max(c,o()-d);return{containerRef:h,height:k,isResizing:m,setHeight:a=>{q(a)},resetHeight:r,separatorProps:{role:"separator",tabIndex:0,"aria-label":"Resize project details","aria-orientation":"horizontal","aria-valuemin":c,"aria-valuemax":z,"aria-valuenow":k,"aria-valuetext":`${k} px`,onDoubleClick:r,onKeyDown:y,onLostPointerCapture:x,onPointerCancel:x,onPointerDown:u,onPointerMove:v,onPointerUp:x}}}({storageKey:"agent-studio:project-dashboard-split",defaultHeight:132,minTop:40,minBottom:180}),Q=P.height<=42,R=(0,e.useCallback)((a,b)=>{let c=function(a,b,c){let d={...a},e={...d[b]};for(let a of["alias","note","color"]){var f;if(!(a in c))continue;let b="string"==typeof(f=c[a])&&f.trim().length>0?f:void 0;void 0===b?delete e[a]:e[a]=b}return"favorite"in c&&(c.favorite?e.favorite=!0:delete e.favorite),0===Object.keys(e).length?delete d[b]:d[b]=e,d}(G,a,b);H(c)},[G]),S=(0,e.useCallback)(a=>{R(a,{favorite:!G[a]?.favorite})},[R,G]),T=(0,e.useMemo)(()=>a.map(a=>{let b=G[a.id],c={...a,isFavorite:!!b?.favorite};return b?.alias&&(c.alias=b.alias),b?.note&&(c.note=b.note),b?.color&&(c.color=b.color),c}),[a,G]),U=(0,e.useMemo)(()=>{let a=T.reduce((a,b)=>a+b.sessionCount,0),b=T.reduce((a,b)=>a+b.messageTotal,0);return{totalProjects:T.length,activeProjects:T.filter(a=>a.runningCount>0).length,totalSessions:a,totalRunning:T.reduce((a,b)=>a+b.runningCount,0),totalUnread:T.reduce((a,b)=>a+b.unreadCount,0),totalMessages:b,averageSessionsPerProject:T.length>0?a/T.length:0,mostActiveProject:[...T].sort((a,b)=>b.sessionCount-a.sessionCount)[0]}},[T]),V=(0,e.useMemo)(()=>(0,v.TU)((0,v.QZ)((0,v.OW)(T,A),y),p,r),[T,A,y,p,r]),W=(0,e.useMemo)(()=>new Map(T.map(a=>[a.id,a])),[T]),X=(0,e.useCallback)(a=>{B("all"),p===a?s(a=>"desc"===a?"asc":"desc"):(q(a),s("desc"))},[p]),Y=(0,e.useCallback)(a=>{F(a),null!==I.current&&window.clearTimeout(I.current),I.current=window.setTimeout(()=>{I.current=null,F(null)},1600)},[]),Z=(0,e.useCallback)(async a=>{try{if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(a),Y(h("projectDashboard.copied"));return}let b=document.createElement("textarea");b.value=a,b.setAttribute("readonly",""),b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select();let c=document.execCommand("copy");document.body.removeChild(b),Y(h(c?"projectDashboard.copied":"projectDashboard.copyFailed"))}catch{Y(h("projectDashboard.copyFailed"))}},[Y,h]),$=N?W.get(N.projectId):void 0,_=$?[{key:"open",label:h("projectDashboard.ctxOpen"),onSelect:()=>b($)},{key:"new",label:h("projectDashboard.ctxNewSession"),disabled:!c,onSelect:()=>c?.($)},{key:"copy",label:h("projectDashboard.ctxCopyPath"),onSelect:()=>void Z($.path)},{key:"edit",label:h("projectDashboard.ctxEdit"),onSelect:()=>K($.id)},{key:"fav",label:$.isFavorite?h("projectDashboard.removeFavorite"):h("projectDashboard.addFavorite"),onSelect:()=>S($.id)}]:[],aa=(0,e.useCallback)((a,b)=>{b.preventDefault(),b.stopPropagation(),O({projectId:a.id,x:b.clientX,y:b.clientY})},[]),ab=J?W.get(J):void 0;return(0,d.jsxs)("div",{ref:P.containerRef,"data-testid":"project-dashboard",style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,overflow:"hidden"},children:[(0,d.jsxs)("div",{"data-testid":"dashboard-top-pane",style:{height:P.height,flexShrink:0,minHeight:0,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column"},children:[(0,d.jsxs)("div",{style:{padding:"12px 16px 10px",display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:8},children:[(0,d.jsxs)("div",{style:{minWidth:0},children:[(0,d.jsx)("h2",{style:{margin:0,fontSize:15,fontWeight:600,color:"var(--text)"},children:h("projectDashboard.title")}),(0,d.jsx)("p",{style:{margin:"2px 0 0",fontSize:12,color:"var(--text-muted)"},children:h("projectDashboard.subtitle")})]}),(0,d.jsxs)("div",{style:{display:"flex",gap:6,flexShrink:0},children:[(0,d.jsxs)("button",{onClick:f,"data-testid":"new-project-button",title:h("projectDashboard.newProject"),style:{display:"flex",alignItems:"center",gap:4,padding:"5px 9px",background:"var(--accent)",color:"white",border:"none",borderRadius:6,fontSize:12,fontWeight:500,cursor:"pointer"},children:[(0,d.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,d.jsx)("path",{d:"M12 5v14M5 12h14"})}),h("projectDashboard.newProject")]}),(0,d.jsx)("button",{onClick:()=>M(!0),"data-testid":"project-settings-open",title:h("projectDashboard.manage"),"aria-label":h("projectDashboard.manage"),style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:0,background:"var(--bg-hover)",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:"pointer"},children:(0,d.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,d.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,d.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6h.09A1.65 1.65 0 0 0 10.6 3.09V3a2 2 0 0 1 4 0v.09A1.65 1.65 0 0 0 16.11 4.6h.09a1.65 1.65 0 0 0 1.51-1.51l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 20.4 9v.09a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z"})]})}),(0,d.jsx)("button",{onClick:()=>P.setHeight(Q?132:40),"data-testid":"dashboard-toggle-details",title:Q?h("projectDashboard.expandDetails"):h("projectDashboard.collapseDetails"),"aria-label":Q?h("projectDashboard.expandDetails"):h("projectDashboard.collapseDetails"),style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:0,background:"var(--bg-hover)",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:6,cursor:"pointer"},children:(0,d.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:Q?"rotate(180deg)":"none",transition:"transform 0.15s"},children:(0,d.jsx)("path",{d:"m6 15 6-6 6 6"})})})]})]}),(0,d.jsx)(m,{stats:U,quickFilter:A,sortBy:p,sortOrder:r,onQuickFilterChange:B,onSortToggle:X}),(0,d.jsx)(n,{viewMode:i,sortBy:p,sortOrder:r,searchQuery:y,onViewModeChange:j,onSortChange:(a,b)=>{q(a),s(b)},onSearchChange:z})]}),(0,d.jsx)("div",{...P.separatorProps,"data-testid":"dashboard-split-handle",title:h("projectDashboard.splitHint"),style:{height:10,flexShrink:0,cursor:"row-resize",display:"flex",alignItems:"center",justifyContent:"center",background:P.isResizing?"var(--bg-selected)":"transparent",borderTop:"1px solid var(--border)",borderBottom:"1px solid var(--border)",outline:"none",touchAction:"none"},children:(0,d.jsx)("div",{style:{width:44,height:3,borderRadius:2,background:P.isResizing?"var(--accent)":"var(--text-dim)",opacity:P.isResizing?1:.5,transition:"background 0.12s, opacity 0.12s"}})}),(0,d.jsxs)("div",{"data-testid":"dashboard-bottom-pane",style:{flex:1,minHeight:0,overflowY:"auto",padding:"12px 16px"},children:[(0,d.jsxs)("button",{type:"button","data-testid":"add-project-row",onClick:f,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6,width:"100%",padding:"8px 10px",marginBottom:10,background:"none",border:"1px dashed var(--border)",borderRadius:8,color:"var(--text-muted)",fontSize:12.5,fontWeight:500,cursor:"pointer"},children:[(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,d.jsx)("path",{d:"M12 5v14M5 12h14"})}),h("projectDashboard.addProjectRow")]}),"grid"===i?(0,d.jsx)(k,{projects:V,selectedProjects:C,onSelectProject:b,onToggleFavorite:S,onSelectionChange:D,onEditProject:a=>K(a.id),onContextMenu:aa}):(0,d.jsx)(l,{projects:V,selectedProjects:C,onSelectProject:b,onToggleFavorite:S,onSelectionChange:D,onEditProject:a=>K(a.id),onContextMenu:aa}),0===V.length&&(0,d.jsxs)("div",{style:{textAlign:"center",padding:"32px 16px",color:"var(--text-muted)"},children:[(0,d.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",style:{marginBottom:10,opacity:.5},children:(0,d.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,d.jsx)("h3",{style:{margin:"0 0 6px",fontSize:14,fontWeight:500},children:h("projectDashboard.noProjectsFound")}),(0,d.jsx)("p",{style:{margin:0,fontSize:12},children:h("projectDashboard.noProjectsHint")})]})]}),ab&&(0,d.jsx)(t,{project:ab,meta:G[ab.id]??{},onSave:a=>R(ab.id,a),onClose:()=>K(null)}),L&&(0,d.jsx)(u,{projects:T,metaMap:G,onSave:R,onClose:()=>M(!1)}),$&&(0,d.jsx)(o,{x:N?.x??0,y:N?.y??0,items:_,onClose:()=>O(null)}),E&&(0,d.jsx)("div",{role:"status",style:{position:"fixed",bottom:18,left:"50%",transform:"translateX(-50%)",padding:"7px 14px",background:"var(--bg-panel)",border:"1px solid var(--border)",borderRadius:999,fontSize:12,color:"var(--text)",boxShadow:"0 8px 24px rgba(0,0,0,0.28)",zIndex:3400,pointerEvents:"none"},children:E})]})}var y=c(33730);let z={padding:"7px 14px",background:"var(--accent)",border:"none",borderRadius:7,color:"white",fontSize:13,fontWeight:500,cursor:"pointer"},A={display:"inline-flex",alignItems:"center",gap:6,padding:"6px 10px",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:7,color:"var(--text)",fontSize:12.5,cursor:"pointer"},B={width:"100%",padding:"7px 10px",background:"var(--bg)",border:"1px solid var(--border)",borderRadius:7,fontSize:13,color:"var(--text)",outline:"none",fontFamily:"inherit"},C={fontSize:10.5,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:.5,padding:"6px 9px 4px"},D={display:"flex",alignItems:"center",gap:8,width:"100%",padding:"7px 9px",background:"none",border:"1px solid transparent",borderRadius:7,cursor:"pointer",textAlign:"left"};function E({open:a,onClose:b,onSubmit:c,onBrowse:f,existingPaths:h,recentDirectories:i,startDirectory:j}){let{t:k}=(0,g.s)(),[l,m]=(0,e.useState)(""),[n,o]=(0,e.useState)([]),[p,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(0),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(null),[F,G]=(0,e.useState)(null),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(j),[L,M]=(0,e.useState)(""),N=(0,e.useRef)(null),O=(0,e.useMemo)(()=>(0,y.HL)([...h,...i.map(a=>a.path)],3),[h,i]);O.join("\0"),(0,e.useRef)(j).current=j,(0,e.useRef)(!1),(0,e.useRef)(h).current=h;let P=(0,e.useMemo)(()=>(0,y.QJ)([{path:j,label:(0,y.m5)(j),kind:"recent"},...i,...O.map(a=>({path:a,label:(0,y.m5)(a),kind:"sibling"}))]),[j,i,O]),Q=J||P[0]?.path||"",R=(0,e.useMemo)(()=>(0,y.qs)((0,y.QJ)([...i,...n],h),l),[i,n,h,l]),S=R.filter(a=>"recent"===a.kind),T=R.filter(a=>"sibling"===a.kind),U=(0,y.Jn)(l)?l.trim():"",V=!!U&&0===R.length,W=(0,e.useCallback)(async a=>{if(!u){v(!0),x(null);try{let d=await fetch("/api/cwd/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:a})}),e=await d.json().catch(()=>({}));if(d.ok&&e.cwd){c(e.cwd),b();return}let f=a.replace(/[\\/]+$/,""),g=Math.max(f.lastIndexOf("/"),f.lastIndexOf("\\"));if(g>0){let b=f.slice(0,g),c=f.slice(g+1);if((0,y.eG)(c).ok)return void G({parent:b,name:c,path:a})}x(e.error??k("projectDashboard.pathInvalid"))}catch(a){x(a instanceof Error?a.message:String(a))}finally{v(!1)}}},[u,b,c,k]),X=(0,e.useCallback)(async(a,d)=>{let e=(0,y.eG)(d);if(!e.ok)return void x(k(function(a){switch(a){case"empty":return"projectDashboard.folderNameEmpty";case"separator":case"relative":return"projectDashboard.folderNameSeparator";default:return"projectDashboard.folderNameInvalid"}}(e.error)));v(!0),x(null);try{let d=await fetch("/api/cwd/mkdir",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parent:a,name:e.name})}),f=await d.json().catch(()=>({}));if(!d.ok||!f.cwd)return void x(f.error??k("projectDashboard.folderCreateFailed"));c(f.cwd),b()}catch(a){x(a instanceof Error?a.message:String(a))}finally{v(!1)}},[b,c,k]),Y=(0,e.useCallback)(a=>{let b=R[a];b&&W(b.path)},[R,W]),Z=(0,e.useCallback)(a=>{if("ArrowDown"===a.key)a.preventDefault(),t(a=>Math.min(a+1,Math.max(R.length-1,0)));else if("ArrowUp"===a.key)a.preventDefault(),t(a=>Math.max(a-1,0));else if("Enter"===a.key){if(a.preventDefault(),u)return;F?X(F.parent,F.name):R.length>0?Y(Math.min(s,R.length-1)):U?W(U):H&&L.trim()&&X(Q,L)}},[Y,s,u,X,Q,R,H,L,U,F,W]);if(!a)return null;let $=(a,b)=>{let c=b===s;return(0,d.jsxs)("button",{type:"button","data-testid":"quick-create-candidate","data-candidate-path":a.path,onMouseEnter:()=>t(b),onClick:()=>Y(b),style:{...D,background:c?"var(--bg-selected)":"none",borderColor:c?"var(--accent)":"transparent"},children:[(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",style:{flexShrink:0,color:"var(--text-muted)"},children:(0,d.jsx)("path",{d:"M1.5 3h4l1.5 2h7.5v7.5h-13z"})}),(0,d.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,d.jsx)("span",{style:{display:"block",fontSize:13,color:"var(--text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.label}),(0,d.jsx)("span",{style:{display:"block",fontSize:10.5,color:"var(--text-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.path})]}),a.hint&&(0,d.jsxs)("span",{style:{flexShrink:0,fontSize:10.5,color:"var(--text-dim)"},children:[a.hint," ",k("projectDashboard.sessions")]})]},a.path)};return(0,d.jsxs)(q,{title:k("projectDashboard.newProjectTitle"),onClose:b,wide:!0,testId:"quick-create-panel",children:[(0,d.jsx)("input",{ref:N,"data-testid":"quick-create-input",value:l,onChange:a=>{m(a.target.value),t(0),G(null)},onKeyDown:Z,placeholder:k("projectDashboard.searchOrPath"),style:{...B,marginBottom:10}}),F&&(0,d.jsxs)("div",{"data-testid":"quick-create-confirm",style:{display:"flex",alignItems:"center",gap:8,padding:10,marginBottom:10,background:"var(--bg-subtle)",border:"1px solid var(--border)",borderRadius:8},children:[(0,d.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,d.jsx)("div",{style:{fontSize:12.5,color:"var(--text)"},children:k("projectDashboard.pathNotFound")}),(0,d.jsx)("div",{style:{fontSize:11,color:"var(--text-dim)",wordBreak:"break-all"},children:F.path})]}),(0,d.jsx)("button",{type:"button","data-testid":"quick-create-confirm-create",disabled:u,onClick:()=>void X(F.parent,F.name),style:{...z,opacity:u?.6:1},children:k("projectDashboard.createThisFolder")}),(0,d.jsx)("button",{type:"button",onClick:()=>G(null),style:A,children:k("projectDashboard.cancel")})]}),V&&!F&&(0,d.jsxs)("button",{type:"button","data-testid":"quick-create-use-path",onClick:()=>void W(U),disabled:u,style:{...D,background:"var(--bg-selected)",borderColor:"var(--accent)",marginBottom:10},children:[(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",style:{flexShrink:0},children:(0,d.jsx)("path",{d:"M1.5 3h4l1.5 2h7.5v7.5h-13z"})}),(0,d.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,d.jsx)("span",{style:{display:"block",fontSize:12,color:"var(--text-muted)"},children:k("projectDashboard.useThisPath")}),(0,d.jsx)("span",{style:{display:"block",fontSize:12.5,color:"var(--text)",wordBreak:"break-all"},children:U})]}),(0,d.jsx)("span",{style:{flexShrink:0,fontSize:11,color:"var(--text-dim)"},children:"⏎"})]}),(0,d.jsxs)("div",{style:{maxHeight:300,overflowY:"auto"},children:[S.length>0&&(0,d.jsxs)("div",{style:{marginBottom:8},children:[(0,d.jsx)("div",{style:C,children:k("projectDashboard.recentUsed")}),S.map(a=>$(a,R.indexOf(a)))]}),(T.length>0||p)&&(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{style:C,children:k("projectDashboard.siblingDirs")}),p&&0===T.length&&(0,d.jsx)("div",{style:{padding:"6px 9px",fontSize:12,color:"var(--text-dim)"},children:k("projectDashboard.scanning")}),T.map(a=>$(a,R.indexOf(a)))]}),0===R.length&&!V&&!F&&(0,d.jsx)("div",{style:{padding:"18px 8px",textAlign:"center",fontSize:12.5,color:"var(--text-muted)"},children:k("projectDashboard.noMatches")})]}),H&&(0,d.jsxs)("div",{"data-testid":"quick-create-folder-form",style:{marginTop:10,padding:10,background:"var(--bg-subtle)",border:"1px solid var(--border)",borderRadius:8,display:"flex",flexDirection:"column",gap:8},children:[(0,d.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,d.jsx)("select",{value:Q,onChange:a=>K(a.target.value),"aria-label":k("projectDashboard.parentDir"),style:{...B,flex:1,cursor:"pointer"},children:P.map(a=>(0,d.jsx)("option",{value:a.path,children:a.path},a.path))}),(0,d.jsx)("input",{"data-testid":"quick-create-folder-name",value:L,onChange:a=>M(a.target.value),onKeyDown:Z,placeholder:k("projectDashboard.folderName"),style:{...B,flex:1}})]}),(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[(0,d.jsx)("button",{type:"button",onClick:()=>I(!1),style:A,children:k("projectDashboard.cancel")}),(0,d.jsx)("button",{type:"button","data-testid":"quick-create-folder-submit",disabled:u||!L.trim()||!Q,onClick:()=>void X(Q,L),style:{...z,opacity:u||!L.trim()?.6:1},children:k("projectDashboard.create")})]}),(0,d.jsx)("div",{style:{fontSize:11,color:"var(--text-dim)"},children:(0,y.as)(Q,L.trim()||"…")})]}),w&&(0,d.jsx)("div",{"data-testid":"quick-create-error",style:{marginTop:10,fontSize:12,color:"#ef4444"},children:w}),(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginTop:12},children:[(0,d.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,d.jsxs)("button",{type:"button","data-testid":"quick-create-browse",onClick:f,style:A,children:[(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",children:(0,d.jsx)("path",{d:"M1.5 3h4l1.5 2h7.5v7.5h-13z"})}),k("projectDashboard.browse")]}),(0,d.jsxs)("button",{type:"button","data-testid":"quick-create-new-folder",onClick:()=>I(a=>!a),style:A,children:[(0,d.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,d.jsx)("path",{d:"M12 5v14M5 12h14"})}),k("projectDashboard.newFolder")]})]}),(0,d.jsx)("span",{style:{fontSize:11,color:"var(--text-dim)",whiteSpace:"nowrap"},children:k("projectDashboard.keyboardHint")})]})]})}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/
|
|
1
|
+
globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/EmuU1f7la3J3ZtEmFSuCi/_buildManifest.js","static/EmuU1f7la3J3ZtEmFSuCi/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-1b16208bb4ccd9c1.js","static/chunks/4bd1b696-8a4ab4fdf0ae305a.js","static/chunks/3794-d29203733ca4633c.js","static/chunks/main-app-dc456095eb2e47ee.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" translate="no" class="__variable_66b8ca notranslate"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"/><link rel="preload" href="/_next/static/media/7deddc85b7ffd1dc-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/ec14413c594b3356-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/88714c00e109ce28.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/d71318cebb94818f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/bb9361c7f832a89d.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-1b16208bb4ccd9c1.js"/><script src="/_next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js" async=""></script><script src="/_next/static/chunks/3794-d29203733ca4633c.js" async=""></script><script src="/_next/static/chunks/main-app-dc456095eb2e47ee.js" async=""></script><script src="/_next/static/chunks/app/layout-122ba415116b228a.js" async=""></script><meta name="robots" content="noindex"/><meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)"/><meta name="theme-color" content="#1a1a1a" media="(prefers-color-scheme: dark)"/><title>AgentStudio</title><meta name="description" content="AI Agent Development Environment"/><meta name="application-name" content="AgentStudio"/><link rel="manifest" href="/manifest.webmanifest"/><meta name="format-detection" content="telephone=no"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="AgentStudio"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="icon" href="/favicon.ico?4cdfa444a9565a57" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icons/icon-192.png" sizes="192x192" type="image/png"/><link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" sizes="180x180" type="image/png"/><meta name="next-size-adjust" content=""/><meta name="google" content="notranslate"/><title>404: This page could not be found.</title><script>(function(){var t="auto";try{var s=localStorage.getItem("pi-theme");if(["light","dark","mist","rose","pine","auto"].includes(s))t=s}catch(e){}if(t==="auto")t=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";var r=document.documentElement;r.dataset.theme=t;r.classList.toggle("dark",t==="dark"||t==="pine")})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body translate="no" class="notranslate"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-1b16208bb4ccd9c1.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[57788,[\"7177\",\"static/chunks/app/layout-122ba415116b228a.js\"],\"PwaRegistration\"]\n5:I[90484,[],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n9:I[90484,[],\"ViewportBoundary\"]\nb:I[90484,[],\"MetadataBoundary\"]\nd:I[27123,[],\"default\",1]\n:HL[\"/_next/static/media/7deddc85b7ffd1dc-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/ec14413c594b3356-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/88714c00e109ce28.css\",\"style\"]\n:HL[\"/_next/static/css/d71318cebb94818f.css\",\"style\"]\n:HL[\"/_next/static/css/bb9361c7f832a89d.css\",\"style\"]\n8:X\n0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/88714c00e109ce28.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d71318cebb94818f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/bb9361c7f832a89d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"translate\":\"no\",\"className\":\"__variable_66b8ca notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"google\",\"content\":\"notranslate\"}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){var t=\\\"auto\\\";try{var s=localStorage.getItem(\\\"pi-theme\\\");if([\\\"light\\\",\\\"dark\\\",\\\"mist\\\",\\\"rose\\\",\\\"pine\\\",\\\"auto\\\"].includes(s))t=s}catch(e){}if(t===\\\"auto\\\")t=window.matchMedia(\\\"(prefers-color-scheme: dark)\\\").matches?\\\"dark\\\":\\\"light\\\";var r=document.documentElement;r.dataset.theme=t;r.classList.toggle(\\\"dark\\\",t===\\\"dark\\\"||t===\\\"pine\\\")})();\"}}]]}],[\"$\",\"body\",null,{\"translate\":\"no\",\"className\":\"notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L4\",null,{}]]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,null]},null,false,\"$8\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lc\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"Q5qAKqQm7gIeAZrKS_iN_\"}\n8:C\na:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#ffffff\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"meta\",\"3\",{\"name\":\"theme-color\",\"content\":\"#1a1a1a\",\"media\":\"(prefers-color-scheme: dark)\"}]]\ne:I[86869,[],\"IconMark\"]\n7:null\nc:[[\"$\",\"title\",\"0\",{\"children\":\"AgentStudio\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"AI Agent Development Environment\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"AgentStudio\"}],[\"$\",\"link\",\"3\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"4\",{\"name\":\"format-detection\",\"content\":\"telephone=no\"}],[\"$\",\"meta\",\"5\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"AgentStudio\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?4cdfa444a9565a57\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/icons/icon-192.png\",\"sizes\":\"192x192\",\"type\":\"image/png\"}],[\"$\",\"link\",\"10\",{\"rel\":\"apple-touch-icon\",\"href\":\"/icons/apple-touch-icon.png\",\"sizes\":\"180x180\",\"type\":\"image/png\"}],[\"$\",\"$Le\",\"11\",{}]]\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><html lang="en" translate="no" class="__variable_66b8ca notranslate"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"/><link rel="preload" href="/_next/static/media/7deddc85b7ffd1dc-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/ec14413c594b3356-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/88714c00e109ce28.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/d71318cebb94818f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/bb9361c7f832a89d.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-1b16208bb4ccd9c1.js"/><script src="/_next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js" async=""></script><script src="/_next/static/chunks/3794-d29203733ca4633c.js" async=""></script><script src="/_next/static/chunks/main-app-dc456095eb2e47ee.js" async=""></script><script src="/_next/static/chunks/app/layout-5faf0c882dfcc520.js" async=""></script><meta name="robots" content="noindex"/><meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)"/><meta name="theme-color" content="#1a1a1a" media="(prefers-color-scheme: dark)"/><title>AgentStudio</title><meta name="description" content="AI Agent Development Environment"/><meta name="application-name" content="AgentStudio"/><link rel="manifest" href="/manifest.webmanifest"/><meta name="format-detection" content="telephone=no"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="AgentStudio"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="icon" href="/favicon.ico?4cdfa444a9565a57" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icons/icon-192.png" sizes="192x192" type="image/png"/><link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" sizes="180x180" type="image/png"/><meta name="next-size-adjust" content=""/><meta name="google" content="notranslate"/><title>404: This page could not be found.</title><script>(function(){var t="auto";try{var s=localStorage.getItem("pi-theme");if(["light","dark","mist","rose","pine","auto"].includes(s))t=s}catch(e){}if(t==="auto")t=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";var r=document.documentElement;r.dataset.theme=t;r.classList.toggle("dark",t==="dark"||t==="pine")})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body translate="no" class="notranslate"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-1b16208bb4ccd9c1.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[57121,[],\"\"]\n3:I[74581,[],\"\"]\n4:I[57788,[\"7177\",\"static/chunks/app/layout-5faf0c882dfcc520.js\"],\"PwaRegistration\"]\n5:I[90484,[],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n9:I[90484,[],\"ViewportBoundary\"]\nb:I[90484,[],\"MetadataBoundary\"]\nd:I[27123,[],\"default\",1]\n:HL[\"/_next/static/media/7deddc85b7ffd1dc-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/ec14413c594b3356-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/88714c00e109ce28.css\",\"style\"]\n:HL[\"/_next/static/css/d71318cebb94818f.css\",\"style\"]\n:HL[\"/_next/static/css/bb9361c7f832a89d.css\",\"style\"]\n8:X\n0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/88714c00e109ce28.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d71318cebb94818f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/bb9361c7f832a89d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"translate\":\"no\",\"className\":\"__variable_66b8ca notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"google\",\"content\":\"notranslate\"}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){var t=\\\"auto\\\";try{var s=localStorage.getItem(\\\"pi-theme\\\");if([\\\"light\\\",\\\"dark\\\",\\\"mist\\\",\\\"rose\\\",\\\"pine\\\",\\\"auto\\\"].includes(s))t=s}catch(e){}if(t===\\\"auto\\\")t=window.matchMedia(\\\"(prefers-color-scheme: dark)\\\").matches?\\\"dark\\\":\\\"light\\\";var r=document.documentElement;r.dataset.theme=t;r.classList.toggle(\\\"dark\\\",t===\\\"dark\\\"||t===\\\"pine\\\")})();\"}}]]}],[\"$\",\"body\",null,{\"translate\":\"no\",\"className\":\"notranslate\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L4\",null,{}]]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,null]},null,false,\"$8\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lc\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"EmuU1f7la3J3ZtEmFSuCi\"}\n8:C\na:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#ffffff\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"meta\",\"3\",{\"name\":\"theme-color\",\"content\":\"#1a1a1a\",\"media\":\"(prefers-color-scheme: dark)\"}]]\ne:I[86869,[],\"IconMark\"]\n7:null\nc:[[\"$\",\"title\",\"0\",{\"children\":\"AgentStudio\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"AI Agent Development Environment\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"AgentStudio\"}],[\"$\",\"link\",\"3\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"4\",{\"name\":\"format-detection\",\"content\":\"telephone=no\"}],[\"$\",\"meta\",\"5\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"AgentStudio\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?4cdfa444a9565a57\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/icons/icon-192.png\",\"sizes\":\"192x192\",\"type\":\"image/png\"}],[\"$\",\"link\",\"10\",{\"rel\":\"apple-touch-icon\",\"href\":\"/icons/apple-touch-icon.png\",\"sizes\":\"180x180\",\"type\":\"image/png\"}],[\"$\",\"$Le\",\"11\",{}]]\n"])</script></body></html>
|