constellai 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/(app)/activity/page.js +2 -2
- package/.next/server/app/(app)/activity/page.js.nft.json +1 -1
- package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/agents/[handle]/page.js +3 -3
- package/.next/server/app/(app)/agents/[handle]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/agents/[handle]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/code/page.js +2 -2
- package/.next/server/app/(app)/code/page.js.nft.json +1 -1
- package/.next/server/app/(app)/code/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/config/page.js +2 -2
- package/.next/server/app/(app)/config/page.js.nft.json +1 -1
- package/.next/server/app/(app)/config/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/costs/page.js +2 -2
- package/.next/server/app/(app)/costs/page.js.nft.json +1 -1
- package/.next/server/app/(app)/costs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/cron/page.js +2 -2
- package/.next/server/app/(app)/cron/page.js.nft.json +1 -1
- package/.next/server/app/(app)/cron/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/dashboard/page.js +2 -2
- package/.next/server/app/(app)/dashboard/page.js.nft.json +1 -1
- package/.next/server/app/(app)/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/design/page.js +3 -3
- package/.next/server/app/(app)/design/page.js.nft.json +1 -1
- package/.next/server/app/(app)/design/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/docs/[id]/page.js +2 -2
- package/.next/server/app/(app)/docs/[id]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/docs/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/docs/page.js +2 -2
- package/.next/server/app/(app)/docs/page.js.nft.json +1 -1
- package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/github/page.js +2 -2
- package/.next/server/app/(app)/github/page.js.nft.json +1 -1
- package/.next/server/app/(app)/github/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/goals/page.js +2 -2
- package/.next/server/app/(app)/goals/page.js.nft.json +1 -1
- package/.next/server/app/(app)/goals/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/inbox/page.js +2 -2
- package/.next/server/app/(app)/inbox/page.js.nft.json +1 -1
- package/.next/server/app/(app)/inbox/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/knowledge/page.js +2 -2
- package/.next/server/app/(app)/knowledge/page.js.nft.json +1 -1
- package/.next/server/app/(app)/knowledge/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/models/page.js +2 -2
- package/.next/server/app/(app)/models/page.js.nft.json +1 -1
- package/.next/server/app/(app)/models/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/notifications/page.js +2 -2
- package/.next/server/app/(app)/notifications/page.js.nft.json +1 -1
- package/.next/server/app/(app)/notifications/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/org/page.js +4 -4
- package/.next/server/app/(app)/org/page.js.nft.json +1 -1
- package/.next/server/app/(app)/org/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/organizations/page.js +2 -2
- package/.next/server/app/(app)/organizations/page.js.nft.json +1 -1
- package/.next/server/app/(app)/organizations/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/page.js +3 -3
- package/.next/server/app/(app)/page.js.nft.json +1 -1
- package/.next/server/app/(app)/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/planner/page.js +2 -2
- package/.next/server/app/(app)/planner/page.js.nft.json +1 -1
- package/.next/server/app/(app)/planner/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/plugins/page.js +2 -2
- package/.next/server/app/(app)/plugins/page.js.nft.json +1 -1
- package/.next/server/app/(app)/plugins/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/pm/page.js +2 -2
- package/.next/server/app/(app)/pm/page.js.nft.json +1 -1
- package/.next/server/app/(app)/pm/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/prepare-deploy/page.js +3 -3
- package/.next/server/app/(app)/prepare-deploy/page.js.nft.json +1 -1
- package/.next/server/app/(app)/prepare-deploy/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/profile/page.js +2 -2
- package/.next/server/app/(app)/profile/page.js.nft.json +1 -1
- package/.next/server/app/(app)/profile/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/pulse/page.js +2 -2
- package/.next/server/app/(app)/pulse/page.js.nft.json +1 -1
- package/.next/server/app/(app)/pulse/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/reports/[id]/page.js +2 -2
- package/.next/server/app/(app)/reports/[id]/page.js.nft.json +1 -1
- package/.next/server/app/(app)/reports/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/reports/page.js +3 -3
- package/.next/server/app/(app)/reports/page.js.nft.json +1 -1
- package/.next/server/app/(app)/reports/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/routines/page.js +2 -2
- package/.next/server/app/(app)/routines/page.js.nft.json +1 -1
- package/.next/server/app/(app)/routines/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/search/page.js +2 -2
- package/.next/server/app/(app)/search/page.js.nft.json +1 -1
- package/.next/server/app/(app)/search/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/security/page.js +2 -2
- package/.next/server/app/(app)/security/page.js.nft.json +1 -1
- package/.next/server/app/(app)/security/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/skills/page.js +3 -3
- package/.next/server/app/(app)/skills/page.js.nft.json +1 -1
- package/.next/server/app/(app)/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/tasks/page.js +2 -2
- package/.next/server/app/(app)/tasks/page.js.nft.json +1 -1
- package/.next/server/app/(app)/tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/test-dev/page.js +1 -1
- package/.next/server/app/(app)/test-dev/page.js.nft.json +1 -1
- package/.next/server/app/(app)/test-dev/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/update/page.js +3 -3
- package/.next/server/app/(app)/update/page.js.nft.json +1 -1
- package/.next/server/app/(app)/update/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(auth)/login/page.js +2 -2
- package/.next/server/app/(auth)/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(auth)/onboarding/page.js +1 -1
- package/.next/server/app/(auth)/onboarding/page_client-reference-manifest.js +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/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/cron/tick/route.js +2 -2
- package/.next/server/app/api/sync/file/route.js +1 -1
- package/.next/server/app/api/telegram/poll/route.js +2 -2
- package/.next/server/app/api/v1/[[...path]]/route.js +1 -1
- package/.next/server/chunks/1033.js +1 -1
- package/.next/server/chunks/1190.js +12 -0
- package/.next/server/chunks/1986.js +1 -1
- package/.next/server/chunks/2118.js +1 -1
- package/.next/server/chunks/{1678.js → 3481.js} +16 -16
- package/.next/server/chunks/3987.js +3 -3
- package/.next/server/chunks/4288.js +1 -1
- package/.next/server/chunks/4435.js +1 -0
- package/.next/server/chunks/4732.js +1 -0
- package/.next/server/chunks/5878.js +1 -1
- package/.next/server/chunks/7348.js +4 -0
- package/.next/server/chunks/739.js +1 -0
- package/.next/server/chunks/7867.js +1 -1
- package/.next/server/chunks/7905.js +1 -1
- package/.next/server/chunks/8134.js +1 -1
- package/.next/server/chunks/8211.js +1 -1
- package/.next/server/chunks/8868.js +21 -0
- package/.next/server/chunks/907.js +1 -1
- package/.next/server/chunks/9344.js +3 -3
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/1738-28b6824e2a707b93.js +1 -0
- package/.next/static/chunks/4365-c5eb5b6af7bfc653.js +4 -0
- package/.next/static/chunks/6871-a079ac1b4f0caec2.js +1 -0
- package/.next/static/chunks/{7218-21f40f9caef5d658.js → 7218-44d9a247cf4980fa.js} +2 -2
- package/.next/static/chunks/7466-6d8ba01f169a6a1e.js +1 -0
- package/.next/static/chunks/app/(app)/activity/{page-ce3fc6003368f592.js → page-8cf9b4c853ca9c69.js} +1 -1
- package/.next/static/chunks/app/(app)/agents/[handle]/page-068e58bd327db429.js +1 -0
- package/.next/static/chunks/app/(app)/code/page-98becb790f9aeedf.js +1 -0
- package/.next/static/chunks/app/(app)/config/page-b5447ad490de11f7.js +1 -0
- package/.next/static/chunks/app/(app)/costs/page-02324b05660bad50.js +1 -0
- package/.next/static/chunks/app/(app)/cron/page-5c9c6fea5aee299c.js +1 -0
- package/.next/static/chunks/app/(app)/dashboard/{page-6237c3a35cce55ce.js → page-742ac16dbfce548b.js} +1 -1
- package/.next/static/chunks/app/(app)/design/{page-5997054187e59e74.js → page-3ff2eae843e8b7ea.js} +3 -3
- package/.next/static/chunks/app/(app)/docs/[id]/page-f7cc168b103da51e.js +1 -0
- package/.next/static/chunks/app/(app)/docs/page-bc93a2e0342c61af.js +1 -0
- package/.next/static/chunks/app/(app)/github/page-44b09f94c19f56f0.js +1 -0
- package/.next/static/chunks/app/(app)/goals/{page-95e85ce115ed9ff3.js → page-b66ec65a7221b023.js} +1 -1
- package/.next/static/chunks/app/(app)/inbox/page-57a8ab9347276aa2.js +12 -0
- package/.next/static/chunks/app/(app)/knowledge/page-fb3902b3c7348818.js +1 -0
- package/.next/static/chunks/app/(app)/layout-98aa9e760faf2331.js +1 -0
- package/.next/static/chunks/app/(app)/models/page-92f957c7400497f0.js +1 -0
- package/.next/static/chunks/app/(app)/notifications/page-e3fcdad57e7a94fd.js +12 -0
- package/.next/static/chunks/app/(app)/org/page-9030d33729e45e07.js +12 -0
- package/.next/static/chunks/app/(app)/organizations/{page-0de7da829c9b2249.js → page-f29c3dc4b3327b8d.js} +1 -1
- package/.next/static/chunks/app/(app)/page-0e7e7cfd98d44f59.js +1 -0
- package/.next/static/chunks/app/(app)/planner/{page-0fc0ebe2d338769a.js → page-a2c45cb14b53454a.js} +1 -1
- package/.next/static/chunks/app/(app)/plugins/page-792b3dc0ae8571db.js +1 -0
- package/.next/static/chunks/app/(app)/pm/page-4624950feadad3be.js +1 -0
- package/.next/static/chunks/app/(app)/prepare-deploy/page-a5d2911069317635.js +1 -0
- package/.next/static/chunks/app/(app)/profile/page-10ce6fd89387a1f0.js +1 -0
- package/.next/static/chunks/app/(app)/pulse/page-793ce0d2074d2cd7.js +1 -0
- package/.next/static/chunks/app/(app)/reports/[id]/page-5c9c6fea5aee299c.js +1 -0
- package/.next/static/chunks/app/(app)/reports/page-cfa78938aef16acc.js +1 -0
- package/.next/static/chunks/app/(app)/routines/page-06df804a8db66b2d.js +1 -0
- package/.next/static/chunks/app/(app)/search/page-eec2f135e6af9c70.js +1 -0
- package/.next/static/chunks/app/(app)/security/page-23dd0b8308ee48b8.js +1 -0
- package/.next/static/chunks/app/(app)/skills/page-d3d63cac10ce08e1.js +1 -0
- package/.next/static/chunks/app/(app)/tasks/{page-4d535f34ae9c44ca.js → page-0750ff77f17bdd9d.js} +1 -1
- package/.next/static/chunks/app/(app)/test-dev/page-7c09ba848265ffe6.js +1 -0
- package/.next/static/chunks/app/(app)/update/page-e70ac9974eb7bf03.js +1 -0
- package/.next/static/chunks/app/(auth)/login/page-0ee8f367460d835a.js +1 -0
- package/.next/static/chunks/app/(auth)/onboarding/{page-8548be7e3ab3659e.js → page-1de0c42322e9f296.js} +1 -1
- package/.next/static/chunks/app/layout-a80704c0fd0a9e29.js +1 -0
- package/.next/trace-build +1 -1
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/README.pt-BR.md +1 -1
- package/docs/UPDATE.md +9 -3
- package/package.json +1 -1
- package/.next/server/chunks/3392.js +0 -1
- package/.next/server/chunks/6538.js +0 -4
- package/.next/server/chunks/7727.js +0 -1
- package/.next/server/chunks/8237.js +0 -12
- package/.next/server/chunks/939.js +0 -1
- package/.next/server/chunks/9795.js +0 -21
- package/.next/static/chunks/3556-dbb9200143640484.js +0 -1
- package/.next/static/chunks/5523-9c369c915ee6d9c9.js +0 -1
- package/.next/static/chunks/7363-b9ebe28fed23b997.js +0 -1
- package/.next/static/chunks/7621-87d8d0d0568de3ca.js +0 -4
- package/.next/static/chunks/app/(app)/agents/[handle]/page-236e13b8edadd480.js +0 -1
- package/.next/static/chunks/app/(app)/code/page-18ae765c81a2c709.js +0 -1
- package/.next/static/chunks/app/(app)/config/page-8a6fcf6c04337210.js +0 -1
- package/.next/static/chunks/app/(app)/costs/page-230b0ef03a2024b0.js +0 -1
- package/.next/static/chunks/app/(app)/cron/page-ca89769e2522191d.js +0 -1
- package/.next/static/chunks/app/(app)/docs/[id]/page-3362d323e0f4dada.js +0 -1
- package/.next/static/chunks/app/(app)/docs/page-d7d8018a7884a4b4.js +0 -1
- package/.next/static/chunks/app/(app)/github/page-f5c1cae725d080fb.js +0 -1
- package/.next/static/chunks/app/(app)/inbox/page-474c3f0a181bbbd3.js +0 -12
- package/.next/static/chunks/app/(app)/knowledge/page-08596428ca34b620.js +0 -1
- package/.next/static/chunks/app/(app)/layout-720a1171f7152d86.js +0 -1
- package/.next/static/chunks/app/(app)/models/page-fa1eb257e6911c9a.js +0 -1
- package/.next/static/chunks/app/(app)/notifications/page-31f2a041bdb497b9.js +0 -12
- package/.next/static/chunks/app/(app)/org/page-666438930ddc4639.js +0 -12
- package/.next/static/chunks/app/(app)/page-bfcf3d25f468240f.js +0 -1
- package/.next/static/chunks/app/(app)/plugins/page-ad369fbfec6f3d1c.js +0 -1
- package/.next/static/chunks/app/(app)/pm/page-bb39c9d9a4f0d597.js +0 -1
- package/.next/static/chunks/app/(app)/prepare-deploy/page-f182991e68b159c1.js +0 -1
- package/.next/static/chunks/app/(app)/profile/page-cf5fe16bfad2a7ba.js +0 -1
- package/.next/static/chunks/app/(app)/pulse/page-03877c467c491e8a.js +0 -1
- package/.next/static/chunks/app/(app)/reports/[id]/page-ca89769e2522191d.js +0 -1
- package/.next/static/chunks/app/(app)/reports/page-7741b6a25e582791.js +0 -1
- package/.next/static/chunks/app/(app)/routines/page-ea83e6337e7502c2.js +0 -1
- package/.next/static/chunks/app/(app)/search/page-5e7f7cf0cc51b76f.js +0 -1
- package/.next/static/chunks/app/(app)/security/page-410144cdc35e19cc.js +0 -1
- package/.next/static/chunks/app/(app)/skills/page-90e5d8a24920c275.js +0 -1
- package/.next/static/chunks/app/(app)/test-dev/page-782c8cadd8a10feb.js +0 -1
- package/.next/static/chunks/app/(app)/update/page-decdb0ece526b50f.js +0 -1
- package/.next/static/chunks/app/(auth)/login/page-147a9be880c44d42.js +0 -1
- package/.next/static/chunks/app/layout-c717657a60a7f62c.js +0 -1
- /package/.next/static/{ehoxBsPzAtE_FyZ2VpMF0 → vW8upousaXo7DvSlRwFbb}/_buildManifest.js +0 -0
- /package/.next/static/{ehoxBsPzAtE_FyZ2VpMF0 → vW8upousaXo7DvSlRwFbb}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1653],{512:(e,s,a)=>{"use strict";a.d(s,{PrepareDeploy:()=>I});var n=a(4275),l=a(2899),i=a(9746),t=a.n(i),r=a(888),c=a(4952),d=a(4906),o=a(869),p=a(7797);let h=(0,p.createServerReference)("007d51487d08d1861c5c9c8f6afb02be818b9a4c53",p.callServer,void 0,p.findSourceMapURL,"getDeployRun"),m=(0,p.createServerReference)("00b1509d943b2987043c92a89fc5e65291af2e5474",p.callServer,void 0,p.findSourceMapURL,"runDeployPipeline"),x=(0,p.createServerReference)("000fcc3ab0e9180e56d9dcf441ed3f53851a02611a",p.callServer,void 0,p.findSourceMapURL,"previewCleanExport"),u=(0,p.createServerReference)("00516a0e85b569ff6044f3169d87c7f776e4fa98a0",p.callServer,void 0,p.findSourceMapURL,"getDeployEnv"),v=(0,p.createServerReference)("40435215edf232a485753db4c78b82a77f70ab3b42",p.callServer,void 0,p.findSourceMapURL,"exportCleanSource"),g=(0,p.createServerReference)("008b17892e9e958c227c782e40ca29a9c4547851b2",p.callServer,void 0,p.findSourceMapURL,"runBuildOnly"),j=(0,p.createServerReference)("00ef003deb96d07a3e796772dbbbd972905c06a402",p.callServer,void 0,p.findSourceMapURL,"runTestsOnly"),f=(0,p.createServerReference)("00e952a6637e0a18692bf5e9abeab8cfa9eb7a5b43",p.callServer,void 0,p.findSourceMapURL,"generateReadme"),b=(0,p.createServerReference)("00e51640f598c8698266cecb962cc3925821a48cbb",p.callServer,void 0,p.findSourceMapURL,"generateDeployDocs"),y=["analyze","deps","env","tests","secrets","build","validateBuild","agent","package"],k={idle:{bg:"var(--bg-active)",c:"var(--text-dim)"},running:{bg:"color-mix(in srgb, var(--accent) 18%, transparent)",c:"var(--accent)"},done:{bg:"rgba(179,217,122,.16)",c:"var(--sx-string)"},failed:{bg:"rgba(232,104,143,.16)",c:"#e8688f"},blocked:{bg:"rgba(232,104,143,.16)",c:"#e8688f"}},N={ok:{icon:"check",c:"var(--sx-string)"},warn:{icon:"warn",c:"var(--sx-number)"},fail:{icon:"close",c:"#e8688f"},todo:{icon:"dot",c:"var(--text-faint)"}};function w(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function I({hasToken:e,repos:s,project:a,env:i,run:p,checklist:z}){let S=(0,o.k)(),[,C]=(0,l.useTransition)(),[R,E]=(0,l.useState)(""),[L,M]=(0,l.useState)(p),[_,F]=(0,l.useState)(i),[q,B]=(0,l.useState)(z),[D,P]=(0,l.useState)(null),[$,U]=(0,l.useState)(!1),[A,O]=(0,l.useState)(!e),[T,G]=(0,l.useState)(""),[K,V]=(0,l.useState)(s[0]?.full??""),[W,H]=(0,l.useState)(""),[J,Q]=(0,l.useState)(s[0]?.branch??"main"),[X,Y]=(0,l.useState)(null),Z=(0,l.useRef)("running"===p.status),ee=(0,l.useRef)(p.startedAt??0),es=(0,l.useCallback)(()=>{h().then(e=>{M(e),B(e.checklist)})},[]);function ea(){window.dispatchEvent(new CustomEvent("constella:agent-run",{detail:{channel:"deploy"}}))}function en(e,s){E(e),ea(),C(async()=>{await s(),es(),E("")})}function el(){E("scan"),C(async()=>{P(await x()),E("")})}function ei(){E("env"),C(async()=>{F(await u()),E("")})}(0,l.useEffect)(()=>{if("running"!==L.status)return;let e=!0,s=setInterval(async()=>{let a=await h();e&&(M(a),"running"!==a.status&&(B(a.checklist),clearInterval(s)))},900);return()=>{e=!1,clearInterval(s)}},[L.status]);let et=k[L.status]??k.idle,er=L.steps.length?L.steps:y.map(e=>({key:e,label:e,status:"waiting"})),ec=(s.length&&!A?K:W)||s[0]?.full||S("deploy.notConfigured"),ed=!!D?.blocked,eo=!_.detected,ep=!A&&s.length>0?!K:!W.trim()||!T.trim();return(0,n.jsxs)("div",{className:"pd-page",children:[(0,n.jsxs)("div",{className:"hw-card pd-hero",children:[(0,n.jsx)("span",{className:"hw-ic",children:(0,n.jsx)(r.I,{name:"cpu",size:20})}),(0,n.jsxs)("div",{className:"pd-hero-body",children:[(0,n.jsxs)("div",{className:"pd-hero-top",children:[(0,n.jsx)("div",{className:"hw-t",children:a?a.name:S("deploy.env.noProject")}),(0,n.jsx)("span",{className:"pd-pill",style:{background:et.bg,color:et.c},children:S("deploy.status."+L.status)})]}),(0,n.jsxs)("div",{className:"pd-hero-meta",children:[(0,n.jsxs)("span",{children:[(0,n.jsx)(r.I,{name:"cpu",size:12})," ",_.framework??_.runtime,_.runLabel?` \xb7 ${_.runLabel}`:""]}),(0,n.jsxs)("span",{children:[(0,n.jsx)(r.I,{name:"goto",size:12})," ",ec,J?` \xb7 ${J}`:""]}),(0,n.jsxs)("span",{children:[(0,n.jsx)(r.I,{name:"calendar",size:12})," ",S("deploy.lastPrep"),": ",L.startedAt?`${function(e){if(!e)return"";let s=Math.floor((Date.now()-e)/1e3);return s<60?`${s}s`:s<3600?`${Math.floor(s/60)}m`:s<86400?`${Math.floor(s/3600)}h`:`${Math.floor(s/86400)}d`}(L.startedAt)}`:S("deploy.never")]}),L.lastExport?.ok&&(0,n.jsxs)("span",{children:[(0,n.jsx)(r.I,{name:"check",size:12})," ",L.lastExport.sha]})]})]}),(0,n.jsxs)("div",{className:"pd-hero-actions",children:[(0,n.jsx)("button",{className:"btn-accent",disabled:"prep"===R||"running"===L.status||eo,onClick:function(){E("prep"),U(!0),ea(),M({...L,status:"running",steps:y.map(e=>({key:e,label:e,status:"waiting"}))}),C(async()=>{let e=await m();M(e),B(e.checklist),E("")})},children:"prep"===R||"running"===L.status?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"sync-spin",children:(0,n.jsx)(r.I,{name:"refresh",size:13})})," ",S("deploy.preparing")]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.I,{name:"play",size:13})," ","idle"===L.status?S("deploy.run"):S("deploy.runAgain")]})}),(0,n.jsxs)("button",{className:"btn-ghost",onClick:()=>document.getElementById("pd-export")?.scrollIntoView({behavior:"smooth"}),children:[(0,n.jsx)(r.I,{name:"arrowUp",size:13})," ",S("deploy.export")]}),(0,n.jsxs)("button",{className:"btn-ghost",onClick:()=>{U(e=>!e),document.getElementById("pd-logs")?.scrollIntoView({behavior:"smooth"})},children:[(0,n.jsx)(r.I,{name:"terminal",size:13})," ",S("deploy.logs")]})]})]}),(0,n.jsxs)("div",{className:"pd-cols",style:{alignItems:"stretch"},children:[(0,n.jsxs)("div",{className:"pd-col",children:[(0,n.jsxs)("div",{className:"hw-card",children:[(0,n.jsxs)("div",{className:"hw-head",children:[(0,n.jsx)("span",{className:"hw-ic",children:(0,n.jsx)(r.I,{name:"split",size:18})}),(0,n.jsxs)("div",{style:{flex:1},children:[(0,n.jsx)("div",{className:"hw-t",children:S("deploy.pipeline")}),(0,n.jsxs)("div",{className:"hw-s",children:[_.framework??_.runtime,_.runLabel?` \xb7 ${_.runLabel}`:""]})]})]}),(0,n.jsx)("div",{className:"ceo-pipe",children:er.map((e,s)=>{var a;return(0,n.jsxs)("div",{className:"ceo-stage "+function(e){switch(e){case"done":return"done";case"running":return"active";case"error":case"blocked":return"fail";case"needs-action":return"wait";default:return"todo"}}(e.status),children:[(0,n.jsx)("span",{className:"cs-dot",children:(a=e.status,"done"===a?(0,n.jsx)(r.I,{name:"check",size:13}):"error"===a||"blocked"===a?"!":"running"===a?(0,n.jsx)("span",{className:"sync-spin",children:(0,n.jsx)(r.I,{name:"refresh",size:12})}):"needs-action"===a?"~":s+1)}),(0,n.jsxs)("div",{className:"cs-main",children:[(0,n.jsx)("div",{className:"cs-t",children:S("deploy.step."+e.key)}),e.detail&&(0,n.jsx)("div",{className:"cs-d",children:e.detail}),(0,n.jsx)("div",{className:"cs-meta",children:S("deploy.st."+e.status)})]})]},e.key)})})]}),(0,n.jsxs)("div",{id:"pd-logs",children:[(0,n.jsx)(d.AgentRunLive,{channel:"deploy",resume:Z.current,sinceSeq:ee.current,onFinish:es}),$&&L.buildLog&&(0,n.jsx)("pre",{className:"pd-log",children:L.buildLog})]}),(0,n.jsxs)("div",{className:"hw-card",children:[(0,n.jsxs)("div",{className:"hw-head",children:[(0,n.jsx)("span",{className:"hw-ic",children:(0,n.jsx)(r.I,{name:"grid",size:18})}),(0,n.jsx)("div",{style:{flex:1},children:(0,n.jsx)("div",{className:"hw-t",children:S("deploy.qa.title")})})]}),(0,n.jsxs)("div",{className:"pd-quick",children:[(0,n.jsxs)("button",{className:"btn-ghost",disabled:!!R||eo,onClick:()=>en("build",g),children:[(0,n.jsx)(r.I,{name:"cpu",size:13})," ",S("deploy.qa.build")]}),(0,n.jsxs)("button",{className:"btn-ghost",disabled:!!R||eo,onClick:()=>en("tests",j),children:[(0,n.jsx)(r.I,{name:"check",size:13})," ",S("deploy.qa.tests")]}),(0,n.jsxs)("button",{className:"btn-ghost",disabled:!!R,onClick:el,children:[(0,n.jsx)(r.I,{name:"shield",size:13})," ",S("deploy.qa.scan")]}),(0,n.jsxs)("button",{className:"btn-ghost",disabled:!!R||eo,onClick:()=>en("readme",f),children:[(0,n.jsx)(r.I,{name:"doc",size:13})," ",S("deploy.qa.readme")]}),(0,n.jsxs)("button",{className:"btn-ghost",disabled:!!R||eo,onClick:()=>en("deploydocs",b),children:[(0,n.jsx)(r.I,{name:"doc",size:13})," ",S("deploy.qa.deploydocs")]}),(0,n.jsxs)("button",{className:"btn-ghost",disabled:!!R,onClick:ei,children:[(0,n.jsx)(r.I,{name:"settings",size:13})," ",S("deploy.qa.env")]}),(0,n.jsxs)("button",{className:"btn-ghost",disabled:!!R,onClick:el,children:[(0,n.jsx)(r.I,{name:"files",size:13})," ",S("deploy.qa.review")]}),(0,n.jsxs)(t(),{href:"/inbox",className:"btn-ghost",children:[(0,n.jsx)(r.I,{name:"bell",size:13})," ",S("deploy.qa.inbox")]})]})]}),(0,n.jsxs)("div",{className:"hw-card",children:[(0,n.jsxs)("div",{className:"hw-head",children:[(0,n.jsx)("span",{className:"hw-ic",children:(0,n.jsx)(r.I,{name:"shield",size:18})}),(0,n.jsx)("div",{style:{flex:1},children:(0,n.jsx)("div",{className:"hw-t",children:S("deploy.sec.title")})}),(0,n.jsx)("button",{className:"btn-ghost",disabled:!!R,onClick:el,children:"scan"===R?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"sync-spin",children:(0,n.jsx)(r.I,{name:"refresh",size:12})})," ",S("deploy.sec.scanning")]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.I,{name:"refresh",size:12})," ",S("deploy.sec.rescan")]})})]}),null===D?(0,n.jsx)("div",{className:"home-empty",children:S("deploy.sec.notRun")}):D.secrets.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"pd-gate",children:[(0,n.jsx)(r.I,{name:"shield",size:14})," ",S("deploy.sec.blocked")]}),(0,n.jsx)("div",{className:"srv-log scroll",style:{maxHeight:150},children:D.secrets.map((e,s)=>(0,n.jsxs)("div",{className:"lg-warn",children:[e.file,":",e.line," \xb7 ",e.kind]},s))}),(0,n.jsxs)(t(),{href:"/inbox",className:"btn-ghost",style:{marginTop:8},children:[(0,n.jsx)(r.I,{name:"bell",size:13})," ",S("deploy.sec.openInbox")]})]}):(0,n.jsxs)("div",{className:"pd-ok",children:[(0,n.jsx)(r.I,{name:"check",size:14,style:{color:"var(--sx-string)"}})," ",S("deploy.sec.clean")]})]})]}),(0,n.jsxs)("div",{className:"pd-col",children:[(0,n.jsxs)("div",{className:"hw-card",children:[(0,n.jsxs)("div",{className:"hw-head",children:[(0,n.jsx)("span",{className:"hw-ic",children:(0,n.jsx)(r.I,{name:"check",size:18})}),(0,n.jsx)("div",{style:{flex:1},children:(0,n.jsx)("div",{className:"hw-t",children:S("deploy.checklist")})})]}),(0,n.jsx)("div",{className:"pd-checklist",children:q.map(e=>{let s=N[e.status]??N.todo;return(0,n.jsxs)("div",{className:"pd-chk-row",children:[(0,n.jsx)(r.I,{name:s.icon,size:14,style:{color:s.c,flex:"0 0 auto"}}),(0,n.jsx)("span",{className:"pd-chk-label",children:S("deploy.chk."+e.key)}),e.detail&&(0,n.jsx)("span",{className:"pd-chk-detail",children:e.detail})]},e.key)})})]}),(0,n.jsxs)("div",{className:"hw-card",style:{flex:1,display:"flex",flexDirection:"column"},children:[(0,n.jsxs)("div",{className:"hw-head",children:[(0,n.jsx)("span",{className:"hw-ic",children:(0,n.jsx)(r.I,{name:"settings",size:18})}),(0,n.jsx)("div",{style:{flex:1},children:(0,n.jsx)("div",{className:"hw-t",children:S("deploy.env.title")})}),(0,n.jsxs)("button",{className:"btn-ghost",disabled:!!R,onClick:ei,children:[(0,n.jsx)(r.I,{name:"refresh",size:12})," ",S("deploy.env.validate")]})]}),eo?(0,n.jsx)("div",{className:"home-empty",children:S("deploy.env.noProject")}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"pd-env-grid",children:[(0,n.jsx)("span",{className:"pd-env-k",children:S("deploy.env.runtime")}),(0,n.jsx)("span",{className:"pd-env-v",children:_.runtime}),_.framework&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"pd-env-k",children:S("deploy.env.framework")}),(0,n.jsx)("span",{className:"pd-env-v",children:_.framework})]}),_.packageManager&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"pd-env-k",children:S("deploy.env.pm")}),(0,n.jsx)("span",{className:"pd-env-v",children:_.packageManager})]}),(0,n.jsx)("span",{className:"pd-env-k",children:S("deploy.env.database")}),(0,n.jsx)("span",{className:"pd-env-v",children:"none"===_.database?S("deploy.env.none"):S("deploy.db."+_.database)}),_.ports.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"pd-env-k",children:S("deploy.env.ports")}),(0,n.jsx)("span",{className:"pd-env-v",children:_.ports.join(", ")})]}),(0,n.jsx)("span",{className:"pd-env-k",children:S("deploy.env.docker")}),(0,n.jsx)("span",{className:"pd-env-v",children:_.hasDockerfile||_.hasCompose?S("deploy.env.yes"):S("deploy.env.no")}),(0,n.jsx)("span",{className:"pd-env-k",children:S("deploy.env.build")}),(0,n.jsx)("span",{className:"pd-env-v mono",children:_.buildScript||"—"}),(0,n.jsx)("span",{className:"pd-env-k",children:S("deploy.env.start")}),(0,n.jsx)("span",{className:"pd-env-v mono",children:_.startScript||"—"}),(0,n.jsx)("span",{className:"pd-env-k",children:S("deploy.env.mode")}),(0,n.jsx)("span",{className:"pd-env-v",children:_.mode})]}),(0,n.jsxs)("div",{className:"pd-env-vars",style:{marginTop:"auto"},children:[(0,n.jsx)("div",{className:"pa-flabel",children:S("deploy.env.requiredVars")}),0===_.requiredEnv.length&&0===_.unsetEnvKeys.length&&(0,n.jsx)("div",{className:"hw-s",children:"—"}),_.requiredEnv.map(e=>(0,n.jsx)("span",{className:"pd-var",children:e.key},e.key)),_.unsetEnvKeys.map(e=>(0,n.jsx)("span",{className:"pd-var warn",title:S("deploy.env.unset"),children:e},e))]})]})]})]})]}),(0,n.jsxs)("div",{className:"hw-card",children:[(0,n.jsxs)("div",{className:"hw-head",children:[(0,n.jsx)("span",{className:"hw-ic",children:(0,n.jsx)(r.I,{name:"files",size:18})}),(0,n.jsx)("div",{style:{flex:1},children:(0,n.jsx)("div",{className:"hw-t",children:S("deploy.pkg.title")})}),(0,n.jsx)("button",{className:"btn-ghost",disabled:!!R,onClick:el,children:"scan"===R?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"sync-spin",children:(0,n.jsx)(r.I,{name:"refresh",size:12})})," ",S("deploy.pkg.loading")]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.I,{name:"files",size:13})," ",S("deploy.pkg.review")]})})]}),null===D?(0,n.jsxs)("div",{className:"home-empty",children:[S("deploy.pkg.review"),"."]}):0===D.includedCount?(0,n.jsx)("div",{className:"home-empty",children:S("deploy.pkg.empty")}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"pd-pkg-meta",children:[(0,n.jsxs)("span",{children:[(0,n.jsx)("b",{children:D.includedCount})," ",S("deploy.pkg.included")]}),(0,n.jsxs)("span",{children:[(0,n.jsx)("b",{children:D.ignoredCount})," ",S("deploy.pkg.ignored")]}),(0,n.jsxs)("span",{children:[(0,n.jsx)("b",{children:w(D.totalBytes)})," ",S("deploy.pkg.size")]}),(0,n.jsxs)("span",{children:[S("deploy.pkg.buildOutput"),": ",(0,n.jsx)("b",{style:{color:D.hasBuild?"var(--sx-string)":"var(--text-dim)"},children:D.hasBuild?S("deploy.pkg.present"):S("deploy.pkg.absent")})]})]}),(0,n.jsx)("div",{className:"folder-grid",style:{marginTop:10},children:D.tree.map(e=>(0,n.jsxs)("div",{className:"folder-item",children:[(0,n.jsx)(r.I,{name:"dir"===e.kind?"files":"doc",size:15}),(0,n.jsx)("span",{className:"fi-name",children:e.name}),(0,n.jsx)("span",{className:"hw-s",style:{marginLeft:"auto"},children:"dir"===e.kind?`${e.childCount} ${S("deploy.pkg.files")}`:w(e.size??0)})]},e.name))}),D.docs.length>0&&(0,n.jsxs)("div",{className:"pd-pkg-docs",children:[S("deploy.pkg.docs"),": ",D.docs.map(e=>(0,n.jsx)("span",{className:"pd-var",children:e},e))]})]})]}),(0,n.jsxs)("div",{className:"hw-card",id:"pd-export",children:[(0,n.jsxs)("div",{className:"hw-head",children:[(0,n.jsx)("span",{className:"hw-ic",children:(0,n.jsx)(r.I,{name:"goto",size:18})}),(0,n.jsxs)("div",{style:{flex:1},children:[(0,n.jsx)("div",{className:"hw-t",children:S("deploy.exp.title")}),(0,n.jsx)("div",{className:"hw-s",children:S("deploy.exp.sub")})]})]}),(0,n.jsxs)("div",{className:"form-hint",style:{marginBottom:10},children:[(0,n.jsx)(r.I,{name:"shield",size:12})," ",S("deploy.exp.diff")]}),ed&&(0,n.jsxs)("div",{className:"pd-gate",style:{marginBottom:10},children:[(0,n.jsx)(r.I,{name:"shield",size:14})," ",S("deploy.exp.gate")]}),s.length>0&&(0,n.jsxs)("div",{className:"seg",style:{marginBottom:10},children:[(0,n.jsx)("button",{className:"seg-opt"+(A?"":" on"),onClick:()=>O(!1),children:S("deploy.exp.connected")}),(0,n.jsx)("button",{className:"seg-opt"+(A?" on":""),onClick:()=>O(!0),children:S("deploy.exp.token")})]}),!A&&s.length>0?(0,n.jsxs)("div",{style:{marginBottom:8},children:[(0,n.jsx)("div",{className:"pa-flabel",style:{marginBottom:4},children:S("deploy.exp.target")}),(0,n.jsx)(c.m,{value:K,options:s.map(e=>({value:e.full,label:e.full,tag:e.private?S("deploy.exp.private"):S("deploy.exp.public")})),onChange:e=>{V(e),Q(s.find(s=>s.full===e)?.branch??"main")}})]}):(0,n.jsxs)("div",{style:{display:"grid",gap:8,marginBottom:8},children:[(0,n.jsx)("input",{className:"form-input mono",type:"password",placeholder:S("deploy.exp.tokenPh"),value:T,onChange:e=>G(e.target.value)}),(0,n.jsx)("input",{className:"form-input mono",placeholder:S("deploy.exp.repoPh"),value:W,onChange:e=>H(e.target.value)})]}),(0,n.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,n.jsx)("input",{className:"form-input mono",style:{maxWidth:160},placeholder:S("deploy.exp.branch"),value:J,onChange:e=>Q(e.target.value)}),(0,n.jsx)("button",{className:"btn-accent",disabled:"export"===R||ed||ep,onClick:function(){E("export"),Y(null);let e=(s.length&&!A?K:W).trim();C(async()=>{let s=await v({repo:e,token:A&&T.trim()||void 0,branch:J.trim()||"main"});Y(s),s.blocked&&s.secrets&&P(e=>e?{...e,secrets:s.secrets,blocked:!0}:e),E("")})},children:"export"===R?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"sync-spin",children:(0,n.jsx)(r.I,{name:"refresh",size:13})})," ",S("deploy.exp.exporting")]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.I,{name:"arrowUp",size:13})," ",S("deploy.exp.title")]})})]}),X&&(0,n.jsx)("div",{className:"pd-result",style:{marginTop:12},children:X.ok?(0,n.jsxs)("div",{style:{fontSize:12.5,color:"var(--sx-string)"},children:[(0,n.jsx)(r.I,{name:"check",size:13})," ",S("deploy.exp.pushedPrefix")," ",X.copied," ",S("deploy.exp.pushedSuffix")," \xb7 ",X.sha]}):X.blocked?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{style:{fontSize:12.5,color:"#e8688f",marginBottom:6},children:[(0,n.jsx)(r.I,{name:"shield",size:13})," ",X.error]}),(0,n.jsx)("div",{className:"srv-log scroll",style:{maxHeight:140},children:(X.secrets??[]).map((e,s)=>(0,n.jsxs)("div",{className:"lg-warn",children:[e.file,":",e.line," \xb7 ",e.kind]},s))}),(0,n.jsx)("div",{className:"form-hint",style:{marginTop:6},children:S("deploy.exp.blockedNote")})]}):(0,n.jsx)("div",{style:{fontSize:12.5,color:"#e8688f"},children:X.error})})]})]})}},3107:(e,s,a)=>{"use strict";a.d(s,{k:()=>l});var n=a(7797);let l=(0,n.createServerReference)("600adfc269778741217c31377d7e0b633650bc2ec9",n.callServer,void 0,n.findSourceMapURL,"getEvents")},4906:(e,s,a)=>{"use strict";a.d(s,{AgentRunLive:()=>o});var n=a(4275),l=a(2899),i=a(6295),t=a(888),r=a(3107),c=a(869);let d=["read","create","edit","run","search","thinking","done","error"];function o({channel:e,resume:s=!1,sinceSeq:a=0,onFinish:p}){let h=(0,c.k)(),m=(0,i.useRouter)(),[x,u]=(0,l.useState)(s),[v,g]=(0,l.useState)([]),[j,f]=(0,l.useState)(0),b=(0,l.useRef)(s?a:0),y=(0,l.useRef)(!1),k=(0,l.useRef)(0);if((0,l.useEffect)(()=>{s&&(b.current=a,y.current=!1,k.current=a>0?a:Date.now(),g([]),f(Math.max(0,Math.floor((Date.now()-k.current)/1e3))),u(!0))},[s,a]),(0,l.useEffect)(()=>{function s(s){let a=s.detail;a?.channel===e&&(b.current=Date.now()-1,y.current=!1,k.current=Date.now(),g([]),f(0),u(!0))}return window.addEventListener("constella:agent-run",s),()=>window.removeEventListener("constella:agent-run",s)},[e]),(0,l.useEffect)(()=>{if(!x)return;k.current||(k.current=Date.now());let e=setInterval(()=>f(Math.floor((Date.now()-k.current)/1e3)),1e3);return()=>clearInterval(e)},[x]),(0,l.useEffect)(()=>{if(!x)return;let s=!0,a=Date.now();async function n(){let n=await (0,r.k)(e,b.current);s&&(n.length&&(b.current=Math.max(b.current,...n.map(e=>e.seq)),g(e=>{let s=new Set(e.map(e=>e.id));return[...e,...n.filter(e=>!s.has(e.id))]}),n.some(e=>"done"===e.kind||"error"===e.kind)&&(y.current||(y.current=!0,m.refresh(),p?.()),setTimeout(()=>{s&&u(!1)},2500))),Date.now()-a>96e4&&u(!1))}n();let l=setInterval(n,700);return()=>{s=!1,clearInterval(l)}},[x,e,m,p]),!x&&0===v.length)return null;let N=function(e){let s=[];for(let a of e)if("text"===a.kind){let e=(a.detail||"").replace(/\s+/g," ").trim();if(!e)continue;let n=s[s.length-1];n&&"text"===n.kind?n.content=(n.content+" "+e).slice(-600):s.push({id:a.id,kind:"text",content:e})}else if("thinking"===a.kind){let e=(a.detail||a.target||"").replace(/\s+/g," ").trim();e&&s.push({id:a.id,kind:"thinking",content:e})}else s.push({id:a.id,kind:a.kind,content:function(e){if(!e)return"";let s=e.split(/[\\/]/);return s.length>1?s.slice(-2).join("/"):e}(a.target)||a.detail||""});return s}(v),w=N.slice(-5),I=N.length-w.length,z=v.some(e=>"done"===e.kind||"error"===e.kind),S=v.some(e=>"error"===e.kind),C=String(Math.floor(j/60)).padStart(2,"0"),R=String(j%60).padStart(2,"0");return(0,n.jsxs)("div",{className:"card live-stream",style:{marginBottom:16,borderColor:S?"var(--sx-keyword)":"var(--accent)"},children:[(0,n.jsxs)("div",{className:"set-desc",style:{marginBottom:8,display:"flex",alignItems:"center",gap:7},children:[x&&!z?(0,n.jsx)("span",{className:"dotpulse"}):(0,n.jsx)(t.I,{name:S?"close":"check",size:13,style:{color:S?"var(--sx-keyword)":"var(--sx-string)"}}),x&&!z?h("agent.run.working"):S?h("agent.run.failed"):h("agent.run.finished"),N.length>0&&(0,n.jsxs)("span",{style:{color:"var(--text-faint)"},children:["\xb7 ",h(1===N.length?"agent.run.steps.one":"agent.run.steps.other",{n:N.length})]}),(0,n.jsxs)("span",{className:"live-elapsed",style:{marginLeft:"auto"},children:[C,":",R]})]}),0===w.length?(0,n.jsxs)("div",{className:"muted",style:{fontSize:12,display:"flex",alignItems:"center",gap:7},children:[(0,n.jsx)("span",{className:"sync-spin",children:(0,n.jsx)(t.I,{name:"refresh",size:12})})," ",h("agent.run.reading")]}):(0,n.jsxs)(n.Fragment,{children:[I>0&&(0,n.jsx)("div",{className:"live-more",children:h(1===I?"agent.run.earlier.one":"agent.run.earlier.other",{n:I})}),(0,n.jsx)("div",{className:"live-stream-lines",children:w.map(e=>(0,n.jsxs)("div",{className:"live-line "+e.kind,children:["text"!==e.kind&&(0,n.jsx)("span",{className:"ll-k",children:d.includes(e.kind)?h(`agent.verb.${e.kind}`):e.kind}),(0,n.jsxs)("span",{className:"ll-c",children:[e.content,!z&&e===w[w.length-1]&&"text"===e.kind&&(0,n.jsx)("span",{className:"ll-caret"})]})]},e.id))})]})]})}},4952:(e,s,a)=>{"use strict";a.d(s,{m:()=>c});var n=a(4275),l=a(2899),i=a(888),t=a(9156),r=a(869);function c({value:e,options:s,onChange:a,placeholder:d,mono:o,glyph:p,disabled:h,searchable:m}){let x=(0,r.k)(),[u,v]=(0,l.useState)(!1),[g,j]=(0,l.useState)(""),f=(0,l.useRef)(null),b=(0,l.useRef)(null),y=(0,l.useMemo)(()=>(s||[]).map(e=>"string"==typeof e?{value:e,label:e}:e),[s]),k=y.find(s=>s.value===e),N=(m??y.length>8)&&!h,w=g.trim().toLowerCase(),I=N&&w?y.filter(e=>(e.label+" "+e.value+" "+(e.sub||"")).toLowerCase().includes(w)):y;return(0,l.useEffect)(()=>{if(!u)return void j("");function e(e){f.current&&!f.current.contains(e.target)&&v(!1)}function s(e){"Escape"===e.key&&v(!1)}return document.addEventListener("mousedown",e),document.addEventListener("keydown",s),N&&requestAnimationFrame(()=>b.current?.focus()),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",s)}},[u,N]),(0,n.jsxs)("div",{className:"dd"+(u?" open":"")+(h?" disabled":""),ref:f,children:[(0,n.jsxs)("button",{type:"button",className:"dd-btn"+(o?" mono":""),onClick:()=>!h&&v(e=>!e),children:[p&&k&&(0,n.jsx)(t.W,{id:k.glyphId||k.value,size:20}),(0,n.jsx)("span",{className:"dd-val",children:k?k.label:(0,n.jsx)("span",{className:"dd-ph",children:d||x("common.selectEllipsis")})}),(0,n.jsx)(i.I,{name:"chevronDown",size:14})]}),u&&(0,n.jsxs)("div",{className:"dd-menu scroll",children:[N&&(0,n.jsxs)("div",{style:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:6,padding:"6px 8px",margin:"-4px -4px 4px",background:"var(--bg-elev, var(--bg-active))",borderBottom:"1px solid var(--border)"},children:[(0,n.jsx)(i.I,{name:"search",size:13}),(0,n.jsx)("input",{ref:b,value:g,placeholder:x("common.searchEllipsis"),onChange:e=>j(e.target.value),onKeyDown:e=>{"Enter"===e.key&&I[0]?(a(I[0].value),v(!1)):"Escape"===e.key&&g&&(e.stopPropagation(),j(""))},className:o?"mono":void 0,style:{flex:1,minWidth:0,background:"transparent",border:"none",outline:"none",color:"var(--text)",fontSize:12.5,fontFamily:o?"var(--mono-font)":"inherit"}}),g&&(0,n.jsx)("button",{type:"button",title:x("common.clear"),onClick:()=>{j(""),b.current?.focus()},style:{background:"none",border:"none",color:"var(--text-dim)",cursor:"pointer",display:"flex",padding:0},children:(0,n.jsx)(i.I,{name:"close",size:12})})]}),0===y.length&&(0,n.jsx)("div",{className:"dd-empty",children:x("common.noOptions")}),y.length>0&&0===I.length&&(0,n.jsx)("div",{className:"dd-empty",children:x("dropdown.noMatch",{q:g})}),I.map(s=>(0,n.jsxs)("button",{type:"button",className:"dd-opt"+(s.value===e?" on":""),onClick:()=>{a(s.value),v(!1)},children:[p&&(0,n.jsx)(t.W,{id:s.glyphId||s.value,size:22}),(0,n.jsxs)("span",{className:"dd-opt-main",children:[(0,n.jsx)("span",{className:"dd-opt-label"+(o?" mono":""),children:s.label}),s.sub&&(0,n.jsx)("span",{className:"dd-opt-sub",children:s.sub})]}),s.tag&&(0,n.jsx)("span",{className:"dd-opt-tag",children:s.tag}),s.value===e&&(0,n.jsx)(i.I,{name:"check",size:13})]},s.value))]})]})}},7170:(e,s,a)=>{Promise.resolve().then(a.t.bind(a,9746,23)),Promise.resolve().then(a.bind(a,512)),Promise.resolve().then(a.bind(a,6516)),Promise.resolve().then(a.bind(a,8183)),Promise.resolve().then(a.bind(a,4822)),Promise.resolve().then(a.bind(a,5412)),Promise.resolve().then(a.bind(a,2454)),Promise.resolve().then(a.bind(a,9508)),Promise.resolve().then(a.bind(a,3891))},9156:(e,s,a)=>{"use strict";a.d(s,{W:()=>r});var n=a(4275),l=a(2899);let i={anthropic:"anthropic",claude_code:"claude",openai:"openai",codex_cli:"openai",google:"google",google_gemini:"gemini",gemini_cli:"gemini",vertex_ai:"vertexai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere",perplexity:"perplexity",xai_grok:"grok",groq:"groq",ai21:"ai21",nvidia_nim:"nvidia",huggingface:"huggingface",replicate:"replicate",azure_openai:"azure",aws_bedrock:"bedrock",cloudflare:"cloudflare",dashscope:"qwen",zhipu:"zhipu",moonshot:"moonshot",minimax:"minimax",together:"together",openrouter:"openrouter",fireworks:"fireworks",cerebras:"cerebras",ollama:"ollama",ollama_cli:"ollama",lmstudio:"lmstudio",vllm:"vllm",localai:"localai",elevenlabs:"elevenlabs",stability:"stability",jina:"jina",voyage:"voyage"},t={anthropic:["#d97757","An"],openai:["#10a37f","AI"],google_gemini:["#4285f4","G"],google:["#4285f4","G"],mistral:["#fa520f","Mi"],xai_grok:["#1a1a1a","X"],deepseek:["#4d6bfe","DS"],cohere:["#39594d","Co"],ai21:["#e8488a","A2"],perplexity:["#20808d","Px"],groq:["#f55036","Gq"],nvidia_nim:["#76b900","NV"],together:["#0f6fff","To"],fireworks:["#5019c5","Fw"],cerebras:["#f25733","Cb"],huggingface:["#ff9d00","HF"],replicate:["#1a1a1a","Rp"],openrouter:["#6566f1","OR"],litellm:["#00b8a3","LL"],portkey:["#3b5bdb","Pk"],azure_openai:["#0078d4","Az"],aws_bedrock:["#ff9900","Br"],vertex_ai:["#4285f4","Vx"],cloudflare:["#f38020","Cf"],dashscope:["#ff6a00","Qw"],zhipu:["#3859ff","GL"],moonshot:["#16162a","Ki"],minimax:["#e1342c","MM"],ollama:["#0c0c0c","Ol"],llamacpp:["#7a4ddb","Lc"],lmstudio:["#4a5cff","LM"],vllm:["#1668dc","vL"],localai:["#2e7d32","La"],gpt4all:["#5b6cff","G4"],jan:["#1a1a1a","Jn"],claude_code:["#d97757","CC"],codex_cli:["#10a37f","Cx"],gemini_cli:["#4285f4","Gc"],aider:["#14b8a6","Ad"],ollama_cli:["#0c0c0c","Oc"],openclaw:["#e8590c","OC"],hermes_cli:["#6d28d9","Hm"],opencode:["#1a1a1a","Oc"],copilot_cli:["#1f2328","Co"],cursor_cli:["#1a1a1a","Cu"],cline_cli:["#2563eb","Cl"],kilo_code:["#7c3aed","Ki"],voyage:["#5b21b6","Vo"],jina:["#ec4899","Ji"],stability:["#a855f7","St"],elevenlabs:["#1a1a1a","El"]};function r({id:e,size:s=34,radius:a}){let c,d=t[e],o=d?d[0]:"#5b6378",p=d?d[1]:(e||"?").slice(0,2).replace(/[^a-z0-9]/gi,"").toUpperCase(),h=(c=i[e])?`https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg/icons/${c}.svg`:null,[m,x]=(0,l.useState)(!1),u=null!=a?a:Math.round(.28*s),v=h&&!m,g=Math.round(.66*s);return(0,n.jsx)("span",{className:"prov-glyph",style:{width:s,height:s,flex:"0 0 "+s+"px",borderRadius:u,background:v?"#fff":"linear-gradient(150deg, "+o+", color-mix(in srgb, "+o+" 70%, #000))",color:"#fff",display:"grid",placeItems:"center",overflow:"hidden",fontSize:Math.round(.4*s),fontWeight:800,letterSpacing:"-.5px",boxShadow:v?"inset 0 0 0 1px rgba(0,0,0,.08)":"inset 0 1px 0 rgba(255,255,255,.18)"},children:v?(0,n.jsx)("img",{src:h,alt:"",width:g,height:g,loading:"lazy",onError:()=>x(!0),style:{width:g,height:g,objectFit:"contain",display:"block"}}):p})}}},e=>{e.O(0,[928,171,6871,7218,2235,7066,7358],()=>e(e.s=7170)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[101],{782:(e,s,a)=>{"use strict";a.d(s,{K:()=>r});var i=a(7797);let r=(0,i.createServerReference)("0083f7ee1dc6ce9ec6bd0c12b600eb53328ba0fb2e",i.callServer,void 0,i.findSourceMapURL,"disconnectTelegram")},1881:(e,s,a)=>{"use strict";a.d(s,{Profile:()=>R,ProfileSaveButton:()=>L});var i=a(4275),r=a(2899),n=a(6295),l=a(3703),t=a(2943),c=a(888),o=a(3758),d=a(5412),m=a(869),h=a(7797);let p=(0,h.createServerReference)("405daeb99ac0dc584448e0a82ebd446353e1df4370",h.callServer,void 0,h.findSourceMapURL,"updateProfile"),u=(0,h.createServerReference)("408e36e5fc942856e7846646e50a0ffb880040d1ac",h.callServer,void 0,h.findSourceMapURL,"removePasskey"),f=(0,h.createServerReference)("00fc098e676b165a642943c5e06fcd724ef5a74ff6",h.callServer,void 0,h.findSourceMapURL,"revokeOtherSessionsAction"),x=(0,h.createServerReference)("000841b225cd318c6b6e1b74681a04446c2fc49827",h.callServer,void 0,h.findSourceMapURL,"deleteAccountAction"),v=(0,h.createServerReference)("60099e58904f04f5679bb3adca0aceb7ca2a23755e",h.callServer,void 0,h.findSourceMapURL,"createPAT"),j=(0,h.createServerReference)("408acc42ba98211dcb2ed5698525048120214a2795",h.callServer,void 0,h.findSourceMapURL,"revokePAT"),g=(0,h.createServerReference)("405c8b7e8f39ec0ca9ccff67449314122e269c4ee2",h.callServer,void 0,h.findSourceMapURL,"unlinkSocial");var b=a(782),N=a(9314);let k=(0,h.createServerReference)("60cd05b6970937c9be25ff9559aad958cda9108eee",h.callServer,void 0,h.findSourceMapURL,"setNotifPref"),y=(0,h.createServerReference)("40b7b0aafd77ebee4bf58f8a190c6e1aa4f872b27f",h.callServer,void 0,h.findSourceMapURL,"setMotionPref"),w=(0,h.createServerReference)("40f51ff321012914f13823c293c8e24340007774ea",h.callServer,void 0,h.findSourceMapURL,"revokeSessionAction"),S="constella:profile-save",C=[{id:"account",icon:"account"},{id:"security",icon:"shield"},{id:"connections",icon:"git"},{id:"notifications",icon:"bell"},{id:"sessions",icon:"cpu"}];function R(e){let s=(0,m.k)(),[a,n]=(0,r.useState)("account");return(0,i.jsxs)("div",{className:"settings",children:[(0,i.jsx)("div",{className:"settings-nav",children:C.map(e=>(0,i.jsxs)("button",{className:"sn-item"+(a===e.id?" on":""),onClick:()=>n(e.id),children:[(0,i.jsx)(c.I,{name:e.icon,size:15})," ",s(`profile.tab.${e.id}`)]},e.id))}),(0,i.jsxs)("div",{className:"settings-panel",children:["account"===a&&(0,i.jsx)(P,{account:e.account}),"security"===a&&(0,i.jsx)(U,{account:e.account,passkeys:e.passkeys}),"tokens"===a&&(0,i.jsx)(z,{tokens:e.tokens}),"connections"===a&&(0,i.jsx)(I,{connections:e.connections}),"notifications"===a&&(0,i.jsx)(T,{prefs:e.prefs}),"sessions"===a&&(0,i.jsx)(E,{sessions:e.sessions})]})]})}function L(){let e=(0,m.k)(),[s,a]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{function e(){a(!0),setTimeout(()=>a(!1),1600)}return window.addEventListener(S+":done",e),()=>window.removeEventListener(S+":done",e)},[]),s)?(0,i.jsxs)("span",{className:"oauth-ok",style:{padding:"6px 11px"},children:[(0,i.jsx)(c.I,{name:"check",size:13})," ",e("common.saved")]}):(0,i.jsxs)("button",{className:"btn-accent",onClick:()=>window.dispatchEvent(new CustomEvent(S)),children:[(0,i.jsx)(c.I,{name:"check",size:14})," ",e("profile.saveChanges")]})}function P({account:e}){let s=(0,m.k)(),[a,n]=(0,r.useState)(e.name),[l,t]=(0,r.useState)(e.addressAs),[c,h]=(0,r.useState)(e.lang),[u,f]=(0,r.useState)(e.tz),[,x]=(0,r.useTransition)();(0,r.useEffect)(()=>{function e(){x(async()=>{await p({name:a,addressAs:l,lang:c,tz:u}),window.dispatchEvent(new CustomEvent(S+":done"))})}return window.addEventListener(S,e),()=>window.removeEventListener(S,e)},[a,l,c,u,x]);let[v,j]=(0,r.useState)(e.image??null);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"set-card",children:(0,i.jsxs)("div",{className:"set-row",style:{paddingTop:0},children:[(0,i.jsx)(o.n,{name:a||s("profile.operatorFallback"),color:"#9a5cff",image:v,size:64,onChange:e=>{j(e),x(()=>p({image:e}))}}),(0,i.jsxs)("div",{className:"sr-main",children:[(0,i.jsx)("div",{className:"sr-title",style:{fontSize:16,fontWeight:700},children:a}),(0,i.jsxs)("div",{className:"sr-sub",children:[e.email," \xb7 ",s("profile.role.owner")]})]})]})}),(0,i.jsxs)("div",{className:"set-card",children:[(0,i.jsx)("h4",{children:s("profile.account.title")}),(0,i.jsx)("div",{className:"set-desc",children:s("profile.account.desc")}),(0,i.jsxs)("div",{className:"set-grid",children:[(0,i.jsxs)("div",{className:"form-field",children:[(0,i.jsx)("label",{className:"form-label",children:s("common.name")}),(0,i.jsx)("input",{className:"form-input",value:a,onChange:e=>n(e.target.value)})]}),(0,i.jsxs)("div",{className:"form-field",children:[(0,i.jsx)("label",{className:"form-label",children:s("profile.field.email")}),(0,i.jsx)("input",{className:"form-input",value:e.email,readOnly:!0})]})]})]}),(0,i.jsxs)("div",{className:"set-card",children:[(0,i.jsx)("h4",{children:s("profile.operatorContext.title")}),(0,i.jsx)("div",{className:"set-desc",children:s("profile.operatorContext.desc")}),(0,i.jsxs)("div",{className:"set-grid",children:[(0,i.jsxs)("div",{className:"form-field",children:[(0,i.jsx)("label",{className:"form-label",children:s("profile.field.addressAs")}),(0,i.jsx)("input",{className:"form-input",value:l,onChange:e=>t(e.target.value)})]}),(0,i.jsxs)("div",{className:"form-field",children:[(0,i.jsx)("label",{className:"form-label",children:s("profile.field.agentLanguage")}),(0,i.jsxs)("select",{className:"form-input",value:c,onChange:e=>h(e.target.value),children:[(0,i.jsx)("option",{children:"English (US)"}),(0,i.jsx)("option",{children:"Portugu\xeas (BR)"}),(0,i.jsx)("option",{children:"Espa\xf1ol"})]})]}),(0,i.jsxs)("div",{className:"form-field",children:[(0,i.jsx)("label",{className:"form-label",children:s("profile.field.interfaceLanguage")}),(0,i.jsx)("div",{style:{paddingTop:4},children:(0,i.jsx)(d.LangSwitch,{})})]}),(0,i.jsxs)("div",{className:"form-field",children:[(0,i.jsx)("label",{className:"form-label",children:s("profile.field.timezone")}),(0,i.jsxs)("select",{className:"form-input",value:u,onChange:e=>f(e.target.value),children:[(0,i.jsx)("option",{children:"UTC"}),(0,i.jsx)("option",{children:"America/Sao_Paulo"}),(0,i.jsx)("option",{children:"America/New_York"}),(0,i.jsx)("option",{children:"Europe/Lisbon"})]})]})]})]})]})}function U({passkeys:e}){let s=(0,m.k)(),a=(0,n.useRouter)(),[o,d]=(0,r.useState)(""),[h,p]=(0,r.useState)(""),[v,j]=(0,r.useState)(""),[g,b]=(0,r.useState)(!1),[N,k]=(0,r.useTransition)(),y=e.length>0;async function w(){b(!0),j("");let e=await t.yK.changePassword({currentPassword:o,newPassword:h,revokeOtherSessions:!0});b(!1),j(e.error?e.error.message??s("profile.msg.failed"):s("profile.msg.passwordUpdated")),e.error||(d(""),p(""))}async function S(){j("");try{let e=await fetch("/api/passkey/register/options",{method:"POST"}).then(e=>e.json());if(e.error)return void j(e.error);let s=await (0,l.Ct)({optionsJSON:e}),i=await fetch("/api/passkey/register/verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({response:s,name:"Passkey"})}).then(e=>e.json());if(i.error)return void j(i.error);a.refresh()}catch(e){j(e instanceof Error?e.message:s("profile.msg.passkeyCancelled"))}}return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"set-card",children:[(0,i.jsx)("h4",{children:s("profile.password.title")}),(0,i.jsx)("div",{className:"set-desc",children:s("profile.password.desc")}),(0,i.jsxs)("div",{className:"set-grid",children:[(0,i.jsxs)("div",{className:"form-field",children:[(0,i.jsx)("label",{className:"form-label",children:s("profile.field.currentPassword")}),(0,i.jsx)("input",{className:"form-input",type:"password",placeholder:"••••••••",value:o,onChange:e=>d(e.target.value)})]}),(0,i.jsxs)("div",{className:"form-field",children:[(0,i.jsx)("label",{className:"form-label",children:s("profile.field.newPassword")}),(0,i.jsx)("input",{className:"form-input",type:"password",placeholder:"••••••••",value:h,onChange:e=>p(e.target.value)})]})]}),(0,i.jsxs)("button",{className:"btn-ghost",style:{marginTop:12},disabled:g||o.length<8||h.length<8,onClick:w,children:[(0,i.jsx)(c.I,{name:"shield",size:13})," ",s("profile.password.update")]}),v&&(0,i.jsx)("div",{className:"sr-sub",style:{marginTop:8},children:v})]}),(0,i.jsxs)("div",{className:"set-card",children:[(0,i.jsx)("h4",{children:s("profile.auth.title")}),(0,i.jsx)("div",{className:"set-desc",children:s("profile.auth.desc")}),(0,i.jsxs)("div",{className:"set-row",children:[(0,i.jsx)("div",{className:"brand-ico",children:(0,i.jsx)(c.I,{name:"account",size:15})}),(0,i.jsxs)("div",{className:"sr-main",children:[(0,i.jsxs)("div",{className:"sr-title",children:[s("profile.passkey.label")," ",y&&(0,i.jsx)("span",{className:"pill",style:{background:"var(--sx-string)22",color:"var(--sx-string)"},children:e.length})]}),(0,i.jsx)("div",{className:"sr-sub",children:s("profile.passkey.desc")})]}),(0,i.jsxs)("button",{className:"btn-ghost",onClick:S,children:[(0,i.jsx)(c.I,{name:"add",size:13})," ",s("profile.passkey.add")]})]}),e.map(e=>(0,i.jsxs)("div",{className:"set-row",children:[(0,i.jsx)("div",{className:"brand-ico",children:(0,i.jsx)(c.I,{name:"shield",size:15})}),(0,i.jsxs)("div",{className:"sr-main",children:[(0,i.jsxs)("div",{className:"sr-title",children:[e.name," ",e.backedUp&&(0,i.jsx)("span",{className:"pill",style:{background:"var(--sx-string)22",color:"var(--sx-string)"},children:s("profile.passkey.synced")})]}),(0,i.jsx)("div",{className:"sr-sub",children:s("profile.passkey.added",{date:new Date(1e3*e.createdAt).toLocaleDateString()})})]}),(0,i.jsx)("button",{className:"link-btn",style:{color:"var(--sx-keyword)"},disabled:N,onClick:()=>k(()=>u(e.id)),children:s("common.remove")})]},e.id)),!y&&(0,i.jsx)("div",{className:"set-row",children:(0,i.jsx)("div",{className:"sr-main",children:(0,i.jsx)("div",{className:"sr-sub",style:{color:"var(--text-faint)"},children:s("profile.passkey.none")})})}),(0,i.jsxs)("div",{className:"set-row",children:[(0,i.jsx)("div",{className:"brand-ico",children:(0,i.jsx)(c.I,{name:"account",size:15})}),(0,i.jsxs)("div",{className:"sr-main",children:[(0,i.jsx)("div",{className:"sr-title",children:s("profile.biometrics.label")}),(0,i.jsx)("div",{className:"sr-sub",children:s("profile.biometrics.desc")})]}),(0,i.jsx)("div",{className:"toggle"+(y?" on":""),style:{opacity:.5,cursor:"default"}})]}),v&&(0,i.jsx)("div",{className:"sr-sub",style:{marginTop:8},children:v})]}),(0,i.jsxs)("div",{className:"set-card danger-card",children:[(0,i.jsx)("h4",{style:{color:"var(--sx-keyword)"},children:s("profile.danger.title")}),(0,i.jsx)("div",{className:"set-desc",children:s("profile.danger.desc")}),(0,i.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,i.jsxs)("button",{className:"btn-danger",disabled:N,onClick:()=>k(()=>f()),children:[(0,i.jsx)(c.I,{name:"close",size:13})," ",s("profile.danger.signOutOthers")]}),(0,i.jsxs)("button",{className:"btn-danger",disabled:N,onClick:()=>{confirm(s("profile.danger.deleteConfirm"))&&k(()=>x())},children:[(0,i.jsx)(c.I,{name:"trash",size:13})," ",s("profile.danger.deleteAccount")]})]})]})]})}function z({tokens:e}){let s=(0,m.k)(),[a,n]=(0,r.useState)(""),[l,t]=(0,r.useState)("read"),[o,d]=(0,r.useState)(null),[h,p]=(0,r.useTransition)();return(0,i.jsxs)("div",{className:"set-card",children:[(0,i.jsx)("div",{style:{display:"flex",alignItems:"center",marginBottom:12},children:(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{style:{marginBottom:2},children:s("profile.tokens.title")}),(0,i.jsx)("div",{className:"set-desc",style:{margin:0},children:s("profile.tokens.desc")})]})}),(0,i.jsxs)("div",{style:{display:"flex",gap:8,marginBottom:12},children:[(0,i.jsx)("input",{className:"form-input",placeholder:s("profile.tokens.namePlaceholder"),value:a,onChange:e=>n(e.target.value)}),(0,i.jsxs)("select",{className:"form-input",value:l,onChange:e=>t(e.target.value),style:{maxWidth:160},children:[(0,i.jsx)("option",{value:"read",children:"read"}),(0,i.jsx)("option",{value:"repo, deploy",children:"repo, deploy"}),(0,i.jsx)("option",{value:"full",children:"full"})]}),(0,i.jsxs)("button",{className:"btn-accent",disabled:h,onClick:function(){p(async()=>{d((await v(a||"New token",l)).token),n("")})},children:[(0,i.jsx)(c.I,{name:"add",size:13})," ",s("profile.tokens.generate")]})]}),o&&(0,i.jsxs)("div",{className:"set-card",style:{background:"var(--bg-app)",marginBottom:12},children:[(0,i.jsx)("div",{className:"set-desc",style:{margin:0},children:s("profile.tokens.copyNow")}),(0,i.jsx)("span",{className:"token-pill",style:{display:"block",padding:8,marginTop:6,wordBreak:"break-all"},children:o})]}),e.map(e=>(0,i.jsxs)("div",{className:"set-row",children:[(0,i.jsx)("div",{className:"brand-ico",children:(0,i.jsx)(c.I,{name:"skill",size:15})}),(0,i.jsxs)("div",{className:"sr-main",children:[(0,i.jsx)("div",{className:"sr-title",children:e.name}),(0,i.jsxs)("div",{className:"sr-sub",children:[s("profile.tokens.scope",{scope:e.scope}),e.lastUsed?` \xb7 ${s("profile.tokens.used",{date:new Date(1e3*e.lastUsed).toLocaleDateString()})}`:` \xb7 ${s("profile.tokens.neverUsed")}`]})]}),(0,i.jsxs)("span",{className:"token-pill",children:[e.prefix,"••••"]}),(0,i.jsx)(M,{id:e.id})]},e.id)),0===e.length&&(0,i.jsx)("div",{style:{color:"var(--text-faint)",fontSize:12.5,padding:"8px 0"},children:s("profile.tokens.none")})]})}function M({id:e}){let s=(0,m.k)(),[a,n]=(0,r.useTransition)();return(0,i.jsx)("button",{className:"link-btn",style:{color:"var(--sx-keyword)"},disabled:a,onClick:()=>n(()=>j(e)),children:s("common.revoke")})}function I({connections:e}){let s=(0,m.k)(),a=(0,n.useRouter)(),[l,o]=(0,r.useState)(!1),[d,h]=(0,r.useState)(""),[p,u]=(0,r.useState)(""),[f,x]=(0,r.useState)(""),[v,j]=(0,r.useState)(""),[k,y]=(0,r.useTransition)();async function w(e){await t.yK.linkSocial({provider:e,callbackURL:"/profile"})}return(0,i.jsxs)("div",{className:"set-card",children:[(0,i.jsx)("h4",{children:s("profile.connections.title")}),(0,i.jsx)("div",{className:"set-desc",children:s("profile.connections.desc")}),[{k:"github",name:"GitHub",glyph:"git"},{k:"google",name:"Google",glyph:"account"}].map(a=>{let r=e.providers.includes(a.k),n=e.linked.includes(a.k);return(0,i.jsxs)("div",{className:"set-row",children:[(0,i.jsx)("div",{className:"brand-ico",children:(0,i.jsx)(c.I,{name:a.glyph,size:15})}),(0,i.jsxs)("div",{className:"sr-main",children:[(0,i.jsx)("div",{className:"sr-title",children:a.name}),(0,i.jsx)("div",{className:"sr-sub",children:s(`profile.provider.${a.k}.sub`)})]}),r?n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"oauth-ok",style:{padding:"4px 9px",fontSize:11.5},children:[(0,i.jsx)(c.I,{name:"check",size:12})," ",s("common.connected")]}),(0,i.jsx)("button",{className:"link-btn",style:{color:"var(--sx-keyword)"},disabled:k,onClick:()=>y(()=>g(a.k)),children:s("common.disconnect")})]}):(0,i.jsx)("button",{className:"btn-ghost",onClick:()=>w(a.k),children:s("common.connect")}):(0,i.jsx)("span",{className:"sr-sub",style:{color:"var(--text-faint)"},children:s("profile.connections.configureCredentials")})]},a.k)}),(0,i.jsxs)("div",{className:"set-row",children:[(0,i.jsx)("div",{className:"brand-ico",children:(0,i.jsx)(c.I,{name:"bell",size:15})}),(0,i.jsxs)("div",{className:"sr-main",children:[(0,i.jsx)("div",{className:"sr-title",children:s("profile.telegram.title")}),(0,i.jsx)("div",{className:"sr-sub",children:s("profile.telegram.desc")})]}),e.telegram?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"oauth-ok",style:{padding:"4px 9px",fontSize:11.5},children:[(0,i.jsx)(c.I,{name:"check",size:12})," ",s("common.connected")]}),(0,i.jsx)("button",{className:"link-btn",style:{color:"var(--sx-keyword)"},disabled:k,onClick:()=>y(()=>(0,b.K)()),children:s("common.disconnect")})]}):(0,i.jsx)("button",{className:"btn-ghost",onClick:()=>o(e=>!e),children:s("common.connect")})]}),l&&!e.telegram&&(0,i.jsxs)("div",{className:"set-row",style:{borderBottom:"none",gap:8,flexWrap:"wrap"},children:[(0,i.jsx)("input",{className:"form-input",placeholder:s("profile.telegram.botPlaceholder"),value:d,onChange:e=>h(e.target.value)}),(0,i.jsx)("input",{className:"form-input",placeholder:s("profile.telegram.chatPlaceholder"),value:p,onChange:e=>u(e.target.value),style:{maxWidth:150}}),(0,i.jsx)("input",{className:"form-input",placeholder:s("profile.telegram.namePlaceholder"),value:f,onChange:e=>x(e.target.value),style:{maxWidth:150}}),(0,i.jsx)("button",{className:"btn-accent",disabled:k||!d||!p,onClick:()=>{j(""),y(async()=>{let e=await (0,N.M)(d,p,f);e.ok?(o(!1),h(""),u(""),x(""),a.refresh()):j(e.error??s("profile.msg.failed"))})},children:s("common.save")}),v&&(0,i.jsx)("div",{style:{fontSize:11,color:"#e8688f",width:"100%"},children:v})]})]})}function T({prefs:e}){let s=(0,m.k)(),a=(0,n.useRouter)(),[l,t]=(0,r.useState)(e),[c,o]=(0,r.useTransition)();return(0,i.jsxs)("div",{className:"set-card",children:[(0,i.jsx)("h4",{children:s("profile.notif.title")}),(0,i.jsx)("div",{className:"set-desc",children:s("profile.notif.desc")}),["email","telegram","inapp","weekly"].map(e=>(0,i.jsxs)("div",{className:"set-row",children:[(0,i.jsxs)("div",{className:"sr-main",children:[(0,i.jsx)("div",{className:"sr-title",children:s(`profile.notif.${e}.label`)}),(0,i.jsx)("div",{className:"sr-sub",children:s(`profile.notif.${e}.desc`)})]}),(0,i.jsx)("div",{className:"toggle"+(l[e]?" on":""),onClick:()=>(function(e){if(c)return;let s=!l[e];t(a=>({...a,[e]:s})),o(()=>k(e,s))})(e)})]},e)),(0,i.jsxs)("div",{className:"set-row",children:[(0,i.jsxs)("div",{className:"sr-main",children:[(0,i.jsx)("div",{className:"sr-title",children:s("profile.notif.reducedMotion.label")}),(0,i.jsx)("div",{className:"sr-sub",children:s("profile.notif.reducedMotion.desc")})]}),(0,i.jsx)("div",{className:"toggle"+(l.reducedMotion?" on":""),onClick:function(){if(c)return;let e=!l.reducedMotion;t(s=>({...s,reducedMotion:e})),o(async()=>{await y(e),a.refresh()})}})]})]})}function E({sessions:e}){let s=(0,m.k)(),[a,n]=(0,r.useTransition)();return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"set-card",children:[(0,i.jsx)("h4",{children:s("profile.sessions.title")}),(0,i.jsx)("div",{className:"set-desc",children:s("profile.sessions.desc")}),e.map(e=>(0,i.jsxs)("div",{className:"set-row",children:[(0,i.jsx)("div",{className:"brand-ico",children:(0,i.jsx)(c.I,{name:"cpu",size:15})}),(0,i.jsxs)("div",{className:"sr-main",children:[(0,i.jsxs)("div",{className:"sr-title",children:[e.device.slice(0,60)," ",e.current&&(0,i.jsx)("span",{className:"pill",style:{background:"var(--sx-string)22",color:"var(--sx-string)"},children:s("profile.sessions.current")})]}),(0,i.jsxs)("div",{className:"sr-sub",children:[e.ip||s("profile.sessions.local")," \xb7 ",s("profile.sessions.since",{date:new Date(1e3*e.createdAt).toLocaleDateString()})]})]}),!e.current&&(0,i.jsx)("button",{className:"link-btn",style:{color:"var(--sx-keyword)"},disabled:a,onClick:()=>n(()=>w(e.token)),children:s("profile.sessions.end")})]},e.id)),0===e.length&&(0,i.jsx)("div",{style:{color:"var(--text-faint)",fontSize:12.5,padding:"8px 0"},children:s("profile.sessions.none")})]})})}},2943:(e,s,a)=>{"use strict";a.d(s,{Jv:()=>l,yK:()=>n});var i=a(3571),r=a(4071);let n=(0,i.M)({baseURL:window.location.origin,plugins:[(0,r.N)()]}),{signIn:l,signUp:t,signOut:c,useSession:o,twoFactor:d}=n},3758:(e,s,a)=>{"use strict";a.d(s,{n:()=>c});var i=a(4275),r=a(2899),n=a(5904),l=a(888),t=a(869);function c({name:e,color:s,image:a,size:o=64,onChange:d}){let m=(0,t.k)(),h=(0,r.useRef)(null),[p,u]=(0,r.useState)(!1),[f,x]=(0,r.useState)(""),[,v]=(0,r.useTransition)();async function j(e){if(e){x(""),u(!0);try{let s=await function(e,s=160){return new Promise((a,i)=>{let r=URL.createObjectURL(e),n=new Image;n.onload=()=>{URL.revokeObjectURL(r);let e=Math.min(1,s/Math.max(n.width,n.height)),l=Math.max(1,Math.round(n.width*e)),t=Math.max(1,Math.round(n.height*e)),c=document.createElement("canvas");c.width=l,c.height=t;let o=c.getContext("2d");if(!o)return void i(Error("canvas unavailable"));o.drawImage(n,0,0,l,t);let d=c.toDataURL("image/webp",.85);d.startsWith("data:image/webp")||(d=c.toDataURL("image/jpeg",.85)),d.length>6e5&&(d=c.toDataURL("image/jpeg",.6)),a(d)},n.onerror=()=>{URL.revokeObjectURL(r),i(Error("invalid image"))},n.src=r})}(e);v(()=>d(s))}catch{x(m("chrome.avatar.processError"))}finally{u(!1),h.current&&(h.current.value="")}}}return(0,i.jsxs)("div",{className:"avatar-upload",children:[(0,i.jsx)(n.e,{name:e,color:s,image:a,size:o}),(0,i.jsxs)("div",{className:"avatar-upload-actions",children:[(0,i.jsxs)("button",{className:"btn-ghost",disabled:p,onClick:()=>h.current?.click(),children:[p?(0,i.jsx)("span",{className:"sync-spin",children:(0,i.jsx)(l.I,{name:"refresh",size:12})}):(0,i.jsx)(l.I,{name:"add",size:12})," ",a?m("chrome.avatar.change"):m("chrome.avatar.upload")]}),f&&(0,i.jsx)("span",{style:{fontSize:11,color:"#e8688f"},children:f}),(0,i.jsx)("input",{ref:h,type:"file",accept:".png,.jpg,.jpeg,.gif,.webp",hidden:!0,onChange:e=>j(e.target.files?.[0])})]})]})}},5904:(e,s,a)=>{"use strict";a.d(s,{e:()=>r});var i=a(4275);function r({name:e,color:s,size:a=24,health:n,image:l}){let t=Math.max(6,Math.round(.3*a)),c=Math.round(.28*a),o=l?/^(data:|https?:|\/)/.test(l)?l:`/api/upload?path=${encodeURIComponent(l)}`:null;return(0,i.jsxs)("span",{style:{position:"relative",width:a,height:a,flex:`0 0 ${a}px`,display:"inline-block"},children:[o?(0,i.jsx)("img",{src:o,alt:e,width:a,height:a,style:{width:a,height:a,borderRadius:c,objectFit:"cover",display:"block"}}):(0,i.jsx)("span",{style:{width:a,height:a,borderRadius:c,background:s,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*a),fontWeight:700},children:(e[0]||"?").toUpperCase()}),n&&(0,i.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:t,height:t,borderRadius:"50%",background:"alive"===n?"var(--sx-string)":"stale"===n?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}},9179:(e,s,a)=>{Promise.resolve().then(a.t.bind(a,9746,23)),Promise.resolve().then(a.bind(a,1881)),Promise.resolve().then(a.bind(a,6516)),Promise.resolve().then(a.bind(a,8183)),Promise.resolve().then(a.bind(a,4822)),Promise.resolve().then(a.bind(a,5412)),Promise.resolve().then(a.bind(a,2454)),Promise.resolve().then(a.bind(a,9508)),Promise.resolve().then(a.bind(a,3891))},9314:(e,s,a)=>{"use strict";a.d(s,{M:()=>r});var i=a(7797);let r=(0,i.createServerReference)("70597648c34d00471da008672cbce28984ac84dc26",i.callServer,void 0,i.findSourceMapURL,"connectTelegram")}},e=>{e.O(0,[928,717,3703,171,6871,7218,2235,7066,7358],()=>e(e.s=9179)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5049],{675:(e,s,n)=>{"use strict";n.d(s,{ValidatePanel:()=>o});var a=n(4275),r=n(2899),i=n(888),l=n(869),t=n(7797);let d=(0,t.createServerReference)("4021cb6bc89007b4cecb55d8655c5d8666bc62f977",t.callServer,void 0,t.findSourceMapURL,"validateWorkspace");function o(){let e=(0,l.k)(),[s,n]=(0,r.useTransition)(),[t,o]=(0,r.useState)(null);return(0,a.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[t&&(0,a.jsxs)("span",{className:"pill",style:{background:(t.ok?"var(--sx-string)":"var(--sx-number)")+"22",color:t.ok?"var(--sx-string)":"var(--sx-number)"},children:[t.ok?e("planner.validate.valid"):e("planner.validate.issues",{n:t.issues.length}),t.repaired.length?` \xb7 ${e("planner.validate.repaired",{n:t.repaired.length})}`:""]}),(0,a.jsxs)("button",{className:"btn-ghost",disabled:s,onClick:()=>n(async()=>o(await d())),children:[(0,a.jsx)(i.I,{name:"shield",size:13})," ",e("planner.validate.validate")]}),(0,a.jsxs)("button",{className:"btn-accent",disabled:s,onClick:()=>n(async()=>o(await d({repair:!0}))),children:[(0,a.jsx)(i.I,{name:"refresh",size:13,className:s?"sync-spin":""})," ",e("planner.validate.repair")]})]})}},2770:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,9746,23)),Promise.resolve().then(n.bind(n,675)),Promise.resolve().then(n.bind(n,6516)),Promise.resolve().then(n.bind(n,8183)),Promise.resolve().then(n.bind(n,4822)),Promise.resolve().then(n.bind(n,5412)),Promise.resolve().then(n.bind(n,2454)),Promise.resolve().then(n.bind(n,9508)),Promise.resolve().then(n.bind(n,3891))}},e=>{e.O(0,[928,171,6871,7218,2235,7066,7358],()=>e(e.s=2770)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148,3719],{701:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,9746,23)),Promise.resolve().then(n.bind(n,6516)),Promise.resolve().then(n.bind(n,8183)),Promise.resolve().then(n.bind(n,4822)),Promise.resolve().then(n.bind(n,5412)),Promise.resolve().then(n.bind(n,2454)),Promise.resolve().then(n.bind(n,9508)),Promise.resolve().then(n.bind(n,3891))}},e=>{e.O(0,[928,171,6871,7218,2235,7066,7358],()=>e(e.s=701)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4639],{3012:(e,r,s)=>{Promise.resolve().then(s.t.bind(s,9746,23)),Promise.resolve().then(s.bind(s,8643)),Promise.resolve().then(s.bind(s,6516)),Promise.resolve().then(s.bind(s,8183)),Promise.resolve().then(s.bind(s,4822)),Promise.resolve().then(s.bind(s,5412)),Promise.resolve().then(s.bind(s,2454)),Promise.resolve().then(s.bind(s,9508)),Promise.resolve().then(s.bind(s,3891))},8643:(e,r,s)=>{"use strict";s.d(r,{GenerateReportButton:()=>l});var n=s(4275),t=s(2899),i=s(6295),o=s(888),a=s(7797);let c=(0,a.createServerReference)("002e6c4a794d877b1871cf1cd52ef1161c1edbb865",a.callServer,void 0,a.findSourceMapURL,"generateReport");var d=s(869);function l(){let e=(0,d.k)(),[r,s]=(0,t.useTransition)(),a=(0,i.useRouter)();return(0,n.jsxs)("button",{className:"btn-accent",disabled:r,onClick:()=>s(async()=>{let e=await c();e.ok&&e.id?a.push(`/reports/${e.id}`):a.refresh()}),children:[(0,n.jsx)(o.I,{name:"doc",size:14,className:r?"sync-spin":""})," ",e(r?"reports.generating":"reports.generate")]})}}},e=>{e.O(0,[928,171,6871,7218,2235,7066,7358],()=>e(e.s=3012)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3785],{47:(e,a,n)=>{"use strict";n.d(a,{FixButton:()=>f,RunReviewButton:()=>p,Toggle:()=>m});var i=n(4275),o=n(2899),t=n(7797);let l=(0,t.createServerReference)("60ca963096e5ac21ffbb5c20553b60e07cfc10a082",t.callServer,void 0,t.findSourceMapURL,"toggleRoutine"),s=(0,t.createServerReference)("60f1bd7e98aa5ca0c4700c68d2982ce1f1cfa391c2",t.callServer,void 0,t.findSourceMapURL,"togglePlugin"),r=(0,t.createServerReference)("4044d632fa539e7ed118940bfb3162d1466ea39a3b",t.callServer,void 0,t.findSourceMapURL,"fixFinding"),c=(0,t.createServerReference)("008cb8cd775a0682f7319a9eed86a533ba9df2b5f3",t.callServer,void 0,t.findSourceMapURL,"runReview");var d=n(888),u=n(869);function m({kind:e,id:a,on:n}){let[t,r]=(0,o.useTransition)(),c="routine"===e?l:s;return(0,i.jsx)("div",{className:"toggle"+(n?" on":""),"aria-disabled":t,role:"switch","aria-checked":n,onClick:()=>!t&&r(()=>c(a,!n))})}function f({id:e}){let a=(0,u.k)(),[n,t]=(0,o.useTransition)();return(0,i.jsxs)("button",{className:"sc2-btn",disabled:n,onClick:()=>t(()=>r(e)),children:[(0,i.jsx)(d.I,{name:"bot",size:12})," ",a("security.letAgentFix")]})}function p(){let e=(0,u.k)(),[a,n]=(0,o.useTransition)();return(0,i.jsxs)("button",{className:"btn-accent",disabled:a,onClick:()=>{window.dispatchEvent(new CustomEvent("constella:agent-run",{detail:{channel:"security"}})),n(async()=>{await c()})},children:[(0,i.jsx)(d.I,{name:"refresh",size:14,className:a?"sync-spin":""})," ",e(a?"security.reviewing":"security.runReview")]})}},437:(e,a,n)=>{"use strict";n.d(a,{DeleteRoutineButton:()=>p,NewRoutineButton:()=>f});var i=n(4275),o=n(2899),t=n(6295),l=n(888),s=n(4952),r=n(869),c=n(7797);let d=(0,c.createServerReference)("406b15d0657c83dab5ffbc9cffdd724d9b809acd31",c.callServer,void 0,c.findSourceMapURL,"createRoutine"),u=(0,c.createServerReference)("40abbb87162e59657b98ec22a7ae131f173b4c408b",c.callServer,void 0,c.findSourceMapURL,"deleteRoutine"),m=["Hourly","Daily","Weekly","Monthly"];function f({agents:e}){let a=(0,r.k)(),[n,c]=(0,o.useState)(!1),[u,p]=(0,o.useState)(""),[h,b]=(0,o.useState)(""),[v,g]=(0,o.useState)("Daily"),[x,y]=(0,o.useState)(""),[j,w]=(0,o.useState)(""),[k,N]=(0,o.useTransition)(),S=(0,t.useRouter)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{className:"btn-accent",onClick:()=>c(!0),children:[(0,i.jsx)(l.I,{name:"add",size:14})," ",a("routines.new.button")]}),n&&(0,i.jsx)("div",{className:"modal-overlay",onMouseDown:()=>!k&&c(!1),children:(0,i.jsxs)("div",{className:"modal",style:{padding:"20px 22px",width:460,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,i.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:4},children:a("routines.new.title")}),(0,i.jsx)("div",{style:{fontSize:12,color:"var(--text-dim)",marginBottom:12},children:a("routines.new.desc")}),(0,i.jsxs)("label",{className:"form-label",children:[a("common.name")," ",(0,i.jsx)("span",{className:"req",children:"*"})]}),(0,i.jsx)("input",{className:"form-input",autoFocus:!0,value:u,onChange:e=>p(e.target.value),placeholder:a("routines.new.namePh")}),(0,i.jsx)("label",{className:"form-label",children:a("routines.new.command")}),(0,i.jsx)("input",{className:"form-input mono",value:h,onChange:e=>b(e.target.value),placeholder:a("routines.new.commandPh")}),(0,i.jsxs)("div",{style:{display:"flex",gap:10},children:[(0,i.jsxs)("div",{style:{flex:1},children:[(0,i.jsx)("label",{className:"form-label",children:a("routines.new.frequency")}),(0,i.jsx)(s.m,{value:v,options:m.map(e=>({value:e,label:a(`routines.freq.${e}`)})),onChange:g})]}),(0,i.jsxs)("div",{style:{flex:1},children:[(0,i.jsx)("label",{className:"form-label",children:a("routines.new.ownerAgent")}),(0,i.jsx)(s.m,{value:x,placeholder:a("routines.new.unassigned"),options:[{value:"",label:a("routines.new.unassigned")},...e.map(e=>({value:e.id,label:e.name}))],onChange:y})]})]}),j&&(0,i.jsx)("div",{style:{color:"#e8688f",fontSize:12,marginTop:8},children:j}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,i.jsx)("button",{className:"btn-ghost",disabled:k,onClick:()=>c(!1),children:a("common.cancel")}),(0,i.jsx)("button",{className:"btn-accent",disabled:k||!u.trim(),onClick:function(){w(""),N(async()=>{let e=await d({name:u,cmd:h,freq:v,agentId:x||void 0});e.ok?(c(!1),p(""),b(""),g("Daily"),y(""),S.refresh()):w(e.error??a("routines.new.failed"))})},children:k?a("routines.new.creating"):a("routines.new.create")})]})]})})]})}function p({id:e}){let a=(0,r.k)(),[n,s]=(0,o.useTransition)(),c=(0,t.useRouter)();return(0,i.jsx)("button",{className:"iact danger",title:a("routines.delete.title"),disabled:n,onClick:()=>{confirm(a("routines.delete.confirm"))&&s(async()=>{await u(e),c.refresh()})},children:(0,i.jsx)(l.I,{name:"trash",size:14})})}},2405:(e,a,n)=>{Promise.resolve().then(n.t.bind(n,9746,23)),Promise.resolve().then(n.bind(n,47)),Promise.resolve().then(n.bind(n,437)),Promise.resolve().then(n.bind(n,6516)),Promise.resolve().then(n.bind(n,8183)),Promise.resolve().then(n.bind(n,4822)),Promise.resolve().then(n.bind(n,5412)),Promise.resolve().then(n.bind(n,2454)),Promise.resolve().then(n.bind(n,9508)),Promise.resolve().then(n.bind(n,3891))},4952:(e,a,n)=>{"use strict";n.d(a,{m:()=>r});var i=n(4275),o=n(2899),t=n(888),l=n(9156),s=n(869);function r({value:e,options:a,onChange:n,placeholder:c,mono:d,glyph:u,disabled:m,searchable:f}){let p=(0,s.k)(),[h,b]=(0,o.useState)(!1),[v,g]=(0,o.useState)(""),x=(0,o.useRef)(null),y=(0,o.useRef)(null),j=(0,o.useMemo)(()=>(a||[]).map(e=>"string"==typeof e?{value:e,label:e}:e),[a]),w=j.find(a=>a.value===e),k=(f??j.length>8)&&!m,N=v.trim().toLowerCase(),S=k&&N?j.filter(e=>(e.label+" "+e.value+" "+(e.sub||"")).toLowerCase().includes(N)):j;return(0,o.useEffect)(()=>{if(!h)return void g("");function e(e){x.current&&!x.current.contains(e.target)&&b(!1)}function a(e){"Escape"===e.key&&b(!1)}return document.addEventListener("mousedown",e),document.addEventListener("keydown",a),k&&requestAnimationFrame(()=>y.current?.focus()),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",a)}},[h,k]),(0,i.jsxs)("div",{className:"dd"+(h?" open":"")+(m?" disabled":""),ref:x,children:[(0,i.jsxs)("button",{type:"button",className:"dd-btn"+(d?" mono":""),onClick:()=>!m&&b(e=>!e),children:[u&&w&&(0,i.jsx)(l.W,{id:w.glyphId||w.value,size:20}),(0,i.jsx)("span",{className:"dd-val",children:w?w.label:(0,i.jsx)("span",{className:"dd-ph",children:c||p("common.selectEllipsis")})}),(0,i.jsx)(t.I,{name:"chevronDown",size:14})]}),h&&(0,i.jsxs)("div",{className:"dd-menu scroll",children:[k&&(0,i.jsxs)("div",{style:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:6,padding:"6px 8px",margin:"-4px -4px 4px",background:"var(--bg-elev, var(--bg-active))",borderBottom:"1px solid var(--border)"},children:[(0,i.jsx)(t.I,{name:"search",size:13}),(0,i.jsx)("input",{ref:y,value:v,placeholder:p("common.searchEllipsis"),onChange:e=>g(e.target.value),onKeyDown:e=>{"Enter"===e.key&&S[0]?(n(S[0].value),b(!1)):"Escape"===e.key&&v&&(e.stopPropagation(),g(""))},className:d?"mono":void 0,style:{flex:1,minWidth:0,background:"transparent",border:"none",outline:"none",color:"var(--text)",fontSize:12.5,fontFamily:d?"var(--mono-font)":"inherit"}}),v&&(0,i.jsx)("button",{type:"button",title:p("common.clear"),onClick:()=>{g(""),y.current?.focus()},style:{background:"none",border:"none",color:"var(--text-dim)",cursor:"pointer",display:"flex",padding:0},children:(0,i.jsx)(t.I,{name:"close",size:12})})]}),0===j.length&&(0,i.jsx)("div",{className:"dd-empty",children:p("common.noOptions")}),j.length>0&&0===S.length&&(0,i.jsx)("div",{className:"dd-empty",children:p("dropdown.noMatch",{q:v})}),S.map(a=>(0,i.jsxs)("button",{type:"button",className:"dd-opt"+(a.value===e?" on":""),onClick:()=>{n(a.value),b(!1)},children:[u&&(0,i.jsx)(l.W,{id:a.glyphId||a.value,size:22}),(0,i.jsxs)("span",{className:"dd-opt-main",children:[(0,i.jsx)("span",{className:"dd-opt-label"+(d?" mono":""),children:a.label}),a.sub&&(0,i.jsx)("span",{className:"dd-opt-sub",children:a.sub})]}),a.tag&&(0,i.jsx)("span",{className:"dd-opt-tag",children:a.tag}),a.value===e&&(0,i.jsx)(t.I,{name:"check",size:13})]},a.value))]})]})}},9156:(e,a,n)=>{"use strict";n.d(a,{W:()=>s});var i=n(4275),o=n(2899);let t={anthropic:"anthropic",claude_code:"claude",openai:"openai",codex_cli:"openai",google:"google",google_gemini:"gemini",gemini_cli:"gemini",vertex_ai:"vertexai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere",perplexity:"perplexity",xai_grok:"grok",groq:"groq",ai21:"ai21",nvidia_nim:"nvidia",huggingface:"huggingface",replicate:"replicate",azure_openai:"azure",aws_bedrock:"bedrock",cloudflare:"cloudflare",dashscope:"qwen",zhipu:"zhipu",moonshot:"moonshot",minimax:"minimax",together:"together",openrouter:"openrouter",fireworks:"fireworks",cerebras:"cerebras",ollama:"ollama",ollama_cli:"ollama",lmstudio:"lmstudio",vllm:"vllm",localai:"localai",elevenlabs:"elevenlabs",stability:"stability",jina:"jina",voyage:"voyage"},l={anthropic:["#d97757","An"],openai:["#10a37f","AI"],google_gemini:["#4285f4","G"],google:["#4285f4","G"],mistral:["#fa520f","Mi"],xai_grok:["#1a1a1a","X"],deepseek:["#4d6bfe","DS"],cohere:["#39594d","Co"],ai21:["#e8488a","A2"],perplexity:["#20808d","Px"],groq:["#f55036","Gq"],nvidia_nim:["#76b900","NV"],together:["#0f6fff","To"],fireworks:["#5019c5","Fw"],cerebras:["#f25733","Cb"],huggingface:["#ff9d00","HF"],replicate:["#1a1a1a","Rp"],openrouter:["#6566f1","OR"],litellm:["#00b8a3","LL"],portkey:["#3b5bdb","Pk"],azure_openai:["#0078d4","Az"],aws_bedrock:["#ff9900","Br"],vertex_ai:["#4285f4","Vx"],cloudflare:["#f38020","Cf"],dashscope:["#ff6a00","Qw"],zhipu:["#3859ff","GL"],moonshot:["#16162a","Ki"],minimax:["#e1342c","MM"],ollama:["#0c0c0c","Ol"],llamacpp:["#7a4ddb","Lc"],lmstudio:["#4a5cff","LM"],vllm:["#1668dc","vL"],localai:["#2e7d32","La"],gpt4all:["#5b6cff","G4"],jan:["#1a1a1a","Jn"],claude_code:["#d97757","CC"],codex_cli:["#10a37f","Cx"],gemini_cli:["#4285f4","Gc"],aider:["#14b8a6","Ad"],ollama_cli:["#0c0c0c","Oc"],openclaw:["#e8590c","OC"],hermes_cli:["#6d28d9","Hm"],opencode:["#1a1a1a","Oc"],copilot_cli:["#1f2328","Co"],cursor_cli:["#1a1a1a","Cu"],cline_cli:["#2563eb","Cl"],kilo_code:["#7c3aed","Ki"],voyage:["#5b21b6","Vo"],jina:["#ec4899","Ji"],stability:["#a855f7","St"],elevenlabs:["#1a1a1a","El"]};function s({id:e,size:a=34,radius:n}){let r,c=l[e],d=c?c[0]:"#5b6378",u=c?c[1]:(e||"?").slice(0,2).replace(/[^a-z0-9]/gi,"").toUpperCase(),m=(r=t[e])?`https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg/icons/${r}.svg`:null,[f,p]=(0,o.useState)(!1),h=null!=n?n:Math.round(.28*a),b=m&&!f,v=Math.round(.66*a);return(0,i.jsx)("span",{className:"prov-glyph",style:{width:a,height:a,flex:"0 0 "+a+"px",borderRadius:h,background:b?"#fff":"linear-gradient(150deg, "+d+", color-mix(in srgb, "+d+" 70%, #000))",color:"#fff",display:"grid",placeItems:"center",overflow:"hidden",fontSize:Math.round(.4*a),fontWeight:800,letterSpacing:"-.5px",boxShadow:b?"inset 0 0 0 1px rgba(0,0,0,.08)":"inset 0 1px 0 rgba(255,255,255,.18)"},children:b?(0,i.jsx)("img",{src:m,alt:"",width:v,height:v,loading:"lazy",onError:()=>p(!0),style:{width:v,height:v,objectFit:"contain",display:"block"}}):u})}}},e=>{e.O(0,[928,171,6871,7218,2235,7066,7358],()=>e(e.s=2405)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7712],{1260:(e,s,t)=>{"use strict";t.d(s,{R:()=>a});var r=t(4275);function a({name:e}){let s={ts:{t:"TS",c:"#3178c6"},tsx:{t:"TS",c:"#3178c6"},js:{t:"JS",c:"#f0c000"},jsx:{t:"JS",c:"#f0c000"},json:{t:"{}",c:"#cbab35"},md:{t:"M↓",c:"#7d8590"},css:{t:"#",c:"#42a5f5"}}[e.split(".").pop()??""]||{t:"\xb7",c:"#7d8590"};return(0,r.jsx)("span",{style:{fontSize:9,fontWeight:700,fontFamily:"var(--mono-font, monospace)",color:s.c,lineHeight:1,letterSpacing:"-.5px"},children:s.t})}},1648:(e,s,t)=>{Promise.resolve().then(t.t.bind(t,9746,23)),Promise.resolve().then(t.bind(t,4838)),Promise.resolve().then(t.bind(t,6516)),Promise.resolve().then(t.bind(t,8183)),Promise.resolve().then(t.bind(t,4822)),Promise.resolve().then(t.bind(t,5412)),Promise.resolve().then(t.bind(t,2454)),Promise.resolve().then(t.bind(t,9508)),Promise.resolve().then(t.bind(t,3891))},4838:(e,s,t)=>{"use strict";t.d(s,{SearchPalette:()=>i});var r=t(4275),a=t(2899),l=t(6295),c=t(1260),n=t(869);function i({index:e,empty:s}){let t=(0,l.useRouter)(),h=(0,n.k)(),[o,d]=(0,a.useState)(""),[m,u]=(0,a.useState)(!1),[x,p]=(0,a.useState)(!1),[v,g]=(0,a.useState)(!1),j=(0,a.useMemo)(()=>{if(!o.trim())return[];let s=null;try{let e=v?o:o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");x&&(e=`\\b(?:${e})\\b`),s=new RegExp(e,m?"g":"gi")}catch{s=null}if(!s)return[];let t=[];for(let r of e){let e=[];r.lines.forEach((t,r)=>{s.lastIndex=0;let a=s.exec(t);a&&a[0].length>0&&e.push({line:r,text:t,idx:a.index,len:a[0].length})}),e.length&&t.push({...r,matches:e})}return t},[o,m,x,v,e]),f=j.reduce((e,s)=>e+s.matches.length,0),b=v&&""!==o.trim()&&(()=>{try{return new RegExp(o),!1}catch{return!0}})();return(0,r.jsxs)("div",{className:"search-panel",children:[(0,r.jsx)("div",{className:"search-input-wrap",children:(0,r.jsx)("input",{className:"search-input",placeholder:h("common.search"),value:o,autoFocus:!0,onChange:e=>d(e.target.value)})}),(0,r.jsx)("input",{className:"replace-input",placeholder:h("search.replace"),disabled:!0}),(0,r.jsxs)("div",{className:"search-toolbar",children:[(0,r.jsx)("button",{className:"search-toggle"+(m?" on":""),title:h("search.matchCase"),onClick:()=>u(e=>!e),children:"Aa"}),(0,r.jsx)("button",{className:"search-toggle"+(x?" on":""),title:h("search.matchWholeWord"),onClick:()=>p(e=>!e),children:"ab"}),(0,r.jsx)("button",{className:"search-toggle"+(v?" on":""),title:h("search.useRegex"),onClick:()=>g(e=>!e),children:".*"})]}),o.trim()&&!b&&(0,r.jsx)("div",{className:"search-summary",children:h("search.summary",{results:f,files:j.length})}),o.trim()&&b&&(0,r.jsx)("div",{className:"search-summary",children:h("search.invalidRegex")}),!o.trim()&&s&&(0,r.jsx)("div",{className:"search-summary",children:h("search.emptyWorkspace")}),o.trim()&&!b&&0===j.length&&(0,r.jsx)("div",{className:"search-summary",children:h("search.noResultsFor",{q:o})}),(0,r.jsx)("div",{children:j.map(e=>(0,r.jsxs)("div",{className:"search-result-file",children:[(0,r.jsxs)("div",{className:"search-file-row",onClick:()=>{var s;return s=e.href,void t.push(s)},children:[(0,r.jsx)(c.R,{name:`x.${e.ext}`}),(0,r.jsx)("span",{children:e.name}),(0,r.jsx)("span",{style:{color:"var(--text-faint)",fontSize:11},children:e.path}),(0,r.jsx)("span",{className:"count",children:e.matches.length})]}),e.matches.slice(0,6).map((s,a)=>{let l,c,n;return(0,r.jsx)("div",{className:"search-match",onClick:()=>{var s;return s=e.href,void t.push(s)},children:(l=s.text.slice(0,s.idx),c=s.text.slice(s.idx,s.idx+s.len),n=s.text.slice(s.idx+s.len),(0,r.jsxs)(r.Fragment,{children:[l,(0,r.jsx)("mark",{children:c}),n]}))},a)})]},e.group+"/"+e.path))})]})}}},e=>{e.O(0,[928,171,6871,7218,2235,7066,7358],()=>e(e.s=1648)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3746],{47:(e,n,t)=>{"use strict";t.d(n,{FixButton:()=>h,RunReviewButton:()=>v,Toggle:()=>f});var r=t(4275),s=t(2899),i=t(7797);let a=(0,i.createServerReference)("60ca963096e5ac21ffbb5c20553b60e07cfc10a082",i.callServer,void 0,i.findSourceMapURL,"toggleRoutine"),l=(0,i.createServerReference)("60f1bd7e98aa5ca0c4700c68d2982ce1f1cfa391c2",i.callServer,void 0,i.findSourceMapURL,"togglePlugin"),c=(0,i.createServerReference)("4044d632fa539e7ed118940bfb3162d1466ea39a3b",i.callServer,void 0,i.findSourceMapURL,"fixFinding"),o=(0,i.createServerReference)("008cb8cd775a0682f7319a9eed86a533ba9df2b5f3",i.callServer,void 0,i.findSourceMapURL,"runReview");var d=t(888),u=t(869);function f({kind:e,id:n,on:t}){let[i,c]=(0,s.useTransition)(),o="routine"===e?a:l;return(0,r.jsx)("div",{className:"toggle"+(t?" on":""),"aria-disabled":i,role:"switch","aria-checked":t,onClick:()=>!i&&c(()=>o(n,!t))})}function h({id:e}){let n=(0,u.k)(),[t,i]=(0,s.useTransition)();return(0,r.jsxs)("button",{className:"sc2-btn",disabled:t,onClick:()=>i(()=>c(e)),children:[(0,r.jsx)(d.I,{name:"bot",size:12})," ",n("security.letAgentFix")]})}function v(){let e=(0,u.k)(),[n,t]=(0,s.useTransition)();return(0,r.jsxs)("button",{className:"btn-accent",disabled:n,onClick:()=>{window.dispatchEvent(new CustomEvent("constella:agent-run",{detail:{channel:"security"}})),t(async()=>{await o()})},children:[(0,r.jsx)(d.I,{name:"refresh",size:14,className:n?"sync-spin":""})," ",e(n?"security.reviewing":"security.runReview")]})}},3107:(e,n,t)=>{"use strict";t.d(n,{k:()=>s});var r=t(7797);let s=(0,r.createServerReference)("600adfc269778741217c31377d7e0b633650bc2ec9",r.callServer,void 0,r.findSourceMapURL,"getEvents")},4906:(e,n,t)=>{"use strict";t.d(n,{AgentRunLive:()=>d});var r=t(4275),s=t(2899),i=t(6295),a=t(888),l=t(3107),c=t(869);let o=["read","create","edit","run","search","thinking","done","error"];function d({channel:e,resume:n=!1,sinceSeq:t=0,onFinish:u}){let f=(0,c.k)(),h=(0,i.useRouter)(),[v,g]=(0,s.useState)(n),[m,k]=(0,s.useState)([]),[p,x]=(0,s.useState)(0),b=(0,s.useRef)(n?t:0),w=(0,s.useRef)(!1),S=(0,s.useRef)(0);if((0,s.useEffect)(()=>{n&&(b.current=t,w.current=!1,S.current=t>0?t:Date.now(),k([]),x(Math.max(0,Math.floor((Date.now()-S.current)/1e3))),g(!0))},[n,t]),(0,s.useEffect)(()=>{function n(n){let t=n.detail;t?.channel===e&&(b.current=Date.now()-1,w.current=!1,S.current=Date.now(),k([]),x(0),g(!0))}return window.addEventListener("constella:agent-run",n),()=>window.removeEventListener("constella:agent-run",n)},[e]),(0,s.useEffect)(()=>{if(!v)return;S.current||(S.current=Date.now());let e=setInterval(()=>x(Math.floor((Date.now()-S.current)/1e3)),1e3);return()=>clearInterval(e)},[v]),(0,s.useEffect)(()=>{if(!v)return;let n=!0,t=Date.now();async function r(){let r=await (0,l.k)(e,b.current);n&&(r.length&&(b.current=Math.max(b.current,...r.map(e=>e.seq)),k(e=>{let n=new Set(e.map(e=>e.id));return[...e,...r.filter(e=>!n.has(e.id))]}),r.some(e=>"done"===e.kind||"error"===e.kind)&&(w.current||(w.current=!0,h.refresh(),u?.()),setTimeout(()=>{n&&g(!1)},2500))),Date.now()-t>96e4&&g(!1))}r();let s=setInterval(r,700);return()=>{n=!1,clearInterval(s)}},[v,e,h,u]),!v&&0===m.length)return null;let j=function(e){let n=[];for(let t of e)if("text"===t.kind){let e=(t.detail||"").replace(/\s+/g," ").trim();if(!e)continue;let r=n[n.length-1];r&&"text"===r.kind?r.content=(r.content+" "+e).slice(-600):n.push({id:t.id,kind:"text",content:e})}else if("thinking"===t.kind){let e=(t.detail||t.target||"").replace(/\s+/g," ").trim();e&&n.push({id:t.id,kind:"thinking",content:e})}else n.push({id:t.id,kind:t.kind,content:function(e){if(!e)return"";let n=e.split(/[\\/]/);return n.length>1?n.slice(-2).join("/"):e}(t.target)||t.detail||""});return n}(m),R=j.slice(-5),N=j.length-R.length,y=m.some(e=>"done"===e.kind||"error"===e.kind),E=m.some(e=>"error"===e.kind),P=String(Math.floor(p/60)).padStart(2,"0"),I=String(p%60).padStart(2,"0");return(0,r.jsxs)("div",{className:"card live-stream",style:{marginBottom:16,borderColor:E?"var(--sx-keyword)":"var(--accent)"},children:[(0,r.jsxs)("div",{className:"set-desc",style:{marginBottom:8,display:"flex",alignItems:"center",gap:7},children:[v&&!y?(0,r.jsx)("span",{className:"dotpulse"}):(0,r.jsx)(a.I,{name:E?"close":"check",size:13,style:{color:E?"var(--sx-keyword)":"var(--sx-string)"}}),v&&!y?f("agent.run.working"):E?f("agent.run.failed"):f("agent.run.finished"),j.length>0&&(0,r.jsxs)("span",{style:{color:"var(--text-faint)"},children:["\xb7 ",f(1===j.length?"agent.run.steps.one":"agent.run.steps.other",{n:j.length})]}),(0,r.jsxs)("span",{className:"live-elapsed",style:{marginLeft:"auto"},children:[P,":",I]})]}),0===R.length?(0,r.jsxs)("div",{className:"muted",style:{fontSize:12,display:"flex",alignItems:"center",gap:7},children:[(0,r.jsx)("span",{className:"sync-spin",children:(0,r.jsx)(a.I,{name:"refresh",size:12})})," ",f("agent.run.reading")]}):(0,r.jsxs)(r.Fragment,{children:[N>0&&(0,r.jsx)("div",{className:"live-more",children:f(1===N?"agent.run.earlier.one":"agent.run.earlier.other",{n:N})}),(0,r.jsx)("div",{className:"live-stream-lines",children:R.map(e=>(0,r.jsxs)("div",{className:"live-line "+e.kind,children:["text"!==e.kind&&(0,r.jsx)("span",{className:"ll-k",children:o.includes(e.kind)?f(`agent.verb.${e.kind}`):e.kind}),(0,r.jsxs)("span",{className:"ll-c",children:[e.content,!y&&e===R[R.length-1]&&"text"===e.kind&&(0,r.jsx)("span",{className:"ll-caret"})]})]},e.id))})]})]})}},7357:(e,n,t)=>{Promise.resolve().then(t.t.bind(t,9746,23)),Promise.resolve().then(t.bind(t,4906)),Promise.resolve().then(t.bind(t,47)),Promise.resolve().then(t.bind(t,6516)),Promise.resolve().then(t.bind(t,8183)),Promise.resolve().then(t.bind(t,4822)),Promise.resolve().then(t.bind(t,5412)),Promise.resolve().then(t.bind(t,2454)),Promise.resolve().then(t.bind(t,9508)),Promise.resolve().then(t.bind(t,3891))}},e=>{e.O(0,[928,171,6871,7218,2235,7066,7358],()=>e(e.s=7357)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4262],{3413:(e,s,a)=>{Promise.resolve().then(a.t.bind(a,9746,23)),Promise.resolve().then(a.bind(a,9011)),Promise.resolve().then(a.bind(a,6516)),Promise.resolve().then(a.bind(a,8183)),Promise.resolve().then(a.bind(a,4822)),Promise.resolve().then(a.bind(a,5412)),Promise.resolve().then(a.bind(a,2454)),Promise.resolve().then(a.bind(a,9508))},4952:(e,s,a)=>{"use strict";a.d(s,{m:()=>c});var l=a(4275),i=a(2899),n=a(888),t=a(9156),r=a(869);function c({value:e,options:s,onChange:a,placeholder:o,mono:d,glyph:m,disabled:u,searchable:h}){let p=(0,r.k)(),[x,g]=(0,i.useState)(!1),[b,v]=(0,i.useState)(""),f=(0,i.useRef)(null),j=(0,i.useRef)(null),k=(0,i.useMemo)(()=>(s||[]).map(e=>"string"==typeof e?{value:e,label:e}:e),[s]),y=k.find(s=>s.value===e),N=(h??k.length>8)&&!u,C=b.trim().toLowerCase(),S=N&&C?k.filter(e=>(e.label+" "+e.value+" "+(e.sub||"")).toLowerCase().includes(C)):k;return(0,i.useEffect)(()=>{if(!x)return void v("");function e(e){f.current&&!f.current.contains(e.target)&&g(!1)}function s(e){"Escape"===e.key&&g(!1)}return document.addEventListener("mousedown",e),document.addEventListener("keydown",s),N&&requestAnimationFrame(()=>j.current?.focus()),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",s)}},[x,N]),(0,l.jsxs)("div",{className:"dd"+(x?" open":"")+(u?" disabled":""),ref:f,children:[(0,l.jsxs)("button",{type:"button",className:"dd-btn"+(d?" mono":""),onClick:()=>!u&&g(e=>!e),children:[m&&y&&(0,l.jsx)(t.W,{id:y.glyphId||y.value,size:20}),(0,l.jsx)("span",{className:"dd-val",children:y?y.label:(0,l.jsx)("span",{className:"dd-ph",children:o||p("common.selectEllipsis")})}),(0,l.jsx)(n.I,{name:"chevronDown",size:14})]}),x&&(0,l.jsxs)("div",{className:"dd-menu scroll",children:[N&&(0,l.jsxs)("div",{style:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:6,padding:"6px 8px",margin:"-4px -4px 4px",background:"var(--bg-elev, var(--bg-active))",borderBottom:"1px solid var(--border)"},children:[(0,l.jsx)(n.I,{name:"search",size:13}),(0,l.jsx)("input",{ref:j,value:b,placeholder:p("common.searchEllipsis"),onChange:e=>v(e.target.value),onKeyDown:e=>{"Enter"===e.key&&S[0]?(a(S[0].value),g(!1)):"Escape"===e.key&&b&&(e.stopPropagation(),v(""))},className:d?"mono":void 0,style:{flex:1,minWidth:0,background:"transparent",border:"none",outline:"none",color:"var(--text)",fontSize:12.5,fontFamily:d?"var(--mono-font)":"inherit"}}),b&&(0,l.jsx)("button",{type:"button",title:p("common.clear"),onClick:()=>{v(""),j.current?.focus()},style:{background:"none",border:"none",color:"var(--text-dim)",cursor:"pointer",display:"flex",padding:0},children:(0,l.jsx)(n.I,{name:"close",size:12})})]}),0===k.length&&(0,l.jsx)("div",{className:"dd-empty",children:p("common.noOptions")}),k.length>0&&0===S.length&&(0,l.jsx)("div",{className:"dd-empty",children:p("dropdown.noMatch",{q:b})}),S.map(s=>(0,l.jsxs)("button",{type:"button",className:"dd-opt"+(s.value===e?" on":""),onClick:()=>{a(s.value),g(!1)},children:[m&&(0,l.jsx)(t.W,{id:s.glyphId||s.value,size:22}),(0,l.jsxs)("span",{className:"dd-opt-main",children:[(0,l.jsx)("span",{className:"dd-opt-label"+(d?" mono":""),children:s.label}),s.sub&&(0,l.jsx)("span",{className:"dd-opt-sub",children:s.sub})]}),s.tag&&(0,l.jsx)("span",{className:"dd-opt-tag",children:s.tag}),s.value===e&&(0,l.jsx)(n.I,{name:"check",size:13})]},s.value))]})]})}},5904:(e,s,a)=>{"use strict";a.d(s,{e:()=>i});var l=a(4275);function i({name:e,color:s,size:a=24,health:n,image:t}){let r=Math.max(6,Math.round(.3*a)),c=Math.round(.28*a),o=t?/^(data:|https?:|\/)/.test(t)?t:`/api/upload?path=${encodeURIComponent(t)}`:null;return(0,l.jsxs)("span",{style:{position:"relative",width:a,height:a,flex:`0 0 ${a}px`,display:"inline-block"},children:[o?(0,l.jsx)("img",{src:o,alt:e,width:a,height:a,style:{width:a,height:a,borderRadius:c,objectFit:"cover",display:"block"}}):(0,l.jsx)("span",{style:{width:a,height:a,borderRadius:c,background:s,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*a),fontWeight:700},children:(e[0]||"?").toUpperCase()}),n&&(0,l.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:r,height:r,borderRadius:"50%",background:"alive"===n?"var(--sx-string)":"stale"===n?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}},9011:(e,s,a)=>{"use strict";a.d(s,{SkillsClient:()=>b});var l=a(4275),i=a(2899),n=a(3891),t=a(888),r=a(5904),c=a(4952),o=a(869),d=a(7797);let m=(0,d.createServerReference)("60b57124a8a3327fcfb5ef2a7e0a1baaebbb93f936",d.callServer,void 0,d.findSourceMapURL,"saveSkillInstructions"),u=(0,d.createServerReference)("40cd9e070a3fc7bc1888c284c9fbfad1556e3b9c39",d.callServer,void 0,d.findSourceMapURL,"approveProvisional"),h=(0,d.createServerReference)("001fae13f4d0050a3d29b2c93ef7e0ad8f62557474",d.callServer,void 0,d.findSourceMapURL,"suggestSkillsFromLearnings"),p=(0,d.createServerReference)("4061030c7209072bb3d5f7d8888184e88934d8ce50",d.callServer,void 0,d.findSourceMapURL,"deleteSkill"),x=(0,d.createServerReference)("401a937e35240c1eb973342cf1c58a3d631984a955",d.callServer,void 0,d.findSourceMapURL,"createSkill"),g=(0,d.createServerReference)("40b75d68862c3bd4473e380cb30981124a5ddd36df",d.callServer,void 0,d.findSourceMapURL,"generateSkill");function b({skills:e,agents:s}){let a=(0,o.k)(),[c,d]=(0,i.useState)(null),[h,p]=(0,i.useState)(!1),[x,g]=(0,i.useState)(""),[y,N]=(0,i.useState)(null),[C,S]=(0,i.useTransition)(),[w,z]=(0,i.useState)(""),[I,_]=(0,i.useState)("all"),L=["all",...Array.from(new Set(e.map(e=>e.category))).sort()],M=w.trim().toLowerCase(),P=e.filter(e=>("all"===I||e.category===I)&&(!M||e.name.toLowerCase().includes(M)||e.summary.toLowerCase().includes(M)));function R(e,s){d(e),p(s),g(e.instructions)}if(c){let e=(c.instructions||"").split("\n").map(e=>e.replace(/^\d+[.)]\s*/,"").trim()).filter(Boolean),s=e.length?e:[a("skills.detail.followInstructions",{file:c.file})];return(0,l.jsxs)(n.ViewChrome,{title:c.name,sub:`${c.file} \xb7 ${a("skills.detail.triggered")}: ${c.trigger}`,right:h?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("button",{className:"btn-ghost",onClick:()=>p(!1),children:[(0,l.jsx)(t.I,{name:"close",size:13})," ",a("common.cancel")]}),(0,l.jsxs)("button",{className:"btn-accent",disabled:C,onClick:function(){c&&S(async()=>{await m(c.id,x),p(!1)})},children:[(0,l.jsx)(t.I,{name:"check",size:13})," ",C?a("common.saving"):a("skills.detail.saveMd")]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("button",{className:"btn-ghost",onClick:()=>R(c,!0),children:[(0,l.jsx)(t.I,{name:"command",size:13})," ",a("skills.detail.editMd")]}),(0,l.jsxs)("button",{className:"btn-ghost",onClick:()=>{d(null),p(!1)},children:[(0,l.jsx)(t.I,{name:"chevronLeft",size:14})," ",a("common.back")]})]}),children:[c.provisional&&(0,l.jsxs)("div",{className:"card",style:{marginBottom:14,borderColor:"var(--sx-number)",background:"var(--sx-number)14",display:"flex",alignItems:"center",gap:12},children:[(0,l.jsxs)("span",{style:{color:"var(--sx-number)",fontSize:12.5,flex:1},children:["⚠ ",a("skills.detail.provisionalWarn")]}),(0,l.jsxs)("button",{className:"btn-accent",disabled:C,onClick:()=>S(async()=>{await u(c.id),d({...c,provisional:!1})}),children:[(0,l.jsx)(t.I,{name:"check",size:13})," ",a("skills.detail.approve")]})]}),h?(0,l.jsx)("textarea",{className:"persona-ta mono",style:{minHeight:360,maxWidth:820},value:x,onChange:e=>g(e.target.value)}):(0,l.jsxs)("div",{className:"card",style:{maxWidth:820},children:[(0,l.jsx)("div",{className:"detail-label",children:a("skills.detail.procedure")}),s.map((e,s)=>(0,l.jsxs)("div",{className:"live-step",children:[(0,l.jsx)("span",{className:"ls-ico",style:{color:"var(--accent)",fontFamily:"var(--mono-font)"},children:s+1}),e]},s)),c.users.length>0&&(0,l.jsxs)("div",{style:{fontSize:11.5,color:"var(--text-faint)",marginTop:12},children:[a("skills.detail.usedBy"),": ",c.users.map(e=>e.name).join(", ")]})]})]})}return(0,l.jsxs)(n.ViewChrome,{title:"Skills",sub:a("skills.list.sub"),right:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v,{}),(0,l.jsxs)("button",{className:"btn-ghost",onClick:()=>N("ai"),children:[(0,l.jsx)(t.I,{name:"bot",size:14})," ",a("skills.list.generateAi")]}),(0,l.jsxs)("button",{className:"btn-accent",onClick:()=>N("manual"),children:[(0,l.jsx)(t.I,{name:"add",size:14})," ",a("skills.list.addSkill")]})]}),children:[0===e.length&&(0,l.jsx)("div",{className:"card",children:(0,l.jsx)("div",{className:"muted",children:a("skills.list.empty")})}),e.length>0&&(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",marginBottom:12},children:[(0,l.jsxs)("div",{className:"stack-search",style:{flex:"0 0 240px",maxWidth:240},children:[(0,l.jsx)(t.I,{name:"search",size:14}),(0,l.jsx)("input",{placeholder:"Filter skills…",value:w,onChange:e=>z(e.target.value)}),w&&(0,l.jsx)("button",{className:"ss-clear",onClick:()=>z(""),children:(0,l.jsx)(t.I,{name:"close",size:12})})]}),(0,l.jsx)("div",{style:{display:"flex",gap:5,flexWrap:"wrap"},children:L.map(e=>(0,l.jsx)("button",{className:"chip-sm",style:I===e?{background:"var(--accent)",color:"var(--accent-fg)"}:void 0,onClick:()=>_(e),children:"all"===e?"All":e[0].toUpperCase()+e.slice(1)},e))})]}),e.length>0&&0===P.length&&(0,l.jsx)("div",{className:"card",children:(0,l.jsx)("div",{className:"muted",children:"No skills match this filter."})}),(0,l.jsx)("div",{className:"skill-grid",children:P.map(e=>{let s=e.users;return(0,l.jsxs)("div",{className:"skill-card2",children:[(0,l.jsxs)("div",{className:"sc2-top",children:[(0,l.jsx)("span",{className:"sc2-ico",children:(0,l.jsx)(t.I,{name:"skill",size:15})}),(0,l.jsxs)("span",{className:"sc2-name",children:[e.name,(0,l.jsx)("span",{className:"sc2-ext",children:".md"})]}),(0,l.jsxs)("span",{className:"sc2-index "+("indexed"===e.indexed?"ok":"pending"),children:[(0,l.jsx)(t.I,{name:"indexed"===e.indexed?"check":"refresh",size:10})," ","indexed"===e.indexed?a("skills.card.indexed"):a("skills.card.indexing")]})]}),(0,l.jsx)("div",{className:"sc2-summary",children:e.summary}),(0,l.jsxs)("div",{className:"sc2-meta",children:[(0,l.jsx)("span",{className:"sc2-kind",children:a("skills.card.kind")}),e.native&&(0,l.jsx)("span",{className:"pill",style:{background:"var(--bg-active)",color:"var(--text-dim)"},children:a("skills.card.native")}),e.provisional&&(0,l.jsx)("span",{className:"pill",style:{background:"var(--sx-number)22",color:"var(--sx-number)"},children:a("skills.card.provisional")}),e.usedCount>0&&(0,l.jsxs)("span",{className:"pill",style:{background:"var(--accent)1f",color:"var(--accent)",display:"inline-flex",alignItems:"center",gap:4},title:e.lastBy?`An agent read this skill during a task — last: ${e.lastBy}`:"Consulted by an agent during a task",children:[(0,l.jsx)(t.I,{name:"pulse",size:10})," Consulted ",e.usedCount,"\xd7"]}),(0,l.jsxs)("span",{className:"sc2-trigger",children:["\xb7 ",e.trigger]})]}),(0,l.jsxs)("div",{className:"sc2-actions",children:[(0,l.jsxs)("button",{className:"sc2-btn",onClick:()=>R(e,!1),children:[(0,l.jsx)(t.I,{name:"goto",size:12})," ",a("skills.card.open")]}),(0,l.jsxs)("button",{className:"sc2-btn",onClick:()=>R(e,!0),children:[(0,l.jsx)(t.I,{name:"command",size:12})," ",a("common.edit")]}),!e.native&&(0,l.jsx)(f,{id:e.id}),(0,l.jsxs)("div",{className:"sc2-users",title:s.length?a("skills.card.usedByTip",{names:s.map(e=>e.name).join(", ")}):a("skills.card.unusedTip"),children:[s.slice(0,4).map(e=>(0,l.jsx)("span",{className:"sc2-user",children:(0,l.jsx)(r.e,{name:e.name,color:e.color,size:20})},e.id)),s.length>4&&(0,l.jsxs)("span",{className:"sc2-user-more",children:["+",s.length-4]}),0===s.length&&(0,l.jsx)("span",{className:"sc2-nouser",children:a("skills.card.unused")})]})]})]},e.id)})}),"manual"===y&&(0,l.jsx)(j,{agents:s,onClose:()=>N(null)}),"ai"===y&&(0,l.jsx)(k,{onClose:()=>N(null)})]})}function v(){let e=(0,o.k)(),[s,a]=(0,i.useTransition)(),[n,r]=(0,i.useState)(null);return(0,l.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[n&&(0,l.jsx)("span",{style:{fontSize:11.5,color:"var(--text-dim)"},children:n}),(0,l.jsxs)("button",{className:"btn-ghost",disabled:s,onClick:function(){r(null),a(async()=>{let s=await h();r(s.ok&&s.proposed>0?e("skills.list.suggested",{n:s.proposed}):e("skills.list.suggestNone"))})},title:e("skills.list.suggestDesc"),children:[s?(0,l.jsx)("span",{className:"sync-spin",children:(0,l.jsx)(t.I,{name:"refresh",size:13})}):(0,l.jsx)(t.I,{name:"branch",size:14})," ",s?e("skills.list.suggesting"):e("skills.list.suggest")]})]})}function f({id:e}){let s=(0,o.k)(),[a,n]=(0,i.useTransition)();return(0,l.jsxs)("button",{className:"sc2-btn danger",disabled:a,onClick:()=>n(()=>p(e)),children:[(0,l.jsx)(t.I,{name:"trash",size:12})," ",s("common.delete")]})}function j({agents:e,onClose:s}){let a=(0,o.k)(),[n,r]=(0,i.useState)(""),[d,m]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[p,g]=(0,i.useState)(e[0]?.id??""),[b,v]=(0,i.useTransition)(),f=(n||"name").toLowerCase().replace(/\s+/g,"-");return(0,l.jsx)("div",{className:"modal-overlay",onClick:s,children:(0,l.jsxs)("div",{className:"modal",onClick:e=>e.stopPropagation(),children:[(0,l.jsx)("div",{className:"modal-head",children:(0,l.jsxs)("div",{className:"modal-title",children:[(0,l.jsx)(t.I,{name:"add",size:15})," ",a("skills.manual.title")]})}),(0,l.jsxs)("div",{className:"modal-body",children:[(0,l.jsx)("label",{className:"form-label",children:a("skills.manual.nameLabel")}),(0,l.jsx)("input",{className:"form-input mono",autoFocus:!0,placeholder:a("skills.manual.namePlaceholder"),value:n,onChange:e=>r(e.target.value)}),(0,l.jsx)("label",{className:"form-label",style:{marginTop:10},children:a("common.description")}),(0,l.jsx)("textarea",{className:"persona-ta",placeholder:a("skills.manual.descPlaceholder"),value:d,onChange:e=>m(e.target.value)}),(0,l.jsx)("label",{className:"form-label",style:{marginTop:10},children:a("skills.manual.instructionsLabel")}),(0,l.jsx)("textarea",{className:"persona-ta mono",style:{minHeight:120},placeholder:a("skills.manual.instructionsPlaceholder"),value:u,onChange:e=>h(e.target.value)}),(0,l.jsx)("label",{className:"form-label",style:{marginTop:10},children:a("skills.manual.usedByAgent")}),(0,l.jsx)(c.m,{value:p,options:e.map(e=>({value:e.id,label:e.name+" \xb7 "+e.role})),onChange:g}),(0,l.jsxs)("div",{className:"modal-hint",children:[a("skills.manual.hintPrefix")," ",(0,l.jsxs)("b",{children:["skills/",f,".md"]}),a("skills.manual.hintSuffix")]})]}),(0,l.jsxs)("div",{className:"modal-foot",children:[(0,l.jsx)("button",{className:"btn-ghost",onClick:s,children:a("common.cancel")}),(0,l.jsx)("button",{className:"btn-accent",disabled:!n.trim()||b,onClick:function(){n.trim()&&v(async()=>{await x({name:n,summary:d,instructions:u,agentId:p}),s()})},children:a(b?"skills.manual.creating":"skills.manual.create")})]})]})})}function k({onClose:e}){let s=(0,o.k)(),[a,n]=(0,i.useState)(""),[r,c]=(0,i.useTransition)();return(0,l.jsx)("div",{className:"modal-overlay",onClick:e,children:(0,l.jsxs)("div",{className:"modal",onClick:e=>e.stopPropagation(),children:[(0,l.jsx)("div",{className:"modal-head",children:(0,l.jsxs)("div",{className:"modal-title",children:[(0,l.jsx)(t.I,{name:"bot",size:15})," ",s("skills.ai.title")]})}),(0,l.jsxs)("div",{className:"modal-body",children:[(0,l.jsx)("label",{className:"form-label",children:s("skills.ai.describeLabel")}),(0,l.jsx)("textarea",{className:"persona-ta",autoFocus:!0,placeholder:s("skills.ai.describePlaceholder"),value:a,onChange:e=>n(e.target.value)}),(0,l.jsxs)("div",{className:"modal-hint",children:[(0,l.jsx)(t.I,{name:"bot",size:12})," ",s("skills.ai.hintPrefix")," ",(0,l.jsx)("b",{children:s("skills.ai.hintProvisional")})," ",s("skills.ai.hintSuffix")]})]}),(0,l.jsxs)("div",{className:"modal-foot",children:[(0,l.jsx)("button",{className:"btn-ghost",onClick:e,children:s("common.cancel")}),(0,l.jsx)("button",{className:"btn-accent",disabled:!a.trim()||r,onClick:function(){a.trim()&&c(async()=>{await g(a),e()})},children:s(r?"skills.ai.drafting":"common.generate")})]})]})})}},9156:(e,s,a)=>{"use strict";a.d(s,{W:()=>r});var l=a(4275),i=a(2899);let n={anthropic:"anthropic",claude_code:"claude",openai:"openai",codex_cli:"openai",google:"google",google_gemini:"gemini",gemini_cli:"gemini",vertex_ai:"vertexai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere",perplexity:"perplexity",xai_grok:"grok",groq:"groq",ai21:"ai21",nvidia_nim:"nvidia",huggingface:"huggingface",replicate:"replicate",azure_openai:"azure",aws_bedrock:"bedrock",cloudflare:"cloudflare",dashscope:"qwen",zhipu:"zhipu",moonshot:"moonshot",minimax:"minimax",together:"together",openrouter:"openrouter",fireworks:"fireworks",cerebras:"cerebras",ollama:"ollama",ollama_cli:"ollama",lmstudio:"lmstudio",vllm:"vllm",localai:"localai",elevenlabs:"elevenlabs",stability:"stability",jina:"jina",voyage:"voyage"},t={anthropic:["#d97757","An"],openai:["#10a37f","AI"],google_gemini:["#4285f4","G"],google:["#4285f4","G"],mistral:["#fa520f","Mi"],xai_grok:["#1a1a1a","X"],deepseek:["#4d6bfe","DS"],cohere:["#39594d","Co"],ai21:["#e8488a","A2"],perplexity:["#20808d","Px"],groq:["#f55036","Gq"],nvidia_nim:["#76b900","NV"],together:["#0f6fff","To"],fireworks:["#5019c5","Fw"],cerebras:["#f25733","Cb"],huggingface:["#ff9d00","HF"],replicate:["#1a1a1a","Rp"],openrouter:["#6566f1","OR"],litellm:["#00b8a3","LL"],portkey:["#3b5bdb","Pk"],azure_openai:["#0078d4","Az"],aws_bedrock:["#ff9900","Br"],vertex_ai:["#4285f4","Vx"],cloudflare:["#f38020","Cf"],dashscope:["#ff6a00","Qw"],zhipu:["#3859ff","GL"],moonshot:["#16162a","Ki"],minimax:["#e1342c","MM"],ollama:["#0c0c0c","Ol"],llamacpp:["#7a4ddb","Lc"],lmstudio:["#4a5cff","LM"],vllm:["#1668dc","vL"],localai:["#2e7d32","La"],gpt4all:["#5b6cff","G4"],jan:["#1a1a1a","Jn"],claude_code:["#d97757","CC"],codex_cli:["#10a37f","Cx"],gemini_cli:["#4285f4","Gc"],aider:["#14b8a6","Ad"],ollama_cli:["#0c0c0c","Oc"],openclaw:["#e8590c","OC"],hermes_cli:["#6d28d9","Hm"],opencode:["#1a1a1a","Oc"],copilot_cli:["#1f2328","Co"],cursor_cli:["#1a1a1a","Cu"],cline_cli:["#2563eb","Cl"],kilo_code:["#7c3aed","Ki"],voyage:["#5b21b6","Vo"],jina:["#ec4899","Ji"],stability:["#a855f7","St"],elevenlabs:["#1a1a1a","El"]};function r({id:e,size:s=34,radius:a}){let c,o=t[e],d=o?o[0]:"#5b6378",m=o?o[1]:(e||"?").slice(0,2).replace(/[^a-z0-9]/gi,"").toUpperCase(),u=(c=n[e])?`https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg/icons/${c}.svg`:null,[h,p]=(0,i.useState)(!1),x=null!=a?a:Math.round(.28*s),g=u&&!h,b=Math.round(.66*s);return(0,l.jsx)("span",{className:"prov-glyph",style:{width:s,height:s,flex:"0 0 "+s+"px",borderRadius:x,background:g?"#fff":"linear-gradient(150deg, "+d+", color-mix(in srgb, "+d+" 70%, #000))",color:"#fff",display:"grid",placeItems:"center",overflow:"hidden",fontSize:Math.round(.4*s),fontWeight:800,letterSpacing:"-.5px",boxShadow:g?"inset 0 0 0 1px rgba(0,0,0,.08)":"inset 0 1px 0 rgba(255,255,255,.18)"},children:g?(0,l.jsx)("img",{src:u,alt:"",width:b,height:b,loading:"lazy",onError:()=>p(!0),style:{width:b,height:b,objectFit:"contain",display:"block"}}):m})}}},e=>{e.O(0,[928,171,6871,7218,2235,7066,7358],()=>e(e.s=3413)),_N_E=e.O()}]);
|
package/.next/static/chunks/app/(app)/tasks/{page-4d535f34ae9c44ca.js → page-0750ff77f17bdd9d.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2738],{1527:(e,s,a)=>{"use strict";a.d(s,{TaskBoard:()=>k});var i=a(4275),l=a(2899),n=a(888),t=a(5904),d=a(869),r=a(3540),c=a(7797);let o=(0,c.createServerReference)("60efe2c88ae01c09237a24a481571df0cbad4fca4d",c.callServer,void 0,c.findSourceMapURL,"updateTaskDescription"),h=(0,c.createServerReference)("60d885ab412f211c3f4564e6c0f3672b2e821be990",c.callServer,void 0,c.findSourceMapURL,"toggleTaskStep"),m=(0,c.createServerReference)("40fc1d0418209dccfeb1ab3612e35ad8b5d92004fa",c.callServer,void 0,c.findSourceMapURL,"deleteTaskStep"),p=(0,c.createServerReference)("606246313f55db9d637653621989a85394f74d7667",c.callServer,void 0,c.findSourceMapURL,"addTaskStep"),u=[{id:"triage",c:"#6cc7e0"},{id:"todo",c:"#84aef5"},{id:"doing",c:"#e0a44e"},{id:"blocked",c:"#e8688f"},{id:"review",c:"#c4a0ff"},{id:"done",c:"#b3d97a"}],v={high:"#e8688f",med:"#f0a35e",low:"#6cc7e0"};function x({task:e,agent:s,onClose:a}){let r=(0,d.k)(),[c,k]=(0,l.useState)(e.description),[b,f]=(0,l.useState)(""),[,j]=(0,l.useTransition)(),g=u.find(s=>s.id===e.col);return(0,i.jsx)("div",{className:"detail-overlay",onMouseDown:a,children:(0,i.jsxs)("div",{className:"detail-panel",onMouseDown:e=>e.stopPropagation(),children:[(0,i.jsxs)("div",{className:"detail-head",children:[(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsx)("span",{className:"kk-id",style:{fontSize:12},children:e.key}),(0,i.jsx)("button",{className:"dock-tool",onClick:a,children:(0,i.jsx)(n.I,{name:"close",size:15})})]}),(0,i.jsx)("div",{className:"view-title",style:{fontSize:17,marginTop:6},children:e.title}),(0,i.jsxs)("div",{style:{display:"flex",gap:8,marginTop:10,alignItems:"center"},children:[s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.e,{name:s.name,color:s.color,size:22}),(0,i.jsx)("span",{style:{fontSize:12.5,color:"var(--text)"},children:s.name})]}),(0,i.jsx)("span",{className:"pill",style:{marginLeft:6,background:v[e.prio]+"22",color:v[e.prio]},children:r(`tasks.prio.${e.prio}`)}),g&&(0,i.jsx)("span",{className:"chip-sm",children:r(`tasks.col.${g.id}`)})]})]}),(0,i.jsxs)("div",{className:"detail-body",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"detail-label",children:r("common.description")}),(0,i.jsx)("textarea",{className:"persona-ta",value:c,onChange:e=>k(e.target.value),onBlur:()=>{c!==e.description&&j(()=>o(e.id,c))},placeholder:r("tasks.descPlaceholder")})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"detail-label",children:r("tasks.liveProgress")}),0===e.steps.length&&(0,i.jsx)("div",{style:{fontSize:12,color:"var(--text-faint)"},children:r("tasks.noSteps",{who:s?s.name:r("tasks.theAgent")})}),e.steps.map(e=>(0,i.jsxs)("div",{className:"live-step "+(e.done?"done":e.active?"active":""),children:[(0,i.jsx)("span",{className:"ls-ico",style:{cursor:"pointer"},onClick:()=>j(()=>h(e.id,!e.done)),children:e.done?(0,i.jsx)(n.I,{name:"check",size:14}):e.active?(0,i.jsx)("span",{className:"spin",children:(0,i.jsx)(n.I,{name:"refresh",size:13})}):(0,i.jsx)(n.I,{name:"dot",size:8})}),(0,i.jsx)("span",{style:{flex:1},children:e.text}),(0,i.jsx)("button",{className:"iact danger",title:r("tasks.removeStep"),onClick:()=>j(()=>m(e.id)),children:(0,i.jsx)(n.I,{name:"close",size:12})})]},e.id)),(0,i.jsxs)("div",{style:{display:"flex",gap:6,marginTop:8},children:[(0,i.jsx)("input",{className:"form-input",style:{height:30,fontSize:12},placeholder:r("tasks.addStepPlaceholder"),value:b,onChange:e=>f(e.target.value),onKeyDown:s=>{"Enter"===s.key&&b.trim()&&(j(()=>p(e.id,b)),f(""))}}),(0,i.jsx)("button",{className:"btn-ghost",style:{padding:"4px 10px"},disabled:!b.trim(),onClick:()=>{j(()=>p(e.id,b)),f("")},children:(0,i.jsx)(n.I,{name:"add",size:12})})]})]})]})]})})}function k({tasks:e,agents:s}){let a=(0,d.k)(),n=Object.fromEntries(s.map(e=>[e.id,e])),[c,o]=(0,l.useState)(null),h=c?e.find(e=>e.id===c)??null:null;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"kanban",children:u.map(s=>{let l=e.filter(e=>e.col===s.id);return(0,i.jsxs)("div",{className:"kan-col",children:[(0,i.jsxs)("div",{className:"kan-col-head",children:[(0,i.jsx)("span",{className:"kc-dot",style:{background:s.c}}),a(`tasks.col.${s.id}`),(0,i.jsx)("span",{className:"kc-count",children:l.length})]}),(0,i.jsxs)("div",{className:"kan-cards scroll",children:[l.map(e=>{let s=e.assigneeId?n[e.assigneeId]:null,l=e.steps.filter(e=>e.done).length;return(0,i.jsxs)("div",{className:"kan-card",style:{cursor:"pointer"},onClick:()=>o(e.id),children:[(0,i.jsx)("div",{className:"kk-id",children:e.key}),(0,i.jsx)("div",{className:"kk-title",children:e.title}),(0,i.jsxs)("div",{className:"kk-foot",children:[(0,i.jsx)("span",{className:"kk-prio",style:{background:v[e.prio]},title:a(`tasks.prio.${e.prio}`)}),e.steps.length>0&&(0,i.jsxs)("span",{className:"chip-sm",title:a("tasks.stepsDone"),children:[l,"/",e.steps.length]}),s&&(0,i.jsx)(t.e,{name:s.name,color:s.color,size:20}),(0,i.jsx)("span",{style:{marginLeft:"auto"},onClick:e=>e.stopPropagation(),children:(0,i.jsx)(r.X,{id:e.id,col:e.col})})]})]},e.id)}),0===l.length&&(0,i.jsx)("div",{className:"muted",style:{fontSize:11.5,padding:"2px 1px"},children:a("tasks.noCards")})]})]},s.id)})}),h&&(0,i.jsx)(x,{task:h,agent:h.assigneeId?n[h.assigneeId]:null,onClose:()=>o(null)})]})}},3540:(e,s,a)=>{"use strict";a.d(s,{NewTaskButton:()=>m,X:()=>u});var i=a(4275),l=a(2899),n=a(869),t=a(7797);let d=(0,t.createServerReference)("40719173fae4079736b541866f993e89daac738cfe",t.callServer,void 0,t.findSourceMapURL,"createTask"),r=(0,t.createServerReference)("407a849d9e03a68a3b8ac5df32b026bd596796708e",t.callServer,void 0,t.findSourceMapURL,"unblockTask"),c=(0,t.createServerReference)("60b134a0492cbb2574ee8ea01d51be12efd59b4f3a",t.callServer,void 0,t.findSourceMapURL,"moveTask"),o=(0,t.createServerReference)("401ed1e0187bc0898d1d0811d4b4b00916db49d810",t.callServer,void 0,t.findSourceMapURL,"blockTask"),h=(0,t.createServerReference)("404c65174c144722505b46e82e7c4a467e6cee2b0d",t.callServer,void 0,t.findSourceMapURL,"deleteTask");function m({agents:e}){let s=(0,n.k)(),[a,t]=(0,l.useState)(!1),[r,c]=(0,l.useState)(""),[o,h]=(0,l.useState)(e[0]?.id??""),[p,u]=(0,l.useState)("med"),[v,x]=(0,l.useTransition)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{className:"btn-accent",onClick:()=>t(!0),children:["+ ",s("tasks.newCard")]}),a&&(0,i.jsx)("div",{className:"modal-overlay",onMouseDown:()=>t(!1),children:(0,i.jsxs)("div",{className:"modal",style:{padding:"20px 22px",width:440,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,i.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:10},children:s("tasks.newTask")}),(0,i.jsx)("label",{className:"form-label",children:s("pm.field.title")}),(0,i.jsx)("input",{className:"form-input",autoFocus:!0,value:r,onChange:e=>c(e.target.value),placeholder:s("tasks.descPlaceholder")}),(0,i.jsx)("label",{className:"form-label",children:s("tasks.assignee")}),(0,i.jsx)("select",{className:"form-input",value:o,onChange:e=>h(e.target.value),children:e.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),(0,i.jsx)("label",{className:"form-label",children:s("tasks.priority")}),(0,i.jsxs)("select",{className:"form-input",value:p,onChange:e=>u(e.target.value),children:[(0,i.jsx)("option",{value:"low",children:s("tasks.prio.low")}),(0,i.jsx)("option",{value:"med",children:s("tasks.prio.med")}),(0,i.jsx)("option",{value:"high",children:s("tasks.prio.high")})]}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,i.jsx)("button",{className:"btn-ghost",onClick:()=>t(!1),children:s("common.cancel")}),(0,i.jsx)("button",{className:"btn-accent",disabled:!r.trim()||v,onClick:function(){x(async()=>{await d({title:r,assigneeId:o,prio:p}),t(!1),c("")})},children:s(v?"tasks.creating":"common.create")})]})]})})]})}let p={triage:"todo",todo:"doing",doing:"review",blocked:"doing",review:"done",done:"done"};function u({id:e,col:s}){let a=(0,n.k)(),[t,d]=(0,l.useTransition)();return(0,i.jsxs)("span",{style:{display:"inline-flex",gap:4},children:["blocked"===s?(0,i.jsx)("button",{className:"mini",disabled:t,title:a("pm.action.unblock"),style:{color:"var(--sx-string)"},onClick:()=>d(()=>r(e)),children:"▶"}):"done"!==s&&(0,i.jsx)("button",{className:"mini",disabled:t,title:a("tasks.advance"),onClick:()=>d(()=>c(e,p[s])),children:"→"}),"done"!==s&&"blocked"!==s&&(0,i.jsx)("button",{className:"mini",disabled:t,title:a("pm.action.block"),style:{color:"#e8688f"},onClick:()=>d(()=>o(e)),children:"⊘"}),(0,i.jsx)("button",{className:"mini",disabled:t,title:a("common.delete"),onClick:()=>d(()=>h(e)),children:"✕"})]})}},4276:(e,s,a)=>{Promise.resolve().then(a.t.bind(a,9746,23)),Promise.resolve().then(a.bind(a,3540)),Promise.resolve().then(a.bind(a,1527)),Promise.resolve().then(a.bind(a,6032)),Promise.resolve().then(a.bind(a,8183)),Promise.resolve().then(a.bind(a,4822)),Promise.resolve().then(a.bind(a,24)),Promise.resolve().then(a.bind(a,2454)),Promise.resolve().then(a.bind(a,9508)),Promise.resolve().then(a.bind(a,3891))},5904:(e,s,a)=>{"use strict";a.d(s,{e:()=>l});var i=a(4275);function l({name:e,color:s,size:a=24,health:n,image:t}){let d=Math.max(6,Math.round(.3*a)),r=Math.round(.28*a),c=t?/^(data:|https?:|\/)/.test(t)?t:`/api/upload?path=${encodeURIComponent(t)}`:null;return(0,i.jsxs)("span",{style:{position:"relative",width:a,height:a,flex:`0 0 ${a}px`,display:"inline-block"},children:[c?(0,i.jsx)("img",{src:c,alt:e,width:a,height:a,style:{width:a,height:a,borderRadius:r,objectFit:"cover",display:"block"}}):(0,i.jsx)("span",{style:{width:a,height:a,borderRadius:r,background:s,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*a),fontWeight:700},children:(e[0]||"?").toUpperCase()}),n&&(0,i.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:d,height:d,borderRadius:"50%",background:"alive"===n?"var(--sx-string)":"stale"===n?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}}},e=>{e.O(0,[928,171,5523,7218,2235,7066,7358],()=>e(e.s=4276)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2738],{2970:(e,s,a)=>{"use strict";a.d(s,{TaskBoard:()=>f});var i=a(4275),l=a(2899),n=a(888),t=a(5904),r=a(869),o=a(3731),d=a(7797);let c=(0,d.createServerReference)("60e9847eeb8f7eab5e5a85b9b72b84b18678c0df3e",d.callServer,void 0,d.findSourceMapURL,"updateTaskDescription"),h=(0,d.createServerReference)("60deb0471e3c61381e81764993ca4d87f8fb102989",d.callServer,void 0,d.findSourceMapURL,"toggleTaskStep"),m=(0,d.createServerReference)("4049f83717fbe8f044f4e9617b667d941193eae1a2",d.callServer,void 0,d.findSourceMapURL,"deleteTaskStep"),p=(0,d.createServerReference)("609f969078e14309deca0962498f8ba6e376223c28",d.callServer,void 0,d.findSourceMapURL,"addTaskStep"),u=[{id:"triage",c:"#6cc7e0"},{id:"todo",c:"#84aef5"},{id:"doing",c:"#e0a44e"},{id:"blocked",c:"#e8688f"},{id:"review",c:"#c4a0ff"},{id:"done",c:"#b3d97a"}],v={high:"#e8688f",med:"#f0a35e",low:"#6cc7e0"};function x({task:e,agent:s,onClose:a}){let o=(0,r.k)(),[d,f]=(0,l.useState)(e.description),[k,b]=(0,l.useState)(""),[,j]=(0,l.useTransition)(),g=u.find(s=>s.id===e.col);return(0,i.jsx)("div",{className:"detail-overlay",onMouseDown:a,children:(0,i.jsxs)("div",{className:"detail-panel",onMouseDown:e=>e.stopPropagation(),children:[(0,i.jsxs)("div",{className:"detail-head",children:[(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsx)("span",{className:"kk-id",style:{fontSize:12},children:e.key}),(0,i.jsx)("button",{className:"dock-tool",onClick:a,children:(0,i.jsx)(n.I,{name:"close",size:15})})]}),(0,i.jsx)("div",{className:"view-title",style:{fontSize:17,marginTop:6},children:e.title}),(0,i.jsxs)("div",{style:{display:"flex",gap:8,marginTop:10,alignItems:"center"},children:[s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.e,{name:s.name,color:s.color,size:22}),(0,i.jsx)("span",{style:{fontSize:12.5,color:"var(--text)"},children:s.name})]}),(0,i.jsx)("span",{className:"pill",style:{marginLeft:6,background:v[e.prio]+"22",color:v[e.prio]},children:o(`tasks.prio.${e.prio}`)}),g&&(0,i.jsx)("span",{className:"chip-sm",children:o(`tasks.col.${g.id}`)})]})]}),(0,i.jsxs)("div",{className:"detail-body",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"detail-label",children:o("common.description")}),(0,i.jsx)("textarea",{className:"persona-ta",value:d,onChange:e=>f(e.target.value),onBlur:()=>{d!==e.description&&j(()=>c(e.id,d))},placeholder:o("tasks.descPlaceholder")})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"detail-label",children:o("tasks.liveProgress")}),0===e.steps.length&&(0,i.jsx)("div",{style:{fontSize:12,color:"var(--text-faint)"},children:o("tasks.noSteps",{who:s?s.name:o("tasks.theAgent")})}),e.steps.map(e=>(0,i.jsxs)("div",{className:"live-step "+(e.done?"done":e.active?"active":""),children:[(0,i.jsx)("span",{className:"ls-ico",style:{cursor:"pointer"},onClick:()=>j(()=>h(e.id,!e.done)),children:e.done?(0,i.jsx)(n.I,{name:"check",size:14}):e.active?(0,i.jsx)("span",{className:"spin",children:(0,i.jsx)(n.I,{name:"refresh",size:13})}):(0,i.jsx)(n.I,{name:"dot",size:8})}),(0,i.jsx)("span",{style:{flex:1},children:e.text}),(0,i.jsx)("button",{className:"iact danger",title:o("tasks.removeStep"),onClick:()=>j(()=>m(e.id)),children:(0,i.jsx)(n.I,{name:"close",size:12})})]},e.id)),(0,i.jsxs)("div",{style:{display:"flex",gap:6,marginTop:8},children:[(0,i.jsx)("input",{className:"form-input",style:{height:30,fontSize:12},placeholder:o("tasks.addStepPlaceholder"),value:k,onChange:e=>b(e.target.value),onKeyDown:s=>{"Enter"===s.key&&k.trim()&&(j(()=>p(e.id,k)),b(""))}}),(0,i.jsx)("button",{className:"btn-ghost",style:{padding:"4px 10px"},disabled:!k.trim(),onClick:()=>{j(()=>p(e.id,k)),b("")},children:(0,i.jsx)(n.I,{name:"add",size:12})})]})]})]})]})})}function f({tasks:e,agents:s}){let a=(0,r.k)(),n=Object.fromEntries(s.map(e=>[e.id,e])),[d,c]=(0,l.useState)(null),h=d?e.find(e=>e.id===d)??null:null;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"kanban",children:u.map(s=>{let l=e.filter(e=>e.col===s.id);return(0,i.jsxs)("div",{className:"kan-col",children:[(0,i.jsxs)("div",{className:"kan-col-head",children:[(0,i.jsx)("span",{className:"kc-dot",style:{background:s.c}}),a(`tasks.col.${s.id}`),(0,i.jsx)("span",{className:"kc-count",children:l.length})]}),(0,i.jsxs)("div",{className:"kan-cards scroll",children:[l.map(e=>{let s=e.assigneeId?n[e.assigneeId]:null,l=e.steps.filter(e=>e.done).length;return(0,i.jsxs)("div",{className:"kan-card",style:{cursor:"pointer"},onClick:()=>c(e.id),children:[(0,i.jsx)("div",{className:"kk-id",children:e.key}),(0,i.jsx)("div",{className:"kk-title",children:e.title}),(0,i.jsxs)("div",{className:"kk-foot",children:[(0,i.jsx)("span",{className:"kk-prio",style:{background:v[e.prio]},title:a(`tasks.prio.${e.prio}`)}),e.steps.length>0&&(0,i.jsxs)("span",{className:"chip-sm",title:a("tasks.stepsDone"),children:[l,"/",e.steps.length]}),s&&(0,i.jsx)(t.e,{name:s.name,color:s.color,size:20}),(0,i.jsx)("span",{style:{marginLeft:"auto"},onClick:e=>e.stopPropagation(),children:(0,i.jsx)(o.X,{id:e.id,col:e.col})})]})]},e.id)}),0===l.length&&(0,i.jsx)("div",{className:"muted",style:{fontSize:11.5,padding:"2px 1px"},children:a("tasks.noCards")})]})]},s.id)})}),h&&(0,i.jsx)(x,{task:h,agent:h.assigneeId?n[h.assigneeId]:null,onClose:()=>c(null)})]})}},3731:(e,s,a)=>{"use strict";a.d(s,{NewTaskButton:()=>m,X:()=>u});var i=a(4275),l=a(2899),n=a(869),t=a(7797);let r=(0,t.createServerReference)("40037e0f022d98a975a44aec67b0d1f35003d88143",t.callServer,void 0,t.findSourceMapURL,"createTask"),o=(0,t.createServerReference)("4028a62aa7706daa9b337f497442b1fe97e7946218",t.callServer,void 0,t.findSourceMapURL,"unblockTask"),d=(0,t.createServerReference)("609f4e81763f16355216a2b5173fe46a2895c29698",t.callServer,void 0,t.findSourceMapURL,"moveTask"),c=(0,t.createServerReference)("403802dc01c05925ab54364e0061b5c72e95cf6771",t.callServer,void 0,t.findSourceMapURL,"blockTask"),h=(0,t.createServerReference)("4060d596e4f3ca8708046ba849cb50514b566acd70",t.callServer,void 0,t.findSourceMapURL,"deleteTask");function m({agents:e}){let s=(0,n.k)(),[a,t]=(0,l.useState)(!1),[o,d]=(0,l.useState)(""),[c,h]=(0,l.useState)(e[0]?.id??""),[p,u]=(0,l.useState)("med"),[v,x]=(0,l.useTransition)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{className:"btn-accent",onClick:()=>t(!0),children:["+ ",s("tasks.newCard")]}),a&&(0,i.jsx)("div",{className:"modal-overlay",onMouseDown:()=>t(!1),children:(0,i.jsxs)("div",{className:"modal",style:{padding:"20px 22px",width:440,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,i.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:10},children:s("tasks.newTask")}),(0,i.jsx)("label",{className:"form-label",children:s("pm.field.title")}),(0,i.jsx)("input",{className:"form-input",autoFocus:!0,value:o,onChange:e=>d(e.target.value),placeholder:s("tasks.descPlaceholder")}),(0,i.jsx)("label",{className:"form-label",children:s("tasks.assignee")}),(0,i.jsx)("select",{className:"form-input",value:c,onChange:e=>h(e.target.value),children:e.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),(0,i.jsx)("label",{className:"form-label",children:s("tasks.priority")}),(0,i.jsxs)("select",{className:"form-input",value:p,onChange:e=>u(e.target.value),children:[(0,i.jsx)("option",{value:"low",children:s("tasks.prio.low")}),(0,i.jsx)("option",{value:"med",children:s("tasks.prio.med")}),(0,i.jsx)("option",{value:"high",children:s("tasks.prio.high")})]}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,i.jsx)("button",{className:"btn-ghost",onClick:()=>t(!1),children:s("common.cancel")}),(0,i.jsx)("button",{className:"btn-accent",disabled:!o.trim()||v,onClick:function(){x(async()=>{await r({title:o,assigneeId:c,prio:p}),t(!1),d("")})},children:s(v?"tasks.creating":"common.create")})]})]})})]})}let p={triage:"todo",todo:"doing",doing:"review",blocked:"doing",review:"done",done:"done"};function u({id:e,col:s}){let a=(0,n.k)(),[t,r]=(0,l.useTransition)();return(0,i.jsxs)("span",{style:{display:"inline-flex",gap:4},children:["blocked"===s?(0,i.jsx)("button",{className:"mini",disabled:t,title:a("pm.action.unblock"),style:{color:"var(--sx-string)"},onClick:()=>r(()=>o(e)),children:"▶"}):"done"!==s&&(0,i.jsx)("button",{className:"mini",disabled:t,title:a("tasks.advance"),onClick:()=>r(()=>d(e,p[s])),children:"→"}),"done"!==s&&"blocked"!==s&&(0,i.jsx)("button",{className:"mini",disabled:t,title:a("pm.action.block"),style:{color:"#e8688f"},onClick:()=>r(()=>c(e)),children:"⊘"}),(0,i.jsx)("button",{className:"mini",disabled:t,title:a("common.delete"),onClick:()=>r(()=>h(e)),children:"✕"})]})}},4276:(e,s,a)=>{Promise.resolve().then(a.t.bind(a,9746,23)),Promise.resolve().then(a.bind(a,3731)),Promise.resolve().then(a.bind(a,2970)),Promise.resolve().then(a.bind(a,6516)),Promise.resolve().then(a.bind(a,8183)),Promise.resolve().then(a.bind(a,4822)),Promise.resolve().then(a.bind(a,5412)),Promise.resolve().then(a.bind(a,2454)),Promise.resolve().then(a.bind(a,9508)),Promise.resolve().then(a.bind(a,3891))},5904:(e,s,a)=>{"use strict";a.d(s,{e:()=>l});var i=a(4275);function l({name:e,color:s,size:a=24,health:n,image:t}){let r=Math.max(6,Math.round(.3*a)),o=Math.round(.28*a),d=t?/^(data:|https?:|\/)/.test(t)?t:`/api/upload?path=${encodeURIComponent(t)}`:null;return(0,i.jsxs)("span",{style:{position:"relative",width:a,height:a,flex:`0 0 ${a}px`,display:"inline-block"},children:[d?(0,i.jsx)("img",{src:d,alt:e,width:a,height:a,style:{width:a,height:a,borderRadius:o,objectFit:"cover",display:"block"}}):(0,i.jsx)("span",{style:{width:a,height:a,borderRadius:o,background:s,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*a),fontWeight:700},children:(e[0]||"?").toUpperCase()}),n&&(0,i.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:r,height:r,borderRadius:"50%",background:"alive"===n?"var(--sx-string)":"stale"===n?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}}},e=>{e.O(0,[928,171,6871,7218,2235,7066,7358],()=>e(e.s=4276)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5210],{1133:(e,s,t)=>{"use strict";t.d(s,{j:()=>i});var a=t(7797);let i=(0,a.createServerReference)("003649be107c69af410f5b59dc57988238c9b2ccb4",a.callServer,void 0,a.findSourceMapURL,"devServerStatusAction")},3063:(e,s,t)=>{"use strict";function a(e){if(null==e)return"";let s=e instanceof Date?e:new Date(e);if(isNaN(s.getTime()))return"";let t=s.toLocaleDateString([],{day:"2-digit",month:"short"}),a=s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return`${t}, ${a}`}t.d(s,{F:()=>a})},4952:(e,s,t)=>{"use strict";t.d(s,{m:()=>d});var a=t(4275),i=t(2899),r=t(888),n=t(9156),l=t(869);function d({value:e,options:s,onChange:t,placeholder:c,mono:o,glyph:m,disabled:v,searchable:h}){let p=(0,l.k)(),[u,x]=(0,i.useState)(!1),[g,f]=(0,i.useState)(""),b=(0,i.useRef)(null),j=(0,i.useRef)(null),y=(0,i.useMemo)(()=>(s||[]).map(e=>"string"==typeof e?{value:e,label:e}:e),[s]),w=y.find(s=>s.value===e),N=(h??y.length>8)&&!v,k=g.trim().toLowerCase(),S=N&&k?y.filter(e=>(e.label+" "+e.value+" "+(e.sub||"")).toLowerCase().includes(k)):y;return(0,i.useEffect)(()=>{if(!u)return void f("");function e(e){b.current&&!b.current.contains(e.target)&&x(!1)}function s(e){"Escape"===e.key&&x(!1)}return document.addEventListener("mousedown",e),document.addEventListener("keydown",s),N&&requestAnimationFrame(()=>j.current?.focus()),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",s)}},[u,N]),(0,a.jsxs)("div",{className:"dd"+(u?" open":"")+(v?" disabled":""),ref:b,children:[(0,a.jsxs)("button",{type:"button",className:"dd-btn"+(o?" mono":""),onClick:()=>!v&&x(e=>!e),children:[m&&w&&(0,a.jsx)(n.W,{id:w.glyphId||w.value,size:20}),(0,a.jsx)("span",{className:"dd-val",children:w?w.label:(0,a.jsx)("span",{className:"dd-ph",children:c||p("common.selectEllipsis")})}),(0,a.jsx)(r.I,{name:"chevronDown",size:14})]}),u&&(0,a.jsxs)("div",{className:"dd-menu scroll",children:[N&&(0,a.jsxs)("div",{style:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:6,padding:"6px 8px",margin:"-4px -4px 4px",background:"var(--bg-elev, var(--bg-active))",borderBottom:"1px solid var(--border)"},children:[(0,a.jsx)(r.I,{name:"search",size:13}),(0,a.jsx)("input",{ref:j,value:g,placeholder:p("common.searchEllipsis"),onChange:e=>f(e.target.value),onKeyDown:e=>{"Enter"===e.key&&S[0]?(t(S[0].value),x(!1)):"Escape"===e.key&&g&&(e.stopPropagation(),f(""))},className:o?"mono":void 0,style:{flex:1,minWidth:0,background:"transparent",border:"none",outline:"none",color:"var(--text)",fontSize:12.5,fontFamily:o?"var(--mono-font)":"inherit"}}),g&&(0,a.jsx)("button",{type:"button",title:p("common.clear"),onClick:()=>{f(""),j.current?.focus()},style:{background:"none",border:"none",color:"var(--text-dim)",cursor:"pointer",display:"flex",padding:0},children:(0,a.jsx)(r.I,{name:"close",size:12})})]}),0===y.length&&(0,a.jsx)("div",{className:"dd-empty",children:p("common.noOptions")}),y.length>0&&0===S.length&&(0,a.jsx)("div",{className:"dd-empty",children:p("dropdown.noMatch",{q:g})}),S.map(s=>(0,a.jsxs)("button",{type:"button",className:"dd-opt"+(s.value===e?" on":""),onClick:()=>{t(s.value),x(!1)},children:[m&&(0,a.jsx)(n.W,{id:s.glyphId||s.value,size:22}),(0,a.jsxs)("span",{className:"dd-opt-main",children:[(0,a.jsx)("span",{className:"dd-opt-label"+(o?" mono":""),children:s.label}),s.sub&&(0,a.jsx)("span",{className:"dd-opt-sub",children:s.sub})]}),s.tag&&(0,a.jsx)("span",{className:"dd-opt-tag",children:s.tag}),s.value===e&&(0,a.jsx)(r.I,{name:"check",size:13})]},s.value))]})]})}},5139:(e,s,t)=>{"use strict";t.d(s,{R:()=>i});var a=t(7797);let i=(0,a.createServerReference)("006a170afb6abc35cef34fd85cf16f40dd0635121c",a.callServer,void 0,a.findSourceMapURL,"startDevServerAction")},7217:(e,s,t)=>{Promise.resolve().then(t.t.bind(t,9746,23)),Promise.resolve().then(t.bind(t,8133)),Promise.resolve().then(t.bind(t,6516)),Promise.resolve().then(t.bind(t,8183)),Promise.resolve().then(t.bind(t,4822)),Promise.resolve().then(t.bind(t,5412)),Promise.resolve().then(t.bind(t,2454)),Promise.resolve().then(t.bind(t,9508)),Promise.resolve().then(t.bind(t,3891))},7985:(e,s,t)=>{"use strict";t.d(s,{K:()=>i});var a=t(7797);let i=(0,a.createServerReference)("40f4edd374e432e6657aea53c1202eefb711b7f6cb",a.callServer,void 0,a.findSourceMapURL,"previewFrameableAction")},8133:(e,s,t)=>{"use strict";t.d(s,{TestDevScreen:()=>b});var a=t(4275),i=t(2899),r=t(888),n=t(4952),l=t(3063),d=t(869),c=t(7985),o=t(7797);let m=(0,o.createServerReference)("0026719cdabaa7470871210fe05e7dbbc601e59e93",o.callServer,void 0,o.findSourceMapURL,"stopDevServerAction");var v=t(5139),h=t(1133);let p=(0,o.createServerReference)("40f08079ab7689af208b79eda5b6e422eba52d8b4d",o.callServer,void 0,o.findSourceMapURL,"runTestDevAction"),u={pass:"var(--sx-string)",fail:"#e8688f",inconclusive:"#d98a2b",running:"var(--accent)"},x={high:"#e8688f",med:"#d98a2b",low:"var(--text-dim)"},g=[{id:"desktop",w:"100%"},{id:"tablet",w:"768px"},{id:"mobile",w:"390px"}];function f({status:e,onStart:s,starting:t}){let n=(0,d.k)(),l=e.url??"",o="running"===e.status&&!!l,[m,v]=(0,i.useState)(l),[h,p]=(0,i.useState)(l),[u,x]=(0,i.useState)(0),[b,j]=(0,i.useState)("desktop"),[y,w]=(0,i.useState)(!0),N=g.find(e=>e.id===b)?.w??"100%";return(0,i.useEffect)(()=>{l?(v(e=>e||l),p(e=>e||l)):(v(""),p(""))},[l]),(0,i.useEffect)(()=>{if(!o||!h)return void w(!0);let e=!0;return(0,c.K)(h).then(s=>{e&&w(s.frameable)}).catch(()=>{}),()=>{e=!1}},[o,h,u]),(0,a.jsxs)("div",{className:"hw-card tdb-card",children:[(0,a.jsxs)("div",{className:"hw-head",children:[(0,a.jsx)("span",{className:"hw-ic",children:(0,a.jsx)(r.I,{name:"goto",size:19})}),(0,a.jsxs)("div",{style:{flex:1},children:[(0,a.jsx)("div",{className:"hw-t",children:n("testdev.preview.title")}),(0,a.jsx)("div",{className:"hw-s",children:n("testdev.preview.sub")})]}),(0,a.jsx)("div",{className:"tdb-vp",children:g.map(e=>(0,a.jsx)("button",{className:"tdb-vp-btn"+(b===e.id?" on":""),disabled:!o,onClick:()=>j(e.id),children:n(`testdev.viewport.${e.id}`)},e.id))})]}),(0,a.jsxs)("div",{className:"tdb-bar",children:[(0,a.jsxs)("div",{className:"tdb-dots",children:[(0,a.jsx)("span",{}),(0,a.jsx)("span",{}),(0,a.jsx)("span",{})]}),(0,a.jsx)("button",{className:"tdb-ico",title:n("testdev.preview.reload"),disabled:!o,onClick:function(){x(e=>e+1)},children:(0,a.jsx)(r.I,{name:"refresh",size:14})}),(0,a.jsxs)("form",{className:"tdb-addr",onSubmit:function(e){let s;e?.preventDefault();let t=(s=m.trim())?/^https?:\/\//i.test(s)?s:l.replace(/\/$/,"")+(s.startsWith("/")?s:"/"+s):l;p(t),v(t),x(e=>e+1)},children:[(0,a.jsx)(r.I,{name:o?"shield":"goto",size:12}),(0,a.jsx)("input",{value:m,placeholder:l||n("testdev.preview.addrPlaceholder"),disabled:!o,onChange:e=>v(e.target.value),spellCheck:!1})]}),o?(0,a.jsx)("a",{className:"tdb-ico",title:n("testdev.preview.openNewTab"),href:h,target:"_blank",rel:"noreferrer",children:(0,a.jsx)(r.I,{name:"goto",size:14})}):(0,a.jsx)("span",{className:"tdb-ico off",children:(0,a.jsx)(r.I,{name:"goto",size:14})})]}),(0,a.jsx)("div",{className:"tdb-stage",children:o&&!y?(0,a.jsxs)("div",{className:"tdb-empty",children:[(0,a.jsx)("span",{className:"tdb-empty-ic",children:(0,a.jsx)(r.I,{name:"shield",size:26})}),(0,a.jsx)("div",{className:"tdb-empty-t",children:n("testdev.preview.blocked.title")}),(0,a.jsx)("div",{className:"tdb-empty-s",children:n("testdev.preview.blocked.sub")}),(0,a.jsxs)("a",{className:"btn-accent",style:{marginTop:10},href:h,target:"_blank",rel:"noreferrer",children:[(0,a.jsx)(r.I,{name:"goto",size:13})," ",n("testdev.preview.openNewTabBtn")]})]}):o?(0,a.jsx)("iframe",{className:"tdb-frame",src:h,style:{width:N,maxWidth:"100%"},title:n("testdev.preview.frameTitle"),sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads"},u):(0,a.jsxs)("div",{className:"tdb-empty",children:[(0,a.jsx)("span",{className:"tdb-empty-ic"+(t||"starting"===e.status?" spin":""),children:(0,a.jsx)(r.I,{name:t||"starting"===e.status?"refresh":"goto",size:26})}),(0,a.jsx)("div",{className:"tdb-empty-t",children:"error"===e.status?n("testdev.preview.empty.errorTitle"):t||"starting"===e.status?n("testdev.preview.empty.startingTitle"):n("testdev.preview.empty.idleTitle")}),(0,a.jsx)("div",{className:"tdb-empty-s",children:"error"===e.status?n("testdev.preview.empty.errorSub"):n("testdev.preview.empty.idleSub")}),"running"!==e.status&&"starting"!==e.status&&!t&&(0,a.jsxs)("button",{className:"btn-accent",style:{marginTop:10},onClick:s,children:[(0,a.jsx)(r.I,{name:"goto",size:13})," ",n("testdev.server.start")]})]})})]})}function b({status:e,runs:s,goals:t}){let c=(0,d.k)(),[o,g]=(0,i.useState)(e),[j,y]=(0,i.useState)(""),[w,N]=(0,i.useState)(null),[k,S]=(0,i.useState)(""),[,z]=(0,i.useTransition)();function _(){S("server"),z(async()=>{g(o.running?await m():await (0,v.R)()),S("")})}let C="running"===o.status?"run":"starting"===o.status?"boot":"stop",I="running"===o.status?c("testdev.state.running"):"starting"===o.status?c("testdev.state.starting"):"error"===o.status?c("testdev.state.error"):"none"===o.status?c("testdev.state.notStarted"):c("testdev.state.stopped");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"lr-grid",children:[(0,a.jsxs)("div",{className:"hw-card",children:[(0,a.jsxs)("div",{className:"hw-head",children:[(0,a.jsx)("span",{className:"hw-ic",children:(0,a.jsx)(r.I,{name:"terminal",size:19})}),(0,a.jsxs)("div",{style:{flex:1},children:[(0,a.jsx)("div",{className:"hw-t",children:c("testdev.server.title")}),(0,a.jsx)("div",{className:"hw-s",children:o.project??c("testdev.server.defaultProject")})]}),(0,a.jsx)("button",{className:"iact",title:c("common.refresh"),onClick:function(){z(async()=>{g(await (0,h.j)())})},children:(0,a.jsx)(r.I,{name:"refresh",size:15})})]}),(0,a.jsxs)("div",{className:"srv-status",children:[(0,a.jsx)("span",{className:"srv-dot "+C}),(0,a.jsxs)("div",{className:"srv-meta",children:[(0,a.jsx)("div",{className:"sm-t",children:I}),(0,a.jsx)("div",{className:"sm-s",children:o.url??c("testdev.server.noServer")})]}),(0,a.jsxs)("button",{className:o.running?"btn-ghost":"btn-accent",onClick:_,disabled:"server"===k,children:["server"===k?(0,a.jsx)("span",{className:"sync-spin",children:(0,a.jsx)(r.I,{name:"refresh",size:13})}):(0,a.jsx)(r.I,{name:o.running?"close":"goto",size:13}),o.running?c("testdev.server.stop"):"server"===k?c("testdev.server.working"):c("testdev.server.start")]})]}),(0,a.jsxs)("div",{className:"srv-log scroll",style:{maxHeight:220},children:[0===o.logs.length&&(0,a.jsx)("div",{className:"lg-dim",children:c("testdev.server.noOutput")}),o.logs.map((e,s)=>(0,a.jsx)("div",{className:"err"===e.c?"lg-warn":"info"===e.c?"lg-dim":"lg-ok",children:e.t},s))]})]}),(0,a.jsxs)("div",{className:"hw-card",children:[(0,a.jsxs)("div",{className:"hw-head",children:[(0,a.jsx)("span",{className:"hw-ic",children:(0,a.jsx)(r.I,{name:"pulse",size:19})}),(0,a.jsxs)("div",{style:{flex:1},children:[(0,a.jsx)("div",{className:"hw-t",children:c("testdev.tests.title")}),(0,a.jsx)("div",{className:"hw-s",children:c("testdev.tests.sub")})]})]}),(0,a.jsxs)("div",{style:{marginBottom:10},children:[(0,a.jsx)("div",{className:"pa-flabel",style:{marginBottom:4},children:c("testdev.tests.scope")}),(0,a.jsx)(n.m,{value:j,placeholder:c("testdev.tests.wholeApp"),options:[{value:"",label:c("testdev.tests.wholeApp")},...t.map(e=>({value:e.id,label:e.title.slice(0,40)}))],onChange:y})]}),(0,a.jsx)("button",{className:"btn-accent",style:{width:"100%",justifyContent:"center"},onClick:function(){S("test"),N(null),z(async()=>{let e=await p(j?{goalId:j}:void 0);N({status:e.status,summary:e.summary,findings:e.findings}),g(await (0,h.j)()),S("")})},disabled:"test"===k,children:"test"===k?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"sync-spin",children:(0,a.jsx)(r.I,{name:"refresh",size:13})})," ",c("testdev.tests.testing")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.I,{name:"play",size:13})," ",c("testdev.tests.run")]})}),w&&(0,a.jsxs)("div",{style:{marginTop:12},children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[(0,a.jsx)("span",{className:"pill",style:{background:u[w.status]+"22",color:u[w.status]},children:c(`testdev.verdict.${w.status}`)}),(0,a.jsx)("span",{style:{fontSize:12.5,color:"var(--text-dim)"},children:w.summary})]}),w.findings.length>0&&(0,a.jsx)("div",{className:"srv-log scroll",style:{maxHeight:160},children:w.findings.map((e,s)=>(0,a.jsxs)("div",{style:{display:"flex",gap:6,padding:"2px 0"},children:[(0,a.jsx)("span",{style:{color:x[e.severity],fontWeight:700,fontSize:10},children:c(`testdev.severity.${e.severity}`).toUpperCase()}),(0,a.jsxs)("span",{style:{color:"var(--text-faint)",fontSize:11},children:[e.kind,"@",e.route]}),(0,a.jsx)("span",{style:{fontSize:11,color:"var(--text-dim)",flex:1},children:e.message})]},s))})]})]})]}),(0,a.jsx)(f,{status:o,onStart:_,starting:"server"===k}),(0,a.jsx)("div",{className:"view-section-title",children:c("testdev.recent.title")}),(0,a.jsx)("div",{className:"tbl-wrap",children:(0,a.jsxs)("table",{className:"tbl",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:c("testdev.col.verdict")}),(0,a.jsx)("th",{children:c("testdev.col.summary")}),(0,a.jsx)("th",{children:c("testdev.col.findings")}),(0,a.jsx)("th",{children:c("testdev.col.by")}),(0,a.jsx)("th",{children:c("testdev.col.when")})]})}),(0,a.jsxs)("tbody",{children:[0===s.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:5,style:{textAlign:"center",color:"var(--text-faint)",padding:18},children:c("testdev.recent.empty")})}),s.map(e=>{let s=0;try{s=JSON.parse(e.findings).length}catch{}return(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("span",{className:"pill",style:{background:u[e.status]+"22",color:u[e.status]},children:c(`testdev.verdict.${e.status}`)})}),(0,a.jsx)("td",{style:{fontSize:12.5},children:e.summary||"—"}),(0,a.jsx)("td",{style:{color:"var(--text-dim)"},children:s}),(0,a.jsx)("td",{style:{color:"var(--text-dim)"},children:e.by}),(0,a.jsx)("td",{style:{color:"var(--text-faint)",fontSize:11},children:e.startedAt?(0,l.F)(e.startedAt):"—"})]},e.id)})]})]})})]})}},9156:(e,s,t)=>{"use strict";t.d(s,{W:()=>l});var a=t(4275),i=t(2899);let r={anthropic:"anthropic",claude_code:"claude",openai:"openai",codex_cli:"openai",google:"google",google_gemini:"gemini",gemini_cli:"gemini",vertex_ai:"vertexai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere",perplexity:"perplexity",xai_grok:"grok",groq:"groq",ai21:"ai21",nvidia_nim:"nvidia",huggingface:"huggingface",replicate:"replicate",azure_openai:"azure",aws_bedrock:"bedrock",cloudflare:"cloudflare",dashscope:"qwen",zhipu:"zhipu",moonshot:"moonshot",minimax:"minimax",together:"together",openrouter:"openrouter",fireworks:"fireworks",cerebras:"cerebras",ollama:"ollama",ollama_cli:"ollama",lmstudio:"lmstudio",vllm:"vllm",localai:"localai",elevenlabs:"elevenlabs",stability:"stability",jina:"jina",voyage:"voyage"},n={anthropic:["#d97757","An"],openai:["#10a37f","AI"],google_gemini:["#4285f4","G"],google:["#4285f4","G"],mistral:["#fa520f","Mi"],xai_grok:["#1a1a1a","X"],deepseek:["#4d6bfe","DS"],cohere:["#39594d","Co"],ai21:["#e8488a","A2"],perplexity:["#20808d","Px"],groq:["#f55036","Gq"],nvidia_nim:["#76b900","NV"],together:["#0f6fff","To"],fireworks:["#5019c5","Fw"],cerebras:["#f25733","Cb"],huggingface:["#ff9d00","HF"],replicate:["#1a1a1a","Rp"],openrouter:["#6566f1","OR"],litellm:["#00b8a3","LL"],portkey:["#3b5bdb","Pk"],azure_openai:["#0078d4","Az"],aws_bedrock:["#ff9900","Br"],vertex_ai:["#4285f4","Vx"],cloudflare:["#f38020","Cf"],dashscope:["#ff6a00","Qw"],zhipu:["#3859ff","GL"],moonshot:["#16162a","Ki"],minimax:["#e1342c","MM"],ollama:["#0c0c0c","Ol"],llamacpp:["#7a4ddb","Lc"],lmstudio:["#4a5cff","LM"],vllm:["#1668dc","vL"],localai:["#2e7d32","La"],gpt4all:["#5b6cff","G4"],jan:["#1a1a1a","Jn"],claude_code:["#d97757","CC"],codex_cli:["#10a37f","Cx"],gemini_cli:["#4285f4","Gc"],aider:["#14b8a6","Ad"],ollama_cli:["#0c0c0c","Oc"],openclaw:["#e8590c","OC"],hermes_cli:["#6d28d9","Hm"],opencode:["#1a1a1a","Oc"],copilot_cli:["#1f2328","Co"],cursor_cli:["#1a1a1a","Cu"],cline_cli:["#2563eb","Cl"],kilo_code:["#7c3aed","Ki"],voyage:["#5b21b6","Vo"],jina:["#ec4899","Ji"],stability:["#a855f7","St"],elevenlabs:["#1a1a1a","El"]};function l({id:e,size:s=34,radius:t}){let d,c=n[e],o=c?c[0]:"#5b6378",m=c?c[1]:(e||"?").slice(0,2).replace(/[^a-z0-9]/gi,"").toUpperCase(),v=(d=r[e])?`https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg/icons/${d}.svg`:null,[h,p]=(0,i.useState)(!1),u=null!=t?t:Math.round(.28*s),x=v&&!h,g=Math.round(.66*s);return(0,a.jsx)("span",{className:"prov-glyph",style:{width:s,height:s,flex:"0 0 "+s+"px",borderRadius:u,background:x?"#fff":"linear-gradient(150deg, "+o+", color-mix(in srgb, "+o+" 70%, #000))",color:"#fff",display:"grid",placeItems:"center",overflow:"hidden",fontSize:Math.round(.4*s),fontWeight:800,letterSpacing:"-.5px",boxShadow:x?"inset 0 0 0 1px rgba(0,0,0,.08)":"inset 0 1px 0 rgba(255,255,255,.18)"},children:x?(0,a.jsx)("img",{src:v,alt:"",width:g,height:g,loading:"lazy",onError:()=>p(!0),style:{width:g,height:g,objectFit:"contain",display:"block"}}):m})}}},e=>{e.O(0,[928,171,6871,7218,2235,7066,7358],()=>e(e.s=7217)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2849],{140:(e,s,a)=>{Promise.resolve().then(a.t.bind(a,9746,23)),Promise.resolve().then(a.bind(a,984)),Promise.resolve().then(a.bind(a,6516)),Promise.resolve().then(a.bind(a,8183)),Promise.resolve().then(a.bind(a,4822)),Promise.resolve().then(a.bind(a,5412)),Promise.resolve().then(a.bind(a,2454)),Promise.resolve().then(a.bind(a,9508)),Promise.resolve().then(a.bind(a,3891))},984:(e,s,a)=>{"use strict";a.d(s,{UpdateScreen:()=>p});var t=a(4275),l=a(2899),n=a(8343),i=a(6054),r=a(888),c=a(7094),d=a(7161),o=a(679),u=a(869);function p(e){let s=(0,u.k)(),[a,p]=(0,l.useState)(!1),[h,m]=(0,l.useState)(null),[v,x]=(0,l.useState)(""),[b,g]=(0,l.useState)({latest:e.latest,updateAvailable:e.updateAvailable,type:e.type,changelog:e.changelog}),[j,y]=(0,l.useState)(!1),[f,N]=(0,l.useState)(!1);async function k(){await new Promise(e=>setTimeout(e,1800));for(let e=0;e<40;e++){try{if((await fetch(window.location.href,{method:"HEAD",cache:"no-store"})).ok)break}catch{}await new Promise(e=>setTimeout(e,1500))}window.location.reload()}async function w(){if(!f){N(!0);try{let e=await (0,c.l)(!0);g({latest:e.info.latest,updateAvailable:e.info.updateAvailable,type:e.info.type,changelog:e.info.changelog}),y(e.busy)}catch{}finally{N(!1)}}}async function I(){if(j)return;p(!0),x("");let e=await (0,d.P)();if(m(e),e.blocked){p(!1),y(!0);return}if(e.started){let e=setInterval(async()=>{let s=await (0,o.e)().catch(()=>null);s&&(x(s.status),"done"===s.status?(clearInterval(e),await k()):"error"===s.status&&(clearInterval(e),p(!1)))},3e3)}else p(!1)}return(0,l.useEffect)(()=>{let e=!1,s=async()=>{try{let s=await (0,c.l)(!1);e||y(s.busy)}catch{}};s();let a=setInterval(s,12e3);return()=>{e=!0,clearInterval(a)}},[]),(0,t.jsxs)("div",{className:"pd-grid",children:[(0,t.jsxs)("div",{className:"hw-card",children:[(0,t.jsxs)("div",{className:"upd-versions",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"upd-k",children:s("update.installed")}),(0,t.jsxs)("div",{className:"upd-v",children:["v",e.current]})]}),(0,t.jsx)(r.I,{name:"goto",size:16,style:{color:"var(--text-faint)"}}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"upd-k",children:s("update.latest")}),(0,t.jsx)("div",{className:"upd-v",style:{color:"var(--accent)"},children:b.latest?"v"+b.latest:"—"})]}),b.type&&(0,t.jsx)("span",{className:"pill",style:{marginLeft:"auto",background:"var(--bg-active)",color:"var(--text-dim)"},children:b.type})]}),(0,t.jsxs)("div",{className:"set-desc",style:{marginTop:10},children:[(0,t.jsx)(r.I,{name:"cpu",size:12})," ",s(`update.ctx.${e.context}`)]}),(0,t.jsxs)("div",{style:{marginTop:14,display:"flex",gap:10,flexWrap:"wrap",alignItems:"center"},children:[b.updateAvailable&&(0,t.jsx)("button",{className:"btn-accent",disabled:a||j,onClick:I,title:j?s("update.busy"):void 0,children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"sync-spin",children:(0,t.jsx)(r.I,{name:"refresh",size:13})})," ",s("update.updating")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.I,{name:"goto",size:13})," ",s("update.updateNow")]})}),(0,t.jsxs)("button",{className:"btn-ghost",disabled:f,onClick:w,children:[(0,t.jsx)("span",{className:f?"sync-spin":"",style:{display:"inline-flex"},children:(0,t.jsx)(r.I,{name:"sync",size:13})})," ",s("update.checkNow")]}),b.updateAvailable&&(0,t.jsx)("button",{className:"btn-ghost",onClick:()=>history.back(),children:s("update.defer")}),(0,t.jsxs)("a",{className:"btn-ghost",href:"https://github.com/gabriel7silva/constella/blob/main/docs/UPDATE.md",target:"_blank",rel:"noreferrer",children:[(0,t.jsx)(r.I,{name:"doc",size:13})," ",s("update.docs")]})]}),!b.updateAvailable&&(0,t.jsxs)("div",{className:"muted",style:{marginTop:12,fontSize:13},children:[(0,t.jsx)(r.I,{name:"check",size:14})," ",s("update.onLatest")]}),j&&(0,t.jsxs)("div",{className:"form-hint",style:{marginTop:10},children:[(0,t.jsx)(r.I,{name:"pulse",size:13})," ",s("update.busy")]}),h&&(0,t.jsxs)("div",{className:"pd-result",style:{marginTop:14},children:[(0,t.jsx)("div",{style:{fontSize:12.5,color:h.ok?"var(--sx-string)":"var(--text-dim)"},children:h.message}),h.started&&(0,t.jsxs)("div",{className:"muted",style:{fontSize:11.5,marginTop:6},children:[s("update.updaterLabel"),": ",v||s("update.poll.running"),"…","done"===v&&(0,t.jsxs)("b",{style:{color:"var(--sx-string)"},children:[" ✓ ",s("update.poll.done")]}),"error"===v&&(0,t.jsxs)("b",{style:{color:"#e8688f"},children:[" ✖ ",s("update.poll.error")]})]}),h.command&&(0,t.jsx)("pre",{className:"pd-log",style:{marginTop:8},children:h.command}),h.backupDir&&(0,t.jsxs)("div",{className:"muted",style:{fontSize:11},children:[s("update.backupSaved"),": ",h.backupDir]}),"error"===v&&(0,t.jsxs)("div",{className:"form-hint",style:{marginTop:6},children:[s("update.rollback"),": ",(0,t.jsxs)("span",{className:"mono",children:["npm i -g constellai@",e.current]}),", ",s("update.rollbackThen")]})]})]}),b.changelog&&(0,t.jsxs)("div",{className:"hw-card",children:[(0,t.jsx)("h4",{style:{marginTop:0},children:s("update.whatsNew",{version:b.latest??""})}),(0,t.jsx)("div",{className:"upd-changelog",children:(0,t.jsx)(n.oz,{remarkPlugins:[i.A],children:b.changelog})})]})]})}}},e=>{e.O(0,[928,5452,171,6871,7218,2235,7066,7358],()=>e(e.s=140)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[72],{2935:(e,n,t)=>{"use strict";t.d(n,{LoginForm:()=>f});var a=t(4275),r=t(2899),i=t(6295),s=t(3703),l=t(2943),o=t(7797);let c=(0,o.createServerReference)("40fb5b878915dbf36071ea284b2b48c77a592b6681",o.callServer,void 0,o.findSourceMapURL,"signupAction");var d=t(9288),u=t(888),g=t(6516),p=t(5412),h=t(869);function f({screen:e,operatorEmail:n}){let t=(0,i.useRouter)(),o=(0,h.k)(),[m,y]=(0,r.useState)(e),[x,v]=(0,r.useState)(n),[j,b]=(0,r.useState)(""),[w,S]=(0,r.useState)(""),[k,N]=(0,r.useState)(""),[C,L]=(0,r.useState)(!1),[R,T]=(0,r.useState)(""),[z,E]=(0,r.useState)(""),[M,O]=(0,r.useState)(!1),[F,P]=(0,r.useState)("");function J(e){e?.twoFactorRedirect?O(!0):t.push("/")}async function _(){L(!0),T("");let e=await l.Jv.email({email:x,password:w});if(e.error){L(!1),T(o("login.invalidCredentials"));return}J(e.data),L(!1)}async function I(){if(T(""),w!==k)return void T(o("login.passwordMismatch"));L(!0);let e=await c({email:x,name:j,password:w});if(!e.ok){if(L(!1),"alreadyConfigured"===e.error){y("signin"),S(""),N(""),E(o("login.alreadyConfigured"));return}T(o("login.failed"));return}let n=await l.Jv.email({email:e.email,password:w});if(n.error){L(!1),T(o("login.failed"));return}J(n.data),L(!1)}async function B(){L(!0),T("");let e=await l.yK.twoFactor.verifyTotp({code:F});(L(!1),e.error)?T(e.error.message??o("login.invalidCode")):t.push("/")}async function K(){L(!0),T("");try{let e=await fetch("/api/passkey/authenticate/options",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:x})}).then(e=>e.json());if(e.error)throw Error(e.error);let n=await (0,s.HS)({optionsJSON:e}),a=await fetch("/api/passkey/authenticate/verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({response:n})}).then(e=>e.json());if(!a.ok)throw Error(a.error??o("login.passkeyFailed"));t.push("/")}catch(e){L(!1),T(e instanceof Error?e.message:o("login.passkeyFailed"))}}let W="signup"===m?o("login.signup.title"):o("login.title"),U="signup"===m?o("login.signup.sub"):o("login.sub.continue");return(0,a.jsxs)("div",{className:"login-wrap",children:[(0,a.jsx)("div",{className:"login-aurora","aria-hidden":!0,style:{position:"fixed",inset:0,zIndex:-1,pointerEvents:"none",background:"radial-gradient(60% 50% at 70% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%), radial-gradient(50% 40% at 20% 80%, color-mix(in srgb, #7c5cff 16%, transparent), transparent 70%)"}}),(0,a.jsxs)("div",{className:"login-card",children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:18},children:[(0,a.jsx)(d.J,{size:46,rx:13}),(0,a.jsx)("span",{style:{fontSize:18,fontWeight:800},children:"Constella"}),(0,a.jsxs)("div",{style:{marginLeft:"auto",display:"flex",gap:8,alignItems:"center"},children:[(0,a.jsx)(p.LangSwitch,{}),(0,a.jsx)(g.AnimToggle,{})]})]}),(0,a.jsx)("h1",{style:{fontSize:24,fontWeight:800,marginBottom:6},children:W}),(0,a.jsx)("p",{className:"muted",style:{fontSize:13,marginBottom:16},children:U}),z&&(0,a.jsx)("p",{style:{color:"var(--accent)",fontSize:12.5,marginBottom:10},children:z}),M?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{className:"form-label",children:o("login.authCode")}),(0,a.jsx)("input",{className:"form-input",placeholder:"123456",autoFocus:!0,value:F,onChange:e=>P(e.target.value),onKeyDown:e=>{"Enter"===e.key&&F.length>=6&&B()}}),R&&(0,a.jsx)("p",{style:{color:"var(--sx-keyword)",fontSize:12.5,marginTop:8},children:R}),(0,a.jsx)("button",{className:"btn-accent",style:{width:"100%",justifyContent:"center",marginTop:16,padding:11},disabled:C||F.length<6,onClick:B,children:C?o("login.verifying"):o("login.verify")})]}):"signup"===m?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{className:"form-label",children:o("login.name")}),(0,a.jsx)("input",{className:"form-input",value:j,onChange:e=>b(e.target.value),placeholder:"Operator"}),(0,a.jsx)("label",{className:"form-label",children:o("login.email")}),(0,a.jsx)("input",{className:"form-input",value:x,onChange:e=>v(e.target.value)}),(0,a.jsx)("label",{className:"form-label",children:o("login.password")}),(0,a.jsx)("input",{className:"form-input",type:"password",value:w,onChange:e=>S(e.target.value),placeholder:"••••••••"}),(0,a.jsx)("label",{className:"form-label",children:o("login.confirmPassword")}),(0,a.jsx)("input",{className:"form-input",type:"password",value:k,onChange:e=>N(e.target.value),placeholder:"••••••••",onKeyDown:e=>{"Enter"===e.key&&w.length>=8&&k.length>=8&&I()}}),R&&(0,a.jsx)("p",{style:{color:"var(--sx-keyword)",fontSize:12.5,marginTop:8},children:R}),(0,a.jsx)("button",{className:"btn-accent",style:{width:"100%",justifyContent:"center",marginTop:12,padding:11},disabled:C||w.length<8||k.length<8,onClick:I,children:C?o("login.signingIn"):o("login.signup.button")})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{className:"form-label",children:o("login.email")}),(0,a.jsx)("input",{className:"form-input",value:x,onChange:e=>v(e.target.value)}),(0,a.jsx)("label",{className:"form-label",children:o("login.password")}),(0,a.jsx)("input",{className:"form-input",type:"password",value:w,onChange:e=>S(e.target.value),onKeyDown:e=>{"Enter"===e.key&&w.length>=8&&_()}}),R&&(0,a.jsx)("p",{style:{color:"var(--sx-keyword)",fontSize:12.5,marginTop:8},children:R}),(0,a.jsx)("button",{className:"btn-accent",style:{width:"100%",justifyContent:"center",marginTop:12,padding:11},disabled:C||w.length<8,onClick:_,children:C?o("login.signingIn"):o("login.signin")}),(0,a.jsx)("button",{className:"btn-ghost",style:{width:"100%",justifyContent:"center",marginTop:8,padding:10},disabled:C,onClick:K,type:"button",children:o("login.passkey")})]}),(0,a.jsxs)("div",{className:"login-note",style:{display:"flex",alignItems:"center",gap:8,marginTop:16,fontSize:11.5,color:"var(--text-faint)"},children:[(0,a.jsx)(u.I,{name:"shield",size:13})," ",o("login.note")]})]})]})}},2943:(e,n,t)=>{"use strict";t.d(n,{Jv:()=>s,yK:()=>i});var a=t(3571),r=t(4071);let i=(0,a.M)({baseURL:window.location.origin,plugins:[(0,r.N)()]}),{signIn:s,signUp:l,signOut:o,useSession:c,twoFactor:d}=i},6295:(e,n,t)=>{"use strict";var a=t(2095);t.o(a,"usePathname")&&t.d(n,{usePathname:function(){return a.usePathname}}),t.o(a,"useRouter")&&t.d(n,{useRouter:function(){return a.useRouter}})},7797:(e,n,t)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={callServer:function(){return i.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return s.findSourceMapURL}};for(var r in a)Object.defineProperty(n,r,{enumerable:!0,get:a[r]});let i=t(4150),s=t(1410),l=t(7837)},7826:(e,n,t)=>{Promise.resolve().then(t.bind(t,2935))},9288:(e,n,t)=>{"use strict";t.d(n,{J:()=>r});var a=t(4275);function r({size:e=34,rx:n=9}){return(0,a.jsxs)("svg",{width:e,height:e,viewBox:"0 0 100 100",style:{display:"block",flex:`0 0 ${e}px`},"aria-label":"Constella",children:[(0,a.jsx)("rect",{x:"1",y:"1",width:"98",height:"98",rx:n,fill:"var(--cs-bg)",stroke:"var(--cs-border)",strokeWidth:"1.5"}),(0,a.jsx)("path",{d:"M66.06 27.06 L42.75 22.95 L24.62 38.17 L24.62 61.83 L42.75 77.05 L66.06 72.94",fill:"none",stroke:"var(--cs-line)",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M48 50 L42.75 22.95 M48 50 L24.62 50 M48 50 L42.75 77.05",fill:"none",stroke:"var(--cs-line)",strokeWidth:"1.2",strokeLinecap:"round",opacity:"0.55"}),[[66.06,27.06],[42.75,22.95],[24.62,38.17],[24.62,61.83],[42.75,77.05],[66.06,72.94]].map((e,n)=>(0,a.jsx)("circle",{cx:e[0],cy:e[1],r:"3.1",fill:"var(--cs-node)"},n)),(0,a.jsx)("circle",{cx:"48",cy:"50",r:"8.5",fill:"var(--cs-glow)",opacity:"0.4"}),(0,a.jsx)("circle",{cx:"48",cy:"50",r:"4.3",fill:"var(--cs-core)"})]})}}},e=>{e.O(0,[717,3703,171,6871,2235,7066,7358],()=>e(e.s=7826)),_N_E=e.O()}]);
|