constellai 0.3.3 → 0.3.5
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 +44 -44
- 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 +3 -3
- 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 +3 -3
- 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 +2 -2
- 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 +3 -3
- 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 +1 -1
- 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 +2 -2
- 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 +2 -2
- 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.js.nft.json +1 -1
- package/.next/server/app/(auth)/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(auth)/onboarding/page.js +2 -2
- package/.next/server/app/(auth)/onboarding/page.js.nft.json +1 -1
- package/.next/server/app/(auth)/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error/page.js +1 -1
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +3 -3
- package/.next/server/app/_global-error.segments/_full.segment.rsc +3 -3
- 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 +2 -2
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +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 +2 -2
- 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/1249.js +7 -7
- package/.next/server/chunks/1845.js +1 -1
- package/.next/server/chunks/212.js +1 -0
- package/.next/server/chunks/259.js +1 -1
- package/.next/server/chunks/260.js +1 -1
- package/.next/server/chunks/2867.js +1 -1
- package/.next/server/chunks/2960.js +1 -1
- package/.next/server/chunks/3131.js +1 -1
- package/.next/server/chunks/3234.js +1 -1
- package/.next/server/chunks/4979.js +2 -2
- package/.next/server/chunks/6381.js +15 -0
- package/.next/server/chunks/6431.js +1 -1
- package/.next/server/chunks/6853.js +12 -0
- package/.next/server/chunks/6954.js +1 -0
- package/.next/server/chunks/7589.js +1 -1
- package/.next/server/chunks/7989.js +1 -1
- package/.next/server/chunks/8561.js +1 -1
- package/.next/server/chunks/8623.js +1 -1
- package/.next/server/chunks/8762.js +417 -15
- package/.next/server/chunks/8823.js +1 -1
- package/.next/server/chunks/9215.js +4 -0
- package/.next/server/chunks/9229.js +1 -0
- package/.next/server/chunks/9310.js +21 -0
- package/.next/server/chunks/9783.js +1 -1
- package/.next/server/middleware-build-manifest.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/2692-7fee6e06b3c93940.js +1 -0
- package/.next/static/chunks/2997-ec8b18227849683e.js +1 -0
- package/.next/static/chunks/3219-b4941c7ff967e904.js +1 -0
- package/.next/static/chunks/6602-f26d109fd94cee1d.js +4 -0
- package/.next/static/chunks/8370-2733742abf5f3ddf.js +12 -0
- package/.next/static/chunks/{5332-84d9a65aa5d16106.js → 9112-c37628abc8a164cd.js} +1 -1
- package/.next/static/chunks/app/(app)/activity/{page-0f51a22d4f2207b2.js → page-29e80a32c02f376b.js} +1 -1
- package/.next/static/chunks/app/(app)/agents/[handle]/page-83277413debb3b25.js +1 -0
- package/.next/static/chunks/app/(app)/code/page-1f954f7688bc24e4.js +1 -0
- package/.next/static/chunks/app/(app)/config/page-eee4f8736608afa5.js +1 -0
- package/.next/static/chunks/app/(app)/costs/page-0beac688917eaa30.js +1 -0
- package/.next/static/chunks/app/(app)/cron/{page-ab35783e4341f6b7.js → page-a4dd65c78173b872.js} +1 -1
- package/.next/static/chunks/app/(app)/dashboard/page-519a934ccfcce6fa.js +1 -0
- package/.next/static/chunks/app/(app)/design/{page-fcee2dfd5c7e3a4b.js → page-238be90d78d22780.js} +3 -3
- package/.next/static/chunks/app/(app)/docs/[id]/page-e29afa1ba1a086e1.js +1 -0
- package/.next/static/chunks/app/(app)/docs/page-b4462f9ca2118f8b.js +1 -0
- package/.next/static/chunks/app/(app)/github/page-cf8501e45fe38663.js +1 -0
- package/.next/static/chunks/app/(app)/goals/page-75c36155c162df5b.js +1 -0
- package/.next/static/chunks/app/(app)/inbox/page-f40bdb457609ddad.js +12 -0
- package/.next/static/chunks/app/(app)/knowledge/page-dc5dd15e4f0ad22e.js +1 -0
- package/.next/static/chunks/app/(app)/layout-408976a4d35f06a8.js +1 -0
- package/.next/static/chunks/app/(app)/models/page-a54e0b8ffed0085c.js +1 -0
- package/.next/static/chunks/app/(app)/notifications/page-1f84d74bc53c2c6c.js +12 -0
- package/.next/static/chunks/app/(app)/org/page-d17c62b7a668b399.js +12 -0
- package/.next/static/chunks/app/(app)/organizations/page-b55445f226cf8c61.js +1 -0
- package/.next/static/chunks/app/(app)/{page-54a99a54295a40be.js → page-c7dd52ecc2da529d.js} +1 -1
- package/.next/static/chunks/app/(app)/planner/page-920e439e6f88c238.js +1 -0
- package/.next/static/chunks/app/(app)/plugins/{page-e75d982132825b07.js → page-d10239fcbabdf4fa.js} +1 -1
- package/.next/static/chunks/app/(app)/pm/page-61ad11558f241cf1.js +1 -0
- package/.next/static/chunks/app/(app)/prepare-deploy/page-8d25f86b26ab0d2e.js +1 -0
- package/.next/static/chunks/app/(app)/profile/page-236673e1a8c1e6c6.js +1 -0
- package/.next/static/chunks/app/(app)/pulse/{page-1a63c4ed76db48f5.js → page-f2c6049a967b93a3.js} +1 -1
- package/.next/static/chunks/app/(app)/reports/[id]/{page-ab35783e4341f6b7.js → page-a4dd65c78173b872.js} +1 -1
- package/.next/static/chunks/app/(app)/reports/page-5c07fa3a8b5ba553.js +1 -0
- package/.next/static/chunks/app/(app)/routines/page-0193e84e6a60a06a.js +1 -0
- package/.next/static/chunks/app/(app)/search/{page-d30f1c44c95e14a3.js → page-07e037c487f14c35.js} +1 -1
- package/.next/static/chunks/app/(app)/security/{page-4640d72a0b360f05.js → page-71e5d992b5ddf79a.js} +1 -1
- package/.next/static/chunks/app/(app)/skills/page-72691864856c9906.js +1 -0
- package/.next/static/chunks/app/(app)/tasks/page-5c9ca8f83d4c904f.js +1 -0
- package/.next/static/chunks/app/(app)/test-dev/page-5aee630d9bc73a0b.js +1 -0
- package/.next/static/chunks/app/(app)/update/page-2c9bcdb65bd2f597.js +1 -0
- package/.next/static/chunks/app/(auth)/login/page-50033813b56469ee.js +1 -0
- package/.next/static/chunks/app/(auth)/onboarding/{page-0cd7cd9fa146a927.js → page-075fd9673f7ab241.js} +1 -1
- package/.next/static/chunks/app/_not-found/page-dc38b02aebeab535.js +1 -0
- package/.next/trace-build +1 -1
- package/CHANGELOG.md +45 -3
- package/README.md +1 -1
- package/README.pt-BR.md +1 -1
- package/bin/constella-update.mjs +44 -0
- package/docs/UPDATE.md +38 -7
- package/package.json +1 -1
- package/scripts/vps-install.sh +25 -0
- package/scripts/vps-update.sh +24 -0
- package/.next/server/chunks/3174.js +0 -12
- package/.next/server/chunks/3334.js +0 -1
- package/.next/server/chunks/3439.js +0 -4
- package/.next/server/chunks/478.js +0 -1
- package/.next/server/chunks/5086.js +0 -417
- package/.next/server/chunks/8195.js +0 -21
- package/.next/server/chunks/8244.js +0 -1
- package/.next/static/chunks/3219-9684aa1c634212de.js +0 -1
- package/.next/static/chunks/386-0f2b8d23016cf4d0.js +0 -1
- package/.next/static/chunks/4909-9f16a714c78ed30d.js +0 -4
- package/.next/static/chunks/5664-3cb5735f1b5bbde1.js +0 -1
- package/.next/static/chunks/8370-7ec9e9bf414f8f2d.js +0 -12
- package/.next/static/chunks/app/(app)/agents/[handle]/page-14805dd54a1333e8.js +0 -1
- package/.next/static/chunks/app/(app)/code/page-7ebd6923ac440103.js +0 -1
- package/.next/static/chunks/app/(app)/config/page-47b5b62b73050673.js +0 -1
- package/.next/static/chunks/app/(app)/costs/page-969eba498344314d.js +0 -1
- package/.next/static/chunks/app/(app)/dashboard/page-59521ad116c60a88.js +0 -1
- package/.next/static/chunks/app/(app)/docs/[id]/page-b3451b21d7d2127b.js +0 -1
- package/.next/static/chunks/app/(app)/docs/page-3a34eec67591ce3e.js +0 -1
- package/.next/static/chunks/app/(app)/github/page-a0117637dc143821.js +0 -1
- package/.next/static/chunks/app/(app)/goals/page-d1cb2552625ccadb.js +0 -1
- package/.next/static/chunks/app/(app)/inbox/page-dbfc885cd61f9b9f.js +0 -12
- package/.next/static/chunks/app/(app)/knowledge/page-29df476a9c2f930c.js +0 -1
- package/.next/static/chunks/app/(app)/layout-2b6b23e82fbf0211.js +0 -1
- package/.next/static/chunks/app/(app)/models/page-ea54a5d167cd3cc2.js +0 -1
- package/.next/static/chunks/app/(app)/notifications/page-ef1ac55efadb2a1a.js +0 -12
- package/.next/static/chunks/app/(app)/org/page-a7c734b8d86f7641.js +0 -12
- package/.next/static/chunks/app/(app)/organizations/page-4bcec3010a9d9119.js +0 -1
- package/.next/static/chunks/app/(app)/planner/page-adfd05afc6ddcbef.js +0 -1
- package/.next/static/chunks/app/(app)/pm/page-773626398c10fdb7.js +0 -1
- package/.next/static/chunks/app/(app)/prepare-deploy/page-01f767248e7fa2a7.js +0 -1
- package/.next/static/chunks/app/(app)/profile/page-cb2450679785db1a.js +0 -1
- package/.next/static/chunks/app/(app)/reports/page-b0bcc85ad4afecf5.js +0 -1
- package/.next/static/chunks/app/(app)/routines/page-c0ce223d128a9010.js +0 -1
- package/.next/static/chunks/app/(app)/skills/page-87a71bd0a6b0f262.js +0 -1
- package/.next/static/chunks/app/(app)/tasks/page-a34a5658aff509ec.js +0 -1
- package/.next/static/chunks/app/(app)/test-dev/page-842f8771d36e964b.js +0 -1
- package/.next/static/chunks/app/(app)/update/page-64467fa6d8ed737e.js +0 -1
- package/.next/static/chunks/app/(auth)/login/page-82964b720ff11bab.js +0 -1
- package/.next/static/chunks/app/_not-found/page-489c316e4356f1b7.js +0 -1
- /package/.next/static/{Fx06n4huXV42eQUI-Lty0 → vaEtsAmUuKf_DngRqwRUn}/_buildManifest.js +0 -0
- /package/.next/static/{Fx06n4huXV42eQUI-Lty0 → vaEtsAmUuKf_DngRqwRUn}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[386],{386:(e,t,a)=>{a.d(t,{uG:()=>U,QE:()=>T,CZ:()=>A});var s=a(5076),c=a(8488),n=a(7814);let l=(0,n.createServerReference)("00d7e9c1769c68149f98218001d1ddeb98043eccfe",n.callServer,void 0,n.findSourceMapURL,"listChatRefs");var r=a(9947);let i=(0,n.createServerReference)("407fce3da0c8d3712c1bb9b6e37754fd1c495cb81b",n.callServer,void 0,n.findSourceMapURL,"listSessions"),d=(0,n.createServerReference)("607abf4183886833e6e480c222512329f142131c77",n.callServer,void 0,n.findSourceMapURL,"createSession"),o=(0,n.createServerReference)("6071f6fad90bba9afb8993e8201d90922c0b420035",n.callServer,void 0,n.findSourceMapURL,"switchSession"),h=(0,n.createServerReference)("6059882e0544cbad698c8da2cd5f36f90b414b4dae",n.callServer,void 0,n.findSourceMapURL,"renameSession"),m=(0,n.createServerReference)("609840742e940619bb5a84de070dda27c453a3a4a4",n.callServer,void 0,n.findSourceMapURL,"deleteSession");var u=a(753),f=a(7224),x=a(4619),g=a(1251),v=a(5629),p=a(3042),j=a(5145),b=a(6434),k=a(4733),N=a(6991),S=a(9836);let y=(0,n.createServerReference)("00787e1d3b391edf77c366599af3e651180d599956",n.callServer,void 0,n.findSourceMapURL,"getChatNotifications"),w=(0,n.createServerReference)("00554f3f45aed8311b34015efd1675c98eb75a7003",n.callServer,void 0,n.findSourceMapURL,"getUnreadCounts"),C=(0,n.createServerReference)("407edf85849570f6bac31fa7be72ea92e762873ac0",n.callServer,void 0,n.findSourceMapURL,"markChannelRead"),R=(0,n.createServerReference)("40036da9c7c0ca4e2e6adcf4b5fdaefded4551dd7e",n.callServer,void 0,n.findSourceMapURL,"markNotifRead");var I=a(4552),L=a(8576),z=a(891),E=a(8163),M=a(5571);function T({agents:e,previews:t,onOpenDM:a}){let n=(0,v.k)(),[l,r]=(0,c.useState)(""),i=l.trim().toLowerCase(),d=e.filter(e=>!i||e.name.toLowerCase().includes(i)||e.handle.includes(i)||e.role.toLowerCase().includes(i));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"dm-search",children:[(0,s.jsx)(L.I,{name:"search",size:13}),(0,s.jsx)("input",{placeholder:n("chat.searchAgents"),value:l,onChange:e=>r(e.target.value),autoFocus:!0})]}),(0,s.jsxs)("div",{className:"people-list scroll",children:[0===d.length&&(0,s.jsx)("div",{className:"mention-empty",children:n("chat.noAgentMatch",{q:l})}),d.map(e=>{let c=t[e.handle];return(0,s.jsxs)("div",{className:"people-row",onClick:()=>a(e.handle),children:[(0,s.jsx)(I.e,{name:e.name,color:e.color,image:e.image,size:36,health:e.health}),(0,s.jsxs)("div",{className:"people-meta",children:[(0,s.jsxs)("div",{className:"people-name",style:{display:"flex",alignItems:"center",gap:6},children:[e.name," ",(0,s.jsxs)("span",{className:"agent-handle",children:["@",e.handle]})," ","idle"!==e.status&&(0,s.jsx)(z.m,{status:e.status})]}),(0,s.jsx)("div",{className:"people-sub"+(c?" preview":""),children:c?(c.mine?n("chat.youPrefix"):"")+(c.text||"…"):`${e.role} \xb7 ${e.adapter}`})]}),(0,s.jsx)("span",{className:"people-go",children:(0,s.jsx)(L.I,{name:c?"chat":"chevronRight",size:14})})]},e.handle)})]})]})}function A({onConnected:e}){let t=(0,v.k)(),[a,n]=(0,c.useState)(""),[l,r]=(0,c.useState)(""),[i,d]=(0,c.useState)(""),[o,h]=(0,c.useState)(""),[m,u]=(0,c.useState)(""),[f,x]=(0,c.useTransition)();return(0,s.jsx)("div",{className:"tg-connect scroll",children:(0,s.jsxs)("div",{className:"tg-card",children:[(0,s.jsxs)("div",{className:"tg-card-head",children:[(0,s.jsx)("span",{className:"tg-card-ico",children:(0,s.jsx)(L.I,{name:"send",size:18})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"tg-card-title",children:t("chat.tg.connectTitle")}),(0,s.jsx)("div",{className:"tg-card-sub",children:t("chat.tg.connectSub")})]})]}),(0,s.jsxs)("ol",{className:"tg-steps",children:[(0,s.jsxs)("li",{children:[t("chat.tg.step1.a")," ",(0,s.jsx)("b",{children:"@BotFather"})," ",t("chat.tg.step1.b")," → ",(0,s.jsx)("code",{children:"/newbot"})," → ",t("chat.tg.step1.c")," ",(0,s.jsx)("b",{children:t("chat.tg.step1.token")}),"."]}),(0,s.jsxs)("li",{children:[t("chat.tg.step2.a")," ",(0,s.jsx)("b",{children:"@userinfobot"})," → ",t("chat.tg.step2.b")," ",(0,s.jsx)("b",{children:t("chat.tg.step2.chatId")})," ",t("chat.tg.step2.c")]}),(0,s.jsx)("li",{children:t("chat.tg.step3")})]}),(0,s.jsxs)("label",{className:"tg-field",children:[(0,s.jsx)("span",{children:t("chat.tg.botToken")}),(0,s.jsx)("input",{className:"form-input",placeholder:"123456789:AA…",value:a,onChange:e=>n(e.target.value)})]}),(0,s.jsxs)("div",{className:"tg-field-row",children:[(0,s.jsxs)("label",{className:"tg-field",children:[(0,s.jsx)("span",{children:t("chat.tg.yourChatId")}),(0,s.jsx)("input",{className:"form-input",placeholder:"123456789",value:l,onChange:e=>r(e.target.value)})]}),(0,s.jsxs)("label",{className:"tg-field",children:[(0,s.jsx)("span",{children:t("chat.tg.yourName")}),(0,s.jsx)("input",{className:"form-input",placeholder:t("chat.tg.namePlaceholder"),value:i,onChange:e=>d(e.target.value)})]})]}),o&&(0,s.jsx)("div",{className:"tg-msg err",children:o}),m&&(0,s.jsx)("div",{className:"tg-msg ok",children:m}),(0,s.jsxs)("button",{className:"btn-accent tg-save",disabled:f||!a.trim()||!l.trim(),onClick:function(){h(""),u(""),x(async()=>{let s=await (0,p.M)(a,l,i);s.ok?(u(t("chat.tg.botConnected",{bot:"@"+(s.username??"bot")})),n(""),r(""),d(""),e()):h(s.error??t("chat.tg.connectionFailed"))})},children:[f?(0,s.jsx)("span",{className:"spin",children:(0,s.jsx)(L.I,{name:"refresh",size:13})}):(0,s.jsx)(L.I,{name:"send",size:13})," ",t("chat.tg.connectBot")]}),(0,s.jsxs)("div",{className:"tg-note",children:[(0,s.jsx)(L.I,{name:"bot",size:12})," ",t("chat.tg.isolatedNote")]})]})})}function U({agents:e,operator:t}){let a,n,p,z,[D,q]=(0,c.useState)(!1),[F,H]=(0,c.useState)("right"),[O,P]=(0,c.useState)(380),[W,$]=(0,c.useState)("room"),[_,B]=(0,c.useState)("all"),[K,V]=(0,c.useState)(""),G=(0,v.k)(),[J,X]=(0,c.useState)([]),[Q,Y]=(0,c.useState)([]),[Z,ee]=(0,c.useState)([]),[et,ea]=(0,c.useState)(!1),[es,ec]=(0,c.useState)(null),[en,el]=(0,c.useState)(!1),[er,ei]=(0,c.useState)([]),[ed,eo]=(0,c.useState)({}),[eh,em]=(0,c.useState)(!1),[eu,ef]=(0,c.useState)(null),[ex,eg]=(0,c.useState)({}),[ev,ep]=(0,c.useState)(""),[ej,eb]=(0,c.useState)(0),[ek,eN]=(0,c.useState)([]),[eS,ey]=(0,c.useState)(null),[ew,eC]=(0,c.useState)(0),[eR,eI]=(0,c.useState)([]),[,eL]=(0,c.useTransition)(),ez=(0,c.useRef)(0),eE=(0,c.useRef)(0),eM=(0,c.useRef)(null),eT=(0,c.useRef)({}),eA=(0,c.useRef)([]),[eU,eD]=(0,c.useState)(null),eq=Object.fromEntries(e.map(e=>[e.handle,e])),eF=W.startsWith("dm:");(0,c.useEffect)(()=>{D&&!eR.length&&l().then(eI).catch(()=>{})},[D]);let eH="people"===W,eO="telegram"===W,eP=eF?W.slice(3):null,eW=eP?eq[eP]:null,e$=eF?W:eO?"telegram":"room";function e_(){delete eT.current[e$],eC(e=>e+1)}(0,c.useEffect)(()=>{function e(){q(e=>!e)}function t(e){q(!0);let t=e.detail?.channel;("room"===t||"telegram"===t||t&&t.startsWith("dm:"))&&$(t)}return window.addEventListener("constella:toggle-chat",e),window.addEventListener("constella:open-chat",t),()=>{window.removeEventListener("constella:toggle-chat",e),window.removeEventListener("constella:open-chat",t)}},[]),(0,c.useEffect)(()=>{try{"1"===localStorage.getItem("bx.chatOpen")&&q(!0);let e=localStorage.getItem("bx.chatSide");("left"===e||"right"===e)&&H(e);let t=Number(localStorage.getItem("bx.chatWidth"));t>=320&&t<=640&&P(t)}catch{}},[]),(0,c.useEffect)(()=>{try{localStorage.setItem("bx.chatOpen",D?"1":"0")}catch{}},[D]),(0,c.useEffect)(()=>{try{localStorage.setItem("bx.chatSide",F)}catch{}},[F]),(0,c.useEffect)(()=>{try{localStorage.setItem("bx.chatWidth",String(O))}catch{}},[O]),(0,c.useEffect)(()=>{function e(e){let t=e.detail;t?.handle&&(q(!0),$("dm:"+t.handle),t.text&&(ep(t.text),eb(e=>e+1)))}return window.addEventListener("constella:open-dm",e),()=>window.removeEventListener("constella:open-dm",e)},[]),(0,c.useEffect)(()=>{if(!D||eH)return;let e=!1,t=()=>({msgs:[],events:[],evSeq:0,msgCursor:0}),a=e=>e.length>250?e.slice(-250):e;for(eA.current=[...eA.current.filter(e=>e!==e$),e$];eA.current.length>6;){let e=eA.current.shift();e&&e!==e$&&delete eT.current[e]}let s=eT.current[e$];async function c(){let[t,a]=await Promise.all([(0,r.V)(e$),(0,k.k)(e$,0)]);e||(X(t),Y(a),ez.current=a.reduce((e,t)=>Math.max(e,t.seq),0),eE.current=t.reduce((e,t)=>Math.max(e,t.createdAt?new Date(t.createdAt).getTime():0),0),eT.current[e$]={msgs:t,events:a,evSeq:ez.current,msgCursor:eE.current})}function n(){if(e||document.hidden||eM.current)return;let s=new EventSource(`/api/stream?channel=${encodeURIComponent(e$)}&evCursor=${ez.current}&msgCursor=${eE.current}`);eM.current=s,s.addEventListener("ev",e=>{let s=JSON.parse(e.data);s.seq>ez.current&&(ez.current=s.seq),Y(e=>e.some(e=>e.id===s.id)?e:a([...e,s]));let c=eT.current[e$]??t();c.events.some(e=>e.id===s.id)||(eT.current[e$]={...c,events:a([...c.events,s]),evSeq:ez.current})}),s.addEventListener("msg",e=>{let s=JSON.parse(e.data),c=s.createdAt?new Date(s.createdAt).getTime():0;if(c>eE.current&&(eE.current=c),"cleared"===s.kind){X([s]),Y([]),ee([]),eT.current[e$]={...t(),msgs:[s],msgCursor:eE.current,evSeq:ez.current};return}X(e=>e.some(e=>e.id===s.id)?e:a([...e,s])),Y(e=>e.filter(e=>e.runId!==s.id||"text"!==e.kind));let n=eT.current[e$]??t();eT.current[e$]={...n,msgs:n.msgs.some(e=>e.id===s.id)?n.msgs:a([...n.msgs,s]),events:n.events.filter(e=>e.runId!==s.id||"text"!==e.kind),msgCursor:eE.current}})}function l(){eM.current&&(eM.current.close(),eM.current=null)}s?(X(s.msgs),Y(s.events),ez.current=s.evSeq,eE.current=s.msgCursor,ea(!1)):(X([]),Y([]),ez.current=0,eE.current=0,ea(!0)),s?document.hidden||n():c().catch(()=>{}).finally(()=>{!e&&(ea(!1),document.hidden||n())});let i=()=>{document.hidden?l():n()};return document.addEventListener("visibilitychange",i),()=>{e=!0,document.removeEventListener("visibilitychange",i),l()}},[D,W,ew]),(0,c.useEffect)(()=>{D&&eF?i(e$).then(eN).catch(()=>{}):eN([])},[D,W,ew]);let eB=()=>(0,u.b)().then(e=>eg(e));(0,c.useEffect)(()=>{D&&eB()},[D,W]);let eK=()=>(0,j.G)().then(e=>eD(e)).catch(()=>eD({connected:!1}));(0,c.useEffect)(()=>{D&&eO&&eK()},[D,W]);let eV=async()=>{if(!eH)try{let e=await (0,N.p)(e$);if(e.used>=e.max&&!en){el(!0);try{await (0,S.L)(e$),e=await (0,N.p)(e$)}finally{el(!1)}}ec(e)}catch{}};async function eG(){if(!en){el(!0);try{await (0,S.L)(e$),await eV()}finally{el(!1)}}}function eJ(){ey({title:G("chat.dock.clearTitle"),body:G("chat.dock.clearBody"),confirmLabel:G("common.clear"),onConfirm:()=>eL(async()=>{await (0,f.H)(e$).catch(()=>{}),X([]),Y([]),ee([]),delete eT.current[e$],ez.current=0,eE.current=0,await eV(),eF&&await eB()})})}(0,c.useEffect)(()=>{D&&!eH?eV():eH&&ec(null)},[D,W,J.length]);let eX=async()=>{try{let[e,t]=await Promise.all([y(),w()]);ei(e),eo(t)}catch{}};async function eQ(e){em(!1),e.channel&&$(e.channel.startsWith("dm:")?e.channel:"room"),e.messageId&&(ef(e.messageId),setTimeout(()=>ef(null),2600));try{await R(e.id)}catch{}eX()}function eY(e,t){eL(async()=>{let{responders:a}=await (0,x._)(e$,e,t);if(a.length){for(let e of(ee(a),a))await (0,g.n)(e$,e),ee(t=>t.filter(t=>t!==e));ee([])}eF&&await eB()})}if((0,c.useEffect)(()=>{D&&eX()},[D,W,J.length]),(0,c.useEffect)(()=>{D&&!eH&&C(e$).then(eX).catch(()=>{})},[D,W,J.length]),!D)return(0,s.jsx)("button",{className:"chat-fab",style:{display:"grid",placeItems:"center"},onClick:()=>q(!0),title:G("chrome.chat.agentRoom"),children:(0,s.jsx)(L.I,{name:"chat",size:20})});let eZ={};for(let e of Q)(eZ[e.runId]??=[]).push(e);let e0=new Set(J.map(e=>e.id)),e1=Object.entries(eZ).filter(([e])=>!e0.has(e)),e4=Object.keys(ex).length,e5=ed.room??0,e3=Object.entries(ed).reduce((e,[t,a])=>t.startsWith("dm:")?e+a:e,0),e8=ed.telegram??0;return(0,s.jsxs)("div",{className:"chat-dock "+F,style:{width:O},children:[(0,s.jsx)("div",{className:"dock-resizer "+F,onMouseDown:function(e){e.preventDefault();let t=e.clientX;function a(e){let a=e.clientX-t;P(Math.max(320,Math.min(640,"right"===F?O-a:O+a)))}document.body.style.cursor="col-resize",window.addEventListener("mousemove",a),window.addEventListener("mouseup",function e(){window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",e),document.body.style.cursor=""})}}),(0,s.jsxs)("div",{className:"dock-toolbar",children:[(0,s.jsxs)("span",{className:"dock-toolbar-title",children:[(0,s.jsx)(L.I,{name:"agents",size:15,style:{color:"var(--accent)"}})," ",G("chat.dock.agents")]}),(0,s.jsxs)("div",{className:"dock-tools",children:[(0,s.jsxs)("div",{className:"dock-bell-wrap",children:[(0,s.jsxs)("button",{className:"dock-tool",title:G("top.notifications"),onClick:()=>em(e=>!e),children:[(0,s.jsx)(L.I,{name:"bell",size:15}),er.length>0&&(0,s.jsx)("span",{className:"dock-bell-badge",children:er.length})]}),eh&&(0,s.jsxs)("div",{className:"dock-notif-pop",children:[(0,s.jsxs)("div",{className:"dock-notif-head",children:[G("top.notifications")," ",er.length>0&&(0,s.jsxs)("span",{children:["(",er.length,")"]})]}),0===er.length&&(0,s.jsx)("div",{className:"dock-notif-empty",children:G("chat.dock.nothingNeedsYou")}),er.map(e=>(0,s.jsxs)("button",{className:"dock-notif-row"+("approval"===e.kind?" approval":""),onClick:()=>eQ(e),children:[(0,s.jsx)("span",{className:"dn-ico",children:(0,s.jsx)(L.I,{name:"approval"===e.kind?"check":"at",size:13})}),(0,s.jsxs)("span",{className:"dn-body",children:[(0,s.jsx)("span",{className:"dn-text",children:e.text}),e.detail&&(0,s.jsx)("span",{className:"dn-detail",children:e.detail})]}),(0,s.jsx)("span",{className:"dn-go",children:(0,s.jsx)(L.I,{name:"chevronRight",size:12})})]},e.id))]})]}),(0,s.jsx)("button",{className:"dock-tool",title:"right"===F?G("chat.dock.moveLeft"):G("chat.dock.moveRight"),onClick:()=>H(e=>"right"===e?"left":"right"),children:(0,s.jsx)(L.I,{name:"right"===F?"dockLeft":"dockRight",size:15})}),(0,s.jsx)("button",{className:"dock-tool",title:G("chat.dock.hide"),onClick:()=>q(!1),children:(0,s.jsx)(L.I,{name:"close",size:15})})]})]}),(0,s.jsxs)("div",{className:"dock-tabs",children:[(0,s.jsxs)("button",{className:"dock-tab"+(eF||eH||eO?"":" on"),onClick:()=>$("room"),children:[(0,s.jsx)(L.I,{name:"agents",size:14})," ",G("chat.dock.tabRoom"),e5>0&&(0,s.jsx)("span",{className:"dt-badge",children:e5})]}),(0,s.jsxs)("button",{className:"dock-tab"+(eH||eF?" on":""),onClick:()=>$("people"),children:[(0,s.jsx)(L.I,{name:"chat",size:14})," ",G("chat.dock.tabDirect"),(e3||e4)>0&&(0,s.jsx)("span",{className:"dt-badge",children:e3||e4})]}),(0,s.jsxs)("button",{className:"dock-tab"+(eO?" on":""),onClick:()=>$("telegram"),children:[(0,s.jsx)(L.I,{name:"send",size:14})," Telegram",e8>0&&(0,s.jsx)("span",{className:"dt-badge",children:e8})]})]}),!eH&&!(eO&&eU&&!eU.connected)&&(0,s.jsxs)("div",{className:"ctx-bar",children:[es?(0,s.jsx)(E.m,{stat:es,onCompact:eG,compacting:en}):(0,s.jsx)("span",{}),eO?(0,s.jsxs)("span",{className:"ctx-hint",title:G("chat.dock.tgIsolatedTip"),children:[(0,s.jsx)(L.I,{name:"bot",size:12})," ",G("chat.dock.isolatedThreadAda")]}):(0,s.jsxs)("span",{className:"ctx-hint",title:G("chat.dock.dmAdaTip"),children:[(0,s.jsx)(L.I,{name:"bot",size:12})," ",G("home.chat.dmAda")]})]}),eF&&eW?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"dm-back-row",children:[(0,s.jsxs)("button",{className:"dm-back-btn",onClick:()=>$("people"),children:[(0,s.jsx)(L.I,{name:"chevronLeft",size:14})," ",G("chat.dock.allAgents")]}),(0,s.jsxs)("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:5,flexWrap:"wrap",justifyContent:"flex-end"},children:[ek.map(e=>(0,s.jsxs)("span",{className:"sess-pill",children:[(0,s.jsx)("button",{className:"sess-tab"+(e.active?" active":""),title:e.active?G("chat.dock.sessActiveTip"):G("chat.dock.sessSwitchTip"),onClick:()=>{var t;return t=e.id,void(!ek.find(e=>e.id===t)?.active&&eL(async()=>{await o(e$,t).catch(()=>{}),e_()}))},onDoubleClick:()=>{var t,a;let s;return t=e.id,a=e.title,void(null!=(s=prompt(G("chat.dock.renameSession"),a))&&eL(async()=>{await h(t,s).catch(()=>{}),i(e$).then(eN).catch(()=>{})}))},children:e.title}),ek.length>1&&(0,s.jsx)("button",{className:"sess-del",title:G("chat.dock.sessDelete"),onClick:()=>{var t,a;return t=e.id,a=e.title,void ey({title:G("chat.dock.deleteSessionTitle"),body:G("chat.dock.deleteSessionBody",{title:a}),confirmLabel:G("common.delete"),onConfirm:()=>eL(async()=>{await m(e$,t).catch(()=>{}),e_(),i(e$).then(eN).catch(()=>{})})})},children:(0,s.jsx)(L.I,{name:"close",size:11})})]},e.id)),(0,s.jsxs)("button",{className:"sess-new",title:G("chat.dock.sessNewTip"),onClick:function(){eL(async()=>{await d(e$).catch(()=>{}),e_()})},children:[(0,s.jsx)(L.I,{name:"add",size:12})," ",G("chat.dock.sessNew")]})]})]}),(0,s.jsxs)("div",{className:"chat-header dm",children:[(0,s.jsx)(I.e,{name:eW.name,color:eW.color,image:eW.image,size:34,health:eW.health}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"chat-title",children:[eW.name," ",(0,s.jsxs)("span",{className:"agent-handle",children:["@",eW.handle]})]}),(0,s.jsxs)("div",{className:"chat-sub",children:[eW.role," \xb7 ",eW.adapter]})]}),(0,s.jsxs)("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:8},children:[(0,s.jsx)(M.qs,{status:eW.status}),(0,s.jsx)("button",{className:"dock-tool",title:G("chat.dock.clearConversation"),onClick:eJ,children:(0,s.jsx)(L.I,{name:"trash",size:15})})]})]}),(0,s.jsxs)("div",{className:"dm-context-note",children:[(0,s.jsx)("span",{className:"ico",children:(0,s.jsx)(L.I,{name:"bot",size:14})}),G("chat.dock.dmContextNote",{name:eW.name})]}),(0,s.jsx)(M.H8,{msgs:J,typing:Z,agents:e,byRun:eZ,liveRuns:e1,loading:et,highlightId:eu,operator:t,markdownAgent:!0}),(0,s.jsx)(M.V4,{onSend:eY,agents:e,defaultText:ev,placeholder:G("chat.dock.messageAgent",{name:eW.name})},"dm:"+eP+":"+ej)]}):eH?(0,s.jsx)(T,{agents:e,previews:ex,onOpenDM:e=>{$("dm:"+e)}}):eO?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"chat-header room",children:[(0,s.jsx)("div",{className:"brand-ico",style:{background:"linear-gradient(150deg,#2aabee,#229ed9)",color:"#fff"},children:(0,s.jsx)(L.I,{name:"send",size:16})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"chat-title",children:"Telegram"}),(0,s.jsx)("div",{className:"chat-sub",children:eU?.connected?G("chat.tg.connectedSub",{name:eU.allowedName||G("chat.tg.you"),chatId:eU.chatIdMasked??""}):G("chat.tg.connectPrompt")})]}),eU?.connected&&(0,s.jsxs)("div",{style:{marginLeft:"auto",display:"flex",gap:6},children:[(0,s.jsx)("button",{className:"dock-tool",title:G("chat.dock.clearConversation"),onClick:eJ,children:(0,s.jsx)(L.I,{name:"trash",size:15})}),(0,s.jsx)("button",{className:"dock-tool",title:G("chat.tg.disconnect"),onClick:()=>{confirm(G("chat.tg.disconnectConfirm"))&&eL(async()=>{await (0,b.K)(),eK()})},children:(0,s.jsx)(L.I,{name:"close",size:15})})]})]}),eU&&!eU.connected?(0,s.jsx)(A,{onConnected:eK}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"dm-context-note",children:[(0,s.jsx)("span",{className:"ico",children:(0,s.jsx)(L.I,{name:"send",size:14})}),G("chat.tg.isolatedThreadNote")]}),(0,s.jsx)(M.H8,{msgs:J,typing:Z,agents:e,byRun:eZ,liveRuns:e1,loading:et||!eU,highlightId:eu,operator:t,markdownAgent:!0}),(0,s.jsx)(M.V4,{onSend:eY,agents:e,placeholder:G("chat.tg.composerPlaceholder")},"telegram:"+ej)]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"chat-header room",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"chat-title",children:G("chat.dock.teamChannel")}),(0,s.jsx)("div",{className:"chat-sub",children:G("chat.dock.teamChannelSub",{n:e.length})})]}),(0,s.jsxs)("div",{className:"chat-members",children:[e.slice(0,6).map(e=>(0,s.jsx)("button",{className:"member-btn",title:G("chat.dock.dmName",{name:e.name}),onClick:()=>{$("dm:"+e.handle)},children:(0,s.jsx)(I.e,{name:e.name,color:e.color,size:26})},e.handle)),e.length>6&&(0,s.jsxs)("button",{className:"more",title:G("chat.dock.allAgents"),onClick:()=>$("people"),children:["+",e.length-6]})]})]}),(a=Array.from(new Set(e.map(e=>e.role))).sort(),n="all"===_?J:"type:work"===_?J.filter(e=>(eZ[e.id]?.length??0)>0||!!e.kind):"type:chat"===_?J.filter(e=>!eZ[e.id]?.length&&!e.kind):_.startsWith("role:")?J.filter(e=>"operator"===e.fromKind||e.fromHandle&&eq[e.fromHandle]?.role===_.slice(5)):J.filter(e=>"operator"===e.fromKind||e.fromHandle===_),z=(p=K.trim().toLowerCase())?n.filter(e=>(e.text??"").toLowerCase().includes(p)):n,(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"room-filter",children:[(0,s.jsx)("span",{className:"rf-label",children:G("chat.filter")}),(0,s.jsx)("button",{type:"button",className:"rf-chip"+("all"===_?" on":""),onClick:()=>B("all"),children:G("common.all")}),(0,s.jsx)("button",{type:"button",className:"rf-chip rf-lane"+("type:work"===_?" on":""),title:G("chat.filter.work"),onClick:()=>B("type:work"===_?"all":"type:work"),children:G("chat.filter.work")}),(0,s.jsx)("button",{type:"button",className:"rf-chip rf-lane"+("type:chat"===_?" on":""),title:G("chat.filter.discussion"),onClick:()=>B("type:chat"===_?"all":"type:chat"),children:G("chat.filter.discussion")}),a.map(e=>(0,s.jsx)("button",{type:"button",className:"rf-chip rf-role"+(_==="role:"+e?" on":""),title:G("chat.filter.byRole"),onClick:()=>B(_==="role:"+e?"all":"role:"+e),children:e},"role:"+e)),e.map(e=>(0,s.jsxs)("button",{type:"button",className:"rf-chip"+(_===e.handle?" on":""),title:e.name,onClick:()=>B(_===e.handle?"all":e.handle),children:["@",e.handle]},e.handle)),(0,s.jsxs)("span",{className:"rf-search",children:[(0,s.jsx)(L.I,{name:"search",size:12}),(0,s.jsx)("input",{value:K,onChange:e=>V(e.target.value),placeholder:G("chat.filter.search"),"aria-label":G("chat.filter.search")}),K&&(0,s.jsx)("button",{type:"button",className:"rf-clear",onClick:()=>V(""),"aria-label":G("common.dismiss"),children:(0,s.jsx)(L.I,{name:"close",size:11})})]})]}),(0,s.jsx)(M.H8,{msgs:z,typing:Z,agents:e,byRun:eZ,liveRuns:e1,loading:et,highlightId:eu,operator:t,markdownAgent:!0,refs:eR})]})),(0,s.jsx)(M.V4,{onSend:eY,agents:e,defaultText:"room"===W?ev:"",requireMention:!0,placeholder:G("chat.dock.roomPlaceholder"),refs:eR},"room:"+ej)]}),eS&&(0,s.jsx)("div",{className:"modal-overlay",onMouseDown:()=>ey(null),children:(0,s.jsxs)("div",{className:"modal",style:{width:380},onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsx)("div",{className:"modal-head",children:(0,s.jsxs)("div",{className:"modal-title",children:[(0,s.jsx)(L.I,{name:"trash",size:15,style:{color:"var(--sx-keyword)"}})," ",eS.title]})}),(0,s.jsx)("div",{className:"modal-body",children:(0,s.jsx)("div",{style:{fontSize:13,color:"var(--text-dim)",lineHeight:1.55},children:eS.body})}),(0,s.jsxs)("div",{className:"modal-foot",children:[(0,s.jsx)("button",{className:"btn-ghost",onClick:()=>ey(null),children:G("common.cancel")}),(0,s.jsx)("button",{className:"btn-accent",style:{background:"var(--sx-keyword)",borderColor:"var(--sx-keyword)",color:"#fff"},onClick:()=>{eS.onConfirm(),ey(null)},children:eS.confirmLabel})]})]})})]})}},753:(e,t,a)=>{a.d(t,{b:()=>c});var s=a(7814);let c=(0,s.createServerReference)("0065d0a233bee6cc0f2cc0ec1c9e2e57d3fe4146bd",s.callServer,void 0,s.findSourceMapURL,"getDmPreviews")},891:(e,t,a)=>{a.d(t,{m:()=>n});var s=a(5076);let c={working:{c:"var(--sx-string)",pulse:!0,label:"working"},review:{c:"#e0a44e",label:"review"},blocked:{c:"#e8688f",label:"blocked"},idle:{c:"var(--text-faint)",label:"idle"}};function n({status:e,label:t=!1,size:a=8}){let l=c[e]??c.idle;return(0,s.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},title:l.label,children:[l.pulse?(0,s.jsx)("span",{className:"dotpulse"}):(0,s.jsx)("span",{style:{width:a,height:a,borderRadius:"50%",background:l.c,display:"inline-block",flex:`0 0 ${a}px`}}),t&&(0,s.jsx)("span",{style:{fontSize:11,color:l.c,fontWeight:600},children:l.label})]})}},1251:(e,t,a)=>{a.d(t,{n:()=>c});var s=a(7814);let c=(0,s.createServerReference)("60edb05ee6cc09289adab8cda11ee413c19d4c7f54",s.callServer,void 0,s.findSourceMapURL,"agentRespond")},3042:(e,t,a)=>{a.d(t,{M:()=>c});var s=a(7814);let c=(0,s.createServerReference)("709237475d6d2e64f2d693bc804672bd7e7e2e48e3",s.callServer,void 0,s.findSourceMapURL,"connectTelegram")},4619:(e,t,a)=>{a.d(t,{_:()=>c});var s=a(7814);let c=(0,s.createServerReference)("703023a31555bd5115954eb1274fb796ec5c2ca922",s.callServer,void 0,s.findSourceMapURL,"sendMessage")},5145:(e,t,a)=>{a.d(t,{G:()=>c});var s=a(7814);let c=(0,s.createServerReference)("0074f45d8e4ca4543908c3ced6c3b9b9a3706ea44d",s.callServer,void 0,s.findSourceMapURL,"telegramStatus")},6434:(e,t,a)=>{a.d(t,{K:()=>c});var s=a(7814);let c=(0,s.createServerReference)("00f0bb87694f8eeadf8dcf1c1cfa321313a5a4b1fb",s.callServer,void 0,s.findSourceMapURL,"disconnectTelegram")},7224:(e,t,a)=>{a.d(t,{H:()=>c});var s=a(7814);let c=(0,s.createServerReference)("40601efd7c8cf9c8003649273bd48079ac53d9137b",s.callServer,void 0,s.findSourceMapURL,"clearConversation")}}]);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4909],{4552:(e,s,t)=>{t.d(s,{e:()=>n});var a=t(5076);function n({name:e,color:s,size:t=24,health:l,image:c}){let r=Math.max(6,Math.round(.3*t)),i=Math.round(.28*t),d=c?/^(data:|https?:|\/)/.test(c)?c:`/api/upload?path=${encodeURIComponent(c)}`:null;return(0,a.jsxs)("span",{style:{position:"relative",width:t,height:t,flex:`0 0 ${t}px`,display:"inline-block"},children:[d?(0,a.jsx)("img",{src:d,alt:e,width:t,height:t,style:{width:t,height:t,borderRadius:i,objectFit:"cover",display:"block"}}):(0,a.jsx)("span",{style:{width:t,height:t,borderRadius:i,background:s,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*t),fontWeight:700},children:(e[0]||"?").toUpperCase()}),l&&(0,a.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:r,height:r,borderRadius:"50%",background:"alive"===l?"var(--sx-string)":"stale"===l?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}},4733:(e,s,t)=>{t.d(s,{k:()=>n});var a=t(7814);let n=(0,a.createServerReference)("60ac6b802b4ac5f1a28c3dbdb5ff9f27e10a8e3dcf",a.callServer,void 0,a.findSourceMapURL,"getEvents")},5571:(e,s,t)=>{t.d(s,{V4:()=>w,H8:()=>M,qs:()=>b});var a=t(5076),n=t(8488),l=t(9860),c=t(4302),r=t(5393),i=t(4552),d=t(8576),o=t(5629),m=t(7814);let h=(0,m.createServerReference)("40ac6757fb2775911c0038068e6886a3048ccde63e",m.callServer,void 0,m.findSourceMapURL,"pullKbForComposer"),u=(0,m.createServerReference)("4012501e494aa25cf5c7859e4f894c264b3df602d1",m.callServer,void 0,m.findSourceMapURL,"sendMessageToKb"),p=(0,m.createServerReference)("400eee66a77accda3de846105635a40928fdfbd421",m.callServer,void 0,m.findSourceMapURL,"taskRef");var x=t(9102),g=t(6184);let j={read:"Read",create:"Create",edit:"Edit",run:"Run",search:"Search"},f=[{cmd:"/help",descKey:"help"},{cmd:"/kb",descKey:"kb",arg:"<question>"},{cmd:"/search",descKey:"search",arg:"<query>"},{cmd:"/graph",descKey:"graph",arg:"<key>"},{cmd:"/status",descKey:"status"},{cmd:"/agents",descKey:"agents"},{cmd:"/agent",descKey:"agent",arg:"<handle>"},{cmd:"/new-goal",descKey:"newGoal",arg:"<brief>"},{cmd:"/new-issue",descKey:"newIssue",arg:"<title>"},{cmd:"/new-spec",descKey:"newSpec",arg:"<title>"},{cmd:"/generate-plan",descKey:"generatePlan",arg:"<brief>"},{cmd:"/approve",descKey:"approve"},{cmd:"/reject",descKey:"reject",arg:"<reason>"},{cmd:"/run-247",descKey:"run247"},{cmd:"/pause",descKey:"pause"},{cmd:"/cancel",descKey:"cancel"},{cmd:"/archive",descKey:"archive"},{cmd:"/assign",descKey:"assign",arg:"<issue> <@agent>"},{cmd:"/review",descKey:"review"},{cmd:"/close-sprint",descKey:"closeSprint"},{cmd:"/test-dev",descKey:"testDev"},{cmd:"/github",descKey:"github"},{cmd:"/prepare-deploy",descKey:"prepareDeploy"},{cmd:"/export-source",descKey:"exportSource",arg:"<repo>"},{cmd:"/models",descKey:"models"},{cmd:"/skills",descKey:"skills"},{cmd:"/locks",descKey:"locks"},{cmd:"/telegram",descKey:"telegram"},{cmd:"/reindex",descKey:"reindex"},{cmd:"/curate",descKey:"curate"},{cmd:"/clear",descKey:"clear"}],v={idle:{c:"#6b7390",bg:"rgba(120,130,160,.16)"},working:{c:"#b3d97a",bg:"rgba(179,217,122,.15)"},review:{c:"#e0a44e",bg:"rgba(224,164,78,.16)"},blocked:{c:"#e8688f",bg:"rgba(232,104,143,.16)"}};function b({status:e}){let s=(0,o.k)(),t=v[e]??v.idle;return(0,a.jsx)("span",{className:"status-pill",style:{color:t.c,background:t.bg},children:e in v?s("chat.status."+e):e})}function k(e,s,t){let n=t?Object.fromEntries(t.map(e=>[e.key.toLowerCase(),e])):{},l=t&&t.length>0;return e.split(l?/(@[a-z0-9-]+|#[a-z0-9_-]+)/gi:/(@[a-z0-9-]+)/gi).map((e,t)=>{if(/^@[a-z0-9-]+$/i.test(e)&&s.has(e.slice(1).toLowerCase()))return(0,a.jsx)("span",{className:"mention",children:e},t);if(l&&/^#[a-z0-9_-]+$/i.test(e)){let s=n[e.slice(1).toLowerCase()];if(s){let n="goal"===s.kind?"/goals":"spec"===s.kind?"/planner":"/pm";return(0,a.jsx)("a",{className:"ref-chip",href:n,title:s.title,children:e},t)}}return(0,a.jsx)("span",{children:e},t)})}function N({step:e}){let s,t,n=(0,o.k)(),l=e.kind in j?n("chat.verb."+e.kind):e.kind,c="run"===e.kind,r="edit"===e.kind&&!!e.detail,i="create"===e.kind&&!!e.detail,d=r?e.detail.split("\n"):[],m=r?d.filter(e=>e.startsWith("+")).length:0,h=r?d.filter(e=>e.startsWith("-")).length:0,u=i?e.detail.slice(0,4e3).split("\n"):[];return(0,a.jsxs)("div",{className:"work-step",children:[(0,a.jsxs)("div",{className:"wstep-head",children:[(0,a.jsx)("span",{className:"wstep-verb "+e.kind,children:l}),(0,a.jsx)("span",{className:"wstep-file",children:e.target}),r&&(0,a.jsxs)("span",{className:"wstep-badge",children:[(0,a.jsxs)("span",{className:"plus",children:["+",m]})," ",(0,a.jsxs)("span",{className:"minus",children:["−",h]})]}),i&&(0,a.jsx)("span",{className:"wstep-badge",children:(0,a.jsxs)("span",{className:"plus",children:["+",u.length]})})]}),i&&(0,a.jsx)("div",{className:"wstep-code scroll",children:u.map((e,s)=>(0,a.jsxs)("div",{className:"wcode-line",children:[(0,a.jsx)("span",{className:"wcode-gutter",children:s+1}),(0,a.jsx)("span",{className:"wcode-text",children:e||""})]},s))}),r&&(0,a.jsx)("div",{className:"wstep-code scroll",children:d.map((e,s)=>{let t=e.startsWith("+")?"add":e.startsWith("-")?"del":"ctx";return(0,a.jsxs)("div",{className:"wdiff-line "+t,children:[(0,a.jsx)("span",{className:"wdiff-sign",children:"add"===t?"+":"del"===t?"−":" "}),(0,a.jsx)("span",{className:"wdiff-text",children:e.slice(1)||""})]},s)})}),c&&e.detail&&(t=(s=e.detail.split("\n")).slice(0,14),(0,a.jsxs)("div",{className:"wstep-term",children:[t.map((e,s)=>(0,a.jsx)("div",{className:/✓|passed|ok\b/i.test(e)?"ok":"",children:e||""},s)),s.length>t.length&&(0,a.jsxs)("div",{className:"wstep-more",children:["… +",s.length-t.length," lines"]})]}))]})}function y({steps:e,live:s}){let t=(0,o.k)(),l=e.filter(e=>["read","create","edit","run","search"].includes(e.kind)),c=l.filter(e=>"create"===e.kind||"edit"===e.kind).length,r=[...e].reverse().find(e=>"thinking"===e.kind),i=!s,[m,h]=(0,n.useState)(s);return 0!==l.length||r?(0,a.jsxs)("div",{className:"work-block"+(m?"":" collapsed"),children:[(0,a.jsxs)("button",{type:"button",className:"work-head",onClick:()=>h(e=>!e),children:[i?(0,a.jsx)("span",{className:"done-check",children:(0,a.jsx)(d.I,{name:"check",size:15})}):(0,a.jsx)("span",{className:"spin",children:(0,a.jsx)(d.I,{name:"refresh",size:14})}),(0,a.jsx)("span",{className:"wlabel",children:t(i?"chat.work.done":"chat.work.working")}),(0,a.jsx)("span",{className:"wmeta",children:i?t(1===l.length?"chat.work.actions.one":"chat.work.actions.other",{n:l.length}):t("chat.work.workingEllipsis")}),i&&c>0&&(0,a.jsxs)("span",{className:"wmeta wfiles",title:"files changed",children:["✎ ",c]}),(0,a.jsx)("span",{className:"work-toggle"+(m?" open":""),children:(0,a.jsx)(d.I,{name:"chevronRight",size:13})})]}),m&&(0,a.jsxs)(a.Fragment,{children:[r?.detail&&(0,a.jsxs)("div",{className:"work-thinking",children:[(0,a.jsx)("span",{className:"ti",children:(0,a.jsx)(d.I,{name:"bot",size:13})}),(0,a.jsx)("span",{children:r.detail})]}),(0,a.jsx)("div",{className:"work-steps",children:l.map(e=>(0,a.jsx)(N,{step:e},e.id))})]})]}):null}function w({onSend:e,placeholder:s,agents:t,defaultText:l="",requireMention:c=!1,enableAttachments:r=!0,refs:m}){let[u,p]=(0,n.useState)(l),x=(0,o.k)(),g=!c||u.trim().startsWith("/")||(u.match(/@([a-z0-9-]+)/gi)||[]).some(e=>t.some(s=>s.handle.toLowerCase()===e.slice(1).toLowerCase())),[j,v]=(0,n.useState)(!1),[b,k]=(0,n.useState)(null),[N,y]=(0,n.useState)(null),[S,z]=(0,n.useState)(null),[D,I]=(0,n.useState)([]),[K,R]=(0,n.useState)(""),[C,M]=(0,n.useState)(!1),[A,L]=(0,n.useState)(!1),[E,$]=(0,n.useState)(""),[P,T]=(0,n.useState)(null),[F,W]=(0,n.useState)(""),[U,q]=(0,n.useTransition)(),H=(0,n.useRef)(null),B=(0,n.useRef)(null),_=(0,n.useRef)(null),V=void 0!==m;async function O(e){if(!e||!e.length)return;R("");let s=10-D.length,t=Array.from(e).slice(0,Math.max(0,s));if(!t.length)return void R(x("chat.composer.maxAttachments"));let a=new FormData;for(let e of t)a.append("files",e);M(!0);try{let e=await fetch("/api/upload",{method:"POST",body:a}),s=await e.json();if(!e.ok||!s.ok)return void R(s.error??x("chat.composer.uploadFailed"));I(e=>[...e,...s.attachments].slice(0,10))}catch{R(x("chat.composer.uploadFailed"))}finally{M(!1),B.current&&(B.current.value="")}}function G(e){e.style.height="auto",e.style.height=Math.min(e.scrollHeight,260)+"px"}function J(e){if(!b||!H.current)return;let s=u.slice(0,b.start),t=u.slice(H.current.selectionStart),a="@"+e.handle+" ";p(s+a+t),_.current=(s+a).length,k(null),requestAnimationFrame(()=>H.current?.focus())}function Q(e){if(!N||!H.current)return;let s=u.slice(0,N.start),t=u.slice(H.current.selectionStart),a="#"+e.key+" ";p(s+a+t),_.current=(s+a).length,y(null),requestAnimationFrame(()=>H.current?.focus())}function X(e){let s=e.cmd+(e.arg?" ":"");p(s),_.current=s.length,z(null),requestAnimationFrame(()=>H.current?.focus())}function Y(){let e=E.trim();if(!e){T(null),W(x("chat.kbPull.empty"));return}W(""),T(null),q(async()=>{let s=await h(e);s.ok&&s.text?T({text:s.text,sources:s.sources??[]}):W(x("chat.kbPull.noResult"))})}function Z(){let s=u.trim();!s&&0===D.length||g&&(e(s,D.length?D:void 0),p(""),I([]),R(""),H.current&&(H.current.style.height="auto"),k(null),z(null),y(null),L(!1))}return(0,n.useEffect)(()=>{null!=_.current&&H.current&&(H.current.setSelectionRange(_.current,_.current),_.current=null)}),(0,a.jsxs)("div",{className:"chat-composer",children:[b&&(0,a.jsxs)("div",{className:"mention-pop",children:[(0,a.jsxs)("div",{className:"mention-head",children:[(0,a.jsx)(d.I,{name:"at",size:12})," ",x("chat.composer.mentionAgent")]}),(0,a.jsxs)("div",{className:"mention-list scroll",children:[0===b.items.length&&(0,a.jsx)("div",{className:"mention-empty",children:x("chat.noAgentMatch",{q:b.query})}),b.items.map((e,s)=>(0,a.jsxs)("div",{className:"mention-item"+(s===b.index?" active":""),onMouseEnter:()=>k(e=>e&&{...e,index:s}),onMouseDown:s=>{s.preventDefault(),J(e)},children:[(0,a.jsx)(i.e,{name:e.name,color:e.color,image:e.image,size:24}),(0,a.jsx)("div",{className:"mi-text",children:(0,a.jsxs)("div",{className:"mi-name",children:[e.name," ",(0,a.jsxs)("span",{className:"mi-handle",children:["@",e.handle]})]})}),(0,a.jsx)("span",{className:"mi-role",children:e.role})]},e.handle))]})]}),N&&(0,a.jsxs)("div",{className:"mention-pop",children:[(0,a.jsxs)("div",{className:"mention-head",children:[(0,a.jsx)(d.I,{name:"branch",size:12})," ",x("chat.composer.referenceItem")]}),(0,a.jsxs)("div",{className:"mention-list scroll",children:[0===N.items.length&&(0,a.jsx)("div",{className:"mention-empty",children:x("chat.noRefMatch",{q:N.query})}),N.items.map((e,s)=>(0,a.jsxs)("div",{className:"mention-item"+(s===N.index?" active":""),onMouseEnter:()=>y(e=>e&&{...e,index:s}),onMouseDown:s=>{s.preventDefault(),Q(e)},children:[(0,a.jsx)("span",{className:"mi-ref-kind",children:x("chat.composer.refKind."+e.kind)}),(0,a.jsx)("div",{className:"mi-text",children:(0,a.jsxs)("div",{className:"mi-name",children:[(0,a.jsxs)("span",{className:"mi-handle",children:["#",e.key]})," ",e.title]})})]},e.id))]})]}),S&&(0,a.jsxs)("div",{className:"mention-pop",children:[(0,a.jsxs)("div",{className:"mention-head",children:[(0,a.jsx)(d.I,{name:"command",size:12})," ",x("chat.commands")]}),(0,a.jsx)("div",{className:"mention-list scroll",children:S.items.map((e,s)=>(0,a.jsxs)("div",{className:"mention-item"+(s===S.index?" active":""),onMouseEnter:()=>z(e=>e&&{...e,index:s}),onMouseDown:s=>{s.preventDefault(),X(e)},children:[(0,a.jsx)("div",{className:"mi-text",children:(0,a.jsxs)("div",{className:"mi-name",children:[e.cmd,e.arg&&(0,a.jsxs)("span",{className:"mi-handle",children:[" ",e.arg]})]})}),(0,a.jsx)("span",{className:"mi-role",children:x("chat.slash."+e.descKey)})]},e.cmd))})]}),A&&(0,a.jsxs)("div",{className:"mention-pop kb-pull-pop",children:[(0,a.jsxs)("div",{className:"mention-head",children:[(0,a.jsx)(d.I,{name:"branch",size:12})," ",x("chat.kbPull.title")]}),(0,a.jsxs)("div",{className:"kb-pull-body",children:[(0,a.jsxs)("div",{className:"kb-pull-row",children:[(0,a.jsx)("input",{className:"kb-pull-input",value:E,placeholder:x("chat.kbPull.placeholder"),onChange:e=>{$(e.target.value),W("")},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),Y()),"Escape"===e.key&&(e.preventDefault(),L(!1))}}),(0,a.jsxs)("button",{type:"button",className:"att-btn",disabled:U,onMouseDown:e=>e.preventDefault(),onClick:Y,children:[U?(0,a.jsx)("span",{className:"spin",children:(0,a.jsx)(d.I,{name:"refresh",size:13})}):(0,a.jsx)(d.I,{name:"search",size:13}),x("chat.kbPull.search")]})]}),(0,a.jsx)("div",{className:"kb-pull-preview",children:U?(0,a.jsx)("div",{className:"kb-pull-muted",children:x("chat.kbPull.searching")}):P?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"kb-pull-text",children:P.text}),P.sources.length>0&&(0,a.jsx)("div",{className:"kb-pull-sources",children:P.sources.map(e=>(0,a.jsx)("span",{children:e},e))})]}):(0,a.jsx)("div",{className:F?"kb-pull-error":"kb-pull-muted",children:F||x("chat.kbPull.empty")})}),P&&(0,a.jsx)("div",{className:"kb-pull-actions",children:(0,a.jsxs)("button",{type:"button",className:"send-btn",onMouseDown:e=>e.preventDefault(),onClick:function(){if(!P)return;let e=P.sources.length?`
|
|
2
|
-
Sources: ${P.sources.join(", ")}`:"",s=`KB: ${P.text}${e}`;p(e=>e.trim()?`${e.trimEnd()}
|
|
3
|
-
|
|
4
|
-
${s}`:s),L(!1),T(null),W(""),requestAnimationFrame(()=>{H.current&&(G(H.current),H.current.focus())})},children:[(0,a.jsx)(d.I,{name:"add",size:13})," ",x("chat.kbPull.insert")]})})]})]}),(0,a.jsxs)("div",{className:"composer-box"+(j?" focus":""),children:[D.length>0&&(0,a.jsx)("div",{className:"att-row",children:D.map((e,s)=>(0,a.jsxs)("span",{className:"att-chip",children:[(0,a.jsx)(d.I,{name:/^image\//.test(e.type)||"application/pdf"===e.type?"doc":"files",size:11}),(0,a.jsx)("span",{className:"att-name",children:e.name}),(0,a.jsx)("button",{className:"att-x",onClick:()=>I(e=>e.filter((e,t)=>t!==s)),children:(0,a.jsx)(d.I,{name:"close",size:10})})]},e.path))}),K&&(0,a.jsx)("div",{style:{fontSize:10.5,color:"#e8688f",padding:"2px 8px"},children:K}),(0,a.jsx)("textarea",{ref:H,className:"composer-input",value:u,rows:1,placeholder:s,onChange:e=>{p(e.target.value),function(e,s){let a=e.match(/^\/([a-z-]*)$/i);if(a){let e=a[1].toLowerCase(),s=f.filter(s=>s.cmd.slice(1).startsWith(e));k(null),y(null),z(s.length?{items:s,index:0}:null);return}z(null);let n=e.slice(0,s).match(/#([a-z0-9_-]*)$/i);if(n&&m&&m.length>0){let e=n[1].toLowerCase(),t=m.filter(s=>s.key.toLowerCase().includes(e)||s.title.toLowerCase().includes(e));k(null),y({query:e,start:s-n[0].length,items:t,index:0});return}y(null);let l=e.slice(0,s).match(/@([a-z0-9-]*)$/i);if(!l)return k(null);let c=l[1].toLowerCase(),r=t.filter(e=>e.handle.includes(c)||e.name.toLowerCase().includes(c)||e.role.toLowerCase().includes(c));k({query:c,start:s-l[0].length,items:r,index:0})}(e.target.value,e.target.selectionStart),G(e.target)},onKeyDown:function(e){if(S&&S.items.length){if("ArrowDown"===e.key){e.preventDefault(),z(e=>e&&{...e,index:(e.index+1)%e.items.length});return}if("ArrowUp"===e.key){e.preventDefault(),z(e=>e&&{...e,index:(e.index-1+e.items.length)%e.items.length});return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault(),X(S.items[S.index]);return}if("Escape"===e.key){e.preventDefault(),z(null);return}}if(N&&N.items.length){if("ArrowDown"===e.key){e.preventDefault(),y(e=>e&&{...e,index:(e.index+1)%e.items.length});return}if("ArrowUp"===e.key){e.preventDefault(),y(e=>e&&{...e,index:(e.index-1+e.items.length)%e.items.length});return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault(),Q(N.items[N.index]);return}if("Escape"===e.key){e.preventDefault(),y(null);return}}if(b&&b.items.length){if("ArrowDown"===e.key){e.preventDefault(),k(e=>e&&{...e,index:(e.index+1)%e.items.length});return}if("ArrowUp"===e.key){e.preventDefault(),k(e=>e&&{...e,index:(e.index-1+e.items.length)%e.items.length});return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault(),J(b.items[b.index]);return}if("Escape"===e.key){e.preventDefault(),k(null);return}}if("Escape"===e.key&&A){e.preventDefault(),L(!1);return}"Enter"!==e.key||e.shiftKey||(e.preventDefault(),Z())},onFocus:()=>v(!0),onBlur:()=>v(!1)}),r&&(0,a.jsx)("input",{ref:B,type:"file",multiple:!0,hidden:!0,accept:".png,.jpg,.jpeg,.gif,.webp,.bmp,.pdf,.txt,.md,.csv,.json,.log,.zip,.doc,.docx,.xls,.xlsx,.ppt,.pptx",onChange:e=>O(e.target.files)}),(0,a.jsxs)("div",{className:"composer-foot",children:[(0,a.jsxs)("span",{className:"composer-actions",children:[r&&(0,a.jsxs)("button",{type:"button",className:"att-btn",title:x("chat.composer.attachTitle"),disabled:C||D.length>=10,onClick:()=>B.current?.click(),children:[C?(0,a.jsx)("span",{className:"spin",children:(0,a.jsx)(d.I,{name:"refresh",size:13})}):(0,a.jsx)(d.I,{name:"add",size:14})," ",D.length>0?`${D.length}/10`:x("chat.composer.attach")]}),V&&(0,a.jsxs)("button",{type:"button",className:"att-btn kb-pull-btn",title:x("chat.kbPull.open"),disabled:U,onMouseDown:e=>e.preventDefault(),onClick:function(){$(u.replace(/@[a-z0-9-]+/gi,"").trim().slice(0,180)),T(null),W(""),k(null),z(null),y(null),L(e=>!e)},children:[(0,a.jsx)(d.I,{name:"branch",size:13})," ",x("chat.kbPull.open")]})]}),c&&u.trim()&&!g?(0,a.jsxs)("span",{className:"composer-hint",style:{color:"#f0a35e"},children:[(0,a.jsx)(d.I,{name:"at",size:11})," ",x("chat.composer.mentionToSend")]}):(0,a.jsxs)("span",{className:"composer-hint",children:[(0,a.jsx)("kbd",{children:"↵"})," ",x("chat.composer.send")," \xb7 ",(0,a.jsx)("kbd",{children:"⇧↵"})," ",x("chat.composer.newline")]}),(0,a.jsxs)("button",{className:"send-btn",disabled:!u.trim()&&0===D.length||!g,onMouseDown:e=>e.preventDefault(),onClick:Z,children:[(0,a.jsx)(d.I,{name:"send",size:13})," ",x("home.cmd.run")]})]})]})]})}function S({atts:e}){return(0,a.jsx)("div",{className:"msg-atts",children:e.map(e=>{let s=`/api/upload?path=${encodeURIComponent(e.path)}`;return/^image\//.test(e.type)?(0,a.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",className:"msg-att-img",title:e.name,children:(0,a.jsx)("img",{src:s,alt:e.name,loading:"lazy"})},e.path):(0,a.jsxs)("a",{href:s,target:"_blank",rel:"noreferrer",className:"msg-att-doc",title:e.name,children:[(0,a.jsx)(d.I,{name:"doc",size:13})," ",(0,a.jsx)("span",{className:"mad-name",children:e.name})]},e.path)})})}function z({id:e}){let s=(0,o.k)(),[t,l]=(0,n.useTransition)(),[c,r]=(0,n.useState)(!1);return(0,a.jsx)("button",{type:"button",className:"cmsg-kb",disabled:t||c,title:s(c?"chat.kbSave.saved":"chat.kbSave.send"),onClick:()=>l(async()=>{(await u(e)).ok&&r(!0)}),style:{background:"none",border:"none",cursor:c?"default":"pointer",padding:0,marginLeft:2,display:"inline-flex",alignItems:"center",color:c?"var(--accent)":"var(--text-faint)",opacity:t?.5:1},children:(0,a.jsx)(d.I,{name:c?"check":"branch",size:11,className:t?"sync-spin":""})})}function D({taskId:e}){let[s,t]=(0,n.useState)(null);return((0,n.useEffect)(()=>{let s=!0;return p(e).then(e=>{s&&t(e)}).catch(()=>{}),()=>{s=!1}},[e]),s)?(0,a.jsxs)("div",{style:{marginTop:5,fontSize:10.5,color:"var(--text-faint)",display:"flex",alignItems:"center",gap:5,flexWrap:"wrap"},children:[(0,a.jsx)(d.I,{name:"branch",size:10}),(0,a.jsx)("span",{style:{color:"var(--accent)",fontWeight:600},children:s.taskKey}),s.issueKey&&(0,a.jsxs)("span",{children:["\xb7 ",s.issueKey]}),s.goalTitle&&(0,a.jsxs)("span",{children:["\xb7 ",s.goalTitle.slice(0,40)]}),s.col&&(0,a.jsx)("span",{style:{padding:"0 5px",borderRadius:5,border:"1px solid var(--border)",textTransform:"capitalize"},children:s.col})]}):null}function I({blocks:e}){let s=(0,l.useRouter)(),t=(0,o.k)();return(0,a.jsxs)("div",{style:{marginTop:5,fontSize:10.5,color:"var(--text-faint)",display:"flex",alignItems:"center",gap:5,flexWrap:"wrap"},children:[(0,a.jsx)(d.I,{name:"doc",size:10}),(0,a.jsx)("span",{children:t("chat.touchedBlocks")}),e.map(e=>(0,a.jsx)("button",{type:"button",title:t("chat.touchedBlocks"),onClick:()=>s.push("/knowledge"),style:{color:"var(--accent)",fontWeight:600,background:"rgba(120,100,255,.10)",border:"1px solid rgba(120,100,255,.25)",borderRadius:4,padding:"0 5px",cursor:"pointer"},children:e},e))]})}function K({sources:e}){let[s,t]=(0,n.useState)(!1),l=(0,o.k)();return(0,a.jsxs)("div",{className:"msg-sources",children:[(0,a.jsxs)("button",{type:"button",className:"msg-sources-toggle",onClick:()=>t(e=>!e),children:[(0,a.jsx)(d.I,{name:"pulse",size:10})," ",l("chat.sources",{n:e.length})," ",(0,a.jsx)(d.I,{name:s?"chevronDown":"chevronRight",size:11})]}),s&&(0,a.jsx)("div",{className:"msg-sources-list",children:e.map((e,s)=>(0,a.jsx)("span",{children:e},s))})]})}function R({text:e,markdown:s,known:t,refs:l}){let i=(0,o.k)(),[d,m]=(0,n.useState)(!1),h=e.length>900;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"cmsg-bubble"+(h&&!d?" clamped":"")+(h&&d?" expanded":""),children:s?(0,a.jsx)("div",{className:"md cmsg-md",children:(0,a.jsx)(c.oz,{remarkPlugins:[r.A],children:e})}):k(e,t,l)}),h&&(0,a.jsx)("button",{type:"button",className:"cmsg-more",onClick:()=>m(e=>!e),children:i(d?"chat.showLess":"chat.showMore")})]})}function C({m:e}){let s=(0,o.k)(),t=(0,l.useRouter)(),[i,m]=(0,n.useTransition)(),[h,u]=(0,n.useState)(!1),[p,j]=(0,n.useState)(null);return(0,a.jsxs)("div",{className:"kb-card",children:[(0,a.jsxs)("div",{className:"kb-card-head",children:[(0,a.jsx)(d.I,{name:"branch",size:14})," ",s("kbcard.title")]}),(0,a.jsx)("div",{className:"kb-card-body cmsg-md",children:(0,a.jsx)(c.oz,{remarkPlugins:[r.A],children:e.text})}),p&&(0,a.jsxs)("div",{className:"kb-card-note",children:[(0,a.jsx)(d.I,{name:"check",size:12})," ",p]}),(0,a.jsxs)("div",{className:"kb-card-actions",children:[(0,a.jsx)("button",{className:"kbc-btn primary",disabled:i,onClick:()=>m(async()=>{j(s("kbcard.created",{n:(await (0,x.V)()).seeded})),t.refresh()}),children:s("home.createBlocks")}),(0,a.jsx)("button",{className:"kbc-btn",onClick:()=>t.push("/knowledge"),children:s("home.openKnowledge")}),(0,a.jsx)("button",{className:"kbc-btn",disabled:i,onClick:()=>m(async()=>{j(s("kb.reindexResult",{n:(await (0,g.f)()).chunks})),t.refresh()}),children:s("kb.reindex")})]}),e.sources&&e.sources.length>0&&(0,a.jsxs)("div",{className:"kb-card-sources",children:[(0,a.jsxs)("button",{type:"button",className:"msg-sources-toggle",onClick:()=>u(e=>!e),children:[(0,a.jsx)(d.I,{name:"pulse",size:10})," ",s("chat.sources",{n:e.sources.length})," ",(0,a.jsx)(d.I,{name:h?"chevronDown":"chevronRight",size:11})]}),h&&(0,a.jsx)("div",{className:"msg-sources-list",children:e.sources.map((e,s)=>(0,a.jsx)("span",{children:e},s))})]})]})}function M({msgs:e,typing:s,agents:t,byRun:l,liveRuns:c,loading:r,highlightId:d,operator:m,markdownAgent:h=!1,emptyHint:u,avatarSize:p=30,refs:x}){let g=(0,o.k)(),j=(0,n.useRef)(null),f=(0,n.useRef)(!0),v=Object.fromEntries(t.map(e=>[e.handle,e])),b=new Set(t.map(e=>e.handle));return(0,n.useEffect)(()=>{let e=j.current;e&&f.current&&(e.scrollTop=e.scrollHeight)},[e,s,l,c]),(0,n.useEffect)(()=>{d&&document.getElementById("m-"+d)?.scrollIntoView({block:"center",behavior:"smooth"})},[d,e]),(0,a.jsxs)("div",{className:"chat-stream scroll",ref:j,onScroll:()=>{let e=j.current;e&&(f.current=e.scrollHeight-e.scrollTop-e.clientHeight<120)},children:[[...e].sort((e,s)=>{let t=e.createdAt?new Date(e.createdAt).getTime():0,a=s.createdAt?new Date(s.createdAt).getTime():0;return t!==a?t-a:("operator"!==e.fromKind)-("operator"!==s.fromKind)}).map(e=>{let s="operator"===e.fromKind,t=e.fromHandle?v[e.fromHandle]:null,n=l[e.id],c=!s&&"kb-card"===e.kind;return(0,a.jsxs)("div",{className:"cmsg"+(s?" operator":"")+(d===e.id?" highlight":""),id:"m-"+e.id,children:[s?m?.image?(0,a.jsx)(i.e,{name:m.name||g("chat.you"),color:"#9a5cff",image:m.image,size:p}):(0,a.jsx)("div",{className:"avatar",style:{background:"linear-gradient(150deg,#e0a44e,#9a5cff)",color:"#1a1206",width:p,height:p,borderRadius:Math.round(.3*p),display:"grid",placeItems:"center",fontWeight:700,fontSize:Math.round(.4*p)},children:"OP"}):t?(0,a.jsx)(i.e,{name:t.name,color:t.color,image:t.image,size:p}):(0,a.jsx)(i.e,{name:"?",color:"#6b7390",size:p}),(0,a.jsxs)("div",{className:"cmsg-body",children:[(0,a.jsxs)("div",{className:"cmsg-head",children:[(0,a.jsx)("span",{className:"cmsg-name",children:s?g("chat.you"):t?.name??e.fromHandle}),!s&&t&&(0,a.jsx)("span",{className:"cmsg-role",children:t.role}),(0,a.jsx)("span",{className:"cmsg-when",children:function(e){if(!e)return"";let s="string"==typeof e?new Date(e):e,t=s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),a=s.toLocaleDateString([],{day:"2-digit",month:"short"});return`${a}, ${t}`}(e.createdAt)}),!s&&e.text&&(0,a.jsx)(z,{id:e.id})]}),n&&n.length>0&&(0,a.jsx)(y,{steps:n,live:!1}),c?(0,a.jsx)(C,{m:e}):e.text&&(0,a.jsx)(R,{text:e.text,markdown:h&&!s,known:b,refs:x}),e.attachments&&e.attachments.length>0&&(0,a.jsx)(S,{atts:e.attachments}),!s&&!c&&e.sources&&e.sources.length>0&&(0,a.jsx)(K,{sources:e.sources}),!s&&e.taskId&&(0,a.jsx)(D,{taskId:e.taskId}),!s&&e.blocks&&e.blocks.length>0&&(0,a.jsx)(I,{blocks:e.blocks})]})]},e.id)}),c.map(([e,s])=>{let n=s.find(e=>e.agentId)?.agentId,l=t.find(e=>e.id===n);if(!l)return null;let c=s.reduce((e,s)=>Math.max(e,s.seq||0),0),r=s.some(e=>"done"===e.kind)||c>0&&Date.now()-c>12e4,d=s.filter(e=>"text"===e.kind).map(e=>e.detail).join("");return(0,a.jsxs)("div",{className:"cmsg",children:[(0,a.jsx)(i.e,{name:l.name,color:l.color,image:l.image,size:p}),(0,a.jsxs)("div",{className:"cmsg-body",children:[(0,a.jsxs)("div",{className:"cmsg-head",children:[(0,a.jsx)("span",{className:"cmsg-name",children:l.name}),(0,a.jsx)("span",{className:"cmsg-role",children:l.role})]}),(0,a.jsx)(y,{steps:s,live:!r}),d&&(0,a.jsxs)("div",{className:"cmsg-bubble",children:[k(d,b,x),!r&&(0,a.jsx)("span",{className:"live-caret"})]})]})]},"live-"+e)}),s.filter(e=>{let s=v[e];return s&&!c.some(([,e])=>e.some(e=>e.agentId===s.id))}).map(e=>{let s=v[e];return s?(0,a.jsxs)("div",{className:"cmsg",children:[(0,a.jsx)(i.e,{name:s.name,color:s.color,image:s.image,size:p}),(0,a.jsxs)("div",{className:"cmsg-body",children:[(0,a.jsxs)("div",{className:"cmsg-head",children:[(0,a.jsx)("span",{className:"cmsg-name",children:s.name}),(0,a.jsx)("span",{className:"cmsg-role",children:s.role})]}),(0,a.jsxs)("div",{className:"typing-bubble",children:[(0,a.jsx)("span",{}),(0,a.jsx)("span",{}),(0,a.jsx)("span",{})]})]})]},"typing-"+e):null}),r&&0===e.length&&0===c.length&&(0,a.jsx)("div",{className:"chat-skel","aria-label":g("home.chat.loading"),children:[0,1,2].map(e=>(0,a.jsxs)("div",{className:"skel-row",style:{animationDelay:`${.12*e}s`},children:[(0,a.jsx)("div",{className:"skel-avatar"}),(0,a.jsxs)("div",{className:"skel-lines",children:[(0,a.jsx)("div",{className:"skel-line",style:{width:"38%"}}),(0,a.jsx)("div",{className:"skel-line",style:{width:1===e?"82%":"64%"}}),2!==e&&(0,a.jsx)("div",{className:"skel-line",style:{width:"48%"}})]})]},e))}),!r&&0===e.length&&0===s.length&&0===c.length&&(0,a.jsx)("div",{className:"mention-empty",style:{textAlign:"center",padding:22},children:u??g("chat.stream.emptyHint")})]})}},6184:(e,s,t)=>{t.d(s,{f:()=>n});var a=t(7814);let n=(0,a.createServerReference)("001d11e1ddfafcf521054a33afdc0087b8fc02ca5e",a.callServer,void 0,a.findSourceMapURL,"reindexKbAction")},6991:(e,s,t)=>{t.d(s,{p:()=>n});var a=t(7814);let n=(0,a.createServerReference)("40e2554fd57b4e5a7a54c4ede48a862646bc2f4006",a.callServer,void 0,a.findSourceMapURL,"conversationContext")},8163:(e,s,t)=>{t.d(s,{m:()=>i});var a=t(5076),n=t(4552),l=t(8576),c=t(5629);let r=e=>(e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e))+" tks";function i({stat:e,onCompact:s,compacting:t}){let d=(0,c.k)(),o=2*Math.PI*15,m=Math.min(1,e.used/e.max)*o,h=Math.min(1,e.reserve/e.max)*o,u=e.usedPct>=85?"#e8688f":e.usedPct>=65?"#e0a44e":"#b3d97a",p=e.remainingPct<=35,x=e.used>0&&e.usedPct<1?"<1%":`${e.usedPct}%`;return(0,a.jsxs)("div",{className:"ctx-donut-wrap",children:[(0,a.jsxs)("div",{className:"ctx-donut",tabIndex:0,children:[(0,a.jsxs)("svg",{width:38,height:38,viewBox:"0 0 38 38",children:[(0,a.jsx)("circle",{cx:19,cy:19,r:15,fill:"none",stroke:"var(--border)",strokeWidth:4}),(0,a.jsx)("circle",{cx:19,cy:19,r:15,fill:"none",stroke:u,strokeWidth:4,strokeLinecap:"round",strokeDasharray:`${m} ${o}`,transform:"rotate(-90 19 19)"}),(0,a.jsx)("circle",{cx:19,cy:19,r:15,fill:"none",stroke:"var(--text-faint)",strokeWidth:4,strokeDasharray:`${h} ${o}`,strokeDashoffset:-m,transform:"rotate(-90 19 19)"}),(0,a.jsx)("text",{x:19,y:20,textAnchor:"middle",dominantBaseline:"middle",fontSize:10,fontWeight:700,fill:"var(--text)",children:x})]}),(0,a.jsxs)("div",{className:"ctx-pop",children:[(0,a.jsxs)("div",{className:"ctx-pop-title",children:[(0,a.jsx)(l.I,{name:"pulse",size:12})," ",d("chrome.ctx.title")]}),(0,a.jsxs)("div",{className:"ctx-rows",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:d("chrome.ctx.max")}),(0,a.jsx)("b",{children:r(e.max)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:d("chrome.ctx.used")}),(0,a.jsxs)("b",{style:{color:u},children:[r(e.used)," \xb7 ",x]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:d("chrome.ctx.reserve")}),(0,a.jsxs)("b",{children:[r(e.reserve)," \xb7 ",e.reservePct,"%"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:d("chrome.ctx.remaining")}),(0,a.jsxs)("b",{children:[r(e.remaining)," \xb7 ",e.remainingPct,"%"]})]})]}),e.perAgent.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"ctx-pop-sub",children:d("chrome.ctx.byAgent")}),(0,a.jsx)("div",{className:"ctx-agents",children:e.perAgent.slice(0,8).map(e=>(0,a.jsxs)("div",{className:"ctx-agent",children:[(0,a.jsx)(n.e,{name:e.name,color:e.color,size:18}),(0,a.jsx)("span",{className:"ctx-agent-name",children:e.name}),(0,a.jsx)("span",{className:"ctx-agent-bar",children:(0,a.jsx)("span",{style:{width:`${e.pct}%`,background:e.color}})}),(0,a.jsxs)("span",{className:"ctx-agent-tok",children:[r(e.tokens)," \xb7 ",e.pct,"%",e.usd>0?` \xb7 $${e.usd.toFixed(2)}`:""]})]},e.handle))})]}),(0,a.jsx)("div",{className:"ctx-pop-note",children:d("chrome.ctx.explain")})]})]}),p&&(0,a.jsxs)("button",{className:"ctx-compact",onClick:s,disabled:t,title:d("chrome.ctx.compactHint"),children:[t?(0,a.jsx)("span",{className:"spin",children:(0,a.jsx)(l.I,{name:"refresh",size:12})}):(0,a.jsx)(l.I,{name:"collapse",size:12}),d(t?"chrome.ctx.compacting":"chrome.ctx.compact")]})]})}},9102:(e,s,t)=>{t.d(s,{V:()=>n});var a=t(7814);let n=(0,a.createServerReference)("0006e9a4090ba43efa59bbc52b604c68dda554a774",a.callServer,void 0,a.findSourceMapURL,"seedDefaultBlocksAction")},9836:(e,s,t)=>{t.d(s,{L:()=>n});var a=t(7814);let n=(0,a.createServerReference)("40f2ed8b17501eb4f787ae6031a1453166894c6b1a",a.callServer,void 0,a.findSourceMapURL,"compactConversation")},9947:(e,s,t)=>{t.d(s,{V:()=>n});var a=t(7814);let n=(0,a.createServerReference)("4090dfcfd07d329c55152cb0be356ba4ac7bbb578b",a.callServer,void 0,a.findSourceMapURL,"getMessages")}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5664],{2730:(e,n,a)=>{a.d(n,{B:()=>r});var s=a(7814);let r=(0,s.createServerReference)("404de78d48c7a08195046dd144742454e2bda67c9c",s.callServer,void 0,s.findSourceMapURL,"approveSpec")},2964:(e,n,a)=>{a.d(n,{d:()=>r});var s=a(7814);let r=(0,s.createServerReference)("407e76c79e36677578f1327d2f785d64c352713479",s.callServer,void 0,s.findSourceMapURL,"rejectIssue")},2978:(e,n,a)=>{a.d(n,{AgentRunLive:()=>o});var s=a(5076),r=a(8488),t=a(9860),l=a(8576),i=a(4733),c=a(5629);let d=["read","create","edit","run","search","thinking","done","error"];function o({channel:e,resume:n=!1,sinceSeq:a=0,onFinish:p}){let u=(0,c.k)(),h=(0,t.useRouter)(),[g,v]=(0,r.useState)(n),[m,f]=(0,r.useState)([]),[x,j]=(0,r.useState)(0),b=(0,r.useRef)(n?a:0),k=(0,r.useRef)(!1),N=(0,r.useRef)(0);if((0,r.useEffect)(()=>{n&&(b.current=a,k.current=!1,N.current=a>0?a:Date.now(),f([]),j(Math.max(0,Math.floor((Date.now()-N.current)/1e3))),v(!0))},[n,a]),(0,r.useEffect)(()=>{function n(n){let a=n.detail;a?.channel===e&&(b.current=Date.now()-1,k.current=!1,N.current=Date.now(),f([]),j(0),v(!0))}return window.addEventListener("constella:agent-run",n),()=>window.removeEventListener("constella:agent-run",n)},[e]),(0,r.useEffect)(()=>{if(!g)return;N.current||(N.current=Date.now());let e=setInterval(()=>j(Math.floor((Date.now()-N.current)/1e3)),1e3);return()=>clearInterval(e)},[g]),(0,r.useEffect)(()=>{if(!g)return;let n=!0,a=Date.now();async function s(){let s=await (0,i.k)(e,b.current);n&&(s.length&&(b.current=Math.max(b.current,...s.map(e=>e.seq)),f(e=>{let n=new Set(e.map(e=>e.id));return[...e,...s.filter(e=>!n.has(e.id))]}),s.some(e=>"done"===e.kind||"error"===e.kind)&&(k.current||(k.current=!0,h.refresh(),p?.()),setTimeout(()=>{n&&v(!1)},2500))),Date.now()-a>96e4&&v(!1))}s();let r=setInterval(s,700);return()=>{n=!1,clearInterval(r)}},[g,e,h,p]),!g&&0===m.length)return null;let y=function(e){let n=[];for(let a of e)if("text"===a.kind){let e=(a.detail||"").replace(/\s+/g," ").trim();if(!e)continue;let s=n[n.length-1];s&&"text"===s.kind?s.content=(s.content+" "+e).slice(-600):n.push({id:a.id,kind:"text",content:e})}else if("thinking"===a.kind){let e=(a.detail||a.target||"").replace(/\s+/g," ").trim();e&&n.push({id:a.id,kind:"thinking",content:e})}else n.push({id:a.id,kind:a.kind,content:function(e){if(!e)return"";let n=e.split(/[\\/]/);return n.length>1?n.slice(-2).join("/"):e}(a.target)||a.detail||""});return n}(m),S=y.slice(-5),w=y.length-S.length,I=m.some(e=>"done"===e.kind||"error"===e.kind),R=m.some(e=>"error"===e.kind),z=String(Math.floor(x/60)).padStart(2,"0"),C=String(x%60).padStart(2,"0");return(0,s.jsxs)("div",{className:"card live-stream",style:{marginBottom:16,borderColor:R?"var(--sx-keyword)":"var(--accent)"},children:[(0,s.jsxs)("div",{className:"set-desc",style:{marginBottom:8,display:"flex",alignItems:"center",gap:7},children:[g&&!I?(0,s.jsx)("span",{className:"dotpulse"}):(0,s.jsx)(l.I,{name:R?"close":"check",size:13,style:{color:R?"var(--sx-keyword)":"var(--sx-string)"}}),g&&!I?u("agent.run.working"):R?u("agent.run.failed"):u("agent.run.finished"),y.length>0&&(0,s.jsxs)("span",{style:{color:"var(--text-faint)"},children:["\xb7 ",u(1===y.length?"agent.run.steps.one":"agent.run.steps.other",{n:y.length})]}),(0,s.jsxs)("span",{className:"live-elapsed",style:{marginLeft:"auto"},children:[z,":",C]})]}),0===S.length?(0,s.jsxs)("div",{className:"muted",style:{fontSize:12,display:"flex",alignItems:"center",gap:7},children:[(0,s.jsx)("span",{className:"sync-spin",children:(0,s.jsx)(l.I,{name:"refresh",size:12})})," ",u("agent.run.reading")]}):(0,s.jsxs)(s.Fragment,{children:[w>0&&(0,s.jsx)("div",{className:"live-more",children:u(1===w?"agent.run.earlier.one":"agent.run.earlier.other",{n:w})}),(0,s.jsx)("div",{className:"live-stream-lines",children:S.map(e=>(0,s.jsxs)("div",{className:"live-line "+e.kind,children:["text"!==e.kind&&(0,s.jsx)("span",{className:"ll-k",children:d.includes(e.kind)?u(`agent.verb.${e.kind}`):e.kind}),(0,s.jsxs)("span",{className:"ll-c",children:[e.content,!I&&e===S[S.length-1]&&"text"===e.kind&&(0,s.jsx)("span",{className:"ll-caret"})]})]},e.id))})]})]})}},4461:(e,n,a)=>{a.d(n,{t:()=>r});var s=a(7814);let r=(0,s.createServerReference)("409483dd86b3a500619c574d5486d6fe760b53accd",s.callServer,void 0,s.findSourceMapURL,"approveIssue")},4733:(e,n,a)=>{a.d(n,{k:()=>r});var s=a(7814);let r=(0,s.createServerReference)("60ac6b802b4ac5f1a28c3dbdb5ff9f27e10a8e3dcf",s.callServer,void 0,s.findSourceMapURL,"getEvents")},5664:(e,n,a)=>{a.d(n,{IssueApprove:()=>y,PlanGate:()=>k,PlanGateLive:()=>b,Run247Button:()=>S,p:()=>N});var s=a(5076),r=a(8488),t=a(9860),l=a(8576),i=a(5629),c=a(2978),d=a(7814);let o=(0,d.createServerReference)("40b9f423165fc1bd787ea6c1079de9f2c3abab7157",d.callServer,void 0,d.findSourceMapURL,"generatePlan"),p=(0,d.createServerReference)("002ec012533e91d74d3596cacc28fb29672dd2d424",d.callServer,void 0,d.findSourceMapURL,"requestPlanChanges");var u=a(5957),h=a(2730),g=a(8812),v=a(4461),m=a(2964);let f=(0,d.createServerReference)("40747886657d57fe4ec7bb6e930420729ce0501fd8",d.callServer,void 0,d.findSourceMapURL,"setAuto247"),x=(0,d.createServerReference)("00caf518bdee64b8e365f2de8f5e807f028e55958d",d.callServer,void 0,d.findSourceMapURL,"skipDesignGate");function j(e,n){window.dispatchEvent(new CustomEvent("constella:open-dm",{detail:{handle:e,text:n}}))}function b({planning:e,planSince:n,designRecommended:a=!1,designPending:d=!1}){let p=(0,i.k)(),[u,h]=(0,r.useTransition)(),g=(0,t.useRouter)(),[v,m]=(0,r.useState)(!1),[f,j]=(0,r.useState)(""),k=e||v;function N(){j(""),m(!0),window.dispatchEvent(new CustomEvent("constella:agent-run",{detail:{channel:"planner"}})),h(async()=>{try{let e=await o();(!e?.ok||!1===e.started)&&(m(!1),e?.error&&j(e.error)),g.refresh()}catch{m(!1),j(p("planner.gate.staleTab"))}})}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.AgentRunLive,{channel:"planner",resume:e,sinceSeq:e?n-1:0,onFinish:()=>m(!1)}),k?(0,s.jsxs)("div",{className:"plan-gate",children:[(0,s.jsx)("div",{className:"plan-gate-bar","aria-hidden":!0}),(0,s.jsx)("div",{className:"pg-ic",children:(0,s.jsx)(l.I,{name:"bot",size:20})}),(0,s.jsxs)("div",{className:"pg-main",children:[(0,s.jsx)("div",{className:"pg-t",children:p("planner.gate.drafting.t")}),(0,s.jsx)("div",{className:"pg-d",children:p("planner.gate.drafting.d")})]})]}):a||d?(0,s.jsxs)("div",{className:"plan-gate",style:{borderColor:"rgba(99,102,241,.45)"},children:[(0,s.jsx)("div",{className:"plan-gate-bar","aria-hidden":!0,style:{background:"#6366f1"}}),(0,s.jsx)("div",{className:"pg-ic",style:{background:"rgba(99,102,241,.16)",color:"#6366f1"},children:(0,s.jsx)(l.I,{name:"skill",size:20})}),(0,s.jsxs)("div",{className:"pg-main",children:[(0,s.jsx)("div",{className:"pg-t",children:d?"Design step pending":"Recommended: prototype the design first"}),(0,s.jsx)("div",{className:"pg-d",children:d?"Ada is holding the plan on the design step. Open the Design module, build & approve the prototype with Grace, then Send to execution — Ada turns the approved design into specs & issues (zero drift).":"This is a frontend product. Prototype & approve the UI in the Design module before generating the plan — Grace turns the brief into a real visual reference, so the specs are precise and you avoid rework."}),f&&(0,s.jsx)("div",{className:"pg-d",style:{color:"var(--sx-keyword)",marginTop:6},children:f})]}),(0,s.jsxs)("div",{className:"pg-actions",children:[(0,s.jsxs)("button",{className:"btn-accent",onClick:()=>g.push("/design"),children:[(0,s.jsx)(l.I,{name:"skill",size:14})," Open Design"]}),(0,s.jsxs)("button",{className:"btn-ghost",disabled:u,onClick:function(){h(async()=>{try{await x()}catch{}}),N()},style:{fontSize:12},children:[(0,s.jsx)(l.I,{name:u?"refresh":"bot",size:13,className:u?"sync-spin":""})," ",u?p("planner.gate.analyzing"):"Skip design & plan anyway"]})]})]}):(0,s.jsxs)("div",{className:"plan-gate",children:[(0,s.jsx)("div",{className:"plan-gate-bar","aria-hidden":!0}),(0,s.jsx)("div",{className:"pg-ic",children:(0,s.jsx)(l.I,{name:"bot",size:20})}),(0,s.jsxs)("div",{className:"pg-main",children:[(0,s.jsx)("div",{className:"pg-t",children:p("planner.gate.noPlan.t")}),(0,s.jsx)("div",{className:"pg-d",children:p("planner.gate.noPlan.d")}),f&&(0,s.jsx)("div",{className:"pg-d",style:{color:"var(--sx-keyword)",marginTop:6},children:f})]}),(0,s.jsxs)("div",{className:"pg-actions",children:[(0,s.jsxs)("div",{className:"plan-hint",children:[(0,s.jsx)("div",{className:"plan-hint-t",children:p("planner.gate.hint.t")}),(0,s.jsx)("div",{className:"plan-hint-d",children:p("planner.gate.hint.d")})]}),(0,s.jsxs)("button",{className:"btn-accent",disabled:u,onClick:N,children:[(0,s.jsx)(l.I,{name:u?"refresh":"bot",size:14,className:u?"sync-spin":""})," ",u?p("planner.gate.analyzing"):p("planner.gate.generate")]})]})]})]})}function k({specs:e,total:n}){let a=(0,i.k)(),[t,c]=(0,r.useTransition)();return(0,s.jsxs)("div",{className:"plan-gate",children:[(0,s.jsx)("div",{className:"pg-ic",children:(0,s.jsx)(l.I,{name:"bot",size:20})}),(0,s.jsxs)("div",{className:"pg-main",children:[(0,s.jsx)("div",{className:"pg-t",children:a("planner.gate.ready.t")}),(0,s.jsx)("div",{className:"pg-d",children:a("planner.gate.ready.d",{specs:e,total:n})})]}),(0,s.jsxs)("div",{className:"pg-actions",children:[(0,s.jsxs)("button",{className:"btn-ghost",disabled:t,onClick:()=>c(async()=>{await p(),j("ada",a("planner.gate.rejectPlanDm"))}),children:[(0,s.jsx)(l.I,{name:"refresh",size:13})," ",a("planner.gate.requestChanges")]}),(0,s.jsxs)("button",{className:"btn-accent",disabled:t,onClick:()=>c(()=>(0,u.P)()),children:[(0,s.jsx)(l.I,{name:"check",size:14})," ",a("planner.gate.approvePlan")]})]})]})}function N({specId:e,specKey:n,approved:a}){let t=(0,i.k)(),[c,d]=(0,r.useTransition)();return a?(0,s.jsxs)("span",{className:"pill",style:{background:"var(--sx-string)22",color:"var(--sx-string)"},children:[(0,s.jsx)(l.I,{name:"check",size:11})," ",t("planner.approved")]}):(0,s.jsxs)("span",{style:{display:"inline-flex",gap:6},children:[(0,s.jsxs)("button",{className:"sc2-btn",disabled:c,onClick:()=>d(()=>(0,h.B)(e)),children:[(0,s.jsx)(l.I,{name:"check",size:11})," ",t("planner.approve")]}),(0,s.jsxs)("button",{className:"sc2-btn danger",disabled:c,onClick:()=>d(async()=>{j((await (0,g.J)(e)).handle,t("planner.rejectItemDm",{key:n}))}),children:[(0,s.jsx)(l.I,{name:"refresh",size:11})," ",t("planner.reject")]})]})}function y({issueId:e,issueKey:n,approved:a}){let t=(0,i.k)(),[c,d]=(0,r.useTransition)();return a?(0,s.jsxs)("span",{className:"pill",style:{background:"var(--sx-string)22",color:"var(--sx-string)"},children:[(0,s.jsx)(l.I,{name:"check",size:11})," ",t("planner.approved")]}):(0,s.jsxs)("span",{style:{display:"inline-flex",gap:6},children:[(0,s.jsxs)("button",{className:"sc2-btn",disabled:c,onClick:()=>d(()=>(0,v.t)(e)),children:[(0,s.jsx)(l.I,{name:"check",size:11})," ",t("planner.approve")]}),(0,s.jsxs)("button",{className:"sc2-btn danger",disabled:c,onClick:()=>d(async()=>{j((await (0,m.d)(e)).handle,t("planner.rejectItemDm",{key:n}))}),children:[(0,s.jsx)(l.I,{name:"refresh",size:11})," ",t("planner.reject")]})]})}function S({auto:e,approved:n,state:a}){let t=(0,i.k)(),[c,d]=(0,r.useTransition)(),o=t(c?e?"planner.run247.pausing":"planner.run247.starting":"waiting-approval"===a?"planner.run247.approveToRun":"all-done"===a?"planner.run247.allDone":e?"planner.run247.pause":"planner.run247.run"),p="blocked"===a?t("planner.run247.blockedTip"):void 0,u="off"===a&&!c;return(0,s.jsxs)("button",{className:"btn-"+(e?"ghost":"accent")+(u?" run-attn":""),disabled:!n||"all-done"===a||c,title:p,onClick:()=>d(()=>f(!e)),children:[(0,s.jsx)(l.I,{name:c?"refresh":"waiting-approval"===a?"bot":"all-done"===a?"check":e?"close":"play",size:14,className:c?"sync-spin":""})," ",o,("running"===a||u)&&(0,s.jsx)("span",{className:"dotpulse",style:{marginLeft:6}})]})}},5957:(e,n,a)=>{a.d(n,{P:()=>r});var s=a(7814);let r=(0,s.createServerReference)("00e565233acd1b1622979ff2cf891f01f7021a1b7a",s.callServer,void 0,s.findSourceMapURL,"approvePlan")},8812:(e,n,a)=>{a.d(n,{J:()=>r});var s=a(7814);let r=(0,s.createServerReference)("40ce2a1d1b3f5a652afcd597a20bc8bfc5e240f8e2",s.callServer,void 0,s.findSourceMapURL,"rejectSpec")}}]);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8370],{827:(e,t,i)=>{i.d(t,{e:()=>n});var o=i(7814);let n=(0,o.createServerReference)("0067de168f0f3d5d47da2729379e374260b6f809a6",o.callServer,void 0,o.findSourceMapURL,"pollUpdateResult")},972:(e,t,i)=>{i.d(t,{E:()=>o,e:()=>n});let o=["Cockpit","Hierarchy","Execution","Product","Knowledge","Operations","Inbox","System"],n=[{id:"home",title:"Home",href:"/",group:"Cockpit",tile:"Welcome — canonical knowledge & quick navigation",icon:"grid"},{id:"dashboard",title:"Dashboard",href:"/dashboard",group:"Cockpit",tile:"Cockpit hub — status at a glance",icon:"pulse"},{id:"organizations",title:"Organizations",href:"/organizations",group:"Hierarchy",tile:"Manage organizations & workspaces",icon:"grid"},{id:"org",title:"Org Chart",href:"/org",group:"Hierarchy",tile:"Hierarchy & delegation",icon:"agents"},{id:"agents",title:"Agent Studio",href:"/agents/ada",group:"Hierarchy",tile:"Configure each agent",icon:"bot"},{id:"code",title:"Code",href:"/code",group:"Execution",tile:"Code editor & repo files",icon:"terminal"},{id:"tasks",title:"Tasks",href:"/tasks",group:"Execution",tile:"Team kanban board",icon:"files"},{id:"cron",title:"Cron",href:"/cron",group:"Execution",tile:"Scheduled tasks & history",icon:"calendar"},{id:"routines",title:"Routines",href:"/routines",group:"Execution",tile:"Recurring automations",icon:"repeat"},{id:"goals",title:"Goals",href:"/goals",group:"Execution",tile:"Objective tree",icon:"target"},{id:"design",title:"Design",href:"/design",group:"Execution",tile:"Prototype the UI with the frontend agent before the plan",icon:"grid"},{id:"planner",title:"CEO Planner",href:"/planner",group:"Execution",tile:"Specs → issues → approval → 24/7",icon:"command"},{id:"test-dev",title:"Test Dev",href:"/test-dev",group:"Execution",tile:"Boot, navigate + validate the project",icon:"play"},{id:"pm",title:"Product Manager",href:"/pm",group:"Product",tile:"Sprints & backlog (PO)",icon:"goto"},{id:"reports",title:"Reports",href:"/reports",group:"Knowledge",tile:"Plans, reviews, audits",icon:"doc"},{id:"docs",title:"Docs",href:"/docs",group:"Knowledge",tile:"Architecture, API & PO docs",icon:"doc"},{id:"skills",title:"Skills",href:"/skills",group:"Knowledge",tile:"Agent procedure library",icon:"skill"},{id:"activity",title:"Activity",href:"/activity",group:"Knowledge",tile:"Agent action timeline",icon:"pulse"},{id:"knowledge",title:"Knowledge",href:"/knowledge",group:"Knowledge",tile:"KB index, coverage, gaps & agent recall",icon:"branch"},{id:"costs",title:"Costs",href:"/costs",group:"Operations",tile:"Spend by agent/provider",icon:"coins"},{id:"security",title:"Security",href:"/security",group:"Operations",tile:"Findings & security score",icon:"shield"},{id:"pulse",title:"Pulse",href:"/pulse",group:"Operations",tile:"Agent health & validation",icon:"pulse"},{id:"github",title:"Commit GitHub",href:"/github",group:"Operations",tile:"Push workspace to remote",icon:"git"},{id:"prepare-deploy",title:"Prepare Deploy",href:"/prepare-deploy",group:"Operations",tile:"Prod-prep + export clean source to a deploy repo",icon:"goto"},{id:"models",title:"Models",href:"/models",group:"Operations",tile:"Providers & local models",icon:"cpu"},{id:"update",title:"Update",href:"/update",group:"Operations",tile:"Detect & apply new versions",icon:"goto"},{id:"plugins",title:"Plugins",href:"/plugins",group:"Operations",tile:"Extensions & integrations",icon:"ext"},{id:"inbox",title:"Inbox",href:"/inbox",group:"Inbox",tile:"Approvals & escalations",icon:"inbox"},{id:"notifications",title:"Notifications",href:"/notifications",group:"Inbox",tile:"Passive alert feed",icon:"bell"},{id:"config",title:"Config",href:"/config",group:"System",tile:"Platform settings",icon:"settings"},{id:"profile",title:"Profile",href:"/profile",group:"System",tile:"Account & preferences",icon:"account"}]},2393:(e,t,i)=>{i.d(t,{H4:()=>l,Uy:()=>s,st:()=>a});let o=/Failed to find Server Action|older or newer deployment|ChunkLoadError|Loading chunk [\w-]+ failed|error loading dynamically imported module/i,n=/invariant expected layout router to be mounted/i;function r(e){return e?e instanceof Error?`${e.name} ${e.message}`:"string"==typeof e?e:String(e?.message??e):""}function a(e){return o.test(r(e))}function l(e){let t=r(e);return o.test(t)||n.test(t)}function s(){try{let e="cn-skew-reload-at",t=Number(window.sessionStorage.getItem(e)||0);if(Date.now()-t<2e4)return;window.sessionStorage.setItem(e,String(Date.now()))}catch{}try{let e=new URL(window.location.href);e.searchParams.set("_r",String(Date.now())),window.location.replace(e.toString())}catch{window.location.reload()}}},2444:(e,t,i)=>{i.d(t,{UpdateHeaderBadge:()=>p});var o=i(5076),n=i(8488),r=i(9860),a=i(8576),l=i(5629),s=i(8346),d=i(7390),c=i(827),u=i(2393);function p(){let e=(0,l.k)(),t=(0,r.useRouter)(),[i,p]=(0,n.useState)(null),[g,h]=(0,n.useState)(!1),[f,b]=(0,n.useState)("available"),[v,m]=(0,n.useState)(!1),[y,x]=(0,n.useState)(""),w=(0,n.useRef)(null);async function k(){if(!v){m(!0),x("");try{let t=await (0,s.l)(!0);p(t.info.updateAvailable&&t.info.latest?t.info.latest:null),h(t.busy),t.info.updateAvailable||x(e("chrome.update.upToDate"))}catch{}finally{m(!1)}}}async function S(){if("updating"!==f&&!g){if("done"===f)return void t.refresh();b("updating"),x("");try{let i=await (0,d.P)();if(i.blocked){b("available"),h(!0),x(e("chrome.update.busy"));return}i.started?w.current=setInterval(async()=>{let t=await (0,c.e)().catch(e=>((0,u.st)(e)&&(w.current&&clearInterval(w.current),(0,u.Uy)()),null));t&&("done"===t.status?(w.current&&clearInterval(w.current),window.location.reload()):"error"===t.status&&(w.current&&clearInterval(w.current),b("error"),x(e("chrome.update.failed"))))},3e3):(b("available"),x(i.message||""),t.push("/update"))}catch{b("error"),x(e("chrome.update.failed"))}}}(0,n.useEffect)(()=>{let e=!1,t=async t=>{try{let i=await (0,s.l)(t);if(e)return;p(i.info.updateAvailable&&i.info.latest?i.info.latest:null),h(i.busy)}catch{}};t(!1);let i=setInterval(()=>t(!1),12e3),o=setInterval(()=>t(!0),18e4);return()=>{e=!0,clearInterval(i),clearInterval(o),w.current&&clearInterval(w.current)}},[]);let C=(0,o.jsx)("button",{type:"button",className:"top-btn",onClick:k,disabled:v,title:y||e("chrome.update.check"),children:(0,o.jsx)("span",{className:v?"sync-spin":"",style:{display:"inline-flex"},children:(0,o.jsx)(a.I,{name:"sync",size:17})})});if(!i)return C;let I="updating"===f?e("chrome.update.updating"):"done"===f?e("chrome.update.restart"):"error"===f?e("chrome.update.failed"):g?`v${i}`:`${e("chrome.update.update")} v${i}`,j="updating"===f||g;return(0,o.jsxs)(o.Fragment,{children:[C,(0,o.jsxs)("button",{type:"button",onClick:S,disabled:j,title:g?e("chrome.update.busy"):y||`${e("chrome.update.available")} — v${i}`,style:{display:"inline-flex",alignItems:"center",gap:6,width:"auto",padding:"0 11px",height:30,background:"error"===f?"var(--sx-keyword)":g?"var(--bg-active)":"var(--accent)",color:g?"var(--text-dim)":"var(--accent-fg)",borderRadius:999,fontSize:12,fontWeight:600,border:"none",opacity:"updating"===f?.75:1,cursor:j?"default":"pointer"},children:["updating"===f?(0,o.jsx)("span",{className:"sync-spin",style:{display:"inline-flex"},children:(0,o.jsx)(a.I,{name:"sync",size:14})}):(0,o.jsx)(a.I,{name:"updating"===f?"sync":"done"===f?"refresh":"error"===f?"bell":"arrowUp",size:14}),(0,o.jsx)("span",{children:I})]})]})}},4414:(e,t,i)=>{i.d(t,{ChatToggle:()=>a});var o=i(5076),n=i(8576),r=i(5629);function a(){let e=(0,r.k)();return(0,o.jsx)("button",{className:"top-btn",title:`${e("chrome.chat.agentRoom")} (⌘J)`,type:"button",onClick:()=>window.dispatchEvent(new CustomEvent("constella:toggle-chat")),children:(0,o.jsx)(n.I,{name:"chat",size:17})})}},4942:(e,t,i)=>{i.d(t,{SidebarToggle:()=>l});var o=i(5076),n=i(8488),r=i(8576);let a=`
|
|
2
|
-
body.side-collapsed .side{width:58px!important;flex:0 0 58px!important;}
|
|
3
|
-
body.side-collapsed .side .nav-item{justify-content:center;padding-left:0;padding-right:0;position:relative;}
|
|
4
|
-
body.side-collapsed .side .nav-item>span:not(.nv-badge),
|
|
5
|
-
body.side-collapsed .side .nav-group-label,
|
|
6
|
-
body.side-collapsed .side .nav-search input,
|
|
7
|
-
body.side-collapsed .side .side-foot .pf{display:none!important;}
|
|
8
|
-
body.side-collapsed .side .nav-search{justify-content:center;}
|
|
9
|
-
body.side-collapsed .side .side-brand-wrap{overflow:hidden;}
|
|
10
|
-
body.side-collapsed .side .side-foot{justify-content:center;flex-wrap:wrap;gap:6px;}
|
|
11
|
-
body.side-collapsed .side .nv-badge{position:absolute;top:2px;right:6px;}
|
|
12
|
-
`;function l(){let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(!document.getElementById("side-rail-style")){let e=document.createElement("style");e.id="side-rail-style",e.textContent=a,document.head.appendChild(e)}let e=!1;try{e="1"===localStorage.getItem("bx.sideCollapsed")}catch{}t(e),document.body.classList.toggle("side-collapsed",e)},[]),(0,o.jsx)("button",{className:"top-btn"+(e?" on":""),onClick:function(){t(e=>{let t=!e;document.body.classList.toggle("side-collapsed",t);try{localStorage.setItem("bx.sideCollapsed",t?"1":"0")}catch{}return t})},title:e?"Expand sidebar":"Collapse sidebar","aria-label":"Toggle sidebar",children:(0,o.jsx)(r.I,{name:"sidebarIcon",size:17})})}},5787:(e,t,i)=>{i.d(t,{ViewChrome:()=>l});var o=i(5076),n=i(8576),r=i(972),a=i(5629);function l({title:e,sub:t,right:i,icon:s,flush:d,children:c}){let u=(0,a.k)(),p=r.e.find(t=>t.title===e),g=s??p?.icon,h=p?u(`mod.${p.id}`):e;return(0,o.jsxs)("div",{className:"app-view",children:[(0,o.jsxs)("div",{className:"view-head",children:[g&&(0,o.jsx)("div",{className:"vh-icon",children:(0,o.jsx)(n.I,{name:g,size:18})}),(0,o.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,o.jsx)("div",{className:"view-title",children:h}),t&&(0,o.jsx)("div",{className:"view-sub",children:t})]}),i]}),(0,o.jsx)("div",{className:"view-body",style:d?{padding:0,overflow:"hidden"}:void 0,children:c})]})}},6588:(e,t,i)=>{i.d(t,{BackButton:()=>l});var o=i(5076),n=i(9860),r=i(8576),a=i(5629);function l(){let e=(0,a.k)(),t=(0,n.useRouter)();return(0,o.jsx)("button",{className:"top-btn",title:e("common.back"),style:{marginRight:2},onClick:()=>{window.history.length>1?t.back():t.push("/")},children:(0,o.jsx)(r.I,{name:"chevronLeft",size:18})})}},7390:(e,t,i)=>{i.d(t,{P:()=>n});var o=i(7814);let n=(0,o.createServerReference)("009f3ddf3819ad383dee68db2183a1210c5023774a",o.callServer,void 0,o.findSourceMapURL,"runUpdate")},8346:(e,t,i)=>{i.d(t,{l:()=>n});var o=i(7814);let n=(0,o.createServerReference)("40d0e07cd481a5d3b711c27030044fd000f063541a",o.callServer,void 0,o.findSourceMapURL,"getUpdateState")}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7789],{284:(e,a,l)=>{"use strict";l.d(a,{AgentStudioDetail:()=>I});var s=l(5076),t=l(8488),n=l(1874),i=l(7814);let r=(0,i.createServerReference)("608f5976f35131ce9bc81c305847d981cfb8b602fd",i.callServer,void 0,i.findSourceMapURL,"saveAgentPersona"),o=(0,i.createServerReference)("605e97f1fd0ed65790458458c1e14a8bd12ff381c5",i.callServer,void 0,i.findSourceMapURL,"saveAgentRag"),d=(0,i.createServerReference)("606a416adfb9909d09e33c8494d0e811021a5df870",i.callServer,void 0,i.findSourceMapURL,"saveAgentImage");var c=l(8006);let m=(0,i.createServerReference)("709191310b9d6c080acd8fd68eb3dcb962e0ab50d9",i.callServer,void 0,i.findSourceMapURL,"toggleAgentSkill"),u=(0,i.createServerReference)("60e98319b1bc66d195b5dd810c9986bb30f9f9c8fe",i.callServer,void 0,i.findSourceMapURL,"setAllAgentSkills");var p=l(1252),g=l(4733),h=l(8576),v=l(3728),x=l(4403),f=l(5629);let b=["read","create","edit","run","search"];function j({agentId:e}){let a=(0,f.k)(),[l,n]=(0,t.useState)([]),i=(0,t.useRef)(0);if((0,t.useEffect)(()=>{let a=!0;async function l(){let l=await (0,g.k)("room",i.current);if(!a)return;l.length&&(i.current=Math.max(i.current,...l.map(e=>e.seq)));let s=l.filter(a=>a.agentId===e);s.length&&n(e=>{let a=new Set(e.map(e=>e.id));return[...e,...s.filter(e=>!a.has(e.id))]})}l();let s=setInterval(l,1500);return()=>{a=!1,clearInterval(s)}},[e]),0===l.length)return null;let r=[...new Set(l.map(e=>e.runId))],o=r[r.length-1],d=l.filter(e=>e.runId===o&&b.includes(e.kind));return 0===d.length?null:(0,s.jsxs)("div",{className:"card",style:{marginBottom:14,borderColor:"var(--accent)"},children:[(0,s.jsxs)("div",{className:"set-desc",style:{marginBottom:8,display:"flex",alignItems:"center",gap:6},children:[(0,s.jsx)("span",{className:"spin",children:(0,s.jsx)(h.I,{name:"refresh",size:12})})," ",a("agent.wf.liveRun",{n:d.length})]}),d.map(e=>(0,s.jsxs)("div",{className:"live-step",children:[(0,s.jsx)("span",{className:"ls-ico",style:{color:"var(--accent)",fontFamily:"var(--mono-font)",fontSize:11},children:b.includes(e.kind)?a(`agent.wf.${e.kind}`):e.kind})," ",e.target]},e.id))]})}let k=["model","skills","persona","rag","workflow"],y=e=>"$"+e.toFixed(2);function N({value:e,onChange:a}){let l=(0,f.k)(),t=l(e<=.3?"agent.temp.precise":e<=.6?"agent.temp.balanced":e<=.85?"agent.temp.creative":"agent.temp.exploratory");return(0,s.jsxs)("div",{className:"temp-wrap",children:[(0,s.jsxs)("div",{className:"temp-head",children:[(0,s.jsx)("label",{className:"form-label",style:{margin:0},children:l("agent.temp.label")}),(0,s.jsxs)("span",{className:"temp-val",children:[e.toFixed(2)," \xb7 ",t]})]}),(0,s.jsx)("input",{type:"range",className:"temp-range",min:0,max:1,step:.05,value:e,onChange:e=>a(+e.target.value)}),(0,s.jsxs)("div",{className:"temp-scale",children:[(0,s.jsx)("span",{children:l("agent.temp.scaleFocused")}),(0,s.jsx)("span",{children:"0.5"}),(0,s.jsx)("span",{children:l("agent.temp.scaleCreative")})]}),(0,s.jsxs)("div",{className:"temp-desc",children:[(0,s.jsx)("span",{className:"ti",children:(0,s.jsx)(h.I,{name:"bot",size:12})})," ",l("agent.temp.desc")]})]})}function S({spent:e,cap:a}){let l,t,n=(0,f.k)(),{pct:i,level:r,color:o}=(t=(l=a>0?Math.min(100,e/a*100):0)>=90?"crit":l>=70?"warn":"ok",{pct:l,level:t,color:"crit"===t?"var(--sx-keyword)":"warn"===t?"var(--sx-number)":"var(--sx-string)"}),d=n("crit"===r?"agent.budget.noteCrit":"warn"===r?"agent.budget.noteWarn":"agent.budget.noteOk");return(0,s.jsxs)("div",{className:"budget",children:[(0,s.jsxs)("div",{className:"budget-top",children:[(0,s.jsx)("span",{className:"budget-spent",children:y(e)}),(0,s.jsx)("span",{className:"budget-cap",children:n("agent.budget.dailyCap",{cap:y(a)})}),(0,s.jsxs)("span",{className:"budget-pct",style:{background:o+"22",color:o},children:[Math.round(i),"%"]})]}),(0,s.jsx)("div",{className:"budget-track",children:(0,s.jsx)("div",{className:"budget-fill",style:{width:i+"%",background:o}})}),(0,s.jsxs)("div",{className:"budget-note "+r,children:["ok"===r?(0,s.jsx)(h.I,{name:"check",size:12}):(0,s.jsx)(h.I,{name:"warn",size:12})," ",d]})]})}let C={repo:{color:"var(--accent)"},reports:{color:"var(--sx-property)"},skills:{color:"var(--sx-string)"},room:{color:"#c4a0ff"},external:{color:"#6cc7e0"}};function w({docs:e}){let a=(0,f.k)(),[l,n]=(0,t.useState)(null),i=e.reduce((e,a)=>e+a.chunks,0),r=120*i,o=e.map((a,l)=>{let s=l/Math.max(1,e.length)*Math.PI*2,t=26+l%3*9,n=C[a.source]??C.repo;return{x:50+Math.cos(s)*t,y:50+Math.sin(s)*t,sz:Math.min(18,6+.7*a.chunks),color:n.color,name:a.path.split("/").pop()??a.path,chunks:a.chunks,source:a.source}}),d=[...new Set(e.map(e=>e.source))].map(e=>({key:e,...C[e]??C.repo}));return(0,s.jsxs)("div",{className:"ragm",children:[(0,s.jsxs)("div",{className:"ragm-stats",children:[(0,s.jsxs)("div",{className:"ragm-stat",children:[(0,s.jsx)("div",{className:"rs-n",children:e.length}),(0,s.jsx)("div",{className:"rs-l",children:a("agent.rag.statDocuments")})]}),(0,s.jsxs)("div",{className:"ragm-stat",children:[(0,s.jsx)("div",{className:"rs-n",children:i}),(0,s.jsx)("div",{className:"rs-l",children:a("agent.rag.statChunks")})]}),(0,s.jsxs)("div",{className:"ragm-stat",children:[(0,s.jsx)("div",{className:"rs-n",children:i}),(0,s.jsx)("div",{className:"rs-l",children:a("agent.rag.statVectors")})]}),(0,s.jsxs)("div",{className:"ragm-stat",children:[(0,s.jsxs)("div",{className:"rs-n",children:[(r/1e3).toFixed(1),"k"]}),(0,s.jsx)("div",{className:"rs-l",children:a("agent.rag.statTokens")})]})]}),(0,s.jsxs)("div",{className:"ragm-canvas",children:[(0,s.jsx)("svg",{className:"ragm-svg",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:o.map((e,a)=>(0,s.jsx)("line",{x1:"50",y1:"50",x2:e.x,y2:e.y,stroke:e.color,strokeOpacity:"0.28",strokeWidth:"0.4",vectorEffect:"non-scaling-stroke"},a))}),(0,s.jsx)("div",{className:"ragm-core",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"rc-t",children:"RAG"}),(0,s.jsx)("div",{className:"rc-s",children:a("agent.rag.coreDocs",{n:e.length})})]})}),o.map((e,a)=>(0,s.jsx)("div",{className:"ragm-node",style:{left:e.x+"%",top:e.y+"%",width:e.sz,height:e.sz,background:e.color,boxShadow:"0 0 8px "+e.color+"66"},onMouseEnter:()=>n({x:e.x,y:e.y,name:e.name,chunks:e.chunks}),onMouseLeave:()=>n(null)},a)),l&&(0,s.jsxs)("div",{className:"ragm-tip",style:{left:l.x+"%",top:l.y+"%"},children:[(0,s.jsx)("div",{className:"tt-t",children:l.name}),(0,s.jsx)("div",{className:"tt-s",children:a("agent.rag.tipChunks",{n:l.chunks,tok:120*l.chunks})})]}),0===o.length&&(0,s.jsx)("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center",color:"var(--text-faint)",fontSize:12.5},children:a("agent.rag.nothingIndexed")}),(0,s.jsx)("div",{className:"ragm-legend",children:d.map(e=>(0,s.jsxs)("div",{className:"lg",children:[(0,s.jsx)("span",{className:"dot",style:{background:e.color}})," ",a(`agent.rag.src.${e.key}`)]},e.key))})]}),(0,s.jsx)("div",{className:"ragm-docs",children:e.slice().sort((e,a)=>a.chunks-e.chunks).slice(0,24).map((e,l)=>{let t=C[e.source]??C.repo;return(0,s.jsxs)("div",{className:"ragm-doc",children:[(0,s.jsx)("span",{className:"src-chip",style:{background:t.color+"22",color:t.color},children:a(`agent.rag.src.${e.source}`)}),(0,s.jsx)("span",{className:"rd-t",children:e.path}),(0,s.jsx)("div",{className:"rd-bar",children:(0,s.jsx)("i",{style:{width:Math.min(100,4*e.chunks)+"%",background:t.color}})}),(0,s.jsx)("span",{className:"rd-chunks",children:a("agent.rag.chunksAbbr",{n:e.chunks})})]},l)})})]})}function I(e){let a,l,i,g,b=(0,f.k)(),[y,C]=(0,t.useState)("model"),[I,M]=(0,t.useState)(e.image??null),[z,_]=(0,t.useState)(e.adapter),[R,P]=(0,t.useState)(e.model),[L,A]=(0,t.useState)(e.temperature),[T,E]=(0,t.useState)(e.dailyCapUsd),[U,D]=(0,t.useState)(e.tierFloor),[G,W]=(0,t.useState)(e.persona.identity),[F,O]=(0,t.useState)(e.persona.ritual),[$,B]=(0,t.useState)(e.persona.tone),[q,H]=(0,t.useState)(e.persona.systemPrompt),[K,V]=(0,t.useState)(new Set(e.enabledIds)),[Y,J]=(0,t.useState)(""),[Q,X]=(0,t.useTransition)(),[Z,ee]=(0,t.useState)(e.rag),[ea,el]=(0,t.useState)(!1),[es,et]=(0,t.useState)(""),[en,ei]=(0,t.useState)(""),[er,eo]=(0,t.useState)(!1),[ed,ec]=(0,t.useState)(!1),[em,eu]=(0,t.useState)(""),[ep,eg]=(0,t.useState)(""),[eh,ev]=(0,t.useState)("all");function ex(e){J(e),setTimeout(()=>J(""),1500)}function ef(a){ee(a),X(async()=>{await o(e.agentId,a),ex(b("agent.flash.ragSaved"))})}function eb(){em.trim()&&(ef({...Z,external:!0,sources:[...Z.sources??[],em.trim()]}),eu(""),ec(!1))}function ej(){X(async()=>{eo(!1),ei(b("agent.model.pulling"));let e=await (0,p.j)(es.trim());e.ok?(_("local_ollama"),P(es.trim()),el(!1),et(""),ei(""),ex(b("agent.flash.modelPulled"))):(eo(!0),ei(e.error??b("agent.model.pullFailed")))})}function ek(a){V(a?new Set(e.skills.map(e=>e.id)):new Set),X(()=>u(e.agentId,a))}return(0,t.useEffect)(()=>{C("model"),_(e.adapter),P(e.model),A(e.temperature),E(e.dailyCapUsd),D(e.tierFloor),W(e.persona.identity),O(e.persona.ritual),B(e.persona.tone),H(e.persona.systemPrompt),V(new Set(e.enabledIds)),ee(e.rag),J(""),el(!1),ec(!1),et(""),ei(""),eo(!1),eu(""),eg(""),ev("all")},[e.agentId]),(0,s.jsxs)("div",{className:"as-detail",children:[(0,s.jsx)("div",{className:"as-head",children:(0,s.jsxs)("div",{className:"as-hero",children:[(0,s.jsx)(c.n,{name:e.name,color:e.color,image:I,size:48,onChange:a=>{M(a),X(()=>d(e.agentId,a))}}),(0,s.jsxs)("div",{style:{flex:1},children:[(0,s.jsxs)("div",{className:"ah-name",children:[e.name," ",(0,s.jsxs)("span",{className:"agent-handle",children:["@",e.handle]})]}),(0,s.jsxs)("div",{className:"ah-sub",children:[e.role," \xb7 ",b("agent.reportsTo",{who:e.reportsTo?"@"+e.reportsTo:"—"})]})]}),(0,s.jsx)("span",{className:"pill",style:{background:"var(--bg-active)",color:"var(--text-dim)"},children:b(`agent.status.${e.status}`)})]})}),(0,s.jsxs)("div",{className:"as-tabs",children:[k.map(e=>(0,s.jsx)("button",{className:"as-tab"+(y===e?" on":""),onClick:()=>C(e),children:b(`agent.tab.${e}`)},e)),Y&&(0,s.jsxs)("span",{className:"oauth-ok",style:{marginLeft:"auto",padding:"4px 10px",fontSize:11.5},children:[(0,s.jsx)(h.I,{name:"check",size:12})," ",Y]})]}),(0,s.jsxs)("div",{className:"as-body scroll",children:["model"===y&&(0,s.jsxs)("div",{style:{maxWidth:1080},children:[(0,s.jsxs)("div",{className:"set-grid",children:[(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.model.provider")}),(0,s.jsx)(v.m,{glyph:!0,mono:!0,value:z,options:e.providerOpts,onChange:_})]}),(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.model.model")}),(0,s.jsx)(x.Y,{adapter:z,value:R,onChange:P,providers:e.providers}),(0,s.jsx)("div",{className:"form-hint",style:{justifyContent:"space-between"},children:(0,s.jsxs)("span",{children:[(0,s.jsx)(h.I,{name:"cpu",size:12})," ",b("agent.model.runnerHint")]})})]})]}),(0,s.jsx)("div",{className:"persona-field",style:{marginTop:14},children:(0,s.jsx)(N,{value:L,onChange:A})}),(0,s.jsxs)("div",{className:"set-grid",style:{marginTop:4},children:[(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.model.dailyCap")}),(0,s.jsx)("input",{className:"form-input mono",value:"$"+T,onChange:e=>E(Math.max(0,parseFloat(e.target.value.replace(/[^0-9.]/g,""))||0))})]}),(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.model.tierFloor")}),(0,s.jsx)(v.m,{value:U,options:["light","heavy","critical"].map(e=>({value:e,label:b(`agent.tier.${e}`)})),onChange:D})]})]}),(0,s.jsxs)("div",{className:"card",style:{marginTop:14},children:[(0,s.jsx)("div",{className:"detail-label",children:b("agent.model.budgetToday")}),(0,s.jsx)(S,{spent:e.spentToday,cap:T}),(0,s.jsx)("div",{className:"modal-hint",children:b("agent.model.budgetHint")})]}),(0,s.jsxs)("div",{className:"onb-foot",style:{gap:8},children:[(0,s.jsxs)("button",{className:"btn-ghost",onClick:()=>el(!0),children:[(0,s.jsx)(h.I,{name:"add",size:13})," ",b("agent.model.uploadPull")]}),(0,s.jsxs)("button",{className:"btn-accent",disabled:Q,onClick:function(){X(async()=>{await (0,n.k)(e.agentId,{adapter:z,model:R,temperature:L,dailyCapUsd:T,tierFloor:U}),ex(b("agent.flash.modelSaved"))})},children:[(0,s.jsx)(h.I,{name:"check",size:13})," ",b("agent.model.saveModel")]})]})]}),"skills"===y&&(a=[...new Set(e.skills.map(e=>e.category))].sort(),l=e=>e.charAt(0).toUpperCase()+e.slice(1),i=ep.trim().toLowerCase(),g=e.skills.filter(e=>("all"===eh||e.category===eh)&&(!i||e.name.toLowerCase().includes(i))),(0,s.jsxs)("div",{style:{maxWidth:1080},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:10,gap:10},children:[(0,s.jsxs)("div",{className:"set-desc",style:{margin:0},children:[b("agent.skills.desc")," ",(0,s.jsxs)("span",{style:{color:"var(--text-faint)"},children:["\xb7 ",b("agent.skills.onCount",{on:K.size,total:e.skills.length})]})]}),(0,s.jsxs)("div",{style:{marginLeft:"auto",display:"flex",gap:6},children:[(0,s.jsxs)("button",{className:"btn-ghost",onClick:()=>ek(!0),disabled:0===e.skills.length||K.size===e.skills.length,children:[(0,s.jsx)(h.I,{name:"check",size:12})," ",b("common.enableAll")]}),(0,s.jsxs)("button",{className:"btn-ghost",onClick:()=>ek(!1),disabled:0===K.size,children:[(0,s.jsx)(h.I,{name:"close",size:12})," ",b("common.disableAll")]})]})]}),(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12,flexWrap:"wrap"},children:[(0,s.jsxs)("div",{className:"cs-bar",style:{flex:1,minWidth:220,margin:0},children:[(0,s.jsx)(h.I,{name:"search",size:13}),(0,s.jsx)("input",{value:ep,onChange:e=>eg(e.target.value),placeholder:b("agent.skills.search")}),ep&&(0,s.jsx)("button",{className:"ss-clear",onClick:()=>eg(""),children:(0,s.jsx)(h.I,{name:"close",size:12})})]}),(0,s.jsx)(v.m,{value:eh,options:[{value:"all",label:b("agent.skills.allCategories")},...a.map(e=>({value:e,label:l(e)}))],onChange:ev}),(0,s.jsx)("span",{style:{fontSize:11,color:"var(--text-faint)",whiteSpace:"nowrap"},children:b("agent.skills.shownCount",{shown:g.length,total:e.skills.length})})]}),g.map(a=>(0,s.jsxs)("div",{className:"skill-pick",children:[(0,s.jsx)(h.I,{name:"skill",size:15,style:{color:"var(--accent)"}}),(0,s.jsx)("div",{className:"sp-main",children:(0,s.jsxs)("div",{className:"sr-title mono",style:{fontSize:12.5},children:[a.name," ",a.provisional&&(0,s.jsx)("span",{className:"pill",style:{background:"var(--sx-number)22",color:"var(--sx-number)"},children:b("agent.skills.provisional")})]})}),(0,s.jsx)("span",{className:"pill",style:{background:"var(--bg-active)",color:"var(--text-faint)",fontSize:10},children:l(a.category)}),(0,s.jsx)("div",{className:"toggle"+(K.has(a.id)?" on":""),onClick:()=>{var l;let s;return l=a.id,s=!K.has(l),void(V(e=>{let a=new Set(e);return s?a.add(l):a.delete(l),a}),X(()=>m(e.agentId,l,s)))}})]},a.id)),0===e.skills.length&&(0,s.jsx)("div",{className:"muted",style:{fontSize:12.5,padding:"8px 0"},children:b("agent.skills.empty")}),e.skills.length>0&&0===g.length&&(0,s.jsx)("div",{className:"muted",style:{fontSize:12.5,padding:"8px 0"},children:b("agent.skills.noMatch")})]})),"persona"===y&&(0,s.jsxs)("div",{style:{maxWidth:1080},children:[(0,s.jsxs)("div",{className:"persona-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.persona.identity")}),(0,s.jsx)("textarea",{className:"persona-ta",value:G,onChange:e=>W(e.target.value)})]}),(0,s.jsxs)("div",{className:"persona-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.persona.ritual")}),(0,s.jsx)("textarea",{className:"persona-ta",value:F,onChange:e=>O(e.target.value)})]}),(0,s.jsx)("div",{className:"set-grid",style:{marginBottom:16},children:(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.persona.tone")}),(0,s.jsx)(v.m,{value:$,options:["Executive","Friendly","Direct","Rigorous","Precise","Calm","Clear","Warm","Measured"].map(e=>({value:e,label:b(`agent.tone.${e}`)})),onChange:B})]})}),(0,s.jsxs)("div",{className:"persona-field",children:[(0,s.jsxs)("label",{className:"form-label",children:[b("agent.persona.systemPrompt")," ",(0,s.jsx)("span",{style:{color:"var(--text-faint)",fontWeight:400},children:"\xb7 .md"})]}),(0,s.jsx)("textarea",{className:"persona-ta mono",rows:6,value:q,onChange:e=>H(e.target.value)}),(0,s.jsxs)("div",{className:"modal-hint",children:[b("agent.persona.storedAsPrefix")," ",(0,s.jsxs)("b",{children:[".claude/agents/",e.handle,"/SYSTEM.md"]})," ",b("agent.persona.storedAsSuffix")]})]}),(0,s.jsx)("div",{className:"onb-foot",children:(0,s.jsxs)("button",{className:"btn-accent",disabled:Q,onClick:function(){X(async()=>{await r(e.agentId,{identity:G,ritual:F,tone:$,systemPrompt:q}),ex(b("agent.flash.personaSaved"))})},children:[(0,s.jsx)(h.I,{name:"check",size:13})," ",b("agent.persona.save")]})})]}),"rag"===y&&(0,s.jsxs)("div",{style:{maxWidth:1080},children:[(0,s.jsx)(w,{docs:e.ragDocs}),(0,s.jsxs)("div",{className:"set-desc",style:{marginTop:16,display:"flex",alignItems:"center"},children:[(0,s.jsx)("span",{children:b("agent.rag.sourcesDesc")}),(0,s.jsxs)("button",{className:"btn-ghost",style:{marginLeft:"auto",padding:"5px 11px"},onClick:()=>ec(!0),children:[(0,s.jsx)(h.I,{name:"add",size:12})," ",b("agent.rag.addSource")]})]}),[{k:"repo",name:b("agent.rag.row.repo"),desc:b("agent.rag.row.repoDesc",{n:e.fileCount})},{k:"room",name:b("agent.rag.row.room"),desc:b("agent.rag.row.roomDesc")},{k:"reports",name:b("agent.rag.row.reports"),desc:b("agent.rag.row.reportsDesc")},{k:"skills",name:b("agent.rag.row.skills"),desc:b("agent.rag.row.skillsDesc",{n:e.skills.length})},{k:"external",name:b("agent.rag.row.external"),desc:Z.sources?.length?b(1===Z.sources.length?"agent.rag.sourcesConnected.one":"agent.rag.sourcesConnected.other",{n:Z.sources.length}):b("agent.rag.row.externalOff")}].map(e=>(0,s.jsxs)("div",{className:"skill-pick",children:[(0,s.jsx)(h.I,{name:"doc",size:15,style:{color:"var(--accent)"}}),(0,s.jsxs)("div",{className:"sp-main",children:[(0,s.jsx)("div",{className:"sr-title",children:e.name}),(0,s.jsx)("div",{className:"sr-sub",children:e.desc})]}),(0,s.jsx)("div",{className:"toggle"+(Z[e.k]?" on":""),onClick:()=>{var a;return a=e.k,void ef({...Z,[a]:!Z[a]})}})]},e.k)),(Z.sources??[]).map((e,a)=>(0,s.jsxs)("div",{className:"skill-pick",style:{paddingLeft:28},children:[(0,s.jsx)(h.I,{name:"goto",size:13,style:{color:"var(--text-faint)"}}),(0,s.jsx)("div",{className:"sp-main",children:(0,s.jsx)("div",{className:"sr-title mono",style:{fontSize:12},children:e})}),(0,s.jsx)("button",{className:"iact danger",title:b("agent.rag.removeSource"),onClick:()=>ef({...Z,sources:(Z.sources??[]).filter((e,l)=>l!==a)}),children:(0,s.jsx)(h.I,{name:"trash",size:13})})]},"src-"+a)),(0,s.jsx)("div",{className:"modal-hint",style:{marginTop:10},children:b("agent.rag.toggleHint")})]}),"workflow"===y&&(0,s.jsxs)("div",{style:{maxWidth:1080},children:[(0,s.jsx)(j,{agentId:e.agentId}),(0,s.jsx)("div",{className:"set-desc",children:b("agent.workflow.intro",{name:e.name})}),[b("agent.workflow.step1",{path:`.claude/agents/${e.handle}/SYSTEM.md`}),b("agent.workflow.step2",{cli:z.startsWith("cli_codex")?"Codex":"Claude Code"}),b("agent.workflow.step3"),b("agent.workflow.step4"),b("agent.workflow.step5")].map((e,a)=>(0,s.jsxs)("div",{className:"skill-pick",children:[(0,s.jsx)("span",{style:{width:22,height:22,borderRadius:"50%",background:"var(--bg-active)",color:"var(--accent)",display:"grid",placeItems:"center",fontSize:11,fontWeight:800,flex:"0 0 22px"},children:a+1}),(0,s.jsx)("div",{className:"sp-main",children:(0,s.jsx)("div",{className:"sr-title",style:{fontWeight:500,fontSize:13},children:e})})]},a))]})]}),ea&&(0,s.jsx)("div",{className:"modal-overlay",onMouseDown:()=>el(!1),children:(0,s.jsxs)("div",{className:"modal",style:{padding:"20px 22px",width:460,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:4},children:b("agent.pullModal.title")}),(0,s.jsxs)("div",{className:"set-desc",style:{marginBottom:12},children:[b("agent.pullModal.descPrefix")," ",(0,s.jsx)("span",{className:"mono",children:"qwen2.5-coder:7b"}),b("agent.pullModal.descSuffix",{name:e.name})]}),(0,s.jsx)("input",{className:"form-input mono",autoFocus:!0,placeholder:b("agent.pullModal.placeholder"),value:es,onChange:e=>et(e.target.value),onKeyDown:e=>{"Enter"===e.key&&es.trim()&&ej()}}),en&&(0,s.jsx)("div",{style:{fontSize:11.5,color:er?"var(--sx-keyword)":"var(--sx-string)",marginTop:8},children:en}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,s.jsx)("button",{className:"btn-ghost",onClick:()=>el(!1),children:b("common.cancel")}),(0,s.jsxs)("button",{className:"btn-accent",disabled:!es.trim()||Q,onClick:ej,children:[(0,s.jsx)(h.I,{name:"add",size:13})," ",b("agent.pullModal.pullAssign")]})]})]})}),ed&&(0,s.jsx)("div",{className:"modal-overlay",onMouseDown:()=>ec(!1),children:(0,s.jsxs)("div",{className:"modal",style:{padding:"20px 22px",width:460,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:4},children:b("agent.addSrcModal.title")}),(0,s.jsx)("div",{className:"set-desc",style:{marginBottom:12},children:b("agent.addSrcModal.desc")}),(0,s.jsx)("input",{className:"form-input mono",autoFocus:!0,placeholder:b("agent.addSrcModal.placeholder"),value:em,onChange:e=>eu(e.target.value),onKeyDown:e=>{"Enter"===e.key&&eb()}}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,s.jsx)("button",{className:"btn-ghost",onClick:()=>ec(!1),children:b("common.cancel")}),(0,s.jsxs)("button",{className:"btn-accent",disabled:!em.trim(),onClick:eb,children:[(0,s.jsx)(h.I,{name:"check",size:13})," ",b("agent.rag.addSource")]})]})]})})]})}},1252:(e,a,l)=>{"use strict";l.d(a,{j:()=>t});var s=l(7814);let t=(0,s.createServerReference)("409889669d46218f902094aeecfb2b06fb3b04350b",s.callServer,void 0,s.findSourceMapURL,"pullModel")},1874:(e,a,l)=>{"use strict";l.d(a,{k:()=>t});var s=l(7814);let t=(0,s.createServerReference)("609026c40419ef4761b510ce3fa26fbc5536b4e033",s.callServer,void 0,s.findSourceMapURL,"saveAgentModel")},3728:(e,a,l)=>{"use strict";l.d(a,{m:()=>o});var s=l(5076),t=l(8488),n=l(8576),i=l(9265),r=l(5629);function o({value:e,options:a,onChange:l,placeholder:d,mono:c,glyph:m,disabled:u,searchable:p}){let g=(0,r.k)(),[h,v]=(0,t.useState)(!1),[x,f]=(0,t.useState)(""),b=(0,t.useRef)(null),j=(0,t.useRef)(null),k=(0,t.useMemo)(()=>(a||[]).map(e=>"string"==typeof e?{value:e,label:e}:e),[a]),y=k.find(a=>a.value===e),N=(p??k.length>8)&&!u,S=x.trim().toLowerCase(),C=N&&S?k.filter(e=>(e.label+" "+e.value+" "+(e.sub||"")).toLowerCase().includes(S)):k;return(0,t.useEffect)(()=>{if(!h)return void f("");function e(e){b.current&&!b.current.contains(e.target)&&v(!1)}function a(e){"Escape"===e.key&&v(!1)}return document.addEventListener("mousedown",e),document.addEventListener("keydown",a),N&&requestAnimationFrame(()=>j.current?.focus()),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",a)}},[h,N]),(0,s.jsxs)("div",{className:"dd"+(h?" open":"")+(u?" disabled":""),ref:b,children:[(0,s.jsxs)("button",{type:"button",className:"dd-btn"+(c?" mono":""),onClick:()=>!u&&v(e=>!e),children:[m&&y&&(0,s.jsx)(i.W,{id:y.glyphId||y.value,size:20}),(0,s.jsx)("span",{className:"dd-val",children:y?y.label:(0,s.jsx)("span",{className:"dd-ph",children:d||g("common.selectEllipsis")})}),(0,s.jsx)(n.I,{name:"chevronDown",size:14})]}),h&&(0,s.jsxs)("div",{className:"dd-menu scroll",children:[N&&(0,s.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,s.jsx)(n.I,{name:"search",size:13}),(0,s.jsx)("input",{ref:j,value:x,placeholder:g("common.searchEllipsis"),onChange:e=>f(e.target.value),onKeyDown:e=>{"Enter"===e.key&&C[0]?(l(C[0].value),v(!1)):"Escape"===e.key&&x&&(e.stopPropagation(),f(""))},className:c?"mono":void 0,style:{flex:1,minWidth:0,background:"transparent",border:"none",outline:"none",color:"var(--text)",fontSize:12.5,fontFamily:c?"var(--mono-font)":"inherit"}}),x&&(0,s.jsx)("button",{type:"button",title:g("common.clear"),onClick:()=>{f(""),j.current?.focus()},style:{background:"none",border:"none",color:"var(--text-dim)",cursor:"pointer",display:"flex",padding:0},children:(0,s.jsx)(n.I,{name:"close",size:12})})]}),0===k.length&&(0,s.jsx)("div",{className:"dd-empty",children:g("common.noOptions")}),k.length>0&&0===C.length&&(0,s.jsx)("div",{className:"dd-empty",children:g("dropdown.noMatch",{q:x})}),C.map(a=>(0,s.jsxs)("button",{type:"button",className:"dd-opt"+(a.value===e?" on":""),onClick:()=>{l(a.value),v(!1)},children:[m&&(0,s.jsx)(i.W,{id:a.glyphId||a.value,size:22}),(0,s.jsxs)("span",{className:"dd-opt-main",children:[(0,s.jsx)("span",{className:"dd-opt-label"+(c?" mono":""),children:a.label}),a.sub&&(0,s.jsx)("span",{className:"dd-opt-sub",children:a.sub})]}),a.tag&&(0,s.jsx)("span",{className:"dd-opt-tag",children:a.tag}),a.value===e&&(0,s.jsx)(n.I,{name:"check",size:13})]},a.value))]})]})}},4403:(e,a,l)=>{"use strict";l.d(a,{Y:()=>m});var s=l(5076),t=l(8488),n=l(3728),i=l(5629);let r={cli_claude_code:[{value:"opus",label:"Claude Opus \xb7 most capable"},{value:"sonnet",label:"Claude Sonnet \xb7 balanced"},{value:"haiku",label:"Claude Haiku \xb7 fast"}],cli_codex:[{value:"gpt-5-codex",label:"GPT-5 Codex"},{value:"o4-mini",label:"o4-mini"}],cli_gemini:[{value:"gemini-2.5-pro",label:"Gemini 2.5 Pro"},{value:"gemini-2.5-flash",label:"Gemini 2.5 Flash"}],cli_openclaw:[{value:"(default)",label:"Configured default"},{value:"openai/gpt-5.4",label:"OpenAI \xb7 GPT-5.4"},{value:"anthropic/claude-sonnet-4",label:"Anthropic \xb7 Claude Sonnet 4"}],cli_hermes:[{value:"(default)",label:"Configured default"},{value:"anthropic/claude-sonnet-4.6",label:"Anthropic \xb7 Claude Sonnet 4.6"},{value:"openai/gpt-5.5",label:"OpenAI \xb7 GPT-5.5"}],cli_aider:[{value:"(default)",label:"Configured default"},{value:"anthropic/claude-sonnet-4-6",label:"Anthropic \xb7 Claude Sonnet 4.6"},{value:"openai/gpt-5.2",label:"OpenAI \xb7 GPT-5.2"},{value:"deepseek/deepseek-chat",label:"DeepSeek \xb7 Chat"}],cli_opencode:[{value:"(default)",label:"Configured default"},{value:"anthropic/claude-sonnet-4-6",label:"Anthropic \xb7 Claude Sonnet 4.6"},{value:"openai/gpt-5.2",label:"OpenAI \xb7 GPT-5.2"}],cli_copilot:[{value:"(default)",label:"Configured default"},{value:"claude-sonnet-4.5",label:"Claude Sonnet 4.5"},{value:"gpt-5",label:"GPT-5"}],cli_cursor:[{value:"(default)",label:"Configured default"},{value:"claude-4.5-sonnet",label:"Claude Sonnet 4.5"},{value:"gpt-5",label:"GPT-5"}],cli_cline:[{value:"(default)",label:"Configured default"}],cli_kilo:[{value:"(default)",label:"Configured default"}]};var o=l(6517),d=l(6355),c=l(9744);function m({adapter:e,value:a,onChange:l,providers:u}){let p=(0,i.k)(),g=function(e){let a=r[e]??null;if(!a)return null;let l=(0,o.L2)(e);return l?a.map(e=>{let a=l.find(a=>a.id===e.value);return a?{value:e.value,label:`${a.label} ${a.version}${a.note?" \xb7 "+a.note:""}`}:e}):a}(e),h=e.startsWith("local_"),[v,x]=(0,t.useState)(null),[f,b]=(0,t.useState)(""),j=u.find(a=>a.adapter===e);(0,t.useEffect)(()=>{if(g||h||!j){x(null),b(g||h?"":p("modelpicker.connectProvider"));return}let e=!0;return b(p("modelpicker.loading")),(0,d.A)(j.id).then(async({models:s})=>{if(!e)return;if(s.length){if(x(s.map(e=>{let a;return{value:e.id,label:e.name+(a=[],e.context&&a.push(e.context>=1e6?`${(e.context/1e6).toFixed(e.context%1e6?1:0)}M ctx`:`${Math.round(e.context/1e3)}K ctx`),(e.inputCost||e.outputCost)&&a.push(`$${e.inputCost}/${e.outputCost}`),a.length?" \xb7 "+a.join(" \xb7 "):"")+(e.isDefault?" \xb7 "+p("modelpicker.recommended"):"")}})),b(""),!a){let e=s.find(e=>e.isDefault)??s[0];e&&l(e.id)}return}let t=await (0,c.E)(j.id);e&&(x(t.models.map(e=>({value:e,label:e}))),b(t.error?t.error:t.models.length?p("modelpicker.syncProvider"):p("modelpicker.noModels")))}).catch(()=>{e&&(x([]),b(p("modelpicker.loadError")))}),()=>{e=!1}},[e,j?.id,!!g,h]);let k=h?[{value:a||"local",label:p("modelpicker.localGguf")}]:null,y=g??k??v??(a?[{value:a,label:a}]:[]),N=a&&!y.some(e=>e.value===a)?[{value:a,label:a},...y]:y;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.m,{mono:!0,value:a,options:N,placeholder:p("modelpicker.placeholder"),onChange:l}),f&&(0,s.jsx)("div",{className:"form-hint",style:{marginTop:4},children:f})]})}},4552:(e,a,l)=>{"use strict";l.d(a,{e:()=>t});var s=l(5076);function t({name:e,color:a,size:l=24,health:n,image:i}){let r=Math.max(6,Math.round(.3*l)),o=Math.round(.28*l),d=i?/^(data:|https?:|\/)/.test(i)?i:`/api/upload?path=${encodeURIComponent(i)}`:null;return(0,s.jsxs)("span",{style:{position:"relative",width:l,height:l,flex:`0 0 ${l}px`,display:"inline-block"},children:[d?(0,s.jsx)("img",{src:d,alt:e,width:l,height:l,style:{width:l,height:l,borderRadius:o,objectFit:"cover",display:"block"}}):(0,s.jsx)("span",{style:{width:l,height:l,borderRadius:o,background:a,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*l),fontWeight:700},children:(e[0]||"?").toUpperCase()}),n&&(0,s.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)"}})]})}},4733:(e,a,l)=>{"use strict";l.d(a,{k:()=>t});var s=l(7814);let t=(0,s.createServerReference)("60ac6b802b4ac5f1a28c3dbdb5ff9f27e10a8e3dcf",s.callServer,void 0,s.findSourceMapURL,"getEvents")},5715:(e,a,l)=>{Promise.resolve().then(l.t.bind(l,3283,23)),Promise.resolve().then(l.bind(l,284)),Promise.resolve().then(l.bind(l,6425)),Promise.resolve().then(l.bind(l,6588)),Promise.resolve().then(l.bind(l,4414)),Promise.resolve().then(l.bind(l,4268)),Promise.resolve().then(l.bind(l,4942)),Promise.resolve().then(l.bind(l,2444)),Promise.resolve().then(l.bind(l,5787))},6355:(e,a,l)=>{"use strict";l.d(a,{A:()=>t});var s=l(7814);let t=(0,s.createServerReference)("40cae6ca72d49d4588d84cb2c59de457c7157a788a",s.callServer,void 0,s.findSourceMapURL,"listCatalogModels")},6517:(e,a,l)=>{"use strict";l.d(a,{L2:()=>t,Ov:()=>n});let s={cli_claude_code:[{id:"opus",label:"Claude Opus",version:"4.8",note:"most capable"},{id:"sonnet",label:"Claude Sonnet",version:"4.6",note:"balanced"},{id:"haiku",label:"Claude Haiku",version:"4.5",note:"fast"}],cli_codex:[{id:"gpt-5-codex",label:"GPT-5 Codex",version:"5"},{id:"o4-mini",label:"o4-mini",version:"o4"}],cli_gemini:[{id:"gemini-2.5-pro",label:"Gemini Pro",version:"2.5"},{id:"gemini-2.5-flash",label:"Gemini Flash",version:"2.5"}],cli_openclaw:[{id:"(default)",label:"OpenClaw",version:"default",note:"configured provider"},{id:"openai/gpt-5.4",label:"GPT",version:"5.4"},{id:"anthropic/claude-sonnet-4",label:"Claude Sonnet",version:"4"}],cli_hermes:[{id:"(default)",label:"Hermes",version:"default",note:"configured provider"},{id:"anthropic/claude-sonnet-4.6",label:"Claude Sonnet",version:"4.6"},{id:"openai/gpt-5.5",label:"GPT",version:"5.5"}],cli_aider:[{id:"(default)",label:"Aider",version:"default",note:"configured provider"},{id:"anthropic/claude-sonnet-4-6",label:"Claude Sonnet",version:"4.6"},{id:"openai/gpt-5.2",label:"GPT",version:"5.2"},{id:"deepseek/deepseek-chat",label:"DeepSeek Chat",version:""}],cli_opencode:[{id:"(default)",label:"OpenCode",version:"default",note:"configured provider"},{id:"anthropic/claude-sonnet-4-6",label:"Claude Sonnet",version:"4.6"},{id:"openai/gpt-5.2",label:"GPT",version:"5.2"}],cli_copilot:[{id:"(default)",label:"Copilot",version:"default",note:"configured provider"},{id:"claude-sonnet-4.5",label:"Claude Sonnet",version:"4.5"},{id:"gpt-5",label:"GPT",version:"5"}],cli_cursor:[{id:"(default)",label:"Cursor",version:"default",note:"configured provider"},{id:"claude-4.5-sonnet",label:"Claude Sonnet",version:"4.5"},{id:"gpt-5",label:"GPT",version:"5"}],cli_cline:[{id:"(default)",label:"Cline",version:"default",note:"configured provider"}],cli_kilo:[{id:"(default)",label:"Kilo Code",version:"default",note:"configured provider"}]};function t(e){return s[e]??null}function n(e){if(!e)return{label:"",version:""};let a=e.match(/(\d+(?:[.\-]\d+){0,2})(?!.*\d)/),l=a?a[1].replace(/-/g,"."):"";return{label:(a?e.slice(0,a.index).replace(/[-_.\s]+$/,""):e).split(/[-_.\s]+/).filter(Boolean).map(e=>/^(gpt|llm|api|ai)$/i.test(e)?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)).join(" ")||e,version:l}}},8006:(e,a,l)=>{"use strict";l.d(a,{n:()=>o});var s=l(5076),t=l(8488),n=l(4552),i=l(8576),r=l(5629);function o({name:e,color:a,image:l,size:d=64,onChange:c}){let m=(0,r.k)(),u=(0,t.useRef)(null),[p,g]=(0,t.useState)(!1),[h,v]=(0,t.useState)(""),[,x]=(0,t.useTransition)();async function f(e){if(e){v(""),g(!0);try{let a=await function(e,a=160){return new Promise((l,s)=>{let t=URL.createObjectURL(e),n=new Image;n.onload=()=>{URL.revokeObjectURL(t);let e=Math.min(1,a/Math.max(n.width,n.height)),i=Math.max(1,Math.round(n.width*e)),r=Math.max(1,Math.round(n.height*e)),o=document.createElement("canvas");o.width=i,o.height=r;let d=o.getContext("2d");if(!d)return void s(Error("canvas unavailable"));d.drawImage(n,0,0,i,r);let c=o.toDataURL("image/webp",.85);c.startsWith("data:image/webp")||(c=o.toDataURL("image/jpeg",.85)),c.length>6e5&&(c=o.toDataURL("image/jpeg",.6)),l(c)},n.onerror=()=>{URL.revokeObjectURL(t),s(Error("invalid image"))},n.src=t})}(e);x(()=>c(a))}catch{v(m("chrome.avatar.processError"))}finally{g(!1),u.current&&(u.current.value="")}}}return(0,s.jsxs)("div",{className:"avatar-upload",children:[(0,s.jsx)(n.e,{name:e,color:a,image:l,size:d}),(0,s.jsxs)("div",{className:"avatar-upload-actions",children:[(0,s.jsxs)("button",{className:"btn-ghost",disabled:p,onClick:()=>u.current?.click(),children:[p?(0,s.jsx)("span",{className:"sync-spin",children:(0,s.jsx)(i.I,{name:"refresh",size:12})}):(0,s.jsx)(i.I,{name:"add",size:12})," ",l?m("chrome.avatar.change"):m("chrome.avatar.upload")]}),h&&(0,s.jsx)("span",{style:{fontSize:11,color:"#e8688f"},children:h}),(0,s.jsx)("input",{ref:u,type:"file",accept:".png,.jpg,.jpeg,.gif,.webp",hidden:!0,onChange:e=>f(e.target.files?.[0])})]})]})}},9265:(e,a,l)=>{"use strict";l.d(a,{W:()=>r});var s=l(5076),t=l(8488);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"},i={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:a=34,radius:l}){let o,d=i[e],c=d?d[0]:"#5b6378",m=d?d[1]:(e||"?").slice(0,2).replace(/[^a-z0-9]/gi,"").toUpperCase(),u=(o=n[e])?`https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg/icons/${o}.svg`:null,[p,g]=(0,t.useState)(!1),h=null!=l?l:Math.round(.28*a),v=u&&!p,x=Math.round(.66*a);return(0,s.jsx)("span",{className:"prov-glyph",style:{width:a,height:a,flex:"0 0 "+a+"px",borderRadius:h,background:v?"#fff":"linear-gradient(150deg, "+c+", color-mix(in srgb, "+c+" 70%, #000))",color:"#fff",display:"grid",placeItems:"center",overflow:"hidden",fontSize:Math.round(.4*a),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,s.jsx)("img",{src:u,alt:"",width:x,height:x,loading:"lazy",onError:()=>g(!0),style:{width:x,height:x,objectFit:"contain",display:"block"}}):m})}},9744:(e,a,l)=>{"use strict";l.d(a,{E:()=>t});var s=l(7814);let t=(0,s.createServerReference)("405061dc6346f5a7f9985340a32516015cf4963640",s.callServer,void 0,s.findSourceMapURL,"listProviderModels")}},e=>{e.O(0,[9219,3219,5332,8370,6646,6834,7358],()=>e(e.s=5715)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5125],{1716:(e,s,t)=>{"use strict";t.d(s,{R:()=>n});var a=t(5076);function n({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,a.jsx)("span",{style:{fontSize:9,fontWeight:700,fontFamily:"var(--mono-font, monospace)",color:s.c,lineHeight:1,letterSpacing:"-.5px"},children:s.t})}},7214:(e,s,t)=>{Promise.resolve().then(t.t.bind(t,3283,23)),Promise.resolve().then(t.bind(t,8419)),Promise.resolve().then(t.bind(t,6425)),Promise.resolve().then(t.bind(t,6588)),Promise.resolve().then(t.bind(t,4414)),Promise.resolve().then(t.bind(t,4268)),Promise.resolve().then(t.bind(t,4942)),Promise.resolve().then(t.bind(t,2444)),Promise.resolve().then(t.bind(t,5787))},8419:(e,s,t)=>{"use strict";t.d(s,{CodeEditor:()=>v});var a=t(5076),n=t(8488),l=t(5629),i=t(8576),c=t(1716),o=t(7814);let r=(0,o.createServerReference)("6017f8d0bd856ec6934d5b75c88c68b706ba89c7f0",o.callServer,void 0,o.findSourceMapURL,"saveFileContent"),d=(0,o.createServerReference)("40c878e249a5a867484961e6a69cee47cd124c7866",o.callServer,void 0,o.findSourceMapURL,"createFolder"),h=(0,o.createServerReference)("4089a1dcb59c2695ac6bfa6ab32f72de32a4611bd8",o.callServer,void 0,o.findSourceMapURL,"createFile"),m=(0,o.createServerReference)("40a076707077058c9d9df66a1320d07b6ff46d13d3",o.callServer,void 0,o.findSourceMapURL,"deleteFile"),p=(0,o.createServerReference)("406a2f7c3a0de1c48911feec81208bfded9dceb332",o.callServer,void 0,o.findSourceMapURL,"fileDiff"),x=(0,o.createServerReference)("60ea3ccd8d7e7b0405944f99dbdfa569ef83e9d543",o.callServer,void 0,o.findSourceMapURL,"grepWorkspace");function u(e,s){let t;if(!s)return e||"";let n=[],l=0,i=0;for(s.lastIndex=0;t=s.exec(e);){if(0===t[0].length){s.lastIndex++;continue}t.index>l&&n.push(e.slice(l,t.index)),n.push((0,a.jsx)("mark",{children:t[0]},i++)),l=t.index+t[0].length}return l<e.length&&n.push(e.slice(l)),n.length?n:e||""}function j({path:e,onClose:s}){let t=(0,l.k)(),[c,o]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let s=!0;return p(e).then(e=>{s&&o(e.diff||t("codeedit.noDiff"))}),()=>{s=!1}},[e,t]),(0,a.jsx)("div",{className:"detail-overlay",onMouseDown:s,children:(0,a.jsxs)("div",{className:"detail-panel",style:{width:720,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,a.jsx)("div",{className:"detail-head",children:(0,a.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,a.jsx)("span",{className:"view-title",style:{fontSize:14,fontFamily:"var(--mono-font)"},children:e}),(0,a.jsx)("button",{className:"dock-tool",onClick:s,children:(0,a.jsx)(i.I,{name:"close",size:15})})]})}),(0,a.jsx)("div",{className:"detail-body",children:null===c?(0,a.jsxs)("div",{className:"muted",children:[(0,a.jsx)("span",{className:"spin",children:(0,a.jsx)(i.I,{name:"refresh",size:13})})," ",t("codeedit.loadingDiff")]}):(0,a.jsx)("pre",{className:"scroll",style:{maxHeight:"60vh",overflow:"auto",fontFamily:"var(--mono-font)",fontSize:12,lineHeight:1.5,margin:0},children:c.split("\n").map((e,s)=>(0,a.jsx)("div",{style:{color:e.startsWith("+")&&!e.startsWith("+++")?"var(--sx-string)":e.startsWith("-")&&!e.startsWith("---")?"#e8688f":e.startsWith("@@")?"var(--accent)":"var(--text-dim)",whiteSpace:"pre-wrap"},children:e||""},s))})})]})})}let f=new Set(["import","from","export","const","let","var","function","return","if","else","for","while","async","await","type","interface","class","extends","implements","new","try","catch","finally","throw","switch","case","break","continue","default","of","in","typeof","instanceof","void","null","undefined","true","false","this","super","public","private","protected","readonly","static","enum","as","yield","do","then","def","lambda","with","pass","elif","None","True","False"]);function g({node:e,depth:s,expanded:t,selected:n,onToggle:o,onOpen:r,onDelete:d,gitStatus:h}){let m=(0,l.k)(),p=8+14*s;if("dir"===e.type){let l=t.has(e.path);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"row dir",style:{paddingLeft:p},onClick:()=>o(e.path),children:[(0,a.jsx)("span",{className:"chev",children:(0,a.jsx)(i.I,{name:l?"chevronDown":"chevronRight",size:12})}),(0,a.jsx)("span",{className:"name",children:e.name}),(0,a.jsx)("button",{className:"row-del",title:m("codeedit.deleteFolderNamed",{name:e.name}),onClick:s=>{s.stopPropagation(),d(e.path,"dir")},children:(0,a.jsx)(i.I,{name:"close",size:12})})]}),l&&e.children.map(e=>(0,a.jsx)(g,{node:e,depth:s+1,expanded:t,selected:n,onToggle:o,onOpen:r,onDelete:d,gitStatus:h},e.path))]})}let x=h[e.path];return(0,a.jsxs)("div",{className:"row file"+(n===e.path?" selected":""),style:{paddingLeft:p},onClick:()=>r(e.path),children:[(0,a.jsx)("span",{className:"chev"}),(0,a.jsx)("span",{className:"fi",children:(0,a.jsx)(c.R,{name:e.name})}),(0,a.jsx)("span",{className:"name",style:x?{color:"U"===x?"var(--sx-number)":"var(--sx-type)"}:void 0,children:e.name}),x&&(0,a.jsx)("span",{className:"git-badge gstat "+x,children:x}),(0,a.jsx)("button",{className:"row-del",title:m("codeedit.deleteNamed",{name:e.name}),onClick:s=>{s.stopPropagation(),d(e.path,"file")},children:(0,a.jsx)(i.I,{name:"close",size:12})})]})}function v({files:e,repo:s,branch:t="workspace"}){let o,p=(0,l.k)(),N=(0,n.useMemo)(()=>(function(e){let s=[];for(let t of[...e].sort((e,s)=>e.path.localeCompare(s.path))){let e=t.path.split("/"),a=s,n="";e.forEach((s,l)=>{if(n=n?n+"/"+s:s,l===e.length-1)a.push({type:"file",name:s,path:t.path});else{let e=a.find(e=>"dir"===e.type&&e.path===n);e||(e={type:"dir",name:s,path:n,children:[]},a.push(e)),a=e.children}})}let t=e=>e.sort((e,s)=>e.type===s.type?e.name.localeCompare(s.name):"dir"===e.type?-1:1).map(e=>"dir"===e.type?{...e,children:t(e.children)}:e);return t(s)})(e),[e]),b=(0,n.useMemo)(()=>Object.fromEntries(e.filter(e=>e.gitStatus).map(e=>[e.path,e.gitStatus])),[e]),[y,w]=(0,n.useState)(()=>e[0]?[e[0].path]:[]),[S,k]=(0,n.useState)(e[0]?.path??null),[C,z]=(0,n.useState)("workspace"),[I,F]=(0,n.useState)(""),[R,P]=(0,n.useState)(!1),[M,W]=(0,n.useState)(!1),[D,E]=(0,n.useState)(!1),[T,L]=(0,n.useState)([]),[U,_]=(0,n.useState)(!1),[A,H]=(0,n.useState)(!1),[$,O]=(0,n.useState)(null),B=(0,n.useRef)(null),Z=(0,n.useMemo)(()=>"search"===C?function(e,s){if(!e||e.trim().length<1)return null;try{let t=s.regex?e:e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return s.wholeWord&&(t=`\\b(?:${t})\\b`),new RegExp(t,s.caseSensitive?"g":"gi")}catch{return null}}(I,{caseSensitive:R,wholeWord:M,regex:D}):null,[C,I,R,M,D]);(0,n.useEffect)(()=>{if("search"!==C||I.trim().length<2){L([]),H(!1);return}_(!0);let e=setTimeout(async()=>{try{let e=await x(I,{caseSensitive:R,wholeWord:M,regex:D});L(e.files),H(e.truncated)}finally{_(!1)}},250);return()=>clearTimeout(e)},[C,I,R,M,D]),(0,n.useEffect)(()=>{if(null==$)return;let e=B.current?.querySelector(`[data-line="${$}"]`);e?.scrollIntoView({block:"center",behavior:"smooth"})},[$,S]);let[J,q]=(0,n.useState)(!0),[K,V]=(0,n.useState)(()=>{let e=new Set;return N.forEach(s=>"dir"===s.type&&e.add(s.path)),e}),[X,Y]=(0,n.useState)(""),[G,Q]=(0,n.useState)(!1),[ee,es]=(0,n.useState)(!1),[et,ea]=(0,n.useState)("file"),[en,el]=(0,n.useState)(""),[ei,ec]=(0,n.useState)(null),[eo,er]=(0,n.useState)(null),[,ed]=(0,n.useTransition)(),eh=e.find(e=>e.path===S)??null;function em(e){V(s=>{let t=new Set(s);return t.has(e)?t.delete(e):t.add(e),t})}function ep(e){w(s=>s.includes(e)?s:[...s,e]),k(e),Q(!1)}function ex(e){w(s=>{let t=s.filter(s=>s!==e);return S===e&&k(t[t.length-1]??null),t})}let eu=Object.entries(b).map(([e,s])=>({path:e,st:s,name:e.split("/").pop()??e,dir:e.split("/").slice(0,-1).join("/")})),ej=eu.filter(e=>"A"===e.st),ef=eu.filter(e=>"A"!==e.st),eg=eh?eh.content.split("\n"):[];return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:12},children:[(0,a.jsx)(i.I,{name:"git",size:15,style:{color:"var(--accent)"}}),(0,a.jsx)("span",{className:"mono",style:{fontWeight:700,fontSize:13},children:s}),(0,a.jsxs)("span",{className:"mono",style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:12,color:"var(--text-dim)"},children:[(0,a.jsx)(i.I,{name:"branch",size:11})," ",t]}),(0,a.jsxs)("div",{className:"seg",style:{marginLeft:"auto",width:380},children:[(0,a.jsxs)("button",{className:"seg-opt"+("workspace"===C?" on":""),onClick:()=>z("workspace"),children:[(0,a.jsx)(i.I,{name:"grid",size:12})," ",p("codeedit.workspace")]}),(0,a.jsxs)("button",{className:"seg-opt"+("search"===C?" on":""),onClick:()=>z("search"),children:[(0,a.jsx)(i.I,{name:"search",size:12})," ",p("common.search")]}),(0,a.jsxs)("button",{className:"seg-opt"+("git"===C?" on":""),onClick:()=>z("git"),children:[(0,a.jsx)(i.I,{name:"git",size:12})," ",p("codeedit.sourceControl"),eu.length>0?` \xb7 ${eu.length}`:""]})]})]}),(0,a.jsxs)("div",{className:"code-mod",children:[(0,a.jsx)("div",{className:"code-tree",children:"workspace"===C?(0,a.jsxs)(a.Fragment,{children:[y.length>0&&(0,a.jsxs)("div",{className:"open-editors",children:[(0,a.jsxs)("div",{className:"oe-head",children:[(0,a.jsxs)("span",{className:"tree-section-label",style:{padding:0,cursor:"pointer"},onClick:()=>q(e=>!e),children:[(0,a.jsx)(i.I,{name:J?"chevronDown":"chevronRight",size:12})," ",p("codeedit.openEditors")]}),(0,a.jsx)("span",{className:"oe-count",children:y.length}),(0,a.jsx)("button",{className:"side-act",title:p("codeedit.closeAll"),onClick:()=>{w([]),k(null)},children:(0,a.jsx)(i.I,{name:"close",size:13})})]}),J&&y.map(e=>(0,a.jsxs)("div",{className:"oe-row"+(e===S?" active":""),onClick:()=>ep(e),title:e,children:[(0,a.jsx)(c.R,{name:e.split("/").pop()??e}),(0,a.jsx)("span",{className:"oe-name",children:e.split("/").pop()}),(0,a.jsx)("button",{className:"oe-close",onClick:s=>{s.stopPropagation(),ex(e)},children:(0,a.jsx)(i.I,{name:"close",size:12})})]},e))]}),(0,a.jsxs)("div",{className:"tree-section-label",children:[(0,a.jsx)(i.I,{name:"chevronDown",size:12}),(0,a.jsx)("span",{style:{flex:1},children:s}),(0,a.jsx)("button",{className:"side-act",title:p("codeedit.newFile"),onClick:()=>{ea("file"),es(!0),el("")},children:(0,a.jsx)(i.I,{name:"newFile",size:14})}),(0,a.jsx)("button",{className:"side-act",title:p("codeedit.newFolder"),onClick:()=>{ea("folder"),es(!0),el("")},children:(0,a.jsx)(i.I,{name:"newFolder",size:14})})]}),0===e.length&&(0,a.jsx)("div",{className:"muted",style:{padding:12,fontSize:12},children:p("codeedit.noFilesYet")}),N.map(e=>(0,a.jsx)(g,{node:e,depth:0,expanded:K,selected:S,onToggle:em,onOpen:ep,onDelete:(e,s)=>ec({path:e,type:s}),gitStatus:b},e.path))]}):"search"===C?(0,a.jsxs)("div",{className:"code-search",children:[(0,a.jsxs)("div",{className:"cs-bar",children:[(0,a.jsx)(i.I,{name:"search",size:13}),(0,a.jsx)("input",{autoFocus:!0,placeholder:p("codeedit.searchFilesCode"),value:I,onChange:e=>F(e.target.value)}),I&&(0,a.jsx)("button",{className:"ss-clear",onClick:()=>F(""),children:(0,a.jsx)(i.I,{name:"close",size:12})})]}),(0,a.jsxs)("div",{className:"cs-toggles",children:[(0,a.jsx)("button",{className:"cs-tog"+(R?" on":""),title:p("codeedit.matchCase"),onClick:()=>P(e=>!e),children:"Aa"}),(0,a.jsx)("button",{className:"cs-tog"+(M?" on":""),title:p("codeedit.wholeWord"),onClick:()=>W(e=>!e),children:"ab"}),(0,a.jsx)("button",{className:"cs-tog"+(D?" on":""),title:p("codeedit.regex"),onClick:()=>E(e=>!e),children:".*"}),(0,a.jsx)("span",{className:"cs-count",children:U?"…":T.length?p("codeedit.matchesInFiles",{matches:T.reduce((e,s)=>e+s.matches.length,0),files:T.length}):""})]}),(0,a.jsxs)("div",{className:"cs-results scroll",children:[!U&&I.trim().length>=2&&0===T.length&&(0,a.jsx)("div",{className:"muted",style:{fontSize:12,padding:10},children:p("codeedit.noMatches")}),T.map(e=>(0,a.jsxs)("div",{className:"cs-file",children:[(0,a.jsxs)("div",{className:"cs-file-head",onClick:()=>ep(e.path),title:e.path,children:[(0,a.jsx)(c.R,{name:e.path.split("/").pop()??e.path}),(0,a.jsx)("span",{className:"cs-file-name"+(e.nameMatch?" name-hit":""),children:e.path}),(0,a.jsx)("span",{className:"cs-file-n",children:e.matches.length||(e.nameMatch?p("codeedit.nameMatch"):"")})]}),e.matches.slice(0,50).map((s,t)=>(0,a.jsxs)("div",{className:"cs-hit",onClick:()=>{ep(e.path),O(s.line)},children:[(0,a.jsx)("span",{className:"cs-ln",children:s.line}),(0,a.jsx)("span",{className:"cs-line",children:u(s.text,Z)})]},t))]},e.path)),A&&(0,a.jsx)("div",{className:"muted",style:{fontSize:11,padding:8},children:p("codeedit.truncatedHint")})]})]}):(0,a.jsxs)("div",{className:"git-panel",children:[(0,a.jsxs)("div",{className:"gh-repo",children:[(0,a.jsx)(i.I,{name:"git",size:14,style:{color:"var(--accent)"}}),(0,a.jsxs)("div",{className:"gh-repo-main",children:[(0,a.jsx)("div",{className:"gh-repo-name",children:s}),(0,a.jsxs)("div",{className:"gh-repo-branch",children:[(0,a.jsx)(i.I,{name:"branch",size:11})," ",t]})]})]}),0===eu.length?(0,a.jsx)("div",{className:"muted",style:{fontSize:12,padding:"10px 2px"},children:p("codeedit.noChanges")}):(0,a.jsxs)(a.Fragment,{children:[ej.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"git-group-label",children:p("codeedit.stagedChanges",{n:ej.length})}),ej.map(e=>(0,a.jsxs)("div",{className:"git-row",title:e.path,onClick:()=>ep(e.path),children:[(0,a.jsx)(c.R,{name:e.name}),(0,a.jsx)("span",{className:"gname",children:e.name}),(0,a.jsx)("span",{className:"gpath",children:e.dir}),(0,a.jsx)("button",{className:"iact",title:p("codeedit.viewDiff"),onClick:s=>{s.stopPropagation(),er(e.path)},children:(0,a.jsx)(i.I,{name:"git",size:12})}),(0,a.jsx)("span",{className:"gstat "+e.st,children:e.st})]},e.path))]}),(0,a.jsx)("div",{className:"git-group-label",children:p("codeedit.changes",{n:ef.length})}),ef.map(e=>(0,a.jsxs)("div",{className:"git-row",title:e.path,onClick:()=>ep(e.path),children:[(0,a.jsx)(c.R,{name:e.name}),(0,a.jsx)("span",{className:"gname",children:e.name}),(0,a.jsx)("span",{className:"gpath",children:e.dir}),(0,a.jsx)("button",{className:"iact",title:p("codeedit.viewDiff"),onClick:s=>{s.stopPropagation(),er(e.path)},children:(0,a.jsx)(i.I,{name:"git",size:12})}),(0,a.jsx)("span",{className:"gstat "+e.st,children:e.st})]},e.path)),(0,a.jsxs)("a",{href:"/github",className:"btn-ghost",style:{display:"inline-flex",gap:6,margin:"12px 8px"},children:[(0,a.jsx)(i.I,{name:"arrowUp",size:13})," ",p("codeedit.commitPush")]})]})]})}),(0,a.jsxs)("div",{className:"editor-wrap",children:[(0,a.jsx)("div",{className:"tabbar",children:y.map(e=>(0,a.jsxs)("div",{className:"tab"+(e===S?" active":""),onClick:()=>ep(e),title:e,children:[(0,a.jsx)(c.R,{name:e.split("/").pop()??e}),(0,a.jsx)("span",{className:"tname",children:e.split("/").pop()}),(0,a.jsx)("span",{className:"tclose",onClick:s=>{s.stopPropagation(),ex(e)},children:(0,a.jsx)(i.I,{name:"close",size:12})})]},e))}),eh?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"breadcrumb",children:eh.path.split("/").map((e,s,t)=>(0,a.jsxs)("span",{className:"crumb",children:[s>0&&(0,a.jsx)(i.I,{name:"chevronRight",size:11}),s===t.length-1?(0,a.jsx)(c.R,{name:e}):null," ",e]},s))}),(0,a.jsxs)("div",{className:"editor-toolbar",children:[(0,a.jsxs)("span",{className:"et-lang",children:[(0,a.jsx)(c.R,{name:eh.path.split("/").pop()??""})," ",eh.lang.toUpperCase()]}),(0,a.jsx)("span",{className:"et-spacer"}),(0,a.jsxs)("span",{className:"et-diag ok",children:[(0,a.jsx)(i.I,{name:"check",size:12})," ",p("codeedit.noProblems")]}),G?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{className:"et-edit",onClick:()=>Q(!1),children:p("common.cancel")}),(0,a.jsxs)("button",{className:"et-edit on",onClick:()=>ed(async()=>{await r(eh.path,X),Q(!1)}),children:[(0,a.jsx)(i.I,{name:"check",size:12})," ",p("common.save")]})]}):(0,a.jsxs)("button",{className:"et-edit",onClick:()=>{Q(!0),Y(eh.content)},children:[(0,a.jsx)(i.I,{name:"command",size:12})," ",p("common.edit")]})]}),G?(0,a.jsx)("textarea",{className:"code-area",value:X,onChange:e=>Y(e.target.value),spellCheck:!1}):(0,a.jsxs)("div",{className:"editor-body",children:[(0,a.jsx)("div",{className:"editor-scroll",children:(0,a.jsx)("div",{className:"code",ref:B,children:eg.map((e,s)=>(0,a.jsxs)("div",{className:"code-line"+($===s+1?" search-hit":""),"data-line":s+1,children:[(0,a.jsx)("span",{className:"gutter",children:s+1}),(0,a.jsx)("span",{className:"line-content",children:Z?u(e,Z):""===e?"":(function(e,s){let t=[],a="py"===s||"yaml"===s,n=0,l=/[A-Za-z0-9_$]/;for(;n<e.length;){let s=e[n];if("/"===s&&"/"===e[n+1]||"#"===s&&a){t.push({t:e.slice(n),c:"comment"});break}if('"'===s||"'"===s||"`"===s){let a=n+1;for(;a<e.length&&e[a]!==s;)"\\"===e[a]&&a++,a++;let l=Math.min(a+1,e.length);t.push({t:e.slice(n,l),c:"string"}),n=l;continue}if(s>="0"&&s<="9"&&!l.test(e[n-1]??" ")){let s=n;for(;s<e.length&&/[0-9.xXa-fA-F_]/.test(e[s]);)s++;t.push({t:e.slice(n,s),c:"number"}),n=s;continue}if(/[A-Za-z_$]/.test(s)){let s=n;for(;s<e.length&&l.test(e[s]);)s++;let a=e.slice(n,s);t.push({t:a,c:f.has(a)?"keyword":/^[A-Z]/.test(a)?"type":"plain"}),n=s;continue}t.push({t:s,c:/[{}()[\].,;]/.test(s)?"punct":/\s/.test(s)?"plain":"operator"}),n++}return t})(e,eh.lang).map((e,s)=>(0,a.jsx)("span",{className:"tok-"+e.c,children:e.t},s))})]},s))})}),(0,a.jsx)("div",{className:"minimap",children:(0,a.jsx)("div",{className:"minimap-inner",children:eg.map((e,s)=>(0,a.jsx)("div",{className:"mini-line",children:e||"\xa0"},s))})})]})]}):(0,a.jsx)("div",{className:"welcome",children:(0,a.jsxs)("div",{className:"welcome-inner",children:[(0,a.jsx)("div",{className:"welcome-logo",children:"⌘"}),(0,a.jsx)("div",{className:"welcome-sub",children:p("codeedit.welcomeSub")})]})})]})]}),ee&&(0,a.jsx)("div",{className:"modal-overlay",onMouseDown:()=>es(!1),children:(0,a.jsx)("div",{className:"modal",style:{padding:"20px 22px",width:440,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:(o=()=>ed(async()=>{let e=en.trim();"folder"===et?await d(e):(await h(e),ep(e.replace(/^\/+/,""))),es(!1)}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:10},children:"folder"===et?p("codeedit.newFolder"):p("codeedit.newFile")}),(0,a.jsx)("input",{className:"form-input mono",autoFocus:!0,placeholder:"folder"===et?p("codeedit.folderPathHint"):p("codeedit.filePathHint"),value:en,onChange:e=>el(e.target.value),onKeyDown:e=>{"Enter"===e.key&&en.trim()&&o()}}),(0,a.jsx)("div",{className:"muted",style:{fontSize:11.5,marginTop:8},children:"folder"===et?p("codeedit.folderCreateHint"):p("codeedit.fileCreateHint")}),(0,a.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,a.jsx)("button",{className:"btn-ghost",onClick:()=>es(!1),children:p("common.cancel")}),(0,a.jsx)("button",{className:"btn-accent",disabled:!en.trim(),onClick:o,children:p("common.create")})]})]}))})}),ei&&(0,a.jsx)("div",{className:"modal-overlay",onMouseDown:()=>ec(null),children:(0,a.jsxs)("div",{className:"modal",style:{padding:"20px 22px",width:440,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,a.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:10},children:"dir"===ei.type?p("codeedit.deleteFolder"):p("codeedit.deleteFile")}),(0,a.jsxs)("div",{style:{fontSize:13},children:[p("codeedit.deleteConfirmPrefix")," ",(0,a.jsx)("b",{className:"mono",style:{color:"var(--sx-keyword)"},children:ei.path}),p("codeedit.deleteConfirmSuffix")]}),(0,a.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,a.jsx)("button",{className:"btn-ghost",onClick:()=>ec(null),children:p("common.cancel")}),(0,a.jsx)("button",{className:"btn-accent",onClick:()=>ed(async()=>{await m(ei.path),eh&&(eh.path===ei.path||eh.path.startsWith(ei.path+"/"))&&ex(eh.path),ec(null)}),children:p("common.delete")})]})]})}),eo&&(0,a.jsx)(j,{path:eo,onClose:()=>er(null)})]})}}},e=>{e.O(0,[9219,3219,5332,8370,6646,6834,7358],()=>e(e.s=7214)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9530],{4625:(e,s,a)=>{Promise.resolve().then(a.t.bind(a,3283,23)),Promise.resolve().then(a.bind(a,7521)),Promise.resolve().then(a.bind(a,5034)),Promise.resolve().then(a.bind(a,6798)),Promise.resolve().then(a.bind(a,6425)),Promise.resolve().then(a.bind(a,6588)),Promise.resolve().then(a.bind(a,4414)),Promise.resolve().then(a.bind(a,4268)),Promise.resolve().then(a.bind(a,4942)),Promise.resolve().then(a.bind(a,2444)),Promise.resolve().then(a.bind(a,5787))},5034:(e,s,a)=>{"use strict";a.d(s,{ProjectSource:()=>o});var n=a(5076),i=a(8488),r=a(8576),l=a(7814);let t=(0,l.createServerReference)("00f97e6ace019b8c051069e144ed8581e38dfe9c92",l.callServer,void 0,l.findSourceMapURL,"reanalyzeProject");var c=a(5629);function o({source:e}){let s=(0,c.k)(),[a,l]=(0,i.useTransition)(),[d,m]=(0,i.useState)(!1),v=e??{},p=v.type??"new",g="local"===p?s("config.source.local",{name:v.localPath??"—",n:v.fileCount??0}):"github"===p?s("config.source.github",{repo:v.repo??"—",n:v.fileCount??0}):s("mock"===p?"config.source.mock":"config.source.new");return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"kv",children:[(0,n.jsx)("span",{className:"k",children:s("config.source.active")}),(0,n.jsx)("span",{className:"v",children:g})]}),(0,n.jsxs)("div",{className:"kv",children:[(0,n.jsx)("span",{className:"k",children:s("config.source.dir")}),(0,n.jsx)("span",{className:"v lr-mono",style:{fontFamily:"var(--mono-font)",fontSize:11.5},children:"~/.constella/organizations/<org>/workspace"})]}),("local"===p||"github"===p||"mock"===p)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"kv",children:[(0,n.jsx)("span",{className:"k",children:s("config.source.analysis")}),(0,n.jsx)("span",{className:"v",children:s(v.analyzed?"config.source.analyzed":"config.source.notAnalyzed")})]}),(0,n.jsxs)("button",{className:"btn-ghost",disabled:a||d,style:{marginTop:8},onClick:()=>l(async()=>{m((await t()).ok)}),children:[(0,n.jsx)("span",{className:a?"sync-spin":"",style:{display:"inline-flex"},children:(0,n.jsx)(r.I,{name:"refresh",size:13})})," ",s(d?"config.source.reanalyzeQueued":"config.source.reanalyze")]})]})]})}},6798:(e,s,a)=>{"use strict";a.d(s,{StackEditor:()=>m});var n=a(5076),i=a(8488),r=a(3730),l=a(7814);let t=(0,l.createServerReference)("403ac9e50781e88525176283ac0911735a903bdcfe",l.callServer,void 0,l.findSourceMapURL,"setWorkspaceStack");var c=a(9562),o=a(973),d=a(8576);function m({stack:e}){let[s,a]=(0,i.useState)(()=>(0,c.T1)(e).stack),[l,v]=(0,i.useTransition)(),[p,g]=(0,i.useState)(!1),[h,f]=(0,i.useState)("");return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))",gap:"12px 16px"},children:r.z.map(e=>{let i=e.opts.includes("None")?e.opts:[...e.opts,"None"],r=(0,o.jX)(s[e.key]).filter(e=>"None"!==e);return(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,n.jsxs)("span",{style:{fontSize:11.5,color:"var(--text-dim)",fontWeight:600},children:[e.label,r.length>1&&(0,n.jsxs)("span",{style:{color:"var(--text-faint)",fontWeight:400},children:[" \xb7 ",r.length]})]}),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:5},children:i.map(i=>{let l=(0,c.YL)(s,e.key,i),t="None"===i?0===r.length:(0,o.Hn)(s[e.key],i);return(0,n.jsx)("button",{type:"button",disabled:!!l&&!t,onClick:()=>{var n;let r;(!l||t)&&(n=e.key,a((r=(0,c.T1)({...s,[n]:(0,o.P_)(s[n],i)})).stack),f(r.removed.map(e=>`${e.opt} was unselected automatically — ${e.reason}.`).join(" ")),g(!1))},title:l||i,style:{fontSize:12,padding:"4px 9px",borderRadius:999,cursor:l&&!t?"not-allowed":"pointer",border:"1px solid "+(t?"var(--accent)":"var(--border)"),background:t?"var(--accent)":"transparent",color:t?"#1a1206":l?"var(--text-faint)":"var(--text-dim)",opacity:l&&!t?.5:1},children:i},i)})})]},e.key)})}),h&&(0,n.jsxs)("div",{style:{fontSize:12,color:"var(--sx-number)",marginTop:10,display:"flex",alignItems:"center",gap:6},children:[(0,n.jsx)(d.I,{name:"warn",size:12})," ",h]}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginTop:12},children:[(0,n.jsx)("button",{className:"btn-accent",disabled:l,onClick:function(){v(async()=>{await t(s),g(!0)})},children:l?"Saving…":"Save stack & reload skills"}),p&&(0,n.jsxs)("span",{style:{fontSize:12,color:"var(--sx-string)",display:"inline-flex",alignItems:"center",gap:5},children:[(0,n.jsx)(d.I,{name:"check",size:12})," Saved — agents re-linked to the new stack."]})]})]})}},7521:(e,s,a)=>{"use strict";a.d(s,{AgentRuntimeSettings:()=>d,EditorSettings:()=>o});var n=a(5076),i=a(8488);a(8576);var r=a(5629),l=a(7814);let t=(0,l.createServerReference)("40b9d8a993eb23669f8397d15cd4f7c9c23497d6f8",l.callServer,void 0,l.findSourceMapURL,"setEditorSettings"),c=(0,l.createServerReference)("40a2c234055e4823e34ec48701309140d0125368d3",l.callServer,void 0,l.findSourceMapURL,"setAgentRuntime");function o({editor:e}){let s=(0,r.k)(),[a,l]=(0,i.useState)({tabSize:e?.tabSize??2,formatOnSave:e?.formatOnSave??!0,wordWrap:e?.wordWrap??!0,minimap:e?.minimap??!0}),[,c]=(0,i.useTransition)();function d(e){l(s=>({...s,...e})),c(()=>t(e))}let m=(e,s)=>(0,n.jsxs)("div",{className:"set-row",children:[(0,n.jsx)("div",{className:"sr-main",children:(0,n.jsx)("div",{className:"sr-title",children:s})}),(0,n.jsx)("div",{className:"toggle"+(a[e]?" on":""),onClick:()=>d({[e]:!a[e]})})]});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"set-row",style:{paddingTop:0},children:[(0,n.jsx)("div",{className:"sr-main",children:(0,n.jsx)("div",{className:"sr-title",children:s("config.editor.tabSize")})}),(0,n.jsx)("div",{style:{display:"flex",gap:6},children:[2,4,8].map(e=>(0,n.jsx)("button",{className:"chip-sm",style:a.tabSize===e?{background:"var(--accent)",color:"var(--accent-fg)"}:void 0,onClick:()=>d({tabSize:e}),children:e},e))})]}),m("formatOnSave",s("config.editor.formatOnSave")),m("wordWrap",s("config.editor.wordWrap")),m("minimap",s("config.editor.minimap"))]})}function d({agents:e}){let s=(0,r.k)(),[a,l]=(0,i.useState)(e?.maxConcurrent??1),[t,o]=(0,i.useState)(!!e?.fileLocks),[m,v]=(0,i.useState)(e?.webResearch??!0),[,p]=(0,i.useTransition)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"set-row",style:{paddingTop:0},children:[(0,n.jsxs)("div",{className:"sr-main",children:[(0,n.jsx)("div",{className:"sr-title",children:s("config.agents.parallel")}),(0,n.jsx)("div",{className:"sr-sub",children:s("config.agents.parallelDesc")})]}),(0,n.jsx)("div",{style:{display:"flex",gap:6},children:[1,2,3,4,5].map(e=>(0,n.jsx)("button",{className:"chip-sm",style:a===e?{background:"var(--accent)",color:"var(--accent-fg)"}:void 0,onClick:()=>{l(e),p(()=>c({maxConcurrent:e}))},children:e},e))})]}),(0,n.jsxs)("div",{className:"set-row",children:[(0,n.jsxs)("div",{className:"sr-main",children:[(0,n.jsx)("div",{className:"sr-title",children:s("config.agents.fileLock")}),(0,n.jsx)("div",{className:"sr-sub",children:s("config.agents.fileLockDesc")})]}),(0,n.jsx)("div",{className:"toggle"+(t?" on":""),onClick:()=>{let e=!t;o(e),p(()=>c({fileLocks:e}))}})]}),a>1&&!t&&(0,n.jsxs)("div",{className:"sr-sub",style:{color:"#e8a14e",paddingBottom:6},children:["⚠ ",s("config.agents.lockWarn",{n:a})]}),(0,n.jsxs)("div",{className:"set-row",children:[(0,n.jsxs)("div",{className:"sr-main",children:[(0,n.jsx)("div",{className:"sr-title",children:s("config.agents.webResearch")}),(0,n.jsx)("div",{className:"sr-sub",children:s("config.agents.webResearchDesc")})]}),(0,n.jsx)("div",{className:"toggle"+(m?" on":""),onClick:()=>{let e=!m;v(e),p(()=>c({webResearch:e}))}})]})]})}}},e=>{e.O(0,[9219,3219,5332,8370,9562,6646,6834,7358],()=>e(e.s=4625)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9598],{2124:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,3283,23)),Promise.resolve().then(n.bind(n,4766)),Promise.resolve().then(n.bind(n,6425)),Promise.resolve().then(n.bind(n,6588)),Promise.resolve().then(n.bind(n,4414)),Promise.resolve().then(n.bind(n,4268)),Promise.resolve().then(n.bind(n,4942)),Promise.resolve().then(n.bind(n,2444)),Promise.resolve().then(n.bind(n,5787))},4766:(e,s,n)=>{"use strict";n.d(s,{CapEditor:()=>d});var t=n(5076),i=n(8488),r=n(7814);let o=(0,r.createServerReference)("4074cfc884bb517debf85601300768625df1643b11",r.callServer,void 0,r.findSourceMapURL,"setMonthlyCap");var a=n(8576),l=n(5629);function d({cap:e}){let s=(0,l.k)(),[n,r]=(0,i.useState)(e),[c,h]=(0,i.useState)(!1),[m,v]=(0,i.useTransition)();function p(){n!==e&&v(async()=>{await o(n),h(!0),setTimeout(()=>h(!1),1400)})}return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[c&&(0,t.jsxs)("span",{className:"oauth-ok",style:{padding:"3px 8px",fontSize:11},children:[(0,t.jsx)(a.I,{name:"check",size:11})," ",s("common.saved")]}),(0,t.jsx)("span",{style:{fontSize:12,color:"var(--text-dim)"},children:s("skills.cap.label")}),(0,t.jsx)("input",{className:"form-input mono",style:{width:120},value:"$"+n,disabled:m,onChange:e=>r(Math.max(0,parseFloat(e.target.value.replace(/[^0-9.]/g,""))||0)),onBlur:p,onKeyDown:e=>{"Enter"===e.key&&p()}})]})}}},e=>{e.O(0,[9219,3219,5332,8370,6646,6834,7358],()=>e(e.s=2124)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1536],{891:(e,s,a)=>{"use strict";a.d(s,{m:()=>c});var l=a(5076);let n={working:{c:"var(--sx-string)",pulse:!0,label:"working"},review:{c:"#e0a44e",label:"review"},blocked:{c:"#e8688f",label:"blocked"},idle:{c:"var(--text-faint)",label:"idle"}};function c({status:e,label:s=!1,size:a=8}){let i=n[e]??n.idle;return(0,l.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},title:i.label,children:[i.pulse?(0,l.jsx)("span",{className:"dotpulse"}):(0,l.jsx)("span",{style:{width:a,height:a,borderRadius:"50%",background:i.c,display:"inline-block",flex:`0 0 ${a}px`}}),s&&(0,l.jsx)("span",{style:{fontSize:11,color:i.c,fontWeight:600},children:i.label})]})}},3728:(e,s,a)=>{"use strict";a.d(s,{m:()=>d});var l=a(5076),n=a(8488),c=a(8576),i=a(9265),t=a(5629);function d({value:e,options:s,onChange:a,placeholder:r,mono:o,glyph:h,disabled:x,searchable:m}){let u=(0,t.k)(),[v,p]=(0,n.useState)(!1),[g,j]=(0,n.useState)(""),b=(0,n.useRef)(null),k=(0,n.useRef)(null),N=(0,n.useMemo)(()=>(s||[]).map(e=>"string"==typeof e?{value:e,label:e}:e),[s]),f=N.find(s=>s.value===e),y=(m??N.length>8)&&!x,w=g.trim().toLowerCase(),I=y&&w?N.filter(e=>(e.label+" "+e.value+" "+(e.sub||"")).toLowerCase().includes(w)):N;return(0,n.useEffect)(()=>{if(!v)return void j("");function e(e){b.current&&!b.current.contains(e.target)&&p(!1)}function s(e){"Escape"===e.key&&p(!1)}return document.addEventListener("mousedown",e),document.addEventListener("keydown",s),y&&requestAnimationFrame(()=>k.current?.focus()),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",s)}},[v,y]),(0,l.jsxs)("div",{className:"dd"+(v?" open":"")+(x?" disabled":""),ref:b,children:[(0,l.jsxs)("button",{type:"button",className:"dd-btn"+(o?" mono":""),onClick:()=>!x&&p(e=>!e),children:[h&&f&&(0,l.jsx)(i.W,{id:f.glyphId||f.value,size:20}),(0,l.jsx)("span",{className:"dd-val",children:f?f.label:(0,l.jsx)("span",{className:"dd-ph",children:r||u("common.selectEllipsis")})}),(0,l.jsx)(c.I,{name:"chevronDown",size:14})]}),v&&(0,l.jsxs)("div",{className:"dd-menu scroll",children:[y&&(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)(c.I,{name:"search",size:13}),(0,l.jsx)("input",{ref:k,value:g,placeholder:u("common.searchEllipsis"),onChange:e=>j(e.target.value),onKeyDown:e=>{"Enter"===e.key&&I[0]?(a(I[0].value),p(!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,l.jsx)("button",{type:"button",title:u("common.clear"),onClick:()=>{j(""),k.current?.focus()},style:{background:"none",border:"none",color:"var(--text-dim)",cursor:"pointer",display:"flex",padding:0},children:(0,l.jsx)(c.I,{name:"close",size:12})})]}),0===N.length&&(0,l.jsx)("div",{className:"dd-empty",children:u("common.noOptions")}),N.length>0&&0===I.length&&(0,l.jsx)("div",{className:"dd-empty",children:u("dropdown.noMatch",{q:g})}),I.map(s=>(0,l.jsxs)("button",{type:"button",className:"dd-opt"+(s.value===e?" on":""),onClick:()=>{a(s.value),p(!1)},children:[h&&(0,l.jsx)(i.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"+(o?" 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)(c.I,{name:"check",size:13})]},s.value))]})]})}},4419:(e,s,a)=>{"use strict";a.d(s,{D:()=>n});var l=a(7814);let n=(0,l.createServerReference)("4065765cf5017f860dee347e9cf6370a4635b09b71",l.callServer,void 0,l.findSourceMapURL,"setRunMode")},4552:(e,s,a)=>{"use strict";a.d(s,{e:()=>n});var l=a(5076);function n({name:e,color:s,size:a=24,health:c,image:i}){let t=Math.max(6,Math.round(.3*a)),d=Math.round(.28*a),r=i?/^(data:|https?:|\/)/.test(i)?i:`/api/upload?path=${encodeURIComponent(i)}`:null;return(0,l.jsxs)("span",{style:{position:"relative",width:a,height:a,flex:`0 0 ${a}px`,display:"inline-block"},children:[r?(0,l.jsx)("img",{src:r,alt:e,width:a,height:a,style:{width:a,height:a,borderRadius:d,objectFit:"cover",display:"block"}}):(0,l.jsx)("span",{style:{width:a,height:a,borderRadius:d,background:s,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*a),fontWeight:700},children:(e[0]||"?").toUpperCase()}),c&&(0,l.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:t,height:t,borderRadius:"50%",background:"alive"===c?"var(--sx-string)":"stale"===c?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}},4996:(e,s,a)=>{"use strict";a.d(s,{Dashboard:()=>P});var l=a(5076),n=a(8488),c=a(3283),i=a.n(c),t=a(8576),d=a(4552),r=a(891),o=a(3728);let h=["var(--sx-property)","var(--sx-type)","var(--sx-function)","var(--sx-number)","var(--sx-string)","var(--sx-operator)","var(--sx-keyword)","var(--accent)"];function x({value:e,max:s=100,size:a=64,thickness:n=7,color:c,track:i="var(--bg-active)",center:t,sub:d,className:r}){let o=(a-n)/2,h=a/2,m=2*Math.PI*o,u=s>0?Math.min(1,Math.max(0,e/s)):0,v=c??(u>=.85?"var(--sx-keyword)":u>=.6?"var(--sx-number)":"var(--sx-string)");return(0,l.jsxs)("div",{className:"donut-wrap"+(r?" "+r:""),style:{width:a,height:a},children:[(0,l.jsxs)("svg",{width:a,height:a,viewBox:`0 0 ${a} ${a}`,children:[(0,l.jsx)("circle",{cx:h,cy:h,r:o,fill:"none",stroke:i,strokeWidth:n}),(0,l.jsx)("circle",{cx:h,cy:h,r:o,fill:"none",stroke:v,strokeWidth:n,strokeLinecap:"round",strokeDasharray:`${u*m} ${m}`,transform:`rotate(-90 ${h} ${h})`,className:"donut-arc"})]}),(0,l.jsxs)("div",{className:"donut-center",children:[(0,l.jsx)("div",{className:"donut-num",style:{color:v,fontSize:Math.round(.26*a)},children:t??Math.round(100*u)+"%"}),d&&(0,l.jsx)("div",{className:"donut-sub",children:d})]})]})}function m({segments:e,size:s=96,thickness:a=12,center:n,sub:c,className:i}){let t=(s-a)/2,d=s/2,r=2*Math.PI*t,o=e.reduce((e,s)=>e+s.value,0)||1,h=0,x=e.filter(e=>e.value>0).map((e,s)=>{let n=e.value/o*r,c=(0,l.jsx)("circle",{cx:d,cy:d,r:t,fill:"none",stroke:e.color,strokeWidth:a,strokeDasharray:`${n} ${r-n}`,strokeDashoffset:-h,transform:`rotate(-90 ${d} ${d})`,className:"donut-arc"},s);return h+=n,c});return(0,l.jsxs)("div",{className:"donut-wrap"+(i?" "+i:""),style:{width:s,height:s},children:[(0,l.jsxs)("svg",{width:s,height:s,viewBox:`0 0 ${s} ${s}`,children:[(0,l.jsx)("circle",{cx:d,cy:d,r:t,fill:"none",stroke:"var(--bg-active)",strokeWidth:a}),x]}),(n||c)&&(0,l.jsxs)("div",{className:"donut-center",children:[n&&(0,l.jsx)("div",{className:"donut-num",style:{fontSize:Math.round(.2*s)},children:n}),c&&(0,l.jsx)("div",{className:"donut-sub",children:c})]})]})}function u({data:e,color:s="var(--accent)",width:a=120,height:n=34,fill:c=!0,className:i}){let t=0===e.length?[0,0]:1===e.length?[e[0],e[0]]:e,d=t.length,r=Math.max(...t),o=Math.min(...t),h=r-o||1,x=(a-4)/(d-1),m="M"+t.map((e,s)=>`${(2+s*x).toFixed(1)},${(n-2-(e-o)/h*(n-4)).toFixed(1)}`).join(" L"),v=`${m} L${(2+(d-1)*x).toFixed(1)},${n-2} L2,${n-2} Z`;return(0,l.jsxs)("svg",{className:"spark"+(i?" "+i:""),width:a,height:n,viewBox:`0 0 ${a} ${n}`,preserveAspectRatio:"none",children:[c&&(0,l.jsx)("path",{d:v,fill:s,opacity:.12}),(0,l.jsx)("path",{d:m,fill:"none",stroke:s,strokeWidth:1.6,strokeLinejoin:"round",strokeLinecap:"round"})]})}function v({segments:e,height:s=10,rounded:a=!0,className:n}){let c=e.reduce((e,s)=>e+s.value,0);return(0,l.jsx)("div",{className:"segbar"+(n?" "+n:""),style:{height:s,borderRadius:a?s:4},children:0===c?(0,l.jsx)("span",{className:"segbar-empty"}):e.filter(e=>e.value>0).map((e,s)=>(0,l.jsx)("span",{className:"segbar-seg",style:{width:`${e.value/c*100}%`,background:e.color},title:e.label},s))})}function p({pct:e,color:s="var(--accent)",height:a=8,className:n}){return(0,l.jsx)("div",{className:"pbar"+(n?" "+n:""),style:{height:a},children:(0,l.jsx)("span",{style:{width:Math.min(100,Math.max(0,e))+"%",background:s}})})}var g=a(5629),j=a(7814);let b=(0,j.createServerReference)("40f0bf4c63e3e37227bb708b6533c31f49f1ab4675",j.callServer,void 0,j.findSourceMapURL,"getDashboardSnapshot"),k=(0,j.createServerReference)("0055646df1c032c2012031cc77e02bcdd09e81a194",j.callServer,void 0,j.findSourceMapURL,"startDevServer"),N=(0,j.createServerReference)("40c64d66994467969ec5b9d96b2c94cd31268a38a7",j.callServer,void 0,j.findSourceMapURL,"releaseStaleLock");var f=a(4419),y=a(6184),w=a(9365),I=a(9102);let z=[{id:"today",key:"dash.filter.today"},{id:"7d",key:"dash.filter.7d"},{id:"30d",key:"dash.filter.30d"},{id:"month",key:"dash.filter.month"}],S={"start-dev":"dash.act.start",reindex:"dash.act.reindex","start-loop":"dash.act.start",open:"dash.act.open",configure:"dash.act.configure",reconnect:"dash.act.reconnect"},M={triage:"var(--text-faint)",todo:"var(--sx-property)",doing:"var(--sx-number)",blocked:"var(--sx-keyword)",review:"var(--sx-function)",done:"var(--sx-string)"},C={devServer:"cpu",production:"goto",agentLoop:"play",kb:"knowledge",storage:"files",models:"cpu",github:"goto",telegram:"send",testDev:"check",queues:"files",locks:"files",update:"refresh"},L={github:"goto",telegram:"send",models:"cpu",cli:"terminal",local:"cpu",update:"refresh"};function $(e){return"$"+e.toFixed(2)}function _(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function R(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"}function P({initial:e,runMode:s}){let a=(0,g.k)(),[c,j]=(0,n.useState)(e),[D,A]=(0,n.useState)({range:e.range,goalId:"",agentId:""}),E=(0,n.useRef)(D),[B,F]=(0,n.useState)(""),[,T]=(0,n.useTransition)(),[,O]=(0,n.useState)(0),W=(0,n.useCallback)(async()=>{let e=E.current;try{let s=await b({range:e.range,goalId:e.goalId||null,agentId:e.agentId||null});j(s)}catch{}},[]);function U(e){A(e),E.current=e,T(()=>{W()})}function q(e,s){F(e),T(async()=>{try{await s()}catch{}await W(),F("")})}(0,n.useEffect)(()=>{let e=setInterval(()=>{document.hidden||W()},1e4),s=setInterval(()=>{document.hidden||O(e=>e+1)},5e3);return()=>{clearInterval(e),clearInterval(s)}},[W]);let G=c.cards,K=c.tasksByCol.reduce((e,s)=>e+s.count,0),V=G.spend.trendPct,H=G.spend.cap>0?Math.min(100,G.spend.spent/G.spend.cap*100):0,J=Math.min(100,15*G.security.high+6*G.security.med+2*G.security.low),Q=G.security.high?"var(--sx-keyword)":G.security.open?"var(--sx-number)":"var(--sx-string)",X=[{value:G.agents.idle,color:"var(--text-faint)",label:a("dash.ag.idle")},{value:G.agents.working,color:"var(--sx-string)",label:a("dash.ag.working")},{value:G.agents.review,color:"var(--sx-number)",label:a("dash.ag.review")},{value:G.agents.blocked,color:"var(--sx-keyword)",label:a("dash.ag.blocked")}],Y=[{value:G.goals.active,color:"var(--accent)"},{value:G.goals.done,color:"var(--sx-string)"},{value:G.goals.blocked,color:"var(--sx-keyword)"}],Z=[{value:G.security.high,color:"var(--sx-keyword)"},{value:G.security.med,color:"var(--sx-number)"},{value:G.security.low,color:"var(--sx-property)"}],ee=c.kbByType.length>0,es=ee?c.kbByType.map((e,s)=>({value:e.total,color:h[s%h.length],label:e.type})):[{value:c.kb.embeddings,color:"var(--sx-string)",label:a("dash.kb.embeddings")},{value:Math.max(0,c.kb.chunks-c.kb.embeddings),color:"var(--bg-active)",label:a("dash.kb.chunks")}],ea=ee?c.kb.active:c.kb.chunks,el=ee?a("dash.kb.entries"):a("dash.kb.chunks");return(0,l.jsxs)("div",{className:"dash",children:[(0,l.jsxs)("div",{className:"dash-filters",children:[(0,l.jsx)("div",{className:"df-ranges",children:z.map(e=>(0,l.jsx)("button",{className:"df-chip"+(D.range===e.id?" on":""),onClick:()=>U({...D,range:e.id}),children:a(e.key)},e.id))}),(0,l.jsxs)("div",{className:"df-selects",children:[(0,l.jsx)(o.m,{value:D.goalId,onChange:e=>U({...D,goalId:e}),options:[{value:"",label:a("dash.filter.allGoals")},...c.goalOptions.map(e=>({value:e.id,label:e.title}))]}),(0,l.jsx)(o.m,{value:D.agentId,onChange:e=>U({...D,agentId:e}),options:[{value:"",label:a("dash.filter.allAgents")},...c.agents.map(e=>({value:e.id,label:e.name}))]})]}),(0,l.jsxs)("div",{className:"df-meta",children:[(0,l.jsxs)("span",{className:"df-updated",children:[a("dash.updated")," ",R(c.generatedAt)]}),(0,l.jsx)("button",{className:"df-refresh",disabled:!!B,onClick:()=>q("refresh",W),title:a("dash.refresh"),children:(0,l.jsx)(t.I,{name:"refresh",size:13})})]})]}),(0,l.jsxs)("div",{className:"dash-grid",children:[(0,l.jsxs)("div",{className:"dash-card stat-card",style:{gridColumn:"span 3"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"agents",size:14})," ",a("dash.agents")]}),(0,l.jsxs)("div",{className:"sc-body",children:[(0,l.jsxs)("div",{className:"sc-left",children:[(0,l.jsxs)("div",{className:"stat-num",children:[G.agents.activeNow,(0,l.jsxs)("span",{className:"stat-of",children:["/",G.agents.total]})]}),(0,l.jsx)("div",{className:"kpi-sub",children:a("dash.activeNow")})]}),(0,l.jsx)(x,{value:G.agents.activeNow,max:Math.max(1,G.agents.total),size:56,thickness:6,color:"var(--sx-string)",center:String(G.agents.activeNow)})]}),(0,l.jsx)(v,{segments:X,className:"sc-seg"}),(0,l.jsxs)("div",{className:"stat-chips",children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-string)"}}),G.agents.working," ",a("dash.ag.working")]}),(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-number)"}}),G.agents.review," ",a("dash.ag.review")]}),(0,l.jsxs)("span",{className:G.agents.blocked?"bad":"",children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-keyword)"}}),G.agents.blocked," ",a("dash.ag.blocked")]})]}),(0,l.jsxs)("div",{className:"sc-foot",children:[(0,l.jsx)(t.I,{name:"pulse",size:11})," ",a("dash.ag.heartbeat")," ",R(G.agents.lastHeartbeat)]})]}),(0,l.jsxs)("div",{className:"dash-card stat-card",style:{gridColumn:"span 3"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"coins",size:14})," ",a("dash.spend")]}),(0,l.jsxs)("div",{className:"sc-body",children:[(0,l.jsxs)("div",{className:"sc-left",children:[(0,l.jsx)("div",{className:"stat-num",children:$(G.spend.spent)}),(0,l.jsx)("div",{className:"kpi-sub",children:G.spend.cap?`${Math.round(H)}% ${a("dash.ofCapShort",{cap:G.spend.cap})}`:`${_(G.spend.tokens)} ${a("dash.tokens")}`})]}),(0,l.jsx)(u,{data:c.spendSeries,color:"var(--accent)",width:104,height:42})]}),(0,l.jsx)(p,{pct:H,color:H>=85?"var(--sx-keyword)":H>=60?"var(--sx-number)":"var(--sx-string)",className:"sc-seg"}),(0,l.jsxs)("div",{className:"stat-chips",children:[(0,l.jsxs)("span",{className:"trend "+(V>0?"up":V<0?"down":""),children:[(0,l.jsx)(t.I,{name:V>0?"arrowUp":V<0?"arrowDown":"dot",size:11})," ",Math.abs(V),"%"]}),(0,l.jsx)("span",{children:a("dash.vsPrev")}),(0,l.jsxs)("span",{style:{marginLeft:"auto"},children:[_(G.spend.tokens)," ",a("dash.tokens")]})]})]}),(0,l.jsxs)("div",{className:"dash-card stat-card",style:{gridColumn:"span 3"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"shield",size:14})," ",a("mod.security")]}),(0,l.jsxs)("div",{className:"sc-body",children:[(0,l.jsxs)("div",{className:"sc-left",children:[(0,l.jsx)("div",{className:"stat-num",style:{color:Q},children:G.security.score}),(0,l.jsx)("div",{className:"kpi-sub",children:a("dash.openFindings",{n:G.security.open})})]}),(0,l.jsx)(x,{value:J,max:100,size:56,thickness:6,color:Q,center:String(G.security.open),sub:a("dash.openShort")})]}),(0,l.jsx)(v,{segments:Z,className:"sc-seg"}),(0,l.jsxs)("div",{className:"stat-chips",children:[(0,l.jsxs)("span",{className:G.security.high?"bad":"",children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-keyword)"}}),G.security.high," ",a("dash.sev.high")]}),(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-number)"}}),G.security.med," ",a("dash.sev.med")]}),(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-property)"}}),G.security.low," ",a("dash.sev.low")]})]}),(0,l.jsxs)("div",{className:"sc-foot",children:[(0,l.jsx)(t.I,{name:"refresh",size:11})," ",a("dash.lastScan")," ",R(G.security.lastScan)]})]}),(0,l.jsxs)("div",{className:"dash-card stat-card",style:{gridColumn:"span 3"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"target",size:14})," ",a("mod.goals")]}),(0,l.jsxs)("div",{className:"sc-body",children:[(0,l.jsxs)("div",{className:"sc-left",children:[(0,l.jsxs)("div",{className:"stat-num",children:[G.goals.avgProgress,(0,l.jsx)("span",{className:"stat-of",children:"%"})]}),(0,l.jsx)("div",{className:"kpi-sub",children:a("dash.avgActive",{n:G.goals.active})})]}),(0,l.jsx)(x,{value:G.goals.avgProgress,max:100,size:56,thickness:6,color:"var(--accent)"})]}),(0,l.jsx)(v,{segments:Y,className:"sc-seg"}),(0,l.jsxs)("div",{className:"stat-chips",children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--accent)"}}),G.goals.active," ",a("dash.go.active")]}),(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-string)"}}),G.goals.done," ",a("dash.go.done")]}),(0,l.jsxs)("span",{className:G.goals.blocked?"bad":"",children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-keyword)"}}),G.goals.blocked," ",a("dash.go.blocked")]})]})]})]}),(0,l.jsxs)("div",{className:"dash-card",children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"pulse",size:14})," ",a("dash.healthTitle")]}),(0,l.jsx)("div",{className:"hcard-grid",children:c.health.map(e=>(0,l.jsxs)("div",{className:"hcard",children:[(0,l.jsxs)("div",{className:"hc-top",children:[(0,l.jsx)("span",{className:"hc-ic",children:(0,l.jsx)(t.I,{name:C[e.key]??"dot",size:14})}),(0,l.jsx)("span",{className:"hc-name",children:a("dash.health."+e.key)}),(0,l.jsx)("span",{className:"hdot "+e.status,style:{marginLeft:"auto"}})]}),(0,l.jsx)("div",{className:"hc-detail",children:e.detail}),(0,l.jsxs)("div",{className:"hc-foot",children:[(0,l.jsx)("span",{className:"hc-badge "+e.status,children:a("dash.hstatus."+e.status)}),"start-dev"===e.action||"reindex"===e.action||"start-loop"===e.action?(0,l.jsx)("button",{className:"hi-act",disabled:!!B,onClick:()=>"start-dev"===e.action?q("h-"+e.key,k):"reindex"===e.action?q("h-"+e.key,y.f):"start-loop"===e.action?q("h-"+e.key,()=>(0,f.D)("start")):void 0,children:B==="h-"+e.key?"…":a(S[e.action])}):e.href?(0,l.jsx)(i(),{className:"hi-act",href:e.href,children:a(S[e.action??"open"]??"dash.act.open")}):null]})]},e.key))})]}),(0,l.jsxs)("div",{className:"dash-grid",children:[(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 7"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"play",size:14})," ",a("dash.execTitle")]}),c.execution&&"running"===c.execution.runState?(0,l.jsxs)("div",{className:"exec-panel",children:[(0,l.jsxs)("div",{className:"exec-head",children:[(0,l.jsx)("span",{className:"dotpulse"}),(0,l.jsx)("span",{className:"exec-goal",children:c.execution.goalTitle??c.execution.issueTitle??"—"}),c.execution.agentName&&(0,l.jsx)("span",{className:"exec-agent",children:c.execution.agentName}),(0,l.jsx)("span",{className:"exec-elapsed mono",children:c.execution.elapsedMs?R(Date.now()-c.execution.elapsedMs):""})]}),(0,l.jsxs)("div",{className:"exec-grid",children:[(0,l.jsxs)("div",{className:"exec-row",children:[(0,l.jsx)("span",{className:"ex-k",children:a("dash.exec.issue")}),(0,l.jsx)("span",{className:"ex-v",children:c.execution.issueTitle??"—"})]}),(0,l.jsxs)("div",{className:"exec-row",children:[(0,l.jsx)("span",{className:"ex-k",children:a("dash.exec.next")}),(0,l.jsx)("span",{className:"ex-v",children:c.execution.nextStep??"—"})]}),(0,l.jsxs)("div",{className:"exec-row",children:[(0,l.jsx)("span",{className:"ex-k",children:a("dash.exec.review")}),(0,l.jsx)("span",{className:"ex-v",children:c.execution.reviewOpen??0})]}),(0,l.jsxs)("div",{className:"exec-row",children:[(0,l.jsx)("span",{className:"ex-k",children:a("dash.exec.tests")}),(0,l.jsx)("span",{className:"ex-v",children:c.execution.testStatus?a("dash.test."+c.execution.testStatus):"—"})]}),(0,l.jsxs)("div",{className:"exec-row",children:[(0,l.jsx)("span",{className:"ex-k",children:a("dash.exec.locks")}),(0,l.jsx)("span",{className:"ex-v",children:c.execution.lockedFiles??0})]})]})]}):(0,l.jsxs)("div",{className:"exec-blank",children:[(0,l.jsx)("span",{className:"exec-blank-ic",children:(0,l.jsx)(t.I,{name:"play",size:22})}),(0,l.jsx)("div",{className:"exec-blank-t",children:a("dash.exec.none."+(c.execution?.runState??"idle"))}),(0,l.jsxs)("div",{className:"exec-cta",children:[(0,l.jsxs)(i(),{className:"btn-accent",href:"/planner",children:[(0,l.jsx)(t.I,{name:"target",size:13})," ",a("dash.exec.planner")]}),(0,l.jsxs)("button",{className:"btn-ghost",disabled:!!B,onClick:()=>q("loop",()=>(0,f.D)("off"===s?"start":"off")),children:[(0,l.jsx)(t.I,{name:"play",size:13})," ","off"===s?a("dash.exec.startLoop"):a("dash.exec.pauseLoop")]}),(0,l.jsxs)(i(),{className:"btn-ghost",href:"/inbox",children:[(0,l.jsx)(t.I,{name:"bell",size:13})," ",a("dash.exec.pending")]})]})]})]}),(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 5"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"files",size:14})," ",a("dash.tasksByStatus")]}),(0,l.jsx)(v,{segments:c.tasksByCol.map(e=>({value:e.count,color:M[e.col]})),height:12,className:"tasks-seg"}),(0,l.jsx)("div",{className:"tasks-rows",children:c.tasksByCol.map(e=>{let s=K?Math.round(e.count/K*100):0;return(0,l.jsxs)(i(),{href:"/tasks",className:"taskrow",children:[(0,l.jsx)("span",{className:"tr-dot",style:{background:M[e.col]}}),(0,l.jsx)("span",{className:"tr-name",children:a("dash.col."+e.col)}),(0,l.jsx)("span",{className:"tr-track",children:(0,l.jsx)("span",{className:"tr-fill",style:{width:s+"%",background:M[e.col]}})}),(0,l.jsxs)("span",{className:"tr-val",children:[e.count,(0,l.jsxs)("span",{className:"tr-pct",children:[" ",s,"%"]})]})]},e.col)})})]})]}),(0,l.jsxs)("div",{className:"dash-grid",children:[(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 7"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"bot",size:14})," ",a("dash.activeAgents")]}),0===c.agents.length?(0,l.jsxs)("div",{className:"exec-blank",children:[(0,l.jsx)("span",{className:"exec-blank-ic",children:(0,l.jsx)(t.I,{name:"bot",size:22})}),(0,l.jsx)("div",{className:"exec-blank-t",children:a("dash.noActive")}),(0,l.jsxs)("div",{className:"exec-cta",children:[(0,l.jsxs)("button",{className:"btn-accent",disabled:!!B,onClick:()=>q("loop",()=>(0,f.D)("start")),children:[(0,l.jsx)(t.I,{name:"play",size:13})," ",a("dash.exec.startLoop")]}),(0,l.jsxs)(i(),{className:"btn-ghost",href:"/agents/ada",children:[(0,l.jsx)(t.I,{name:"agents",size:13})," ",a("dash.openStudio")]}),(0,l.jsxs)(i(),{className:"btn-ghost",href:"/config",children:[(0,l.jsx)(t.I,{name:"settings",size:13})," ",a("dash.runConfig")]})]})]}):(0,l.jsx)("div",{className:"agent-grid",children:c.agents.map(e=>{let s=c.costByAgent[e.id]??0;return(0,l.jsxs)("div",{className:"agent-card",children:[(0,l.jsx)(d.e,{name:e.name,color:e.color,size:32,health:e.health}),(0,l.jsxs)("div",{className:"ac-main",children:[(0,l.jsxs)("div",{className:"ac-top",children:[(0,l.jsx)("span",{className:"ac-name",children:e.name}),(0,l.jsx)(r.m,{status:e.status})]}),(0,l.jsxs)("div",{className:"ac-meta",children:[(0,l.jsx)("span",{className:"ac-model mono",children:e.model}),s>0&&(0,l.jsx)("span",{className:"ac-cost",children:$(s)})]}),(0,l.jsx)("div",{className:"ac-task",children:e.taskTitle??a("dash.ag."+e.status)}),(0,l.jsxs)("div",{className:"ac-hb",children:[(0,l.jsx)(t.I,{name:"pulse",size:10})," ",R(e.lastPulseMs)]})]})]},e.id)})})]}),(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 5"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"bell",size:14})," ",a("dash.alerts")]}),0===c.alerts.length?(0,l.jsx)("div",{className:"home-empty",children:a("dash.nothingNeedsYou")}):c.alerts.map(e=>(0,l.jsxs)(i(),{href:"/inbox",className:"alert-group",children:[(0,l.jsx)("span",{className:"ag-badge p"+e.priority,children:e.count}),(0,l.jsxs)("span",{className:"ag-text",children:[a("dash.alert."+e.kind),e.agentName?` \xb7 ${e.agentName}`:""]}),(0,l.jsx)("span",{className:"ag-time",children:R(e.latestAtMs)})]},e.key))]})]}),c.problems.length>0&&(0,l.jsxs)("div",{className:"dash-card",children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"warn",size:14})," ",a("dash.problemsTitle")]}),c.problems.map(e=>(0,l.jsxs)("div",{className:"problem-row",children:[(0,l.jsx)("span",{className:"prob-sev "+e.severity,children:a("dash.sev."+e.severity)}),(0,l.jsxs)("div",{className:"pr-main",children:[(0,l.jsx)("div",{className:"pr-title",children:a(e.title)}),(0,l.jsx)("div",{className:"pr-impact",children:a(e.impact)})]}),(0,l.jsx)(i(),{className:"hi-act",href:e.href,children:a(S[e.action]??"dash.act.open")})]},e.key))]}),(0,l.jsxs)("div",{className:"dash-grid",children:[(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 7"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"knowledge",size:14})," ",a("dash.kbTitle")]}),0===c.kb.chunks?(0,l.jsxs)("div",{className:"exec-blank",children:[(0,l.jsx)("span",{className:"exec-blank-ic",children:(0,l.jsx)(t.I,{name:"knowledge",size:22})}),(0,l.jsx)("div",{className:"exec-blank-t",children:a("dash.kb.empty")}),(0,l.jsxs)("div",{className:"exec-cta",children:[(0,l.jsxs)("button",{className:"btn-accent",disabled:!!B,onClick:()=>q("kb-seed",I.V),children:[(0,l.jsx)(t.I,{name:"add",size:13})," ",a("dash.kb.createBlocks")]}),(0,l.jsxs)(i(),{className:"btn-ghost",href:"/knowledge",children:[(0,l.jsx)(t.I,{name:"knowledge",size:13})," ",a("dash.kb.open")]})]})]}):(0,l.jsxs)("div",{className:"kb-body",children:[(0,l.jsxs)("div",{className:"kb-donut",children:[(0,l.jsx)(m,{segments:es,size:104,thickness:13,center:String(ea),sub:el}),(0,l.jsx)("div",{className:"kb-legend",children:ee?c.kbByType.slice(0,6).map((e,s)=>(0,l.jsxs)("span",{className:"kb-leg",children:[(0,l.jsx)("i",{className:"dotc",style:{background:h[s%h.length]}}),e.type," ",(0,l.jsx)("b",{children:e.total})]},e.type)):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("span",{className:"kb-leg",children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-string)"}}),a("dash.kb.embeddings")," ",(0,l.jsx)("b",{children:c.kb.embeddings})]}),(0,l.jsxs)("span",{className:"kb-leg",children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--bg-active)"}}),a("dash.kb.chunks")," ",(0,l.jsx)("b",{children:c.kb.chunks})]})]})})]}),(0,l.jsxs)("div",{className:"kb-right",children:[(0,l.jsxs)("div",{className:"kb-tiles",children:[(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v",children:c.kb.chunks}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.chunks")})]}),(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v",children:c.kb.embeddings}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.embeddings")})]}),(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v",children:c.kb.recentQueries}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.queries")})]}),(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v"+(c.kb.gaps?" warn":""),children:c.kb.gaps}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.gaps")})]}),(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v",children:R(c.kb.lastReindexMs)}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.lastReindex")})]}),(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v"+(c.kb.semantic?"":" warn"),children:c.kb.semantic?"●":"○"}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.semantic")})]})]}),(0,l.jsxs)("div",{className:"exec-cta",children:[(0,l.jsxs)(i(),{className:"btn-ghost",href:"/knowledge",children:[(0,l.jsx)(t.I,{name:"knowledge",size:13})," ",a("dash.kb.open")]}),(0,l.jsxs)("button",{className:"btn-ghost",disabled:!!B,onClick:()=>q("kb-reindex",y.f),children:[(0,l.jsx)(t.I,{name:"refresh",size:13})," ",a("dash.kb.reindex")]}),(0,l.jsxs)("button",{className:"btn-ghost",disabled:!!B,onClick:()=>q("kb-curate",w.O),children:[(0,l.jsx)(t.I,{name:"skill",size:13})," ",a("dash.kb.curate")]})]})]})]})]}),(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 5"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"ext",size:14})," ",a("dash.integTitle")]}),(0,l.jsx)("div",{className:"integ-grid",children:c.integrations.map(e=>(0,l.jsxs)("div",{className:"integ-card",children:[(0,l.jsx)("span",{className:"ic-ic",children:(0,l.jsx)(t.I,{name:L[e.key]??"ext",size:14})}),(0,l.jsxs)("div",{className:"ic-main",children:[(0,l.jsx)("div",{className:"ic-name",children:a("dash.integ."+e.key)}),(0,l.jsx)("div",{className:"ic-detail",children:e.detail})]}),(0,l.jsx)("span",{className:"integ-chip "+e.status,children:a("dash.integStatus."+e.status)})]},e.key))})]})]}),c.locks.length>0&&(0,l.jsxs)("div",{className:"dash-card",children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"files",size:14})," ",a("dash.locksTitle")]}),c.locks.map(e=>(0,l.jsxs)("div",{className:"lock-row",children:[(0,l.jsx)(t.I,{name:"files",size:13}),(0,l.jsx)("span",{className:"lk-path mono",children:e.path}),(0,l.jsxs)("span",{className:"lk-by",children:["@",e.agentHandle]}),(0,l.jsx)("button",{className:"hi-act",disabled:!!B,onClick:()=>q("lock-"+e.path,()=>N(e.path)),children:a("dash.locks.release")})]},e.path))]})]})}},6184:(e,s,a)=>{"use strict";a.d(s,{f:()=>n});var l=a(7814);let n=(0,l.createServerReference)("001d11e1ddfafcf521054a33afdc0087b8fc02ca5e",l.callServer,void 0,l.findSourceMapURL,"reindexKbAction")},7327:(e,s,a)=>{Promise.resolve().then(a.t.bind(a,3283,23)),Promise.resolve().then(a.bind(a,4996)),Promise.resolve().then(a.bind(a,6425)),Promise.resolve().then(a.bind(a,6588)),Promise.resolve().then(a.bind(a,4414)),Promise.resolve().then(a.bind(a,4268)),Promise.resolve().then(a.bind(a,4942)),Promise.resolve().then(a.bind(a,2444)),Promise.resolve().then(a.bind(a,5787))},9102:(e,s,a)=>{"use strict";a.d(s,{V:()=>n});var l=a(7814);let n=(0,l.createServerReference)("0006e9a4090ba43efa59bbc52b604c68dda554a774",l.callServer,void 0,l.findSourceMapURL,"seedDefaultBlocksAction")},9265:(e,s,a)=>{"use strict";a.d(s,{W:()=>t});var l=a(5076),n=a(8488);let c={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"},i={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 t({id:e,size:s=34,radius:a}){let d,r=i[e],o=r?r[0]:"#5b6378",h=r?r[1]:(e||"?").slice(0,2).replace(/[^a-z0-9]/gi,"").toUpperCase(),x=(d=c[e])?`https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg/icons/${d}.svg`:null,[m,u]=(0,n.useState)(!1),v=null!=a?a:Math.round(.28*s),p=x&&!m,g=Math.round(.66*s);return(0,l.jsx)("span",{className:"prov-glyph",style:{width:s,height:s,flex:"0 0 "+s+"px",borderRadius:v,background:p?"#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:p?"inset 0 0 0 1px rgba(0,0,0,.08)":"inset 0 1px 0 rgba(255,255,255,.18)"},children:p?(0,l.jsx)("img",{src:x,alt:"",width:g,height:g,loading:"lazy",onError:()=>u(!0),style:{width:g,height:g,objectFit:"contain",display:"block"}}):h})}},9365:(e,s,a)=>{"use strict";a.d(s,{O:()=>n});var l=a(7814);let n=(0,l.createServerReference)("00fee93e284b9d3ce4673d4b35a90469df57457050",l.callServer,void 0,l.findSourceMapURL,"curateKbAction")}},e=>{e.O(0,[9219,3219,5332,8370,6646,6834,7358],()=>e(e.s=7327)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1387],{404:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,3283,23)),Promise.resolve().then(n.bind(n,6386)),Promise.resolve().then(n.bind(n,6425)),Promise.resolve().then(n.bind(n,6588)),Promise.resolve().then(n.bind(n,4414)),Promise.resolve().then(n.bind(n,4268)),Promise.resolve().then(n.bind(n,4942)),Promise.resolve().then(n.bind(n,2444)),Promise.resolve().then(n.bind(n,5787))},6386:(e,s,n)=>{"use strict";n.d(s,{DocEditor:()=>m});var t=n(5076),i=n(8488),a=n(4302),o=n(5393),r=n(8576),l=n(7814);let c=(0,l.createServerReference)("605fb9579c5e59345b326dd2f38a16e32a052fa418",l.callServer,void 0,l.findSourceMapURL,"saveDoc");var d=n(5629);function m({docId:e,path:s,initial:n}){let l=(0,d.k)(),[h,v]=(0,i.useState)(!1),[b,u]=(0,i.useState)(n),[x,j]=(0,i.useTransition)();return(0,t.jsxs)("div",{className:"card",style:{maxWidth:880},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{className:"btn-accent",disabled:x,onClick:()=>j(async()=>{await c(e,b),v(!1)}),children:[(0,t.jsx)(r.I,{name:"check",size:13})," ",l(x?"common.saving":"docsedit.saveMd")]}),(0,t.jsx)("button",{className:"btn-ghost",onClick:()=>{u(n),v(!1)},children:l("common.cancel")})]}):(0,t.jsxs)("button",{className:"btn-ghost",onClick:()=>v(!0),children:[(0,t.jsx)(r.I,{name:"command",size:13})," ",l("common.edit")]}),(0,t.jsx)("span",{className:"mono",style:{marginLeft:"auto",fontSize:11,color:"var(--text-faint)"},children:s})]}),h?(0,t.jsx)("textarea",{className:"persona-ta mono",style:{minHeight:460,width:"100%"},value:b,onChange:e=>u(e.target.value)}):(0,t.jsx)("div",{className:"md",children:b.trim()?(0,t.jsx)(a.oz,{remarkPlugins:[o.A],children:b}):(0,t.jsx)("div",{className:"muted",children:l("docsedit.emptyFile")})})]})}}},e=>{e.O(0,[9219,9690,3219,5332,8370,6646,6834,7358],()=>e(e.s=404)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1059],{3438:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,3283,23)),Promise.resolve().then(n.bind(n,6508)),Promise.resolve().then(n.bind(n,6425)),Promise.resolve().then(n.bind(n,6588)),Promise.resolve().then(n.bind(n,4414)),Promise.resolve().then(n.bind(n,4268)),Promise.resolve().then(n.bind(n,4942)),Promise.resolve().then(n.bind(n,2444)),Promise.resolve().then(n.bind(n,5787))},6508:(e,s,n)=>{"use strict";n.d(s,{GenerateDocsButton:()=>l});var r=n(5076),i=n(8488),o=n(9860),t=n(8576),c=n(7814);let a=(0,c.createServerReference)("00a69b5ea7cdee80358280f82ffd15ec5dcdf06951",c.callServer,void 0,c.findSourceMapURL,"generateDocs");var d=n(5629);function l(){let e=(0,d.k)(),[s,n]=(0,i.useTransition)(),c=(0,o.useRouter)();return(0,r.jsxs)("button",{className:"btn-accent",disabled:s,onClick:()=>n(async()=>{await a(),c.refresh()}),children:[(0,r.jsx)(t.I,{name:"doc",size:14,className:s?"sync-spin":""})," ",e(s?"docs.writing":"docs.generate")]})}}},e=>{e.O(0,[9219,3219,5332,8370,6646,6834,7358],()=>e(e.s=3438)),_N_E=e.O()}]);
|