UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 3.26 kB
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{$a as t}from"./_4____________________________.js";import{Dm as n,Em as r,GN as i,JN as a,Xs as o,Zs as s,fN as c,pN as l,qN as u}from"./_2_____________________________.js";import{C as d,J as f,O as p,U as m,b as h,d as g,f as _,g as v,j as y,l as b,m as x,t as S,u as C,x as w}from"./_6____________________.js";import{n as T,t as E}from"./_1____________________________________.js";import{l as D,u as O}from"./control-ui-boot-chat-styles-DMRbEm40.js";function k(e){let n=()=>a(R[e.row.status]),i=()=>e.presentation?void 0:e.row.listed?e.onOpenSubagent??e.onOpenSession:e.onOpenSession,o=()=>e.row.progress&&a(`chat.sessionDetails.planSteps`,{completed:String(e.row.progress.completed),total:String(e.row.progress.total)}),s=()=>[e.row.label,n(),e.row.activity,o()].filter(Boolean).join(`. `);var l=F();return g(l,y(S,{get component(){return i()?`button`:`div`},get class(){return[`chat-subagent-activity__row`,{"chat-subagent-activity__row--preview":!!e.row.activity}]},get type(){return i()?`button`:void 0},get title(){return s()},get"aria-label"(){return _(()=>!!i())()?s():void 0},get onClick(){return i()?()=>i()?.(e.row.key):void 0},get children(){return[(()=>{var n=j();return g(n,y(c,{name:`bot`})),b(()=>({e:e.row.status,t:`--chat-details-avatar-hue: ${t(e.row.key)%360}`}),({e,t},r)=>{e!==r?.e&&v(n,`data-status`,e),h(n,t,r?.t)}),n})(),(()=>{var t=M(),n=E(()=>e.row.label);return(typeof n==`function`||Array.isArray(n))&&x(()=>n,t),g(t,()=>e.row.label),b(()=>e.row.label,e=>{v(t,`title`,e)}),t})(),(()=>{var t=N();return g(t,()=>e.row.activity||n()),t})(),(()=>{var t=P();return g(t,y(p,{get when(){return _(()=>e.row.status!==`queued`)()&&e.row.session?.startedAt},children:t=>y(r,{get startMs(){return t()},get endMs(){return e.row.session?.endedAt??null}})})),t})(),y(p,{get when(){return e.row.progress},children:e=>(()=>{var t=I(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling;return g(t,()=>e().completed,r),g(t,()=>e().total,i),b(()=>({e:e().total,t:Math.min(e().completed,e().total)}),({e,t},r)=>{e!==r?.e&&v(n,`max`,e),t!==r?.t&&v(n,`value`,t)}),t})()})]}})),b(()=>e.row.key,e=>{v(l,`data-subagent-session-key`,e)}),l}function A(e){let t=()=>e.presentation??e.rows;return y(p,{get when(){return t().length>0},get children(){var n=L();return g(n,y(d,{get each(){return _(()=>e.limit===void 0)()?t():t().slice(0,e.limit)},keyed:e=>e.key,children:t=>y(k,f(e,{get row(){return t()}}))})),b(()=>a(`chat.subagentsPanel.title`),e=>{v(n,`aria-label`,e)}),n}})}var j,M,N,P,F,I,L,R;function z(){return(z=e((()=>{C(),m(),n(),l(),T(),D(),o(),i(),j=w(`<span class=chat-details__agent-avatar aria-hidden=true>`),M=w(`<span class=chat-subagent-activity__name>`),N=w(`<span class=chat-subagent-activity__status>`),P=w(`<span class=chat-subagent-activity__elapsed-compact aria-hidden=true>`),F=w(`<div role=listitem>`),I=w(`<span class=chat-subagent-activity__steps aria-hidden=true><meter class=chat-details__meter min=0></meter>/<!>`),L=w(`<div class=chat-subagent-activity role=list>`),u(s),u(O),R={queued:`common.queued`,running:`common.running`,waiting:`chat.waitingOnSubagents`,done:`common.completed`,failed:`common.failed`,stopped:`chat.sessionDetails.stopped`}})))()}export{z as n,A as t};