hive-am 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -1
- package/package.json +1 -1
- package/server/dist/context.js +62 -0
- package/server/dist/db/migrations.js +7 -0
- package/server/dist/db.js +4 -4
- package/server/dist/history/claude.js +8 -2
- package/server/dist/http/routes/agents.js +1 -1
- package/server/dist/http/validate.js +2 -0
- package/server/dist/instructions.js +4 -0
- package/server/dist/models.js +2 -0
- package/server/dist/providers/claude.js +13 -1
- package/server/dist/providers/opencode-server.js +59 -0
- package/server/dist/providers/opencode.js +4 -1
- package/server/dist/stats.js +15 -3
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-build-manifest.json +70 -70
- package/web/.next/app-path-routes-manifest.json +7 -7
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +49 -49
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/server/app/_not-found.rsc +3 -3
- package/web/.next/server/app/agents/[id]/page.js +3 -3
- package/web/.next/server/app/agents/[id]/page.js.nft.json +1 -1
- package/web/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/agents/page.js +1 -1
- package/web/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/agents.html +1 -1
- package/web/.next/server/app/agents.rsc +4 -4
- package/web/.next/server/app/connections/page.js +1 -1
- package/web/.next/server/app/connections/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/connections.html +1 -1
- package/web/.next/server/app/connections.rsc +4 -4
- package/web/.next/server/app/index.html +1 -1
- package/web/.next/server/app/index.rsc +4 -4
- package/web/.next/server/app/page.js +1 -1
- package/web/.next/server/app/page.js.nft.json +1 -1
- package/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/relations/page.js +1 -1
- package/web/.next/server/app/relations/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/relations.html +1 -1
- package/web/.next/server/app/relations.rsc +4 -4
- package/web/.next/server/app/resources/[id]/page.js +1 -1
- package/web/.next/server/app/resources/[id]/page.js.nft.json +1 -1
- package/web/.next/server/app/resources/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/resources/page.js +1 -1
- package/web/.next/server/app/resources/page.js.nft.json +1 -1
- package/web/.next/server/app/resources/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/resources.html +1 -1
- package/web/.next/server/app/resources.rsc +4 -4
- package/web/.next/server/app/schedules/page.js +1 -1
- package/web/.next/server/app/schedules/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/schedules.html +1 -1
- package/web/.next/server/app/schedules.rsc +4 -4
- package/web/.next/server/app/sessions/page.js +1 -1
- package/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/sessions.html +1 -1
- package/web/.next/server/app/sessions.rsc +4 -4
- package/web/.next/server/app/skills/page.js +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills.html +1 -1
- package/web/.next/server/app/skills.rsc +4 -4
- package/web/.next/server/app/types/page.js +1 -1
- package/web/.next/server/app/types/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/types.html +1 -1
- package/web/.next/server/app/types.rsc +4 -4
- package/web/.next/server/app-paths-manifest.json +7 -7
- package/web/.next/server/chunks/143.js +1 -1
- package/web/.next/server/chunks/274.js +1 -1
- package/web/.next/server/chunks/306.js +1 -1
- package/web/.next/server/chunks/451.js +1 -0
- package/web/.next/server/chunks/505.js +1 -1
- package/web/.next/server/chunks/612.js +1 -1
- package/web/.next/server/chunks/716.js +2 -2
- package/web/.next/server/pages/404.html +1 -1
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/static/chunks/281-d8a0dcfaa6d064e4.js +1 -0
- package/web/.next/static/chunks/{291-efae53ea5f7ee92d.js → 291-23f314877fa39054.js} +1 -1
- package/web/.next/static/chunks/304-681348099f874a30.js +1 -0
- package/web/.next/static/chunks/350-0fe82e622e7a670f.js +1 -0
- package/web/.next/static/chunks/{491-6b4e6201f5110dff.js → 491-28f093772bd460ac.js} +1 -1
- package/web/.next/static/chunks/517-373a80c8ba432bdc.js +1 -0
- package/web/.next/static/chunks/654-92a63b3c4b412666.js +1 -0
- package/web/.next/static/chunks/705-780e48e55b0346bd.js +1 -0
- package/web/.next/static/chunks/{844-fe55292e0701f436.js → 844-519177e6198ca84f.js} +1 -1
- package/web/.next/static/chunks/app/agents/[id]/page-c005161cec5527d8.js +1 -0
- package/web/.next/static/chunks/app/agents/{page-f4c4c80f955f3967.js → page-9bb8cba69776c719.js} +1 -1
- package/web/.next/static/chunks/app/connections/{page-0936beaf02d863c6.js → page-eb11cfb1ffeab3ca.js} +1 -1
- package/web/.next/static/chunks/app/{layout-99620746d028dda8.js → layout-49b46c9b5aa512a8.js} +1 -1
- package/web/.next/static/chunks/app/{page-a7f292117b7d76bf.js → page-da042d146caeeab6.js} +1 -1
- package/web/.next/static/chunks/app/relations/{page-fba25393c8688714.js → page-a44fd515a3b0525e.js} +1 -1
- package/web/.next/static/chunks/app/resources/[id]/{page-d110d89bb8b5fca7.js → page-bf05836f97248ca7.js} +1 -1
- package/web/.next/static/chunks/app/resources/{page-bbd0b450d3f3131d.js → page-800f774e5cacf4c9.js} +1 -1
- package/web/.next/static/chunks/app/schedules/{page-a1124397fc760413.js → page-96976fff4ee23538.js} +1 -1
- package/web/.next/static/chunks/app/sessions/{page-0e322811b0cde724.js → page-a7534ebd90e982d6.js} +1 -1
- package/web/.next/static/chunks/app/skills/{page-22ea0ef89d9f7a13.js → page-bc1acd0663f36129.js} +1 -1
- package/web/.next/static/chunks/app/types/{page-18c4e1db2724d41d.js → page-ebd37e220f77c1f3.js} +1 -1
- package/web/.next/static/css/{b7a03c62468f4263.css → d42799b7e6a0e8a2.css} +1 -1
- package/web/.next/trace +29 -29
- package/web/.next/server/chunks/555.js +0 -1
- package/web/.next/static/chunks/176-aeaf907a6ea5627d.js +0 -1
- package/web/.next/static/chunks/350-56599dc3bf06066d.js +0 -1
- package/web/.next/static/chunks/486-13e08542f3a1cbac.js +0 -1
- package/web/.next/static/chunks/517-ccaf8cc5c733cbd8.js +0 -1
- package/web/.next/static/chunks/705-c7e75806f77b880c.js +0 -1
- package/web/.next/static/chunks/839-4aefe6e71be6e1ef.js +0 -1
- package/web/.next/static/chunks/app/agents/[id]/page-3faf40800981a736.js +0 -1
- /package/web/.next/static/{7BI__-ayGDTlOrSboD_bT → aSYzbHk1M5YeS_d3SQKTZ}/_buildManifest.js +0 -0
- /package/web/.next/static/{7BI__-ayGDTlOrSboD_bT → aSYzbHk1M5YeS_d3SQKTZ}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=555,exports.ids=[555],exports.modules={206:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},16098:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]])},20862:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]])},21347:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]])},21959:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]])},22276:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},29083:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},29723:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},34410:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},35842:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},40123:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},42818:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},46875:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]])},47087:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]])},48881:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]])},54143:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]])},54514:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},55674:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]])},61593:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]])},69048:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]])},73726:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},77671:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},84300:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},87414:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},88404:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]])},93351:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]])},97299:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]])},98635:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]])}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[176],{494:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},4713:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]])},7697:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},8089:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]])},14214:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]])},18853:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Ear",[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]])},19431:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},32219:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]])},38950:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]])},46325:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]])},49731:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},50352:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]])},50703:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},52687:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]])},55267:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]])},62716:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},66477:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},75014:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},79141:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},79278:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},83372:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},84611:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])},84616:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},87454:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},90124:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},92720:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]])},97541:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(74955).A)("Waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[350],{10969:(e,l,t)=>{t.d(l,{Dm:()=>J,Kt:()=>$,Qh:()=>_,WQ:()=>A,q0:()=>F});var s=t(94799),n=t(34023),o=t(72705),r=t(494),a=t(87454),i=t(66477),c=t(4713),d=t(92720),u=t(38950),m=t(97541),h=t(52687),p=t(19431),x=t(90124),j=t(32219),f=t(58311),y=t(84616),b=t(62716),g=t(55267),v=t(79278),w=t(79141),N=t(56072),T=t(69654);let _=(0,n.createContext)(null),k=e=>e.replace(/^\/home\/[^/]+/,"~");function A(e){let{text:l,label:t,compact:a=!1}=e,{t:i}=(0,T.s9)();null!=t||(t=i("common.copy"));let[c,d]=(0,n.useState)(!1);return(0,s.jsxs)("button",{type:"button",className:"copybtn ".concat(a?"compact":""),"aria-label":t,title:t,onClick:e=>{var t;e.preventDefault(),e.stopPropagation(),null==(t=navigator.clipboard)||t.writeText(l).then(()=>{d(!0),setTimeout(()=>d(!1),1200)}).catch(()=>void 0)},children:[c?(0,s.jsx)(o.A,{size:13}):(0,s.jsx)(r.A,{size:13}),a?null:c?i("common.copied"):t]})}let z=e=>"string"==typeof e?e:null==e?"":JSON.stringify(e),S=function(e){for(var l=arguments.length,t=Array(l>1?l-1:0),s=1;s<l;s++)t[s-1]=arguments[s];for(let l of t)if((null==e?void 0:e[l])!=null&&""!==e[l])return e[l]};function O(e){let{oldText:l,newText:t}=e;return(0,s.jsxs)("div",{className:"diff",children:[l.split("\n").map((e,l)=>(0,s.jsxs)("div",{className:"del",children:[(0,s.jsx)("b",{children:"−"}),e]},"o"+l)),t.split("\n").map((e,l)=>(0,s.jsxs)("div",{className:"add",children:[(0,s.jsx)("b",{children:"+"}),e]},"n"+l))]})}function C(e){let{rows:l}=e;return(0,s.jsx)("dl",{className:"kv",children:l.filter(e=>{let[,l]=e;return void 0!==l&&""!==l&&null!==l}).map(e=>{let[l,t]=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{children:l}),(0,s.jsx)("dd",{children:t})]},l)})})}function F(e){var l,t,n,o,r,w;let _,F=e.input&&"object"==typeof e.input?e.input:{},J=e.name,W=/^mcp__([^_]+(?:_[^_]+)*)__(.+)$/.exec(J),E=(W?W[2]:J).toLowerCase().replace(/[^a-z]/g,""),P="string"==typeof F.code?/tools\.hive\.channel_reply\(\s*\{\s*text\s*:\s*("(?:[^"\\]|\\.)*")/.exec(F.code):null;if(P)try{_=JSON.parse(P[1])}catch(e){}if(E.endsWith("channelreply")||void 0!==_){let e=null!=_?_:z(F.text);return{icon:(0,s.jsx)(a.A,{size:14}),label:(0,T.Tl)("tool.channelReply"),summary:e.replace(/\s+/g," ").slice(0,140),body:(0,s.jsx)("pre",{className:"codebox pre-wrap",children:e})}}let $="string"==typeof F.code?/tools\.hive\.skill_read\(\s*\{\s*name\s*:\s*("(?:[^"\\]|\\.)*")/.exec(F.code):null;if(E.endsWith("skillread")||$){let e=z(F.name);if($)try{e=JSON.parse($[1])}catch(e){}return{icon:(0,s.jsx)(i.A,{size:14}),label:(0,T.Tl)("tool.skillRead"),summary:e,body:null}}let q="string"==typeof F.code?/tools\.hive\.channel_send_file\(\s*\{\s*path\s*:\s*("(?:[^"\\]|\\.)*")/.exec(F.code):null;if(E.endsWith("channelsendfile")||q){let e=z(F.path);if(q)try{e=JSON.parse(q[1])}catch(e){}let l=z(F.caption);return{icon:(0,s.jsx)(c.A,{size:14}),label:(0,T.Tl)("tool.channelSendFile"),summary:e.replace(/^.*[\\/]/,""),body:(0,s.jsx)(C,{rows:[[(0,T.Tl)("tool.k.path"),(0,s.jsx)("span",{className:"mono",children:e},"p")],...l?[[(0,T.Tl)("tool.k.caption"),(0,s.jsx)("span",{children:l},"c")]]:[]]})}}let D="string"==typeof F.code?/tools\.hive\.channel_mute\(\s*\{\s*muted\s*:\s*(true|false)/.exec(F.code):null;if(E.endsWith("channelmute")||D){let e=D?"true"===D[1]:!1!==F.muted;return{icon:e?(0,s.jsx)(d.A,{size:14}):(0,s.jsx)(u.A,{size:14}),label:(0,T.Tl)(e?"tool.channelMute":"tool.channelUnmute"),summary:"",body:null}}if((null==W?void 0:W[1])==="hive"&&"dispatch"===W[2])return{icon:(0,s.jsx)(m.A,{size:14}),label:(0,T.Tl)("tool.delegate"),summary:"".concat(z(F.agent),": ").concat(z(F.task).slice(0,90)),body:(0,s.jsx)(C,{rows:[[(0,T.Tl)("tool.k.subagent"),(0,s.jsx)("b",{children:z(F.agent)},"a")],[(0,T.Tl)("tool.k.task"),(0,s.jsx)("span",{className:"pre-wrap",children:z(F.task)},"t")]]})};if((null==W?void 0:W[1])==="hive")return{icon:(0,s.jsx)(m.A,{size:14}),label:(0,T.Tl)("tool.roster"),summary:"",body:null};if(["bash","shell","executebash","execute","run","runcommand","command"].includes(E)||F.command&&E.includes("bash")){let e=z(S(F,"command","cmd","code","script"));return{icon:(0,s.jsx)(h.A,{size:14}),label:(0,T.Tl)("tool.shell"),kind:"shell",command:e,summary:e,body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"cmdhead",children:[(0,s.jsx)("span",{className:"eyebrow",children:(0,T.Tl)("tool.command")}),(0,s.jsx)(A,{text:e,label:(0,T.Tl)("tool.copyCommand")})]}),(0,s.jsxs)("pre",{className:"cmd",children:[(0,s.jsx)("span",{className:"prompt",children:"$"})," ",e]}),F.description&&(0,s.jsx)("p",{className:"hint",style:{margin:"2px 0 0"},children:z(F.description)}),(0,s.jsx)(C,{rows:[[(0,T.Tl)("tool.k.tool"),(0,s.jsx)("code",{children:J},"n")],[(0,T.Tl)("tool.k.workdir"),F.cwd||F.workdir?(0,s.jsx)("code",{children:k(z(null!=(l=F.cwd)?l:F.workdir))},"c"):""],[(0,T.Tl)("tool.k.timeout"),F.timeout?(0,N.nc)(Number(F.timeout)):""],[(0,T.Tl)("tool.k.background"),F.run_in_background?(0,T.Tl)("common.yes"):""]]})]})}}if(["read","fsread","view","cat"].includes(E)){let e=z(S(F,"file_path","filePath","path","file"));return{icon:(0,s.jsx)(p.A,{size:14}),label:(0,T.Tl)("tool.read"),summary:k(e)||z(F.operations?JSON.stringify(F.operations).slice(0,80):""),body:(0,s.jsx)(C,{rows:[[(0,T.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")],[(0,T.Tl)("tool.k.offset"),z(null!=(t=F.offset)?t:"")],[(0,T.Tl)("tool.k.limit"),z(null!=(n=F.limit)?n:"")]]})}}if(["write","fswrite","create","writefile"].includes(E)){let e=z(S(F,"file_path","filePath","path")),l=z(S(F,"content","file_text","text"));return{icon:(0,s.jsx)(x.A,{size:14}),label:(0,T.Tl)("tool.write"),summary:(0,T.Tl)("tool.writeSummary",{path:k(e),count:l.split("\n").length}),body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C,{rows:[[(0,T.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")]]}),(0,s.jsxs)("pre",{className:"codebox",children:[l.slice(0,4e3),l.length>4e3?"\n…":""]})]})}}if(["edit","strreplace","strreplaceeditor","patch","replace"].includes(E)){let e=z(S(F,"file_path","filePath","path"));return{icon:(0,s.jsx)(j.A,{size:14}),label:(0,T.Tl)("tool.edit"),summary:k(e),body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C,{rows:[[(0,T.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")],[(0,T.Tl)("tool.k.replaceAll"),F.replace_all?(0,T.Tl)("common.yes"):""]]}),(0,s.jsx)(O,{oldText:z(S(F,"old_string","oldString","old_str")),newText:z(S(F,"new_string","newString","new_str"))})]})}}if("multiedit"===E&&Array.isArray(F.edits)){let e=z(F.file_path);return{icon:(0,s.jsx)(j.A,{size:14}),label:(0,T.Tl)("tool.edit"),summary:(0,T.Tl)("tool.editSummary",{path:k(e),count:F.edits.length}),body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C,{rows:[[(0,T.Tl)("tool.k.path"),(0,s.jsx)("code",{children:e},"p")]]}),F.edits.map((e,l)=>(0,s.jsx)(O,{oldText:z(e.old_string),newText:z(e.new_string)},l))]})}}if(["grep","glob","search","find","ls","list","codesearch"].includes(E)){let e=z(S(F,"pattern","query","glob","path"));return{icon:(0,s.jsx)(f.A,{size:14}),label:J.charAt(0).toUpperCase()+J.slice(1),summary:e,body:(0,s.jsx)(C,{rows:Object.entries(F).map(e=>{let[l,t]=e;return[l,(0,s.jsx)("code",{children:z(t)},l)]})})}}if(["webfetch","websearch","fetch","browser"].includes(E)){let e=z(S(F,"url","query"));return{icon:(0,s.jsx)(y.A,{size:14}),label:J,summary:e,body:(0,s.jsx)(C,{rows:Object.entries(F).map(e=>{let[l,t]=e;return[l,(0,s.jsx)("span",{className:"pre-wrap",children:z(t)},l)]})})}}if(["task","agent","subagent"].includes(E))return{icon:(0,s.jsx)(b.A,{size:14}),label:(0,T.Tl)("tool.subagent"),summary:z(S(F,"description","subagent_type")),body:(0,s.jsx)(C,{rows:[[(0,T.Tl)("tool.k.type"),z(null!=(o=F.subagent_type)?o:"")],[(0,T.Tl)("tool.k.description"),z(null!=(r=F.description)?r:"")],[(0,T.Tl)("tool.k.prompt"),(0,s.jsx)("span",{className:"pre-wrap",children:z(null!=(w=F.prompt)?w:"").slice(0,1500)},"p")]]})};if("todowrite"===E&&Array.isArray(F.todos)){let e=F.todos.filter(e=>"completed"===e.status).length;return{icon:(0,s.jsx)(g.A,{size:14}),label:(0,T.Tl)("tool.plan"),summary:(0,T.Tl)("tool.planSummary",{done:e,total:F.todos.length}),body:(0,s.jsx)("ul",{className:"todos",children:F.todos.map((e,l)=>(0,s.jsxs)("li",{"data-s":e.status,children:[(0,s.jsx)("i",{}),z(e.content)]},l))})}}let M=Object.entries(F);return{icon:(0,s.jsx)(v.A,{size:14}),label:W?"".concat(W[1]," \xb7 ").concat(W[2]):J,summary:M.length?z(M[0][1]).slice(0,100):"",body:M.length?(0,s.jsx)("pre",{className:"codebox",children:JSON.stringify(F,null,2)}):null}}function J(e){var l,t,o,r;let{tool:a,streaming:i}=e,{t:c}=(0,T.s9)(),d=F(a),u=void 0!==a.output,m=!u&&!!i,[,h]=(0,n.useState)(0);(0,n.useEffect)(()=>{if(!m)return;let e=setInterval(()=>h(e=>e+1),500);return()=>clearInterval(e)},[m]);let p=null!=(t=a.durationMs)?t:m&&a.startedAt?Date.now()-a.startedAt:void 0,x=null!=(o=a.output)?o:"",j=x?x.split("\n").length:0,f="shell"===d.kind&&u?null==(l=/(?:^|\n)Exit code:?\s*(-?\d+)/i.exec(x))?void 0:l[1]:void 0,y=(0,n.useContext)(_),[b,g]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{null!==y&&g(y)},[y]),(0,s.jsxs)("details",{className:"fold tool ".concat("shell"===d.kind?"is-shell":""," ").concat(a.error?"err":""," ").concat(m?"running":""),open:b,onToggle:e=>g(e.currentTarget.open),children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)("span",{className:"tico",children:d.icon}),(0,s.jsx)("b",{className:"tlabel",children:d.label}),(0,s.jsxs)("span",{className:"tsum mono",title:null!=(r=d.command)?r:d.summary,children:["shell"===d.kind&&(0,s.jsx)("span",{className:"prompt",children:"$ "}),d.summary]}),(0,s.jsxs)("span",{className:"tmeta",children:[void 0!==f&&"0"!==f&&(0,s.jsx)("span",{className:"tbad",children:c("tool.exit",{code:f})}),a.error&&void 0===f&&(0,s.jsx)("span",{className:"tbad",children:c("tool.failed")}),u&&!a.error&&j>0&&(0,s.jsx)("span",{children:c("tool.lines",{count:j})}),void 0!==p&&(0,s.jsx)("span",{className:m?"live":"",children:(0,N.nc)(p)}),m&&(0,s.jsx)("i",{className:"dot run"})]}),(0,s.jsx)(w.A,{size:14,className:"chev"})]}),(0,s.jsxs)("div",{className:"tbody",children:[d.body,u&&(0,s.jsxs)("div",{className:"tout",children:[(0,s.jsxs)("div",{className:"cmdhead",children:[(0,s.jsx)("span",{className:"eyebrow",children:c("tool.output")}),x&&(0,s.jsx)(A,{text:x,label:c("tool.copyOutput")})]}),(0,s.jsx)("pre",{children:x?x.length>12e3?x.slice(0,12e3)+"\n".concat(c("tool.truncated")):x:c("tool.noOutput")})]})]})]})}let W=["write","fswrite","create","writefile"],E=["edit","strreplace","strreplaceeditor","patch","replace","multiedit"],P=e=>"string"==typeof e&&e?e.split("\n").length:0;function $(e){let{blocks:l}=e,{t}=(0,T.s9)(),n=function(e){let l=new Map;for(let i of e){var t,s,n,o,r,a;if("tool"!==i.type||i.error)continue;let e=i.input&&"object"==typeof i.input?i.input:{},c=(null!=(s=null==(t=/^mcp__.+?__(.+)$/.exec(i.name))?void 0:t[1])?s:i.name).toLowerCase().replace(/[^a-z]/g,""),d=W.includes(c);if(!d&&!E.includes(c))continue;let u=z(S(e,"file_path","filePath","path"));if(!u)continue;let m=Array.isArray(e.edits)?e.edits:[e],h=d?P(S(e,"content","file_text","text")):m.reduce((e,l)=>e+P(S(l,"new_string","newString","new_str")),0),p=d?0:m.reduce((e,l)=>e+P(S(l,"old_string","oldString","old_str")),0),x=l.get(u),j=[...null!=(n=null==x?void 0:x.hunks)?n:[]];if(!d)for(let e of m)j.push({old:z(S(e,"old_string","oldString","old_str")),new:z(S(e,"new_string","newString","new_str"))});l.set(u,{path:u,created:null!=(o=null==x?void 0:x.created)&&o||d,added:(null!=(r=null==x?void 0:x.added)?r:0)+h,removed:(null!=(a=null==x?void 0:x.removed)?a:0)+p,hunks:j,content:d?z(S(e,"content","file_text","text")):null==x?void 0:x.content})}return[...l.values()]}(l);return n.length?(0,s.jsxs)("details",{className:"fold changed",open:n.length<=5,children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)(j.A,{size:14}),t("chat.changedFiles",{count:n.length}),(0,s.jsx)(w.A,{size:14,className:"chev"})]}),(0,s.jsx)("div",{className:"cf-list",children:n.map(e=>(0,s.jsxs)("details",{className:"cf-file",children:[(0,s.jsxs)("summary",{children:[(0,s.jsx)(w.A,{size:12,className:"chev"}),(0,s.jsx)("code",{title:e.path,children:k(e.path)}),(0,s.jsxs)("span",{className:"cf-meta",children:[e.created&&(0,s.jsx)("em",{children:t("chat.fileWritten")}),e.added>0&&(0,s.jsxs)("span",{className:"cf-add",children:["+",e.added]}),e.removed>0&&(0,s.jsxs)("span",{className:"cf-del",children:["−",e.removed]})]})]}),(0,s.jsxs)("div",{className:"cf-body",children:[e.hunks.map((e,l)=>(0,s.jsx)(O,{oldText:e.old,newText:e.new},l)),void 0!==e.content&&0===e.hunks.length&&(0,s.jsxs)("pre",{className:"codebox",children:[e.content.slice(0,6e3),e.content.length>6e3?"\n…":""]})]})]},e.path))})]}):null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[486],{494:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},3492:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]])},4713:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]])},19431:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},20555:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]])},32219:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]])},38950:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]])},52263:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]])},52687:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]])},55267:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]])},55712:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},55838:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]])},62716:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},66477:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},70283:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},71529:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},77841:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]])},79141:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},79278:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},83372:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},84616:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},87454:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},89075:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},90124:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},91833:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]])},92720:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]])},92947:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},97356:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},97541:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Waypoints",[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]])},98148:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]])},98938:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},99579:(e,a,t)=>{t.d(a,{A:()=>h});let h=(0,t(74955).A)("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[517],{1517:(e,l,n)=>{n.d(l,{b:()=>h,t:()=>p});var s=n(94799),t=n(34023),i=n(43624),r=n(86606),o=n(5300),a=n(48538),c=n(73506),d=n(3749),m=n(47890),u=n(69654);let p="default-objects";function h(e){var l,n;let{onClose:h,onCreated:f,presetTypeId:v,presetColonyId:g,presetObjectId:j,manager:x=!1}=e,{t:b}=(0,u.s9)(),{types:k,agents:y,refresh:w,colonies:_}=(0,a.q5)(),N=(0,r.dj)(),C=(0,i.useRouter)(),[A,D]=(0,t.useState)(v||x?"form":"type"),[S,E]=(0,t.useState)(()=>{let e={...(0,o.WU)(k.find(e=>e.id===v)),colony_id:null!=g?g:null,object_ids:j?[j]:[]};return x?{...e,description:b("obj.manager.description"),permission:"acceptEdits",skill_ids:[...new Set([...e.skill_ids,p])],skill_loads:{...e.skill_loads,[p]:"always"}}:e}),[q,z]=(0,t.useState)(()=>JSON.stringify(S)),F=e=>{E(e),z(JSON.stringify(e)),D("form")},L=(0,t.useRef)(!1),M=JSON.stringify(S)!==q;(0,c.h)(M&&!L.current);let[O,P]=(0,t.useState)(!1),[T,R]=(0,t.useState)(!1),[K,U]=(0,t.useState)(!1),H=(0,o.tf)(S,y,void 0,_),B=async()=>{if(U(!0),!Object.keys(H).length){R(!0);try{let{object_ids:e,...l}=S,n=await d.FH.post("/agents",l);e.length&&await d.FH.put("/agents/".concat(n.id,"/resources"),{object_ids:e}).catch(e=>N(e instanceof Error?e.message:"","err")),await w(["agents","colonies","objects"]),N(b("newAgent.created",{name:n.name})),L.current=!0,null==f||f(n.id),h(),C.push("/agents/".concat(n.id))}catch(e){N(e instanceof Error?e.message:b("newAgent.failed"),"err"),R(!1)}}};return"type"===A?(0,s.jsx)(r._s,{title:b("newAgent.title"),subtitle:b("newAgent.pickType"),onClose:h,children:(0,s.jsxs)("div",{className:"col gap-m",children:[k.map(e=>(0,s.jsxs)("button",{className:"card card-pad row gap-l cx-typecard",onClick:()=>{F({...(0,o.WU)(e),colony_id:null!=g?g:null,object_ids:j?[j]:[]})},children:[(0,s.jsx)(r._h,{color:m.xq[e.provider].color,queen:"orchestrator"===e.role,label:e.name.slice(0,2).toUpperCase()}),(0,s.jsxs)("div",{className:"grow",children:[(0,s.jsx)("b",{className:"cx-pick-title",children:e.name}),(0,s.jsx)("div",{className:"muted small",children:e.description||b("newAgent.typeFallback",{role:b("role.".concat(e.role)),provider:m.xq[e.provider].label})})]}),(0,s.jsx)("span",{className:"chip",children:m.xq[e.provider].short})]},e.id)),(0,s.jsxs)("button",{className:"card card-pad row gap-l cx-typecard blank",onClick:()=>{F({...(0,o.WU)(),colony_id:null!=g?g:null,object_ids:j?[j]:[]})},children:[(0,s.jsx)(r._h,{color:"var(--muted)",label:"+"}),(0,s.jsxs)("div",{className:"grow",children:[(0,s.jsx)("b",{className:"cx-pick-title",children:b("newAgent.blank")}),(0,s.jsx)("div",{className:"muted small",children:b("newAgent.blankHint")})]})]})]})},"type"):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r._s,{title:b("newAgent.title"),subtitle:x?b("obj.manager.subtitle"):S.type_id?b("newAgent.fromType",{name:null!=(n=null==(l=k.find(e=>e.id===S.type_id))?void 0:l.name)?n:""}):b("newAgent.blank"),onClose:()=>{!M||L.current?h():P(!0)},footer:(0,s.jsxs)(s.Fragment,{children:[!v&&!x&&(0,s.jsx)("button",{className:"btn ghost",onClick:()=>D("type"),children:b("common.back")}),(0,s.jsx)("button",{className:"btn primary",disabled:T,onClick:B,children:T?b("newAgent.creating"):b("newAgent.create")})]}),children:(0,s.jsx)(o.SU,{draft:S,onChange:E,errors:K?H:{},focusName:!0})},"form"),O&&(0,s.jsx)(r.TM,{danger:!0,title:b("fa.unsaved.title"),body:b("fa.unsaved.body"),confirmLabel:b("fa.unsaved.discard"),cancelLabel:b("fa.unsaved.keep"),onClose:()=>P(!1),onConfirm:h})]})}},5300:(e,l,n)=>{n.d(l,{SU:()=>j,TN:()=>f,WU:()=>h,tf:()=>g});var s=n(94799),t=n(34023),i=n(12646),r=n(69654),o=n(56072),a=n(86606),c=n(48538),d=n(22214),m=n(47890),u=n(28941),p=n(52974);let h=e=>{var l,n,s,t,i,r,o,a,c;return{name:"",description:null!=(l=null==e?void 0:e.description)?l:"",role:null!=(n=null==e?void 0:e.role)?n:"worker",provider:null!=(s=null==e?void 0:e.provider)?s:"claude",model:null!=(t=null==e?void 0:e.model)?t:"",system_prompt:null!=(i=null==e?void 0:e.system_prompt)?i:"",permission:null!=(r=null==e?void 0:e.permission)?r:"acceptEdits",cwd:"",skill_ids:null!=(o=null==e?void 0:e.skill_ids)?o:[],skill_loads:null!=(a=null==e?void 0:e.skill_loads)?a:{},worker_ids:[],type_id:null!=(c=null==e?void 0:e.id)?c:null,colony_id:null,overrides:[],object_ids:[]}},f=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{name:e.name,description:e.description,role:e.role,provider:e.provider,model:e.model,system_prompt:e.system_prompt,permission:e.permission,cwd:e.cwd,skill_ids:e.skill_ids,skill_loads:e.skill_loads,worker_ids:e.worker_ids,type_id:e.type_id,colony_id:e.colony_id,overrides:e.overrides,object_ids:l}},v=(e,l,n)=>!!l&&l.inherit[n]&&!e.overrides.includes(n);function g(e,l,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],t={};e.name.trim()?l.some(l=>l.id!==n&&l.name.toLowerCase()===e.name.trim().toLowerCase())&&(t.name=(0,r.Tl)("form.err.nameTaken")):t.name=(0,r.Tl)("form.err.name");let i=s.find(l=>l.id===e.colony_id);return e.cwd.trim()||v(e,i,"cwd")&&(null==i?void 0:i.cwd)||(t.cwd=(0,r.Tl)("form.err.folder")),t}function j(e){var l;let{draft:n,onChange:h,errors:f,selfId:g,showType:j=!0,focusName:b=!1}=e,{t:k}=(0,r.s9)(),{skills:y,providers:w,agents:_,types:N,colonies:C,connections:A,objects:D}=(0,c.q5)(),S=(0,t.useMemo)(()=>D.filter(e=>p.G.includes(e.kind)).map(e=>{var l,n,s,t;return{id:e.id,label:e.name,hint:e.manager_id&&e.manager_id!==g?k("form.resources.taken",{name:null!=(s=null==(l=_.find(l=>l.id===e.manager_id))?void 0:l.name)?s:""}):null!=(t=null==(n=C.find(l=>l.id===e.colony_id))?void 0:n.name)?t:k("common.noColony")}}),[D,_,C,g,k]),E=(0,t.useMemo)(()=>A.filter(e=>e.agent_id===g&&e.enabled),[A,g]),q=C.find(e=>e.id===n.colony_id),z=e=>v(n,q,e),F=(e,l)=>h({...n,overrides:l?n.overrides.filter(l=>l!==e):[...new Set([...n.overrides,e])]}),L=(e,l)=>h({...n,[e]:l}),M=(0,t.useMemo)(()=>_.filter(e=>e.id!==g&&"worker"===e.role),[_,g]),O=N.find(e=>e.id===n.type_id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.D0,{label:k("form.name"),error:f.name,hint:k("form.name.hint"),children:(0,s.jsx)("input",{className:"input",value:n.name,onChange:e=>L("name",e.target.value),placeholder:k("form.name.placeholder"),"data-autofocus":b?"":void 0})}),(0,s.jsx)(a.D0,{label:k("form.purpose"),hint:k("form.purpose.hint"),children:(0,s.jsx)("input",{className:"input",value:n.description,onChange:e=>L("description",e.target.value),placeholder:k("form.purpose.placeholder")})}),(0,s.jsxs)(a.D0,{label:k("form.role"),children:[(0,s.jsx)(a.$q,{value:n.role,onChange:e=>L("role",e),options:[{id:"worker",label:k("role.worker")},{id:"orchestrator",label:k("role.orchestrator")}]}),(0,s.jsx)("span",{className:"hint",children:"orchestrator"===n.role?k("form.role.orchestratorHint"):k("form.role.workerHint")})]}),j&&O&&(0,s.jsx)("p",{className:"hint m0",children:k("form.basedOn",{name:O.name})}),(0,s.jsx)(a.D0,{label:k("form.colony"),hint:k("form.colony.hint"),children:(0,s.jsxs)("select",{className:"select",value:null!=(l=n.colony_id)?l:"",onChange:e=>h({...n,colony_id:e.target.value||null,overrides:[]}),children:[(0,s.jsx)("option",{value:"",children:k("common.noColony")}),C.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))]})}),(0,s.jsx)(a.D0,{label:k("form.provider"),children:(0,s.jsx)(a.YO,{value:n.provider,onChange:e=>h({...n,provider:e,model:""}),providers:w})}),(0,s.jsx)(a.CD,{provider:n.provider,value:n.model,onChange:e=>L("model",e)}),q&&q.inherit.permission&&(0,s.jsx)(x,{colony:q,on:z("permission"),onChange:e=>F("permission",e),label:k("inherit.permissions"),value:(0,m.Ck)(q.permission)}),!z("permission")&&(0,s.jsx)(a.en,{value:n.permission,onChange:e=>L("permission",e),locked:E.length?["plan"]:[]}),E.length>0&&(0,s.jsxs)("p",{className:"hint m0",children:[(0,s.jsxs)("b",{children:[k("form.connections"),":"]})," ",k("form.connections.hint",{names:E.map(e=>e.name).join(", ")})]}),q&&q.inherit.cwd&&q.cwd&&(0,s.jsx)(x,{colony:q,on:z("cwd"),onChange:e=>F("cwd",e),label:k("field.folder"),value:(0,m._1)(q.cwd),mono:!0}),!(z("cwd")&&(null==q?void 0:q.cwd))&&(0,s.jsx)(a.dR,{value:n.cwd,onChange:e=>L("cwd",e),error:f.cwd}),q&&q.inherit.prompt&&q.system_prompt.trim()&&(0,s.jsx)(x,{colony:q,on:z("prompt"),onChange:e=>F("prompt",e),label:k("inherit.context"),value:"".concat(q.system_prompt.trim().slice(0,90)).concat(q.system_prompt.trim().length>90?"…":""),note:k("inherit.context.note")}),(0,s.jsx)(a.D0,{label:z("prompt")||(null==q?void 0:q.system_prompt)?k("form.ownPrompt"):k("form.systemPrompt"),hint:k("form.promptHint",{count:n.system_prompt.length,n:(0,o._E)(n.system_prompt.length)}),children:(0,s.jsx)(i.n,{value:n.system_prompt,onChange:e=>L("system_prompt",e),placeholder:k("form.prompt.placeholder"),defaultView:"write",minHeight:220})}),q&&q.inherit.skills&&q.skill_ids.length>0&&(0,s.jsx)(x,{colony:q,on:z("skills"),onChange:e=>F("skills",e),label:k("inherit.skills"),value:q.skill_ids.map(e=>{var l;return null==(l=y.find(l=>l.id===e))?void 0:l.name}).filter(Boolean).join(", "),note:k("inherit.skills.note")}),(0,s.jsx)(a.D0,{label:k("form.skills"),hint:k("form.skills.hint"),children:(0,s.jsx)(a.kV,{skills:y,value:n.skill_ids,loads:n.skill_loads,onChange:(e,l)=>h({...n,skill_ids:e,skill_loads:l})})}),S.length>0&&(0,s.jsx)(a.D0,{label:k("form.resources"),hint:k("form.resources.hint"),children:(0,s.jsx)(u.c,{multi:!0,options:S,value:n.object_ids,onChange:e=>h({...n,object_ids:e}),placeholder:k("form.resources.placeholder"),empty:k("form.resources.empty"),ariaLabel:k("form.resources")})}),"orchestrator"===n.role&&(0,s.jsx)(a.D0,{label:k("form.team"),hint:k("form.team.hint"),children:M.length?(0,s.jsx)(d.C,{items:M.map(e=>({id:e.id,name:e.name,note:e.description||e.provider})),value:n.worker_ids,onChange:e=>L("worker_ids",e)}):(0,s.jsx)("p",{className:"hint",children:k("form.team.empty")})})]})}function x(e){let{colony:l,on:n,onChange:t,label:i,value:o,note:a,mono:c}=e,{t:d}=(0,r.s9)();return(0,s.jsxs)("label",{className:"inherit-row ".concat(n?"on":""),children:[(0,s.jsx)("input",{type:"checkbox",checked:n,onChange:e=>t(e.target.checked)}),(0,s.jsxs)("span",{className:"grow",children:[(0,s.jsxs)("b",{children:[i," ",(0,s.jsx)("span",{className:"muted fw-500",children:d("inherit.from")})," ",(0,s.jsx)("i",{className:"cdot",style:{background:l.color||"var(--honey)"}}),l.name]}),(0,s.jsx)("span",{className:"inh-val ".concat(c?"mono":""),children:o||"—"}),a&&(0,s.jsx)("span",{className:"hint",children:a})]}),(0,s.jsx)("span",{className:"inh-state",children:d(n?"inherit.following":"inherit.own")})]})}},12646:(e,l,n)=>{n.d(l,{n:()=>_});var s=n(94799),t=n(34023),i=n(6458),r=n(53983),o=n(3492),a=n(98148),c=n(99579),d=n(55838),m=n(98938),u=n(52263),p=n(20555),h=n(91833),f=n(55712),v=n(71529),g=n(69654);function j(e,l,n,s){let t=arguments.length>4&&void 0!==arguments[4]?arguments[4]:s,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",r=e.slice(l,n)||i;return e.slice(l-s.length,l)===s&&e.slice(n,n+t.length)===t&&l!==n?{value:e.slice(0,l-s.length)+r+e.slice(n+t.length),start:l-s.length,end:n-s.length}:{value:e.slice(0,l)+s+r+t+e.slice(n),start:l+s.length,end:l+s.length+r.length}}function x(e,l,n,s,t){let i=e.lastIndexOf("\n",l-1)+1,r=e.indexOf("\n",n),o=-1===r?e.length:r,a=e.slice(i,o).split("\n"),c=a.every(e=>t.test(e)),d=a.map((e,l)=>c?e.replace(t,""):s(l)+e.replace(t,"")).join("\n");return{value:e.slice(0,i)+d+e.slice(o),start:i,end:i+d.length}}let b=/^\s*[-*+] (\[[ x]\] )?/,k=/^\s*\d+\. /,y=/^#{1,6} /,w=/^> ?/;function _(e){let{value:l,onChange:n,placeholder:_,defaultView:N="split",minHeight:C=340,fill:A=!1}=e,{t:D}=(0,g.s9)(),S=(0,t.useRef)(null),[E,q]=(0,t.useState)(N),z=e=>{let l=S.current;if(!l)return;let s=e(l.value,l.selectionStart,l.selectionEnd);n(s.value),requestAnimationFrame(()=>{l.focus(),l.setSelectionRange(s.start,s.end)})},F=[{id:"h",icon:(0,s.jsx)(o.A,{size:15}),label:D("md.heading"),run:()=>z((e,l,n)=>x(e,l,n,()=>"## ",y))},{id:"b",icon:(0,s.jsx)(a.A,{size:15}),label:D("md.bold"),keys:"B",run:()=>z((e,l,n)=>j(e,l,n,"**","**",D("md.boldPh")))},{id:"i",icon:(0,s.jsx)(c.A,{size:15}),label:D("md.italic"),keys:"I",run:()=>z((e,l,n)=>j(e,l,n,"*","*",D("md.italicPh")))},{id:"c",icon:(0,s.jsx)(d.A,{size:15}),label:D("md.code"),run:()=>z((e,l,n)=>j(e,l,n,"`","`","code"))},{id:"cb",icon:(0,s.jsx)(m.A,{size:15}),label:D("md.codeBlock"),run:()=>z((e,l,n)=>j(e,l,n,"\n```\n","\n```\n","code"))},{id:"ul",icon:(0,s.jsx)(u.A,{size:15}),label:D("md.bullets"),run:()=>z((e,l,n)=>x(e,l,n,()=>"- ",b))},{id:"ol",icon:(0,s.jsx)(p.A,{size:15}),label:D("md.numbered"),run:()=>z((e,l,n)=>x(e,l,n,e=>"".concat(e+1,". "),k))},{id:"q",icon:(0,s.jsx)(h.A,{size:15}),label:D("md.quote"),run:()=>z((e,l,n)=>x(e,l,n,()=>"> ",w))},{id:"l",icon:(0,s.jsx)(f.A,{size:15}),label:D("md.link"),keys:"K",run:()=>z((e,l,n)=>{let s=e.slice(l,n)||D("md.linkPh"),t="[".concat(s,"](https://)");return{value:e.slice(0,l)+t+e.slice(n),start:l+s.length+3,end:l+s.length+11}})},{id:"hr",icon:(0,s.jsx)(v.A,{size:15}),label:D("md.rule"),run:()=>z((e,l,n)=>({value:e.slice(0,l)+"\n\n---\n\n"+e.slice(n),start:l+7,end:l+7}))}],L=l.trim()?l.trim().split(/\s+/).length:0;return(0,s.jsxs)("div",{className:"mde".concat(A?" fill":""),children:[(0,s.jsxs)("div",{className:"mde-bar",role:"toolbar","aria-label":D("md.toolbar"),children:[F.map(e=>(0,s.jsx)("button",{type:"button",className:"mde-btn",title:e.keys?"".concat(e.label," (Ctrl+").concat(e.keys,")"):e.label,"aria-label":e.label,onMouseDown:e=>e.preventDefault(),onClick:e.run,disabled:"preview"===E,children:e.icon},e.id)),(0,s.jsx)("span",{className:"grow"}),(0,s.jsx)("div",{className:"mde-views",role:"group",children:["write","split","preview"].map(e=>(0,s.jsx)("button",{type:"button",className:E===e?"on":"","aria-pressed":E===e,onClick:()=>q(e),children:D("md.view.".concat(e))},e))})]}),(0,s.jsxs)("div",{className:"mde-body v-".concat(E),style:{minHeight:C},children:["preview"!==E&&(0,s.jsx)("textarea",{ref:S,className:"mde-text mono",style:{minHeight:C},value:l,onChange:e=>n(e.target.value),onKeyDown:e=>{let l=e.currentTarget;if(e.ctrlKey||e.metaKey){let l=F.find(l=>l.keys&&l.keys.toLowerCase()===e.key.toLowerCase());if(l){e.preventDefault(),l.run();return}}if("Tab"===e.key){e.preventDefault(),z((l,n,s)=>{if(n===s&&!e.shiftKey)return{value:l.slice(0,n)+" "+l.slice(s),start:n+2,end:n+2};let t=l.lastIndexOf("\n",n-1)+1,i=l.indexOf("\n",s),r=-1===i?l.length:i,o=l.slice(t,r).split("\n").map(l=>e.shiftKey?l.replace(/^ {1,2}/,""):" "+l).join("\n");return{value:l.slice(0,t)+o+l.slice(r),start:t,end:t+o.length}});return}if("Enter"===e.key&&!e.shiftKey&&l.selectionStart===l.selectionEnd){let s=l.value,t=l.selectionStart,i=s.lastIndexOf("\n",t-1)+1,r=s.slice(i,t),o=/^(\s*)([-*+] (?:\[[ x]\] )?|(\d+)\. )(.*)$/.exec(r);if(!o)return;if(e.preventDefault(),!o[4]){n(s.slice(0,i)+s.slice(t)),requestAnimationFrame(()=>l.setSelectionRange(i,i));return}let a=o[3]?"".concat(o[1]).concat(Number(o[3])+1,". "):o[1]+o[2].replace("[x]","[ ]");n(s.slice(0,t)+"\n"+a+s.slice(t)),requestAnimationFrame(()=>{let e=t+1+a.length;l.setSelectionRange(e,e)})}},placeholder:_,spellCheck:!1}),"write"!==E&&(0,s.jsx)("div",{className:"mde-prev md",children:(0,s.jsx)(i.oz,{remarkPlugins:[r.A],children:l||D("skills.previewEmpty")})})]}),(0,s.jsxs)("div",{className:"mde-foot muted",children:[D("md.stats",{words:L,chars:l.length})," \xb7 ",D("md.tips")]})]})}},22214:(e,l,n)=>{n.d(l,{C:()=>i});var s=n(94799),t=n(72705);function i(e){let{items:l,value:n,onChange:i}=e;return(0,s.jsx)("div",{className:"skillpick",children:l.map(e=>{let l=n.includes(e.id);return(0,s.jsxs)("button",{type:"button",className:"skillrow","aria-pressed":l,onClick:()=>i(l?n.filter(l=>l!==e.id):[...n,e.id]),children:[(0,s.jsx)("span",{className:"check",children:l&&(0,s.jsx)(t.A,{size:13,strokeWidth:3})}),(0,s.jsxs)("span",{children:[(0,s.jsx)("b",{className:"fw-600",children:e.name}),(0,s.jsx)("span",{className:"hint hint-block",children:e.note})]})]},e.id)})})}},28941:(e,l,n)=>{n.d(l,{c:()=>a});var s=n(94799),t=n(34023),i=n(70665),r=n(21018),o=n(48539);function a(e){let{options:l,value:n,onChange:a,multi:c=!1,inline:d=!1,placeholder:m,empty:u,ariaLabel:p,autoFocus:h=!1}=e,[f,v]=(0,t.useState)(""),[g,j]=(0,t.useState)(!1),[x,b]=(0,t.useState)(0),k=(0,t.useRef)(null),y=(0,t.useRef)(null);(0,r.s)(g,k,()=>j(!1));let w=n.map(e=>l.find(l=>l.id===e)).filter(e=>!!e),_=(0,t.useMemo)(()=>{let e=f.trim().toLowerCase();return l.filter(l=>{var s;return!n.includes(l.id)&&(!e||"".concat(l.label," ").concat(null!=(s=l.hint)?s:"").toLowerCase().includes(e))}).slice(0,50)},[l,n,f]);(0,t.useEffect)(()=>{b(0)},[f,g]);let N=e=>{var l;a(c?[...n,e.id]:[e.id]),v(""),j(c),c&&(null==(l=y.current)||l.focus())},C=e=>{a(n.filter(l=>l!==e)),requestAnimationFrame(()=>{var e;return null==(e=y.current)?void 0:e.focus()})},A=!c&&w.length>0,D=g&&!A&&(_.length>0||!!u),S=(0,o.B)(D,x,_.length);return(0,s.jsxs)("div",{className:"sg ps ".concat(d?"ps-inline":""),ref:k,children:[(0,s.jsxs)("div",{className:"ps-box input ".concat(g?"open":""),onClick:()=>{if(!A){var e;j(!0),null==(e=y.current)||e.focus()}},children:[w.map(e=>(0,s.jsxs)("span",{className:"chip ps-chip",children:[e.label,(0,s.jsx)("button",{type:"button",onClick:l=>{l.stopPropagation(),C(e.id)},"aria-label":"\xd7 ".concat(e.label),children:(0,s.jsx)(i.A,{size:12})})]},e.id)),!A&&(0,s.jsx)("input",{ref:y,className:"ps-input",value:f,placeholder:w.length?"":m,"aria-label":p,autoComplete:"off",spellCheck:!1,autoFocus:h,...S.input,onFocus:()=>j(!0),onChange:e=>{v(e.target.value),j(!0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),j(!0),b(e=>Math.min(_.length-1,e+1))):"ArrowUp"===e.key?(e.preventDefault(),b(e=>Math.max(0,e-1))):"Enter"===e.key&&g&&_[x]?(e.preventDefault(),N(_[x])):"Escape"===e.key&&g?(e.stopPropagation(),j(!1)):"Backspace"===e.key&&!f&&w.length&&C(w[w.length-1].id)}})]}),D&&(0,s.jsxs)("ul",{className:"sg-list",...S.listProps,children:[0===_.length&&(0,s.jsx)("li",{className:"sg-empty",children:u}),_.map((e,l)=>(0,s.jsx)("li",{...S.optionProps(l),children:(0,s.jsxs)("button",{type:"button",className:"sg-opt ".concat(l===x?"hi":""),onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>b(l),onClick:()=>N(e),children:[(0,s.jsx)("span",{className:"nm",children:e.label}),e.hint&&(0,s.jsx)("span",{className:"hint",children:e.hint})]})},e.id))]})]})}},52974:(e,l,n)=>{n.d(l,{G:()=>c,I:()=>d});var s=n(94799),t=n(34023),i=n(69654),r=n(48538),o=n(86606),a=n(28941);let c=["server","docker","cluster"];function d(e){let{value:l,onChange:n}=e,{t:c}=(0,i.s9)(),{agents:d,colonies:m}=(0,r.o0)(),u=(0,t.useMemo)(()=>d.map(e=>{var l,n;return{id:e.id,label:e.name,hint:null!=(n=null==(l=m.find(l=>l.id===e.colony_id))?void 0:l.name)?n:c("common.noColony")}}),[d,m,c]);return(0,s.jsx)(o.D0,{label:c("obj.manager.label"),hint:l?c("obj.manager.hint.set"):c("obj.manager.hint.none"),children:(0,s.jsx)(a.c,{options:u,value:l?[l]:[],onChange:e=>{var l;return n(null!=(l=e[0])?l:"")},placeholder:c("obj.manager.placeholder"),empty:c("obj.manager.empty"),ariaLabel:c("obj.manager.label")})})}},73506:(e,l,n)=>{n.d(l,{h:()=>t});var s=n(34023);function t(e){(0,s.useEffect)(()=>{if(!e)return;let l=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",l),()=>window.removeEventListener("beforeunload",l)},[e])}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[705],{51705:(e,t,s)=>{s.d(t,{ry:()=>K,BZ:()=>O});var a=s(94799),n=s(34023),l=s(6458),r=s(53983),i=s(14214),c=s(84611),o=s(8089),d=s(50352),u=s(46325),h=s(79141),m=s(4713),p=s(70665),x=s(83372),g=s(75014),j=s(97541),f=s(50703),v=s(3749),b=s(48538),y=s(77021),N=s(47890),k=s(86606),z=s(10969),A=s(49731),w=s(7697),C=s(18853);let F=/^\[hive:channel\] (.+?) · Place: (.+?) · Thread: (.+?) · From: (.+?)((?: · (?:Addressed|Muted): \w+| · To: [^·\n]+)*)(?: · Now: [^\n]*)?\nMessage:\n([\s\S]*)$/,R="\n\n[hive:context]\n",T="\n\n[hive:files]\n";var E=s(69654);function D(e){let{text:t,badge:s,agentId:n}=e,{t:l}=(0,E.s9)(),r=function(e){let t=F.exec(e);if(!t)return null;let[s,...a]=t[6].split(R),[n,...l]=s.split(T),r=l.join(T).split("\n").flatMap(e=>{let t=/^- (.+) \(([^()]*)\)$/.exec(e);return t?[{path:t[1],name:t[1].replace(/^.*[\\/]/,"").replace(/^\d+-\d+-/,""),detail:t[2]}]:[]});return{platform:t[1],place:t[2],thread:t[3],from:t[4],body:n,files:r,overheard:/Addressed: no/.test(t[5]),muted:/Muted: yes/.test(t[5]),context:a.join(R)}}(t),i=r?null:function(e){let t=e.indexOf(T);if(t<0)return null;let s=e.slice(t+T.length).split("\n").flatMap(e=>{let t=/^- (.+) \(([^()]*)\)$/.exec(e);return t?[{path:t[1],name:t[1].replace(/^.*[\\/]/,"").replace(/^web-\d+-\d+-/,""),detail:t[2]}]:[]});return s.length?{body:e.slice(0,t),files:s}:null}(t);return i?(0,a.jsxs)("div",{className:"msg user".concat(s?" queued":""),children:[(0,a.jsxs)("div",{className:"bubble",children:[i.body.trim()&&"(no text)"!==i.body.trim()&&(0,a.jsx)("div",{children:i.body.trim()}),(0,a.jsx)("div",{className:"bubble-imgs",children:i.files.map(e=>{let t=n?"/api/agents/".concat(n,"/inbox?path=").concat(encodeURIComponent(e.path)):void 0;return n&&/\.(png|jpe?g|gif|webp)$/i.test(e.path)?(0,a.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",title:e.name,children:(0,a.jsx)("img",{src:t,alt:e.name,loading:"lazy"})},e.path):(0,a.jsxs)("a",{className:"chfile",href:t,download:e.name,title:e.path,children:[(0,a.jsx)(m.A,{size:11,"aria-hidden":!0}),e.name,(0,a.jsx)("i",{children:e.detail.split(", ").pop()})]},e.path)})})]}),s&&(0,a.jsxs)("span",{className:"queued-tag",children:[(0,a.jsx)(A.A,{size:11,"aria-hidden":!0}),s]})]}):r?(0,a.jsx)("div",{className:"msg user",children:(0,a.jsxs)("div",{className:"bubble channel",children:[(0,a.jsxs)("div",{className:"chhead",children:[(0,a.jsx)(w.A,{size:12,"aria-hidden":!0}),(0,a.jsx)("b",{children:r.platform}),(0,a.jsx)("span",{children:r.place}),r.overheard&&(0,a.jsxs)("span",{className:"chtag",title:l("chat.channel.overheard.hint"),children:[(0,a.jsx)(C.A,{size:11,"aria-hidden":!0}),l("chat.channel.overheard")]}),(0,a.jsx)("span",{className:"chfrom",children:r.from.replace(/\s*\(.*\)$/,"")})]}),(0,a.jsx)("div",{className:"chbody",children:r.body}),r.files.length>0&&(0,a.jsx)("div",{className:"chfiles",children:r.files.map(e=>(0,a.jsxs)("span",{className:"chfile",title:e.path,children:[(0,a.jsx)(m.A,{size:11,"aria-hidden":!0}),e.name,(0,a.jsx)("i",{children:e.detail.split(", ").pop()})]},e.path))}),r.context&&(0,a.jsxs)("details",{className:"chctx",children:[(0,a.jsx)("summary",{children:l("chat.channel.context",{n:r.context.split("\n").filter(e=>e.startsWith("- ")).length})}),(0,a.jsx)("pre",{children:r.context.replace(/^[^\n]*\n/,"")})]})]})}):(0,a.jsxs)("div",{className:"msg user".concat(s?" queued":""),children:[(0,a.jsx)("div",{className:"bubble",children:t}),s&&(0,a.jsxs)("span",{className:"queued-tag",children:[(0,a.jsx)(A.A,{size:11,"aria-hidden":!0}),s]})]})}var S=s(56072);function M(e){var t,s,n;let{m:l}=e,{t:r}=(0,E.s9)(),u=null==(t=l.meta)?void 0:t.usage,h=l.blocks.filter(e=>"tool"===e.type).length;if(!u&&!l.durationMs&&!h)return null;let m=(0,S.RP)(u);return(0,a.jsxs)("div",{className:"replymeta",children:[(null==(s=l.meta)?void 0:s.model)&&(0,a.jsx)("span",{className:"mono",children:l.meta.model.replace(/^claude-/,"").replace(/-\d{8}$/,"")}),m>0&&(0,a.jsxs)("span",{title:u?r("chat.tokenDetail",{input:u.input,output:u.output,cacheRead:u.cacheRead,cacheWrite:u.cacheWrite}):"",children:[(0,a.jsx)(i.A,{size:12}),r("chat.inOut",{in:(0,S.yj)(u.input+u.cacheRead+u.cacheWrite),out:(0,S.yj)(u.output)})]}),(null==u?void 0:u.credits)?(0,a.jsxs)("span",{children:[(0,a.jsx)(c.A,{size:12}),r("chat.credits",{value:u.credits.toFixed(2)})]}):null,(null==(n=l.meta)?void 0:n.cost)!==void 0&&(0,a.jsxs)("span",{title:r(l.meta.costEstimated?"stats.costEstimated":"stats.costReported"),children:[(0,a.jsx)(c.A,{size:12}),l.meta.costEstimated?"≈ ":"",(0,S.F0)(l.meta.cost)]}),h>0&&(0,a.jsxs)("span",{children:[(0,a.jsx)(o.A,{size:12}),r("chat.tools",{count:h})]}),l.durationMs?(0,a.jsxs)("span",{children:[(0,a.jsx)(d.A,{size:12}),(0,S.nc)(l.durationMs)]}):null]})}let P=/usage limit|quota|insufficient|rate.?limit|too many requests|credits/i;function H(e){let{agent:t,error:s,onDone:l}=e,{t:r}=(0,E.s9)(),i=(0,k.dj)(),[c,o]=(0,n.useState)(!1),[d,u]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if("opencode"!==t.provider)return;let e=!0;return v.FH.get("/agents/".concat(t.id,"/compact")).then(t=>{e&&o(t.supported)}).catch(()=>{}),()=>{e=!1}},[t.id,t.provider]);let h=async()=>{u(!0);try{await v.FH.post("/agents/".concat(t.id,"/compact")),i(r("chat.compacted"),"ok"),l()}catch(e){i(r("chat.compactFailed",{reason:e instanceof Error?e.message:String(e)}),"err")}finally{u(!1)}},m=P.test(s);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"muted",children:r(m?"chat.failedHintLimit":c?"chat.failedHintCompact":"chat.failedHint")}),c&&!m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("br",{}),(0,a.jsx)("button",{type:"button",className:"btn sm",disabled:d,onClick:()=>void h(),children:d?r("chat.compacting"):r("chat.compact")})]})]})}function q(e){var t,s,l,r,c;let{turn:u}=e,{t:h}=(0,E.s9)(),[,m]=(0,n.useState)(0),p=!!u.error;(0,n.useEffect)(()=>{if(p)return;let e=setInterval(()=>m(e=>e+1),500);return()=>clearInterval(e)},[p]);let x=(0,n.useRef)(0);p&&!x.current&&(x.current=Date.now());let g=u.usage,j=u.blocks.filter(e=>"tool"===e.type).length;return(0,a.jsxs)("div",{className:"replymeta live",children:[(0,a.jsxs)("span",{children:[(0,a.jsx)(d.A,{size:12}),(0,S.nc)((p?x.current:Date.now())-u.startedAt)]}),j>0&&(0,a.jsxs)("span",{children:[(0,a.jsx)(o.A,{size:12}),h("chat.tools",{count:j})]}),g&&(null!=(t=g.output)?t:0)>0&&(0,a.jsxs)("span",{children:[(0,a.jsx)(i.A,{size:12}),h("chat.inOut",{in:(0,S.yj)((null!=(s=g.input)?s:0)+(null!=(l=g.cacheRead)?l:0)+(null!=(r=g.cacheWrite)?r:0)),out:(0,S.yj)(null!=(c=g.output)?c:0)})]}),(null==g?void 0:g.contextPct)!==void 0&&(0,a.jsx)("span",{children:h("chat.contextPct",{pct:g.contextPct.toFixed(1)})})]})}let _=(0,n.memo)(function(e){let{text:t}=e;return(0,a.jsx)("div",{className:"md",children:(0,a.jsx)(l.oz,{remarkPlugins:[r.A],children:t})})}),I=(0,n.memo)(function(e){let{blocks:t,streaming:s}=e,{t:n}=(0,E.s9)();return(0,a.jsxs)(a.Fragment,{children:[t.map((e,l)=>"text"===e.type?(0,a.jsx)(_,{text:e.text},l):"thinking"===e.type?(0,a.jsxs)("details",{className:"fold think",children:[(0,a.jsxs)("summary",{children:[(0,a.jsx)(u.A,{size:14}),s&&l===t.length-1?n("activity.thinking"):n("chat.thought"),(0,a.jsx)(h.A,{size:14,className:"chev"})]}),(0,a.jsx)("pre",{children:e.text})]},l):(0,a.jsx)(z.Dm,{tool:e,streaming:s},l)),(0,a.jsx)(z.Kt,{blocks:t})]})}),O=(0,n.memo)(function(e){let{msgs:t,agent:s}=e;(0,E.s9)();let l=(0,n.useMemo)(()=>(function(e){let t=[],s=null;for(let n of e){var a;let e;if("user"===n.role){s=n.ts,t.push(n);continue}let l=t[t.length-1],r=(e,t)=>{var s,a,n,l,r,i,c;if(!e)return t;if(!t)return e;let o=e.usage,d=t.usage;return{model:null!=(s=t.model)?s:e.model,endTs:null!=(a=t.endTs)?a:e.endTs,cost:void 0!==e.cost||void 0!==t.cost?(null!=(n=e.cost)?n:0)+(null!=(l=t.cost)?l:0):void 0,costEstimated:e.costEstimated||t.costEstimated,usage:o&&d?{input:o.input+d.input,output:o.output+d.output,cacheRead:o.cacheRead+d.cacheRead,cacheWrite:o.cacheWrite+d.cacheWrite,reasoning:o.reasoning+d.reasoning,credits:(null!=(r=o.credits)?r:0)+(null!=(i=d.credits)?i:0)||void 0,contextPct:null!=(c=d.contextPct)?c:o.contextPct}:null!=o?o:d}};(null==l?void 0:l.role)==="assistant"?(e={...l,blocks:[...l.blocks,...n.blocks],meta:r(l.meta,n.meta)},t[t.length-1]=e):(e={...n},t.push(e));let i=null==(a=e.meta)?void 0:a.endTs;e.durationMs=s&&i?Math.max(0,i-s):void 0}return t})(t),[t]);return(0,a.jsx)(a.Fragment,{children:l.map(e=>"user"===e.role?(0,a.jsx)(D,{agentId:s.id,text:e.blocks.map(e=>"text"===e.type?e.text:"").join("")},e.id):(0,a.jsxs)("div",{className:"msg assistant",children:[(0,a.jsxs)("div",{className:"who",children:[(0,a.jsx)(k._h,{agent:s,size:"sm"}),s.name,(0,a.jsx)("span",{className:"stamp",children:e.ts?(0,N.KN)(e.ts):""})]}),(0,a.jsx)(I,{blocks:e.blocks}),(0,a.jsx)(M,{m:e})]},e.id))})},(e,t)=>e.msgs===t.msgs&&e.agent.id===t.agent.id&&e.agent.name===t.agent.name&&e.agent.provider===t.agent.provider&&e.agent.role===t.agent.role),W=(0,n.memo)(function(e){let{agentId:t,name:s,running:l,queued:r,readOnly:i,onSend:c,onStop:o,toolsOpen:d,onToggleTools:u}=e,{t:h}=(0,E.s9)(),[j,f]=(0,y.ud)("hive-am.draft.".concat(t),""),[v,b]=(0,n.useState)([]),[N,z]=(0,n.useState)(!1),A=(0,k.dj)(),w=(0,n.useRef)(null),C=(0,n.useRef)(null),F=()=>{let e=w.current;e&&(e.style.height="auto",e.style.height=Math.min(e.scrollHeight,200)+"px")},R=async e=>{let t=e.slice(0,Math.max(0,5-v.length));t.length<e.length&&A(h("chat.img.max",{n:5}),"err");let s=t.filter(e=>e.size<=0x1400000&&e.size>0);s.length<t.length&&A(h("chat.img.big",{mb:20}),"err");let a=await Promise.all(s.map((e,t)=>new Promise((s,a)=>{let n=new FileReader;n.onload=()=>s({id:"".concat(Date.now(),"-").concat(t),name:e.name&&"image.png"!==e.name?e.name:"pasted-".concat(t+1,".png"),data:String(n.result),type:e.type,size:e.size}),n.onerror=()=>a(n.error),n.readAsDataURL(e)})));b(e=>[...e,...a])},T=async()=>{let e=j.trim();(e||v.length)&&(f(""),b([]),requestAnimationFrame(F),await c(e,v.map(e=>{let{name:t,data:s,type:a}=e;return{name:t,data:s,type:a}}))||(f(e),b(v),requestAnimationFrame(F)))};return(0,a.jsxs)("div",{className:"composer",children:[i?(0,a.jsx)("div",{className:"composer-box chat-readonly",children:(0,a.jsx)("span",{className:"muted",children:h("chat.readOnly")})}):(0,a.jsxs)("div",{className:"composer-box ".concat(N?"over":""),onDragOver:e=>{[...e.dataTransfer.types].includes("Files")&&(e.preventDefault(),z(!0))},onDragLeave:()=>z(!1),onDrop:e=>{z(!1);let t=[...e.dataTransfer.files];t.length&&(e.preventDefault(),R(t))},children:[v.length>0&&(0,a.jsx)("div",{className:"cmp-imgs",children:v.map(e=>{let t;return(0,a.jsxs)("span",{className:"cmp-img".concat(e.type.startsWith("image/")?"":" file"),title:e.name,children:[e.type.startsWith("image/")?(0,a.jsx)("img",{src:e.data,alt:e.name}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.A,{size:14,"aria-hidden":!0}),(0,a.jsx)("b",{children:e.name}),(0,a.jsx)("i",{children:(t=e.size)<1024?"".concat(t," B"):t<1048576?"".concat(Math.round(t/1024)," KB"):"".concat((t/1024/1024).toFixed(1)," MB")})]}),(0,a.jsx)("button",{type:"button",onClick:()=>b(t=>t.filter(t=>t.id!==e.id)),"aria-label":h("chat.img.remove",{name:e.name}),title:h("chat.img.remove",{name:e.name}),children:(0,a.jsx)(p.A,{size:12})})]},e.id)})}),(0,a.jsx)("input",{ref:C,type:"file",multiple:!0,hidden:!0,onChange:e=>{var t;R([...null!=(t=e.target.files)?t:[]]),e.target.value=""}}),(0,a.jsx)("button",{type:"button",className:"btn ghost icon",onClick:()=>{var e;return null==(e=C.current)?void 0:e.click()},"aria-label":h("chat.img.attach"),title:h("chat.img.attach"),children:(0,a.jsx)(m.A,{size:18})}),(0,a.jsx)("textarea",{ref:w,rows:1,onPaste:e=>{let t=[...e.clipboardData.files];!t.length||e.clipboardData.getData("text/plain").trim()||(e.preventDefault(),R(t))},value:j,placeholder:l?h("chat.queuePlaceholder"):h("chat.placeholder",{name:s}),"aria-label":h("chat.messageLabel"),onChange:e=>{f(e.target.value),F()},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),T())}}),l&&(0,a.jsxs)("button",{className:"btn",onClick:o,"aria-label":h("chat.stop"),children:[(0,a.jsx)(x.A,{size:14,fill:"currentColor"}),h("chat.stop")]}),(0,a.jsx)("button",{className:"btn primary icon",onClick:()=>void T(),disabled:!j.trim()&&!v.length,"aria-label":h("chat.send"),children:(0,a.jsx)(g.A,{size:18})})]}),(0,a.jsxs)("div",{className:"composer-meta",children:[(0,a.jsx)("span",{children:h("chat.keys")}),(0,a.jsx)("button",{type:"button",className:"linkbtn",onClick:u,children:d?h("chat.collapseTools"):h("chat.expandTools")}),r>0&&(0,a.jsx)("span",{children:h("queue.count",{count:r})})]})]})});function K(e){var t,s,l,r;let{agent:i,sessionOverride:c}=e,{t:o}=(0,E.s9)(),{agents:d}=(0,b.q5)(),{clearLive:u}=(0,b.zd)(),h=(0,k.dj)(),[m,p]=(0,n.useState)([]),[x,g]=(0,n.useState)(!1),[y,N]=(0,n.useState)(60),[A,w]=(0,n.useState)(0),C=(0,n.useRef)(null),[F,R]=(0,n.useState)([]),[T,S]=(0,n.useState)(null),M=(0,n.useRef)(null),P=(0,n.useRef)(!0),_=(0,n.useRef)(0),K=(0,n.useRef)(0),L=(0,n.useCallback)(()=>{K.current=performance.now()},[]),[$,B]=(0,n.useState)(!1),U=(0,n.useCallback)(()=>{P.current=!1,B(!0)},[]),Y=(0,n.useCallback)(()=>{let e=M.current;P.current=!0,B(!1),e&&(e.scrollTop=e.scrollHeight)},[]),Z=(0,b.M_)(i.id),Q="running"===i.status||!!Z&&!Z.error,V=void 0!==c&&c!==i.session_id,G=(0,n.useCallback)(()=>{let e=V?c:i.session_id;return e?v.FH.get("/agents/".concat(i.id,"/history?session=").concat(encodeURIComponent(e),"&limit=").concat(y)).then(e=>{var t;p(e.messages),w(null!=(t=e.total)?t:e.messages.length),g(!0)}).catch(e=>{h(e.message,"err"),g(!0)}):(p([]),w(0),g(!0),Promise.resolve())},[i.id,i.session_id,V,c,h,y]);(0,n.useEffect)(()=>{g(!1),N(60)},[i.id,i.session_id,c]),(0,n.useEffect)(()=>{G()},[G]),(0,n.useLayoutEffect)(()=>{let e=M.current;e&&null!==C.current&&(e.scrollTop+=e.scrollHeight-C.current,C.current=null)},[m]);let J=(0,n.useCallback)(()=>{var e,t;C.current=null!=(t=null==(e=M.current)?void 0:e.scrollHeight)?t:null,U(),N(e=>e+120)},[U]),X=(0,b.SV)(i.id),ee=(0,n.useRef)(!0);ee.current=!Z&&"running"!==i.status&&!(null!=(s=i.queued)?s:0),(0,n.useEffect)(()=>{X&&G().then(()=>{ee.current&&R(e=>e.length?[]:e)})},[X]),(0,n.useEffect)(()=>{R(e=>{let t=e.filter(e=>!m.some(t=>"user"===t.role&&t.blocks.some(t=>"text"===t.type&&t.text.trim()===e.trim())));return t.length===e.length?e:t})},[m]),(0,n.useEffect)(()=>{let e=M.current,t=null==e?void 0:e.firstElementChild;if(!e||!t)return;let s=()=>{P.current&&(e.scrollTop=e.scrollHeight)},a=new ResizeObserver(s);return a.observe(t),s(),()=>a.disconnect()},[x,i.id]);let et=(0,n.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(V)return!1;R(t=>[...t,e]),Y();try{let s=await v.FH.post("/agents/".concat(i.id,"/messages"),{prompt:e,...t.length?{files:t}:{}});return s.prompt&&s.prompt!==e&&R(t=>{let a=t.lastIndexOf(e);return a<0?t:t.map((e,t)=>t===a?s.prompt:e)}),!0}catch(t){return R(t=>{let s=t.lastIndexOf(e);return s<0?t:t.filter((e,t)=>t!==s)}),h(t instanceof Error?t.message:o("chat.sendFailed"),"err"),!1}},[i.id,V,h,o,Y]),es=(0,n.useCallback)(()=>{v.FH.post("/agents/".concat(i.id,"/stop")).catch(()=>void 0)},[i.id]),ea=(0,n.useCallback)(()=>S(e=>!e),[]),en=F.filter((e,t)=>!(Z&&t===F.findIndex(e=>e.trim()===Z.prompt.trim()))),el=x&&!m.length&&!Z&&!F.length;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(z.Qh.Provider,{value:T,children:(0,a.jsxs)("div",{className:"thread-wrap",children:[(0,a.jsx)("div",{className:"thread",ref:M,role:"log","aria-label":o("fa.chat.log",{name:i.name}),"aria-live":Z?"off":"polite","aria-relevant":"additions",tabIndex:-1,onWheel:e=>{e.deltaY<0&&U()},onTouchStart:L,onTouchMove:L,onPointerDown:L,onPointerMove:e=>{e.buttons&&L()},onKeyDown:e=>{!["PageUp","ArrowUp","Home"].includes(e.key)||e.target instanceof HTMLTextAreaElement||U()},onScroll:e=>{let t=e.currentTarget;t.scrollHeight-t.scrollTop-t.clientHeight<40?(P.current=!0,B(!1)):t.scrollTop<_.current-1&&performance.now()-K.current<700&&U(),_.current=t.scrollTop},children:(0,a.jsxs)("div",{className:"thread-inner",children:[el&&(0,a.jsx)("div",{className:"mt-l",children:(0,a.jsx)(k.pp,{icon:(0,a.jsx)(k._h,{agent:i,size:"lg"}),title:o("chat.empty.title",{name:i.name}),body:"orchestrator"===i.role?o("chat.empty.orchestrator"):o("chat.empty.worker")})}),A>m.length&&(0,a.jsx)("button",{type:"button",className:"btn sm chat-earlier",onClick:J,children:o("chat.earlier",{n:A-m.length})}),(0,a.jsx)(O,{msgs:m,agent:i}),Z&&(0,a.jsxs)(a.Fragment,{children:["dispatch"===Z.source?(0,a.jsxs)("div",{className:"delegation-card",children:[(0,a.jsxs)("div",{className:"head",children:[(0,a.jsx)(j.A,{size:14}),o("chat.delegatedFrom",{name:null!=(l=null==(t=d.find(e=>e.id===Z.from))?void 0:t.name)?l:o("chat.anOrchestrator")})]}),(0,a.jsx)("p",{children:Z.prompt}),(0,a.jsx)("span",{className:"hint",children:o("chat.delegatedNote")})]}):!m.some(e=>"user"===e.role&&e.blocks.some(e=>"text"===e.type&&e.text.trim()===Z.prompt.trim()))&&(0,a.jsx)(D,{text:Z.prompt,agentId:i.id}),(0,a.jsxs)("div",{className:"msg assistant",children:[(0,a.jsxs)("div",{className:"who",children:[(0,a.jsx)(k._h,{agent:i,size:"sm"}),i.name]}),(0,a.jsx)(I,{blocks:Z.blocks,streaming:!0}),!Z.error&&(0,a.jsxs)("span",{className:"typing","aria-label":o("common.working"),children:[(0,a.jsx)("i",{}),(0,a.jsx)("i",{}),(0,a.jsx)("i",{})]}),(0,a.jsx)(q,{turn:Z}),Z.error&&(0,a.jsxs)(k.lZ,{kind:"err",onDismiss:()=>u(i.id),children:[(0,E.YF)(Z.error),(0,a.jsx)(H,{agent:i,error:Z.error,onDone:()=>u(i.id)})]})]})]}),en.map((e,t)=>(0,a.jsx)(D,{agentId:i.id,text:e,badge:Z?o("chat.queuedBadge"):void 0},"".concat(t,":").concat(e)))]})}),$&&(0,a.jsxs)("button",{type:"button",className:"btn sm chat-jump",onClick:Y,children:[(0,a.jsx)(f.A,{size:14,"aria-hidden":!0}),o("fa.chat.jump")]})]})}),(0,a.jsx)("span",{className:"chat-sr",role:"status",children:Z?o("fa.chat.working",{name:i.name}):X?o("fa.chat.done",{name:i.name}):""}),(0,a.jsx)(W,{agentId:i.id,name:i.name,running:Q,queued:null!=(r=i.queued)?r:0,readOnly:V,onSend:et,onStop:es,toolsOpen:T,onToggleTools:ea})]})}}}]);
|