UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines • 4.82 kB
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./deferred-ui-support-DZEPWjAk.js","./control-ui-boot-chat-styles-DMRbEm40.js","./markdown-runtime-CtlJb8xA.js","./chat-message-media-runtime-tT5AgKo0.js","./virtual-core-runtime-LhyriIY5.js","./control-ui-boot-new-pHXPNTZp.js","./route-controls-runtime-LXiVRSj4.js","./control-ui-boot-new-styles-C3bRIOZh.js","./command-discovery-english-zfhZUSVO.js","./composer-invocation-menus-Dvscf6c8.js","./_1____________________________.css","./_0____________________________________.css","./control-ui-boot-chat-styles-ixIYYh0U.css","./control-ui-boot-new-styles-C8rpwVHV.css"])))=>i.map(i=>d[i]); import{n as e,r as t}from"./rolldown-runtime-CNOWq4Kh.js";import{$u as n,Bc as r,Qu as i,Wc as a}from"./_4____________________________.js";import{AN as o,EN as s,GN as c,HC as l,JN as u,VC as d,qN as f}from"./_2_____________________________.js";import{C as p,F as m,O as h,Rt as g,T as _,U as v,a as y,d as b,f as x,g as S,gt as C,j as w,k as T,l as E,o as D,p as O,u as k,x as A}from"./_6____________________.js";var j=t({FocusDashboard:()=>M});function M(e){let t=m(()=>e.route),n=()=>e.snapshot.phase===`connected`,r=m(()=>{let e=t();return e.kind===`error`||e.kind===`not-found`?e:void 0}),i=()=>{let e=r();return e?.kind===`error`?u(`dashboardDocument.loadFailed`,{error:e.message}):u(`dashboardDocument.notFound`)},a=m(()=>{let e=t();return e.kind===`ambiguous`?e.data:void 0}),o=m(()=>{let e=t();return e.kind===`session`?e.data:void 0});return w(h,{get when(){return t()},children:t=>(C(()=>e.onReady()),w(T,{get children(){return[w(_,{get when(){return t().kind===`loading`},get children(){return e.renderSplash()}}),w(_,{get when(){return r()},children:t=>(()=>{var n=N(),r=n.firstChild,a=r.firstChild;return b(a,i),b(r,()=>e.renderEscape(),null),E(()=>({e:O(t().kind===`error`?`board-document__state board-document__state--error stack`:`board-document__state stack`),t:t().kind===`error`?`alert`:`status`}),({e,t},n)=>{D(r,e,n?.e),t!==n?.t&&S(r,`role`,t)}),n})()}),w(_,{get when(){return a()},children:t=>(()=>{var n=F(),r=n.firstChild,i=r.firstChild,a=i.nextSibling,o=a.nextSibling,s=o.nextSibling,c=s.nextSibling;return b(i,()=>u(`chat.sessionRoute.chooseTitle`)),b(a,(()=>{var e=x(()=>t().candidates.length>1);return()=>e()?u(`chat.sessionRoute.multipleMatches`,{shortId:t().shortId}):u(`chat.sessionRoute.additionalMatches`)})()),b(r,w(p,{get each(){return t().candidates},children:e=>(()=>{var t=I(),n=t.firstChild,r=n.nextSibling.nextSibling,i=r.firstChild,a=i.nextSibling,o=g();return b(n,()=>e.displayName),b(r,()=>e.agentId,i),b(r,()=>e.idPrefix,a),E(()=>e.href,e=>{S(n,`href`,e),y(n,o)}),t})()}),o),b(r,w(h,{get when(){return t().truncated},get children(){var e=P(),t=e.firstChild;return b(t,()=>u(`chat.sessionRoute.additionalMatches`)),e}}),s),b(r,()=>e.renderEscape(),c),n})()}),w(_,{get when(){return o()},children:t=>[x(()=>e.renderDocument({sessionKey:t().sessionKey,preparedSession:t().agentId?{sessionKey:t().sessionKey,agentId:t().agentId}:null})),w(h,{get when(){return x(()=>!n())()&&e.snapshot.lastError===null},get children(){return e.renderSplash()}})]})]}}))})}var N,P,F,I;function L(){return(L=e((()=>{k(),v(),d(),c(),N=A(`<main class=board-document><section><span>`),P=A(`<p><small>`),F=A(`<main class=board-document><section class="card board-document__state"><h2></h2><p></p><!><!><!>`),I=A(`<p><a></a><br><small> · <!>`),f(l)})))()}var R=t({loadFocusDashboard:()=>B});function z(e){return`type`in e&&e.type===`notFound`}async function B(e,t,n){let r=(t,r)=>{if(n.aborted)return;let[i,o]=[r,t].map(t=>a({kind:`dashboard`,path:`${t.pathname}${t.search}${t.hash}`},e.basePath)),s=`${globalThis.location.pathname}${globalThis.location.search}${globalThis.location.hash}`;i&&o&&s===i&&o!==s&&globalThis.history.replaceState(globalThis.history.state,``,o)};try{let{loadChatRoute:o}=await i(async()=>{let{loadChatRoute:e}=await import(`./control-ui-boot-chat-CqvkfPXD.js`).then(e=>(e.t(),e.n));return{loadChatRoute:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),s=await o(e,t.route,`dashboard`,n);if(n.aborted)return{kind:`loading`};if(z(s)||s.kind===`missing-session`||s.kind===`unavailable-home`)return{kind:`not-found`};if(s.kind===`route-error`)return{kind:`error`,message:s.message};if(s.kind===`ambiguous`)return{kind:`ambiguous`,data:{...s,candidates:s.candidates.map(t=>({...t,href:a({kind:`dashboard`,path:t.href},e.basePath)??t.href}))}};s.canonicalLocation&&s.canonicalLocationSource&&r(s.canonicalLocation,s.canonicalLocationSource);let c=s.canonicalLocationSource;return s.canonicalLocationReady&&c&&s.canonicalLocationReady.then(e=>{e&&r(e,c)}),{kind:`session`,data:s}}catch(e){return{kind:`error`,message:s(e)}}}function V(){return(V=e((()=>{r(),o(),n()})))()}export{L as i,V as n,j as r,R as t};