hive-am 1.2.0 → 1.2.1
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 +18 -1
- package/package.json +1 -1
- package/server/dist/http/routes/agents.js +21 -0
- package/server/dist/providers/opencode-server.js +45 -0
- package/server/dist/providers/opencode.js +50 -4
- package/server/dist/terminals.js +10 -2
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-build-manifest.json +56 -56
- package/web/.next/app-path-routes-manifest.json +6 -6
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +55 -55
- 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 +1 -1
- package/web/.next/server/app/agents/[id]/page_client-reference-manifest.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_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_client-reference-manifest.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_client-reference-manifest.js +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_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_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_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_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 +6 -6
- package/web/.next/server/chunks/274.js +1 -1
- package/web/.next/server/chunks/612.js +1 -1
- 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/705-c7e75806f77b880c.js +1 -0
- package/web/.next/static/chunks/839-4aefe6e71be6e1ef.js +1 -0
- package/web/.next/static/chunks/app/agents/[id]/{page-4af6c246c4ca7a97.js → page-3faf40800981a736.js} +1 -1
- package/web/.next/static/chunks/app/layout-99620746d028dda8.js +1 -0
- package/web/.next/static/css/{dd4e32c285f75776.css → b7a03c62468f4263.css} +1 -1
- package/web/.next/trace +29 -29
- package/web/.next/static/chunks/705-a16e1fe09be1ac7f.js +0 -1
- package/web/.next/static/chunks/839-23c5508622fae942.js +0 -1
- package/web/.next/static/chunks/app/layout-87ebb70bd9cb8443.js +0 -1
- /package/web/.next/static/{p4S3i9kvO359GW91DQiHu → Bz7onClw1BajMUCwqpU8o}/_buildManifest.js +0 -0
- /package/web/.next/static/{p4S3i9kvO359GW91DQiHu → Bz7onClw1BajMUCwqpU8o}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=612,exports.ids=[612],exports.modules={12675:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},30257:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).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"}]])},33165:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).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"}]])},36414:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},40413:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).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"}]])},48612:(a,b,c)=>{c.d(b,{ry:()=>P,BZ:()=>N});var d=c(55322),e=c(17027),f=c(37070),g=c(31826),h=c(40413),i=c(33165),j=c(30257),k=c(78574),l=c(51537);let m=(0,l.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"}]]);var n=c(29083),o=c(47087),p=c(31251),q=c(84300),r=c(36414),s=c(93351),t=c(12675),u=c(7371),v=c(60570),w=c(73269),x=c(61162),y=c(5207),z=c(2335);let A=(0,l.A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);var B=c(91313);let C=(0,l.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"}]]),D=/^\[hive:channel\] (.+?) · Place: (.+?) · Thread: (.+?) · From: (.+?)((?: · (?:Addressed|Muted): \w+| · To: [^·\n]+)*)(?: · Now: [^\n]*)?\nMessage:\n([\s\S]*)$/,E="\n\n[hive:context]\n",F="\n\n[hive:files]\n";var G=c(93884);function H({text:a,badge:b,agentId:c}){let{t:e}=(0,G.s9)(),f=function(a){let b=D.exec(a);if(!b)return null;let[c,...d]=b[6].split(E),[e,...f]=c.split(F),g=f.join(F).split("\n").flatMap(a=>{let b=/^- (.+) \(([^()]*)\)$/.exec(a);return b?[{path:b[1],name:b[1].replace(/^.*[\\/]/,"").replace(/^\d+-\d+-/,""),detail:b[2]}]:[]});return{platform:b[1],place:b[2],thread:b[3],from:b[4],body:e,files:g,overheard:/Addressed: no/.test(b[5]),muted:/Muted: yes/.test(b[5]),context:d.join(E)}}(a),g=f?null:function(a){let b=a.indexOf(F);if(b<0)return null;let c=a.slice(b+F.length).split("\n").flatMap(a=>{let b=/^- (.+) \(([^()]*)\)$/.exec(a);return b?[{path:b[1],name:b[1].replace(/^.*[\\/]/,"").replace(/^web-\d+-\d+-/,""),detail:b[2]}]:[]});return c.length?{body:a.slice(0,b),files:c}:null}(a);return g?(0,d.jsxs)("div",{className:`msg user${b?" queued":""}`,children:[(0,d.jsxs)("div",{className:"bubble",children:[g.body.trim()&&"(no text)"!==g.body.trim()&&(0,d.jsx)("div",{children:g.body.trim()}),(0,d.jsx)("div",{className:"bubble-imgs",children:g.files.map(a=>{let b=c?`/api/agents/${c}/inbox?path=${encodeURIComponent(a.path)}`:void 0;return c&&/\.(png|jpe?g|gif|webp)$/i.test(a.path)?(0,d.jsx)("a",{href:b,target:"_blank",rel:"noreferrer",title:a.name,children:(0,d.jsx)("img",{src:b,alt:a.name,loading:"lazy"})},a.path):(0,d.jsxs)("a",{className:"chfile",href:b,download:a.name,title:a.path,children:[(0,d.jsx)(o.A,{size:11,"aria-hidden":!0}),a.name,(0,d.jsx)("i",{children:a.detail.split(", ").pop()})]},a.path)})})]}),b&&(0,d.jsxs)("span",{className:"queued-tag",children:[(0,d.jsx)(A,{size:11,"aria-hidden":!0}),b]})]}):f?(0,d.jsx)("div",{className:"msg user",children:(0,d.jsxs)("div",{className:"bubble channel",children:[(0,d.jsxs)("div",{className:"chhead",children:[(0,d.jsx)(B.A,{size:12,"aria-hidden":!0}),(0,d.jsx)("b",{children:f.platform}),(0,d.jsx)("span",{children:f.place}),f.overheard&&(0,d.jsxs)("span",{className:"chtag",title:e("chat.channel.overheard.hint"),children:[(0,d.jsx)(C,{size:11,"aria-hidden":!0}),e("chat.channel.overheard")]}),(0,d.jsx)("span",{className:"chfrom",children:f.from.replace(/\s*\(.*\)$/,"")})]}),(0,d.jsx)("div",{className:"chbody",children:f.body}),f.files.length>0&&(0,d.jsx)("div",{className:"chfiles",children:f.files.map(a=>(0,d.jsxs)("span",{className:"chfile",title:a.path,children:[(0,d.jsx)(o.A,{size:11,"aria-hidden":!0}),a.name,(0,d.jsx)("i",{children:a.detail.split(", ").pop()})]},a.path))}),f.context&&(0,d.jsxs)("details",{className:"chctx",children:[(0,d.jsx)("summary",{children:e("chat.channel.context",{n:f.context.split("\n").filter(a=>a.startsWith("- ")).length})}),(0,d.jsx)("pre",{children:f.context.replace(/^[^\n]*\n/,"")})]})]})}):(0,d.jsxs)("div",{className:`msg user${b?" queued":""}`,children:[(0,d.jsx)("div",{className:"bubble",children:a}),b&&(0,d.jsxs)("span",{className:"queued-tag",children:[(0,d.jsx)(A,{size:11,"aria-hidden":!0}),b]})]})}var I=c(30584);function J({m:a}){let{t:b}=(0,G.s9)(),c=a.meta?.usage,e=a.blocks.filter(a=>"tool"===a.type).length;if(!c&&!a.durationMs&&!e)return null;let f=(0,I.RP)(c);return(0,d.jsxs)("div",{className:"replymeta",children:[a.meta?.model&&(0,d.jsx)("span",{className:"mono",children:a.meta.model.replace(/^claude-/,"").replace(/-\d{8}$/,"")}),f>0&&(0,d.jsxs)("span",{title:c?b("chat.tokenDetail",{input:c.input,output:c.output,cacheRead:c.cacheRead,cacheWrite:c.cacheWrite}):"",children:[(0,d.jsx)(h.A,{size:12}),b("chat.inOut",{in:(0,I.yj)(c.input+c.cacheRead+c.cacheWrite),out:(0,I.yj)(c.output)})]}),c?.credits?(0,d.jsxs)("span",{children:[(0,d.jsx)(i.A,{size:12}),b("chat.credits",{value:c.credits.toFixed(2)})]}):null,a.meta?.cost!==void 0&&(0,d.jsxs)("span",{title:b(a.meta.costEstimated?"stats.costEstimated":"stats.costReported"),children:[(0,d.jsx)(i.A,{size:12}),a.meta.costEstimated?"≈ ":"",(0,I.F0)(a.meta.cost)]}),e>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(j.A,{size:12}),b("chat.tools",{count:e})]}),a.durationMs?(0,d.jsxs)("span",{children:[(0,d.jsx)(k.A,{size:12}),(0,I.nc)(a.durationMs)]}):null]})}function K({turn:a}){let{t:b}=(0,G.s9)(),[,c]=(0,e.useState)(0),f=a.usage,g=a.blocks.filter(a=>"tool"===a.type).length;return(0,d.jsxs)("div",{className:"replymeta live",children:[(0,d.jsxs)("span",{children:[(0,d.jsx)(k.A,{size:12}),(0,I.nc)(Date.now()-a.startedAt)]}),g>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(j.A,{size:12}),b("chat.tools",{count:g})]}),f&&(f.output??0)>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(h.A,{size:12}),b("chat.inOut",{in:(0,I.yj)((f.input??0)+(f.cacheRead??0)+(f.cacheWrite??0)),out:(0,I.yj)(f.output??0)})]}),f?.contextPct!==void 0&&(0,d.jsx)("span",{children:b("chat.contextPct",{pct:f.contextPct.toFixed(1)})})]})}let L=(0,e.memo)(function({text:a}){return(0,d.jsx)("div",{className:"md",children:(0,d.jsx)(f.oz,{remarkPlugins:[g.A],children:a})})}),M=(0,e.memo)(function({blocks:a,streaming:b}){let{t:c}=(0,G.s9)();return(0,d.jsxs)(d.Fragment,{children:[a.map((e,f)=>"text"===e.type?(0,d.jsx)(L,{text:e.text},f):"thinking"===e.type?(0,d.jsxs)("details",{className:"fold think",children:[(0,d.jsxs)("summary",{children:[(0,d.jsx)(m,{size:14}),b&&f===a.length-1?c("activity.thinking"):c("chat.thought"),(0,d.jsx)(n.A,{size:14,className:"chev"})]}),(0,d.jsx)("pre",{children:e.text})]},f):(0,d.jsx)(z.Dm,{tool:e,streaming:b},f)),(0,d.jsx)(z.Kt,{blocks:a})]})}),N=(0,e.memo)(function({msgs:a,agent:b}){(0,G.s9)();let c=(0,e.useMemo)(()=>(function(a){let b=[],c=null;for(let d of a){let a;if("user"===d.role){c=d.ts,b.push(d);continue}let e=b[b.length-1],f=(a,b)=>{if(!a)return b;if(!b)return a;let c=a.usage,d=b.usage;return{model:b.model??a.model,endTs:b.endTs??a.endTs,cost:void 0!==a.cost||void 0!==b.cost?(a.cost??0)+(b.cost??0):void 0,costEstimated:a.costEstimated||b.costEstimated,usage:c&&d?{input:c.input+d.input,output:c.output+d.output,cacheRead:c.cacheRead+d.cacheRead,cacheWrite:c.cacheWrite+d.cacheWrite,reasoning:c.reasoning+d.reasoning,credits:(c.credits??0)+(d.credits??0)||void 0,contextPct:d.contextPct??c.contextPct}:c??d}};e?.role==="assistant"?(a={...e,blocks:[...e.blocks,...d.blocks],meta:f(e.meta,d.meta)},b[b.length-1]=a):(a={...d},b.push(a));let g=a.meta?.endTs;a.durationMs=c&&g?Math.max(0,g-c):void 0}return b})(a),[a]);return(0,d.jsx)(d.Fragment,{children:c.map(a=>"user"===a.role?(0,d.jsx)(H,{agentId:b.id,text:a.blocks.map(a=>"text"===a.type?a.text:"").join("")},a.id):(0,d.jsxs)("div",{className:"msg assistant",children:[(0,d.jsxs)("div",{className:"who",children:[(0,d.jsx)(y._h,{agent:b,size:"sm"}),b.name,(0,d.jsx)("span",{className:"stamp",children:a.ts?(0,x.KN)(a.ts):""})]}),(0,d.jsx)(M,{blocks:a.blocks}),(0,d.jsx)(J,{m:a})]},a.id))})},(a,b)=>a.msgs===b.msgs&&a.agent.id===b.agent.id&&a.agent.name===b.agent.name&&a.agent.provider===b.agent.provider&&a.agent.role===b.agent.role),O=(0,e.memo)(function({agentId:a,name:b,running:c,queued:f,readOnly:g,onSend:h,onStop:i,toolsOpen:j,onToggleTools:k}){let{t:l}=(0,G.s9)(),[m,n]=(0,w.ud)(`hive-am.draft.${a}`,""),[s,t]=(0,e.useState)([]),[u,v]=(0,e.useState)(!1),x=(0,y.dj)(),z=(0,e.useRef)(null),A=(0,e.useRef)(null),B=()=>{let a=z.current;a&&(a.style.height="auto",a.style.height=Math.min(a.scrollHeight,200)+"px")},C=async a=>{let b=a.slice(0,Math.max(0,5-s.length));b.length<a.length&&x(l("chat.img.max",{n:5}),"err");let c=b.filter(a=>a.size<=0x1400000&&a.size>0);c.length<b.length&&x(l("chat.img.big",{mb:20}),"err");let d=await Promise.all(c.map((a,b)=>new Promise((c,d)=>{let e=new FileReader;e.onload=()=>c({id:`${Date.now()}-${b}`,name:a.name&&"image.png"!==a.name?a.name:`pasted-${b+1}.png`,data:String(e.result),type:a.type,size:a.size}),e.onerror=()=>d(e.error),e.readAsDataURL(a)})));t(a=>[...a,...d])},D=async()=>{let a=m.trim();(a||s.length)&&(n(""),t([]),requestAnimationFrame(B),await h(a,s.map(({name:a,data:b,type:c})=>({name:a,data:b,type:c})))||(n(a),t(s),requestAnimationFrame(B)))};return(0,d.jsxs)("div",{className:"composer",children:[g?(0,d.jsx)("div",{className:"composer-box chat-readonly",children:(0,d.jsx)("span",{className:"muted",children:l("chat.readOnly")})}):(0,d.jsxs)("div",{className:`composer-box ${u?"over":""}`,onDragOver:a=>{[...a.dataTransfer.types].includes("Files")&&(a.preventDefault(),v(!0))},onDragLeave:()=>v(!1),onDrop:a=>{v(!1);let b=[...a.dataTransfer.files];b.length&&(a.preventDefault(),C(b))},children:[s.length>0&&(0,d.jsx)("div",{className:"cmp-imgs",children:s.map(a=>{let b;return(0,d.jsxs)("span",{className:`cmp-img${a.type.startsWith("image/")?"":" file"}`,title:a.name,children:[a.type.startsWith("image/")?(0,d.jsx)("img",{src:a.data,alt:a.name}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.A,{size:14,"aria-hidden":!0}),(0,d.jsx)("b",{children:a.name}),(0,d.jsx)("i",{children:(b=a.size)<1024?`${b} B`:b<1048576?`${Math.round(b/1024)} KB`:`${(b/1024/1024).toFixed(1)} MB`})]}),(0,d.jsx)("button",{type:"button",onClick:()=>t(b=>b.filter(b=>b.id!==a.id)),"aria-label":l("chat.img.remove",{name:a.name}),title:l("chat.img.remove",{name:a.name}),children:(0,d.jsx)(p.A,{size:12})})]},a.id)})}),(0,d.jsx)("input",{ref:A,type:"file",multiple:!0,hidden:!0,onChange:a=>{C([...a.target.files??[]]),a.target.value=""}}),(0,d.jsx)("button",{type:"button",className:"btn ghost icon",onClick:()=>A.current?.click(),"aria-label":l("chat.img.attach"),title:l("chat.img.attach"),children:(0,d.jsx)(o.A,{size:18})}),(0,d.jsx)("textarea",{ref:z,rows:1,onPaste:a=>{let b=[...a.clipboardData.files];!b.length||a.clipboardData.getData("text/plain").trim()||(a.preventDefault(),C(b))},value:m,placeholder:c?l("chat.queuePlaceholder"):l("chat.placeholder",{name:b}),"aria-label":l("chat.messageLabel"),onChange:a=>{n(a.target.value),B()},onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||a.nativeEvent.isComposing||(a.preventDefault(),D())}}),c&&(0,d.jsxs)("button",{className:"btn",onClick:i,"aria-label":l("chat.stop"),children:[(0,d.jsx)(q.A,{size:14,fill:"currentColor"}),l("chat.stop")]}),(0,d.jsx)("button",{className:"btn primary icon",onClick:()=>void D(),disabled:!m.trim()&&!s.length,"aria-label":l("chat.send"),children:(0,d.jsx)(r.A,{size:18})})]}),(0,d.jsxs)("div",{className:"composer-meta",children:[(0,d.jsx)("span",{children:l("chat.keys")}),(0,d.jsx)("button",{type:"button",className:"linkbtn",onClick:k,children:j?l("chat.collapseTools"):l("chat.expandTools")}),f>0&&(0,d.jsx)("span",{children:l("queue.count",{count:f})})]})]})});function P({agent:a,sessionOverride:b}){let{t:c}=(0,G.s9)(),{agents:f}=(0,v.q5)(),{clearLive:g}=(0,v.zd)(),h=(0,y.dj)(),[i,j]=(0,e.useState)([]),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(60),[o,p]=(0,e.useState)(0),q=(0,e.useRef)(null),[r,w]=(0,e.useState)([]),[x,A]=(0,e.useState)(null),B=(0,e.useRef)(null),C=(0,e.useRef)(!0),D=(0,e.useRef)(0),E=(0,e.useRef)(0),F=(0,e.useCallback)(()=>{E.current=performance.now()},[]),[I,J]=(0,e.useState)(!1),L=(0,e.useCallback)(()=>{C.current=!1,J(!0)},[]),P=(0,e.useCallback)(()=>{let a=B.current;C.current=!0,J(!1),a&&(a.scrollTop=a.scrollHeight)},[]),Q=(0,v.M_)(a.id),R="running"===a.status||!!Q,S=void 0!==b&&b!==a.session_id;(0,e.useCallback)(()=>{let c=S?b:a.session_id;return c?u.FH.get(`/agents/${a.id}/history?session=${encodeURIComponent(c)}&limit=${m}`).then(a=>{j(a.messages),p(a.total??a.messages.length),l(!0)}).catch(a=>{h(a.message,"err"),l(!0)}):(j([]),l(!0),Promise.resolve())},[a.id,a.session_id,S,b,h,m]);let T=(0,e.useCallback)(()=>{q.current=B.current?.scrollHeight??null,L(),n(a=>a+120)},[L]),U=(0,v.SV)(a.id);(0,e.useRef)(!0).current=!Q&&"running"!==a.status&&!a.queued;let V=(0,e.useCallback)(async(b,d=[])=>{if(S)return!1;w(a=>[...a,b]),P();try{let c=await u.FH.post(`/agents/${a.id}/messages`,{prompt:b,...d.length?{files:d}:{}});return c.prompt&&c.prompt!==b&&w(a=>{let d=a.lastIndexOf(b);return d<0?a:a.map((a,b)=>b===d?c.prompt:a)}),!0}catch(a){return w(a=>{let c=a.lastIndexOf(b);return c<0?a:a.filter((a,b)=>b!==c)}),h(a instanceof Error?a.message:c("chat.sendFailed"),"err"),!1}},[a.id,S,h,c,P]),W=(0,e.useCallback)(()=>{u.FH.post(`/agents/${a.id}/stop`).catch(()=>void 0)},[a.id]),X=(0,e.useCallback)(()=>A(a=>!a),[]),Y=r.filter((a,b)=>!(Q&&b===r.findIndex(a=>a.trim()===Q.prompt.trim()))),Z=k&&!i.length&&!Q&&!r.length;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(z.Qh.Provider,{value:x,children:(0,d.jsxs)("div",{className:"thread-wrap",children:[(0,d.jsx)("div",{className:"thread",ref:B,role:"log","aria-label":c("fa.chat.log",{name:a.name}),"aria-live":Q?"off":"polite","aria-relevant":"additions",tabIndex:-1,onWheel:a=>{a.deltaY<0&&L()},onTouchStart:F,onTouchMove:F,onPointerDown:F,onPointerMove:a=>{a.buttons&&F()},onKeyDown:a=>{!["PageUp","ArrowUp","Home"].includes(a.key)||a.target instanceof HTMLTextAreaElement||L()},onScroll:a=>{let b=a.currentTarget;b.scrollHeight-b.scrollTop-b.clientHeight<40?(C.current=!0,J(!1)):b.scrollTop<D.current-1&&performance.now()-E.current<700&&L(),D.current=b.scrollTop},children:(0,d.jsxs)("div",{className:"thread-inner",children:[Z&&(0,d.jsx)("div",{className:"mt-l",children:(0,d.jsx)(y.pp,{icon:(0,d.jsx)(y._h,{agent:a,size:"lg"}),title:c("chat.empty.title",{name:a.name}),body:"orchestrator"===a.role?c("chat.empty.orchestrator"):c("chat.empty.worker")})}),o>i.length&&(0,d.jsx)("button",{type:"button",className:"btn sm chat-earlier",onClick:T,children:c("chat.earlier",{n:o-i.length})}),(0,d.jsx)(N,{msgs:i,agent:a}),Q&&(0,d.jsxs)(d.Fragment,{children:["dispatch"===Q.source?(0,d.jsxs)("div",{className:"delegation-card",children:[(0,d.jsxs)("div",{className:"head",children:[(0,d.jsx)(s.A,{size:14}),c("chat.delegatedFrom",{name:f.find(a=>a.id===Q.from)?.name??c("chat.anOrchestrator")})]}),(0,d.jsx)("p",{children:Q.prompt}),(0,d.jsx)("span",{className:"hint",children:c("chat.delegatedNote")})]}):!i.some(a=>"user"===a.role&&a.blocks.some(a=>"text"===a.type&&a.text.trim()===Q.prompt.trim()))&&(0,d.jsx)(H,{text:Q.prompt,agentId:a.id}),(0,d.jsxs)("div",{className:"msg assistant",children:[(0,d.jsxs)("div",{className:"who",children:[(0,d.jsx)(y._h,{agent:a,size:"sm"}),a.name]}),(0,d.jsx)(M,{blocks:Q.blocks,streaming:!0}),!Q.error&&(0,d.jsxs)("span",{className:"typing","aria-label":c("common.working"),children:[(0,d.jsx)("i",{}),(0,d.jsx)("i",{}),(0,d.jsx)("i",{})]}),(0,d.jsx)(K,{turn:Q}),Q.error&&(0,d.jsx)(y.lZ,{kind:"err",onDismiss:()=>g(a.id),children:(0,G.YF)(Q.error)})]})]}),Y.map((b,e)=>(0,d.jsx)(H,{agentId:a.id,text:b,badge:Q?c("chat.queuedBadge"):void 0},`${e}:${b}`))]})}),I&&(0,d.jsxs)("button",{type:"button",className:"btn sm chat-jump",onClick:P,children:[(0,d.jsx)(t.A,{size:14,"aria-hidden":!0}),c("fa.chat.jump")]})]})}),(0,d.jsx)("span",{className:"chat-sr",role:"status",children:Q?c("fa.chat.working",{name:a.name}):U?c("fa.chat.done",{name:a.name}):""}),(0,d.jsx)(O,{agentId:a.id,name:a.name,running:R,queued:a.queued??0,readOnly:S,onSend:V,onStop:W,toolsOpen:x,onToggleTools:X})]})}},78574:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).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"}]])},91313:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).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"}]])}};
|
|
1
|
+
"use strict";exports.id=612,exports.ids=[612],exports.modules={12675:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},30257:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).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"}]])},33165:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).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"}]])},36414:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).A)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},40413:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).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"}]])},48612:(a,b,c)=>{c.d(b,{ry:()=>R,BZ:()=>P});var d=c(55322),e=c(17027),f=c(37070),g=c(31826),h=c(40413),i=c(33165),j=c(30257),k=c(78574),l=c(51537);let m=(0,l.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"}]]);var n=c(29083),o=c(47087),p=c(31251),q=c(84300),r=c(36414),s=c(93351),t=c(12675),u=c(7371),v=c(60570),w=c(73269),x=c(61162),y=c(5207),z=c(2335);let A=(0,l.A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);var B=c(91313);let C=(0,l.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"}]]),D=/^\[hive:channel\] (.+?) · Place: (.+?) · Thread: (.+?) · From: (.+?)((?: · (?:Addressed|Muted): \w+| · To: [^·\n]+)*)(?: · Now: [^\n]*)?\nMessage:\n([\s\S]*)$/,E="\n\n[hive:context]\n",F="\n\n[hive:files]\n";var G=c(93884);function H({text:a,badge:b,agentId:c}){let{t:e}=(0,G.s9)(),f=function(a){let b=D.exec(a);if(!b)return null;let[c,...d]=b[6].split(E),[e,...f]=c.split(F),g=f.join(F).split("\n").flatMap(a=>{let b=/^- (.+) \(([^()]*)\)$/.exec(a);return b?[{path:b[1],name:b[1].replace(/^.*[\\/]/,"").replace(/^\d+-\d+-/,""),detail:b[2]}]:[]});return{platform:b[1],place:b[2],thread:b[3],from:b[4],body:e,files:g,overheard:/Addressed: no/.test(b[5]),muted:/Muted: yes/.test(b[5]),context:d.join(E)}}(a),g=f?null:function(a){let b=a.indexOf(F);if(b<0)return null;let c=a.slice(b+F.length).split("\n").flatMap(a=>{let b=/^- (.+) \(([^()]*)\)$/.exec(a);return b?[{path:b[1],name:b[1].replace(/^.*[\\/]/,"").replace(/^web-\d+-\d+-/,""),detail:b[2]}]:[]});return c.length?{body:a.slice(0,b),files:c}:null}(a);return g?(0,d.jsxs)("div",{className:`msg user${b?" queued":""}`,children:[(0,d.jsxs)("div",{className:"bubble",children:[g.body.trim()&&"(no text)"!==g.body.trim()&&(0,d.jsx)("div",{children:g.body.trim()}),(0,d.jsx)("div",{className:"bubble-imgs",children:g.files.map(a=>{let b=c?`/api/agents/${c}/inbox?path=${encodeURIComponent(a.path)}`:void 0;return c&&/\.(png|jpe?g|gif|webp)$/i.test(a.path)?(0,d.jsx)("a",{href:b,target:"_blank",rel:"noreferrer",title:a.name,children:(0,d.jsx)("img",{src:b,alt:a.name,loading:"lazy"})},a.path):(0,d.jsxs)("a",{className:"chfile",href:b,download:a.name,title:a.path,children:[(0,d.jsx)(o.A,{size:11,"aria-hidden":!0}),a.name,(0,d.jsx)("i",{children:a.detail.split(", ").pop()})]},a.path)})})]}),b&&(0,d.jsxs)("span",{className:"queued-tag",children:[(0,d.jsx)(A,{size:11,"aria-hidden":!0}),b]})]}):f?(0,d.jsx)("div",{className:"msg user",children:(0,d.jsxs)("div",{className:"bubble channel",children:[(0,d.jsxs)("div",{className:"chhead",children:[(0,d.jsx)(B.A,{size:12,"aria-hidden":!0}),(0,d.jsx)("b",{children:f.platform}),(0,d.jsx)("span",{children:f.place}),f.overheard&&(0,d.jsxs)("span",{className:"chtag",title:e("chat.channel.overheard.hint"),children:[(0,d.jsx)(C,{size:11,"aria-hidden":!0}),e("chat.channel.overheard")]}),(0,d.jsx)("span",{className:"chfrom",children:f.from.replace(/\s*\(.*\)$/,"")})]}),(0,d.jsx)("div",{className:"chbody",children:f.body}),f.files.length>0&&(0,d.jsx)("div",{className:"chfiles",children:f.files.map(a=>(0,d.jsxs)("span",{className:"chfile",title:a.path,children:[(0,d.jsx)(o.A,{size:11,"aria-hidden":!0}),a.name,(0,d.jsx)("i",{children:a.detail.split(", ").pop()})]},a.path))}),f.context&&(0,d.jsxs)("details",{className:"chctx",children:[(0,d.jsx)("summary",{children:e("chat.channel.context",{n:f.context.split("\n").filter(a=>a.startsWith("- ")).length})}),(0,d.jsx)("pre",{children:f.context.replace(/^[^\n]*\n/,"")})]})]})}):(0,d.jsxs)("div",{className:`msg user${b?" queued":""}`,children:[(0,d.jsx)("div",{className:"bubble",children:a}),b&&(0,d.jsxs)("span",{className:"queued-tag",children:[(0,d.jsx)(A,{size:11,"aria-hidden":!0}),b]})]})}var I=c(30584);function J({m:a}){let{t:b}=(0,G.s9)(),c=a.meta?.usage,e=a.blocks.filter(a=>"tool"===a.type).length;if(!c&&!a.durationMs&&!e)return null;let f=(0,I.RP)(c);return(0,d.jsxs)("div",{className:"replymeta",children:[a.meta?.model&&(0,d.jsx)("span",{className:"mono",children:a.meta.model.replace(/^claude-/,"").replace(/-\d{8}$/,"")}),f>0&&(0,d.jsxs)("span",{title:c?b("chat.tokenDetail",{input:c.input,output:c.output,cacheRead:c.cacheRead,cacheWrite:c.cacheWrite}):"",children:[(0,d.jsx)(h.A,{size:12}),b("chat.inOut",{in:(0,I.yj)(c.input+c.cacheRead+c.cacheWrite),out:(0,I.yj)(c.output)})]}),c?.credits?(0,d.jsxs)("span",{children:[(0,d.jsx)(i.A,{size:12}),b("chat.credits",{value:c.credits.toFixed(2)})]}):null,a.meta?.cost!==void 0&&(0,d.jsxs)("span",{title:b(a.meta.costEstimated?"stats.costEstimated":"stats.costReported"),children:[(0,d.jsx)(i.A,{size:12}),a.meta.costEstimated?"≈ ":"",(0,I.F0)(a.meta.cost)]}),e>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(j.A,{size:12}),b("chat.tools",{count:e})]}),a.durationMs?(0,d.jsxs)("span",{children:[(0,d.jsx)(k.A,{size:12}),(0,I.nc)(a.durationMs)]}):null]})}let K=/usage limit|quota|insufficient|rate.?limit|too many requests|credits/i;function L({agent:a,error:b,onDone:c}){let{t:f}=(0,G.s9)(),g=(0,y.dj)(),[h,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)(!1),l=async()=>{k(!0);try{await u.FH.post(`/agents/${a.id}/compact`),g(f("chat.compacted"),"ok"),c()}catch(a){g(f("chat.compactFailed",{reason:a instanceof Error?a.message:String(a)}),"err")}finally{k(!1)}},m=K.test(b);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsx)("span",{className:"muted",children:f(m?"chat.failedHintLimit":h?"chat.failedHintCompact":"chat.failedHint")}),h&&!m&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsx)("button",{type:"button",className:"btn sm",disabled:j,onClick:()=>void l(),children:j?f("chat.compacting"):f("chat.compact")})]})]})}function M({turn:a}){let{t:b}=(0,G.s9)(),[,c]=(0,e.useState)(0),f=!!a.error,g=(0,e.useRef)(0);f&&!g.current&&(g.current=Date.now());let i=a.usage,l=a.blocks.filter(a=>"tool"===a.type).length;return(0,d.jsxs)("div",{className:"replymeta live",children:[(0,d.jsxs)("span",{children:[(0,d.jsx)(k.A,{size:12}),(0,I.nc)((f?g.current:Date.now())-a.startedAt)]}),l>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(j.A,{size:12}),b("chat.tools",{count:l})]}),i&&(i.output??0)>0&&(0,d.jsxs)("span",{children:[(0,d.jsx)(h.A,{size:12}),b("chat.inOut",{in:(0,I.yj)((i.input??0)+(i.cacheRead??0)+(i.cacheWrite??0)),out:(0,I.yj)(i.output??0)})]}),i?.contextPct!==void 0&&(0,d.jsx)("span",{children:b("chat.contextPct",{pct:i.contextPct.toFixed(1)})})]})}let N=(0,e.memo)(function({text:a}){return(0,d.jsx)("div",{className:"md",children:(0,d.jsx)(f.oz,{remarkPlugins:[g.A],children:a})})}),O=(0,e.memo)(function({blocks:a,streaming:b}){let{t:c}=(0,G.s9)();return(0,d.jsxs)(d.Fragment,{children:[a.map((e,f)=>"text"===e.type?(0,d.jsx)(N,{text:e.text},f):"thinking"===e.type?(0,d.jsxs)("details",{className:"fold think",children:[(0,d.jsxs)("summary",{children:[(0,d.jsx)(m,{size:14}),b&&f===a.length-1?c("activity.thinking"):c("chat.thought"),(0,d.jsx)(n.A,{size:14,className:"chev"})]}),(0,d.jsx)("pre",{children:e.text})]},f):(0,d.jsx)(z.Dm,{tool:e,streaming:b},f)),(0,d.jsx)(z.Kt,{blocks:a})]})}),P=(0,e.memo)(function({msgs:a,agent:b}){(0,G.s9)();let c=(0,e.useMemo)(()=>(function(a){let b=[],c=null;for(let d of a){let a;if("user"===d.role){c=d.ts,b.push(d);continue}let e=b[b.length-1],f=(a,b)=>{if(!a)return b;if(!b)return a;let c=a.usage,d=b.usage;return{model:b.model??a.model,endTs:b.endTs??a.endTs,cost:void 0!==a.cost||void 0!==b.cost?(a.cost??0)+(b.cost??0):void 0,costEstimated:a.costEstimated||b.costEstimated,usage:c&&d?{input:c.input+d.input,output:c.output+d.output,cacheRead:c.cacheRead+d.cacheRead,cacheWrite:c.cacheWrite+d.cacheWrite,reasoning:c.reasoning+d.reasoning,credits:(c.credits??0)+(d.credits??0)||void 0,contextPct:d.contextPct??c.contextPct}:c??d}};e?.role==="assistant"?(a={...e,blocks:[...e.blocks,...d.blocks],meta:f(e.meta,d.meta)},b[b.length-1]=a):(a={...d},b.push(a));let g=a.meta?.endTs;a.durationMs=c&&g?Math.max(0,g-c):void 0}return b})(a),[a]);return(0,d.jsx)(d.Fragment,{children:c.map(a=>"user"===a.role?(0,d.jsx)(H,{agentId:b.id,text:a.blocks.map(a=>"text"===a.type?a.text:"").join("")},a.id):(0,d.jsxs)("div",{className:"msg assistant",children:[(0,d.jsxs)("div",{className:"who",children:[(0,d.jsx)(y._h,{agent:b,size:"sm"}),b.name,(0,d.jsx)("span",{className:"stamp",children:a.ts?(0,x.KN)(a.ts):""})]}),(0,d.jsx)(O,{blocks:a.blocks}),(0,d.jsx)(J,{m:a})]},a.id))})},(a,b)=>a.msgs===b.msgs&&a.agent.id===b.agent.id&&a.agent.name===b.agent.name&&a.agent.provider===b.agent.provider&&a.agent.role===b.agent.role),Q=(0,e.memo)(function({agentId:a,name:b,running:c,queued:f,readOnly:g,onSend:h,onStop:i,toolsOpen:j,onToggleTools:k}){let{t:l}=(0,G.s9)(),[m,n]=(0,w.ud)(`hive-am.draft.${a}`,""),[s,t]=(0,e.useState)([]),[u,v]=(0,e.useState)(!1),x=(0,y.dj)(),z=(0,e.useRef)(null),A=(0,e.useRef)(null),B=()=>{let a=z.current;a&&(a.style.height="auto",a.style.height=Math.min(a.scrollHeight,200)+"px")},C=async a=>{let b=a.slice(0,Math.max(0,5-s.length));b.length<a.length&&x(l("chat.img.max",{n:5}),"err");let c=b.filter(a=>a.size<=0x1400000&&a.size>0);c.length<b.length&&x(l("chat.img.big",{mb:20}),"err");let d=await Promise.all(c.map((a,b)=>new Promise((c,d)=>{let e=new FileReader;e.onload=()=>c({id:`${Date.now()}-${b}`,name:a.name&&"image.png"!==a.name?a.name:`pasted-${b+1}.png`,data:String(e.result),type:a.type,size:a.size}),e.onerror=()=>d(e.error),e.readAsDataURL(a)})));t(a=>[...a,...d])},D=async()=>{let a=m.trim();(a||s.length)&&(n(""),t([]),requestAnimationFrame(B),await h(a,s.map(({name:a,data:b,type:c})=>({name:a,data:b,type:c})))||(n(a),t(s),requestAnimationFrame(B)))};return(0,d.jsxs)("div",{className:"composer",children:[g?(0,d.jsx)("div",{className:"composer-box chat-readonly",children:(0,d.jsx)("span",{className:"muted",children:l("chat.readOnly")})}):(0,d.jsxs)("div",{className:`composer-box ${u?"over":""}`,onDragOver:a=>{[...a.dataTransfer.types].includes("Files")&&(a.preventDefault(),v(!0))},onDragLeave:()=>v(!1),onDrop:a=>{v(!1);let b=[...a.dataTransfer.files];b.length&&(a.preventDefault(),C(b))},children:[s.length>0&&(0,d.jsx)("div",{className:"cmp-imgs",children:s.map(a=>{let b;return(0,d.jsxs)("span",{className:`cmp-img${a.type.startsWith("image/")?"":" file"}`,title:a.name,children:[a.type.startsWith("image/")?(0,d.jsx)("img",{src:a.data,alt:a.name}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.A,{size:14,"aria-hidden":!0}),(0,d.jsx)("b",{children:a.name}),(0,d.jsx)("i",{children:(b=a.size)<1024?`${b} B`:b<1048576?`${Math.round(b/1024)} KB`:`${(b/1024/1024).toFixed(1)} MB`})]}),(0,d.jsx)("button",{type:"button",onClick:()=>t(b=>b.filter(b=>b.id!==a.id)),"aria-label":l("chat.img.remove",{name:a.name}),title:l("chat.img.remove",{name:a.name}),children:(0,d.jsx)(p.A,{size:12})})]},a.id)})}),(0,d.jsx)("input",{ref:A,type:"file",multiple:!0,hidden:!0,onChange:a=>{C([...a.target.files??[]]),a.target.value=""}}),(0,d.jsx)("button",{type:"button",className:"btn ghost icon",onClick:()=>A.current?.click(),"aria-label":l("chat.img.attach"),title:l("chat.img.attach"),children:(0,d.jsx)(o.A,{size:18})}),(0,d.jsx)("textarea",{ref:z,rows:1,onPaste:a=>{let b=[...a.clipboardData.files];!b.length||a.clipboardData.getData("text/plain").trim()||(a.preventDefault(),C(b))},value:m,placeholder:c?l("chat.queuePlaceholder"):l("chat.placeholder",{name:b}),"aria-label":l("chat.messageLabel"),onChange:a=>{n(a.target.value),B()},onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||a.nativeEvent.isComposing||(a.preventDefault(),D())}}),c&&(0,d.jsxs)("button",{className:"btn",onClick:i,"aria-label":l("chat.stop"),children:[(0,d.jsx)(q.A,{size:14,fill:"currentColor"}),l("chat.stop")]}),(0,d.jsx)("button",{className:"btn primary icon",onClick:()=>void D(),disabled:!m.trim()&&!s.length,"aria-label":l("chat.send"),children:(0,d.jsx)(r.A,{size:18})})]}),(0,d.jsxs)("div",{className:"composer-meta",children:[(0,d.jsx)("span",{children:l("chat.keys")}),(0,d.jsx)("button",{type:"button",className:"linkbtn",onClick:k,children:j?l("chat.collapseTools"):l("chat.expandTools")}),f>0&&(0,d.jsx)("span",{children:l("queue.count",{count:f})})]})]})});function R({agent:a,sessionOverride:b}){let{t:c}=(0,G.s9)(),{agents:f}=(0,v.q5)(),{clearLive:g}=(0,v.zd)(),h=(0,y.dj)(),[i,j]=(0,e.useState)([]),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(60),[o,p]=(0,e.useState)(0),q=(0,e.useRef)(null),[r,w]=(0,e.useState)([]),[x,A]=(0,e.useState)(null),B=(0,e.useRef)(null),C=(0,e.useRef)(!0),D=(0,e.useRef)(0),E=(0,e.useRef)(0),F=(0,e.useCallback)(()=>{E.current=performance.now()},[]),[I,J]=(0,e.useState)(!1),K=(0,e.useCallback)(()=>{C.current=!1,J(!0)},[]),N=(0,e.useCallback)(()=>{let a=B.current;C.current=!0,J(!1),a&&(a.scrollTop=a.scrollHeight)},[]),R=(0,v.M_)(a.id),S="running"===a.status||!!R&&!R.error,T=void 0!==b&&b!==a.session_id;(0,e.useCallback)(()=>{let c=T?b:a.session_id;return c?u.FH.get(`/agents/${a.id}/history?session=${encodeURIComponent(c)}&limit=${m}`).then(a=>{j(a.messages),p(a.total??a.messages.length),l(!0)}).catch(a=>{h(a.message,"err"),l(!0)}):(j([]),p(0),l(!0),Promise.resolve())},[a.id,a.session_id,T,b,h,m]);let U=(0,e.useCallback)(()=>{q.current=B.current?.scrollHeight??null,K(),n(a=>a+120)},[K]),V=(0,v.SV)(a.id);(0,e.useRef)(!0).current=!R&&"running"!==a.status&&!a.queued;let W=(0,e.useCallback)(async(b,d=[])=>{if(T)return!1;w(a=>[...a,b]),N();try{let c=await u.FH.post(`/agents/${a.id}/messages`,{prompt:b,...d.length?{files:d}:{}});return c.prompt&&c.prompt!==b&&w(a=>{let d=a.lastIndexOf(b);return d<0?a:a.map((a,b)=>b===d?c.prompt:a)}),!0}catch(a){return w(a=>{let c=a.lastIndexOf(b);return c<0?a:a.filter((a,b)=>b!==c)}),h(a instanceof Error?a.message:c("chat.sendFailed"),"err"),!1}},[a.id,T,h,c,N]),X=(0,e.useCallback)(()=>{u.FH.post(`/agents/${a.id}/stop`).catch(()=>void 0)},[a.id]),Y=(0,e.useCallback)(()=>A(a=>!a),[]),Z=r.filter((a,b)=>!(R&&b===r.findIndex(a=>a.trim()===R.prompt.trim()))),$=k&&!i.length&&!R&&!r.length;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(z.Qh.Provider,{value:x,children:(0,d.jsxs)("div",{className:"thread-wrap",children:[(0,d.jsx)("div",{className:"thread",ref:B,role:"log","aria-label":c("fa.chat.log",{name:a.name}),"aria-live":R?"off":"polite","aria-relevant":"additions",tabIndex:-1,onWheel:a=>{a.deltaY<0&&K()},onTouchStart:F,onTouchMove:F,onPointerDown:F,onPointerMove:a=>{a.buttons&&F()},onKeyDown:a=>{!["PageUp","ArrowUp","Home"].includes(a.key)||a.target instanceof HTMLTextAreaElement||K()},onScroll:a=>{let b=a.currentTarget;b.scrollHeight-b.scrollTop-b.clientHeight<40?(C.current=!0,J(!1)):b.scrollTop<D.current-1&&performance.now()-E.current<700&&K(),D.current=b.scrollTop},children:(0,d.jsxs)("div",{className:"thread-inner",children:[$&&(0,d.jsx)("div",{className:"mt-l",children:(0,d.jsx)(y.pp,{icon:(0,d.jsx)(y._h,{agent:a,size:"lg"}),title:c("chat.empty.title",{name:a.name}),body:"orchestrator"===a.role?c("chat.empty.orchestrator"):c("chat.empty.worker")})}),o>i.length&&(0,d.jsx)("button",{type:"button",className:"btn sm chat-earlier",onClick:U,children:c("chat.earlier",{n:o-i.length})}),(0,d.jsx)(P,{msgs:i,agent:a}),R&&(0,d.jsxs)(d.Fragment,{children:["dispatch"===R.source?(0,d.jsxs)("div",{className:"delegation-card",children:[(0,d.jsxs)("div",{className:"head",children:[(0,d.jsx)(s.A,{size:14}),c("chat.delegatedFrom",{name:f.find(a=>a.id===R.from)?.name??c("chat.anOrchestrator")})]}),(0,d.jsx)("p",{children:R.prompt}),(0,d.jsx)("span",{className:"hint",children:c("chat.delegatedNote")})]}):!i.some(a=>"user"===a.role&&a.blocks.some(a=>"text"===a.type&&a.text.trim()===R.prompt.trim()))&&(0,d.jsx)(H,{text:R.prompt,agentId:a.id}),(0,d.jsxs)("div",{className:"msg assistant",children:[(0,d.jsxs)("div",{className:"who",children:[(0,d.jsx)(y._h,{agent:a,size:"sm"}),a.name]}),(0,d.jsx)(O,{blocks:R.blocks,streaming:!0}),!R.error&&(0,d.jsxs)("span",{className:"typing","aria-label":c("common.working"),children:[(0,d.jsx)("i",{}),(0,d.jsx)("i",{}),(0,d.jsx)("i",{})]}),(0,d.jsx)(M,{turn:R}),R.error&&(0,d.jsxs)(y.lZ,{kind:"err",onDismiss:()=>g(a.id),children:[(0,G.YF)(R.error),(0,d.jsx)(L,{agent:a,error:R.error,onDone:()=>g(a.id)})]})]})]}),Z.map((b,e)=>(0,d.jsx)(H,{agentId:a.id,text:b,badge:R?c("chat.queuedBadge"):void 0},`${e}:${b}`))]})}),I&&(0,d.jsxs)("button",{type:"button",className:"btn sm chat-jump",onClick:N,children:[(0,d.jsx)(t.A,{size:14,"aria-hidden":!0}),c("fa.chat.jump")]})]})}),(0,d.jsx)("span",{className:"chat-sr",role:"status",children:R?c("fa.chat.working",{name:a.name}):V?c("fa.chat.done",{name:a.name}):""}),(0,d.jsx)(Q,{agentId:a.id,name:a.name,running:S,queued:a.queued??0,readOnly:T,onSend:W,onStop:X,toolsOpen:x,onToggleTools:Y})]})}},78574:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).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"}]])},91313:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(51537).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"}]])}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--p4S3i9kvO359GW91DQiHu--><html lang="en" class="__variable_23d1a5 __variable_67a390 __variable_4dc837"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/313510e2713fb214-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/33553e7595b74ccf-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bb3ef058b751a6ad-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" as="image" href="/icon.png"/><link rel="stylesheet" href="/_next/static/css/945795da867f5250.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/dd4e32c285f75776.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-ef515e41a83a16ac.js"/><script src="/_next/static/chunks/0937d497-114a2a3de515565e.js" async=""></script><script src="/_next/static/chunks/89-b194fcffe5120c44.js" async=""></script><script src="/_next/static/chunks/main-app-6086068e5fb5eacd.js" async=""></script><script src="/_next/static/chunks/586-f7017d585a84738d.js" async=""></script><script src="/_next/static/chunks/839-23c5508622fae942.js" async=""></script><script src="/_next/static/chunks/app/layout-87ebb70bd9cb8443.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>hive-am</title><meta name="description" content="Run a colony of coding agents across Claude Code, OpenCode and Kiro."/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icon.png?4b73b0b54465bf4f" type="image/png" sizes="256x256"/><link rel="apple-touch-icon" href="/apple-icon.png?cac1d6d73e6ce0be" type="image/png" sizes="180x180"/><script>(function(){try{var d=document.documentElement,t=localStorage.getItem('hive-theme');if(t!=='light'&&t!=='dark'){var m=matchMedia('(prefers-color-scheme: dark)');t=m.matches?'dark':'light';m.addEventListener('change',function(e){if(!localStorage.getItem('hive-theme'))d.dataset.theme=e.matches?'dark':'light'})}d.dataset.theme=t;var l=localStorage.getItem("hive-locale");if(l!=='en'&&l!=='es')l=(navigator.language||'').toLowerCase().indexOf('es')===0?'es':'en';d.lang=l}catch(e){}})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div class="shell"><nav class="rail" aria-label="Main"><div class="brand"><img src="/icon.png" width="34" height="34" alt="" aria-hidden="true" class="brand-mark"/><div>hive-am<small>agent colony manager</small></div></div><div class="lang-row" role="group" aria-label="Language"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-globe" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg><div class="seg"><button type="button" aria-pressed="true" lang="en" title="English" aria-label="English">EN</button><button type="button" aria-pressed="false" lang="es" title="Español" aria-label="Español">ES</button></div></div><a class="nav" href="/"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hexagon"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg><span class="t">Colony</span></a><a class="nav" href="/resources"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span class="t">Resources</span></a><a class="nav" href="/agents"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M22 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg><span class="t">Agents</span><span class="count">0</span></a><a class="nav" href="/relations"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-network"><rect x="16" y="16" width="6" height="6" rx="1"></rect><rect x="2" y="16" width="6" height="6" rx="1"></rect><rect x="9" y="2" width="6" height="6" rx="1"></rect><path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"></path><path d="M12 12V8"></path></svg><span class="t">Relations</span></a><a class="nav" href="/connections"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plug"><path d="M12 22v-5"></path><path d="M9 8V2"></path><path d="M15 8V2"></path><path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z"></path></svg><span class="t">Connections</span></a><a class="nav" href="/schedules"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-calendar-clock"><path d="M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5"></path><path d="M16 2v4"></path><path d="M8 2v4"></path><path d="M3 10h5"></path><path d="M17.5 17.5 16 16.3V14"></path><circle cx="16" cy="16" r="6"></circle></svg><span class="t">Schedules</span></a><div class="nav-label">Library</div><a class="nav" href="/types"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-boxes"><path d="M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"></path><path d="m7 16.5-4.74-2.85"></path><path d="m7 16.5 5-3"></path><path d="M7 16.5v5.17"></path><path d="M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"></path><path d="m17 16.5-5-3"></path><path d="m17 16.5 4.74-2.85"></path><path d="M17 16.5v5.17"></path><path d="M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"></path><path d="M12 8 7.26 5.15"></path><path d="m12 8 4.74-2.85"></path><path d="M12 13.5V8"></path></svg><span class="t">Agent types</span><span class="count">0</span></a><a class="nav" href="/skills"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-library"><path d="m16 6 4 14"></path><path d="M12 6v14"></path><path d="M8 8v12"></path><path d="M4 4v16"></path></svg><span class="t">Skills</span><span class="count">0</span></a><div class="nav-label">History</div><a class="nav" href="/sessions"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-history"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"></path><path d="M3 3v5h5"></path><path d="M12 7v5l4 2"></path></svg><span class="t">Sessions</span></a><div class="rail-foot"><button type="button" class="nav" aria-pressed="false" title="Terminal (Ctrl+`)"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square-terminal"><path d="m7 11 2-2-2-2"></path><path d="M11 13h4"></path><rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect></svg><span class="t">Terminal</span></button><div class="conn"><i class="dot err"></i>Server offline. Retrying…</div><button type="button" class="nav" aria-pressed="false"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg><span class="t">Switch theme</span></button></div></nav><main class="main"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></main></div><div class="toasts" data-live="true"></div><script src="/_next/static/chunks/webpack-ef515e41a83a16ac.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5506,[\"586\",\"static/chunks/586-f7017d585a84738d.js\",\"839\",\"static/chunks/839-23c5508622fae942.js\",\"177\",\"static/chunks/app/layout-87ebb70bd9cb8443.js\"],\"Shell\"]\n3:I[26082,[],\"\"]\n4:I[64304,[],\"\"]\n5:I[40523,[],\"OutletBoundary\"]\n7:I[91962,[],\"AsyncMetadataOutlet\"]\n9:I[40523,[],\"ViewportBoundary\"]\nb:I[40523,[],\"MetadataBoundary\"]\nc:\"$Sreact.suspense\"\ne:I[89146,[],\"\"]\n:HL[\"/_next/static/media/313510e2713fb214-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/33553e7595b74ccf-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/bb3ef058b751a6ad-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/945795da867f5250.css\",\"style\"]\n:HL[\"/_next/static/css/dd4e32c285f75776.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"p4S3i9kvO359GW91DQiHu\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/945795da867f5250.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/dd4e32c285f75776.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_23d1a5 __variable_67a390 __variable_4dc837\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var d=document.documentElement,t=localStorage.getItem('hive-theme');if(t!=='light'\u0026\u0026t!=='dark'){var m=matchMedia('(prefers-color-scheme: dark)');t=m.matches?'dark':'light';m.addEventListener('change',function(e){if(!localStorage.getItem('hive-theme'))d.dataset.theme=e.matches?'dark':'light'})}d.dataset.theme=t;var l=localStorage.getItem(\\\"hive-locale\\\");if(l!=='en'\u0026\u0026l!=='es')l=(navigator.language||'').toLowerCase().indexOf('es')===0?'es':'en';d.lang=l}catch(e){}})();\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$L6\",[\"$\",\"$L7\",null,{\"promise\":\"$@8\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$c\",null,{\"fallback\":null,\"children\":\"$Ld\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n6:null\n"])</script><script>self.__next_f.push([1,"f:I[13970,[],\"IconMark\"]\n8:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"hive-am\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Run a colony of coding agents across Claude Code, OpenCode and Kiro.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.png?4b73b0b54465bf4f\",\"type\":\"image/png\",\"sizes\":\"256x256\"}],[\"$\",\"link\",\"4\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-icon.png?cac1d6d73e6ce0be\",\"type\":\"image/png\",\"sizes\":\"180x180\"}],[\"$\",\"$Lf\",\"5\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"d:\"$8:metadata\"\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><!--Bz7onClw1BajMUCwqpU8o--><html lang="en" class="__variable_23d1a5 __variable_67a390 __variable_4dc837"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/313510e2713fb214-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/33553e7595b74ccf-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bb3ef058b751a6ad-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" as="image" href="/icon.png"/><link rel="stylesheet" href="/_next/static/css/945795da867f5250.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/b7a03c62468f4263.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-ef515e41a83a16ac.js"/><script src="/_next/static/chunks/0937d497-114a2a3de515565e.js" async=""></script><script src="/_next/static/chunks/89-b194fcffe5120c44.js" async=""></script><script src="/_next/static/chunks/main-app-6086068e5fb5eacd.js" async=""></script><script src="/_next/static/chunks/586-f7017d585a84738d.js" async=""></script><script src="/_next/static/chunks/839-4aefe6e71be6e1ef.js" async=""></script><script src="/_next/static/chunks/app/layout-99620746d028dda8.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>hive-am</title><meta name="description" content="Run a colony of coding agents across Claude Code, OpenCode and Kiro."/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icon.png?4b73b0b54465bf4f" type="image/png" sizes="256x256"/><link rel="apple-touch-icon" href="/apple-icon.png?cac1d6d73e6ce0be" type="image/png" sizes="180x180"/><script>(function(){try{var d=document.documentElement,t=localStorage.getItem('hive-theme');if(t!=='light'&&t!=='dark'){var m=matchMedia('(prefers-color-scheme: dark)');t=m.matches?'dark':'light';m.addEventListener('change',function(e){if(!localStorage.getItem('hive-theme'))d.dataset.theme=e.matches?'dark':'light'})}d.dataset.theme=t;var l=localStorage.getItem("hive-locale");if(l!=='en'&&l!=='es')l=(navigator.language||'').toLowerCase().indexOf('es')===0?'es':'en';d.lang=l}catch(e){}})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div class="shell"><nav class="rail" aria-label="Main"><div class="brand"><img src="/icon.png" width="34" height="34" alt="" aria-hidden="true" class="brand-mark"/><div>hive-am<small>agent colony manager</small></div></div><div class="lang-row" role="group" aria-label="Language"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-globe" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg><div class="seg"><button type="button" aria-pressed="true" lang="en" title="English" aria-label="English">EN</button><button type="button" aria-pressed="false" lang="es" title="Español" aria-label="Español">ES</button></div></div><a class="nav" href="/"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hexagon"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg><span class="t">Colony</span></a><a class="nav" href="/resources"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span class="t">Resources</span></a><a class="nav" href="/agents"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M22 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg><span class="t">Agents</span><span class="count">0</span></a><a class="nav" href="/relations"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-network"><rect x="16" y="16" width="6" height="6" rx="1"></rect><rect x="2" y="16" width="6" height="6" rx="1"></rect><rect x="9" y="2" width="6" height="6" rx="1"></rect><path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"></path><path d="M12 12V8"></path></svg><span class="t">Relations</span></a><a class="nav" href="/connections"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plug"><path d="M12 22v-5"></path><path d="M9 8V2"></path><path d="M15 8V2"></path><path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z"></path></svg><span class="t">Connections</span></a><a class="nav" href="/schedules"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-calendar-clock"><path d="M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5"></path><path d="M16 2v4"></path><path d="M8 2v4"></path><path d="M3 10h5"></path><path d="M17.5 17.5 16 16.3V14"></path><circle cx="16" cy="16" r="6"></circle></svg><span class="t">Schedules</span></a><div class="nav-label">Library</div><a class="nav" href="/types"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-boxes"><path d="M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"></path><path d="m7 16.5-4.74-2.85"></path><path d="m7 16.5 5-3"></path><path d="M7 16.5v5.17"></path><path d="M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"></path><path d="m17 16.5-5-3"></path><path d="m17 16.5 4.74-2.85"></path><path d="M17 16.5v5.17"></path><path d="M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"></path><path d="M12 8 7.26 5.15"></path><path d="m12 8 4.74-2.85"></path><path d="M12 13.5V8"></path></svg><span class="t">Agent types</span><span class="count">0</span></a><a class="nav" href="/skills"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-library"><path d="m16 6 4 14"></path><path d="M12 6v14"></path><path d="M8 8v12"></path><path d="M4 4v16"></path></svg><span class="t">Skills</span><span class="count">0</span></a><div class="nav-label">History</div><a class="nav" href="/sessions"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-history"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"></path><path d="M3 3v5h5"></path><path d="M12 7v5l4 2"></path></svg><span class="t">Sessions</span></a><div class="rail-foot"><button type="button" class="nav" aria-pressed="false" title="Terminal (Ctrl+`)"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square-terminal"><path d="m7 11 2-2-2-2"></path><path d="M11 13h4"></path><rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect></svg><span class="t">Terminal</span></button><div class="conn"><i class="dot err"></i>Server offline. Retrying…</div><button type="button" class="nav" aria-pressed="false"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg><span class="t">Switch theme</span></button></div></nav><main class="main"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--></main></div><section class="dock" style="height:320px;display:none" aria-hidden="true" aria-label="Terminal panel"><div class="dock-grip" role="separator" aria-orientation="horizontal"></div><div class="dock-bar"><div class="dock-tabs" role="tablist" aria-label="Terminal panel"></div><button class="btn ghost icon sm" aria-label="New terminal" title="New terminal"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg></button><button class="btn ghost icon sm" aria-label="Terminal in a folder…" title="Terminal in a folder…"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></button><span class="grow"></span><button class="btn ghost icon sm" aria-label="Hide the panel" title="Hide the panel (Ctrl+`)"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down"><path d="m6 9 6 6 6-6"></path></svg></button></div><div class="dock-body"><p class="gx-note">No terminals open. Press + to start one.</p></div></section><div class="toasts" data-live="true"></div><script src="/_next/static/chunks/webpack-ef515e41a83a16ac.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5506,[\"586\",\"static/chunks/586-f7017d585a84738d.js\",\"839\",\"static/chunks/839-4aefe6e71be6e1ef.js\",\"177\",\"static/chunks/app/layout-99620746d028dda8.js\"],\"Shell\"]\n3:I[26082,[],\"\"]\n4:I[64304,[],\"\"]\n5:I[40523,[],\"OutletBoundary\"]\n7:I[91962,[],\"AsyncMetadataOutlet\"]\n9:I[40523,[],\"ViewportBoundary\"]\nb:I[40523,[],\"MetadataBoundary\"]\nc:\"$Sreact.suspense\"\ne:I[89146,[],\"\"]\n:HL[\"/_next/static/media/313510e2713fb214-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/33553e7595b74ccf-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/bb3ef058b751a6ad-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/945795da867f5250.css\",\"style\"]\n:HL[\"/_next/static/css/b7a03c62468f4263.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"Bz7onClw1BajMUCwqpU8o\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/945795da867f5250.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b7a03c62468f4263.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_23d1a5 __variable_67a390 __variable_4dc837\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var d=document.documentElement,t=localStorage.getItem('hive-theme');if(t!=='light'\u0026\u0026t!=='dark'){var m=matchMedia('(prefers-color-scheme: dark)');t=m.matches?'dark':'light';m.addEventListener('change',function(e){if(!localStorage.getItem('hive-theme'))d.dataset.theme=e.matches?'dark':'light'})}d.dataset.theme=t;var l=localStorage.getItem(\\\"hive-locale\\\");if(l!=='en'\u0026\u0026l!=='es')l=(navigator.language||'').toLowerCase().indexOf('es')===0?'es':'en';d.lang=l}catch(e){}})();\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$L6\",[\"$\",\"$L7\",null,{\"promise\":\"$@8\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$c\",null,{\"fallback\":null,\"children\":\"$Ld\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n6:null\n"])</script><script>self.__next_f.push([1,"f:I[13970,[],\"IconMark\"]\n8:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"hive-am\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Run a colony of coding agents across Claude Code, OpenCode and Kiro.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.png?4b73b0b54465bf4f\",\"type\":\"image/png\",\"sizes\":\"256x256\"}],[\"$\",\"link\",\"4\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-icon.png?cac1d6d73e6ce0be\",\"type\":\"image/png\",\"sizes\":\"180x180\"}],[\"$\",\"$Lf\",\"5\",{}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"d:\"$8:metadata\"\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-ef515e41a83a16ac.js" defer=""></script><script src="/_next/static/chunks/framework-bbac72adbbe2d328.js" defer=""></script><script src="/_next/static/chunks/main-c15f3fee674e0303.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d1670a2c6ce392fc.js" defer=""></script><script src="/_next/static/chunks/pages/_error-95aac014d202fa7a.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-ef515e41a83a16ac.js" defer=""></script><script src="/_next/static/chunks/framework-bbac72adbbe2d328.js" defer=""></script><script src="/_next/static/chunks/main-c15f3fee674e0303.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d1670a2c6ce392fc.js" defer=""></script><script src="/_next/static/chunks/pages/_error-95aac014d202fa7a.js" defer=""></script><script src="/_next/static/Bz7onClw1BajMUCwqpU8o/_buildManifest.js" defer=""></script><script src="/_next/static/Bz7onClw1BajMUCwqpU8o/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"Bz7onClw1BajMUCwqpU8o","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"GtVA2HFLB766tYSQ9AlxB9lEqc0QpbtccHPgZnZBY4c="}
|
|
@@ -0,0 +1 @@
|
|
|
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})]})}}}]);
|