openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 8.13 kB
JavaScript
import{n as e,r as t}from"./rolldown-runtime-CNOWq4Kh.js";import{$n as n,GN as r,Is as i,JN as a,Ls as o,Om as s,aA as c,er as l,fN as u,iA as d,km as f,pN as p,qN as m}from"./_2_____________________________.js";import{C as h,O as g,Rt as _,U as v,d as y,f as b,g as x,j as S,l as C,m as w,o as T,p as E,s as ee,u as te,v as ne,x as D}from"./_6____________________.js";import{a as O,n as k,o as re,r as ie,s as ae,t as oe}from"./session-goal-display-EV4XfCB7.js";var se=t({ChatGoal:()=>le,ChatGoalActions:()=>M,ChatGoalBody:()=>N,ChatGoalMetrics:()=>P,ChatGoalRecoveryAction:()=>I,ChatGoalRecoveryMessage:()=>F,ChatGoalRecoveryNotice:()=>ue,GoalIcon:()=>A});function A(){return S(d,{"aria-hidden":`true`,get children(){return[L(),R(),z()]}})}function j(e){let t=()=>e.goal.status===`active`?f(1e3):0;var n=B();return y(n,()=>k(re(e.goal,t()))),C(()=>E(e.class),(e,t)=>{T(n,e,t)}),n}function M(e){let t=t=>!e.resumeRecovery&&e.canAct&&!!e.onGoalAction&&(t===`edit`?!!e.onGoalEdit&&e.goal.status!==`complete`:t===`pause`?e.goal.status===`active`:t!==`resume`||e.goal.status!==`active`||e.resumeBusy===!1);var n=H(),r=n.firstChild,i=r.nextSibling;return y(n,S(g,{get when(){return b(()=>!!e.resumeRecovery)()?!e.resumeRecovery.pending:e.resumeRecovery},get children(){var t=V(),n=t.firstChild;return t._$$click=()=>void e.resumeRecovery?.onCheck(),y(t,S(u,{name:`playRounded`}),n),y(n,()=>a(`chat.goals.retryResume`)),C(()=>!e.connected,e=>{x(t,`disabled`,e)}),t}}),r),y(n,S(h,{each:pe,children:n=>b(()=>b(()=>!!t(n))()?(()=>{var t=U(),r=t.firstChild,i=r.firstChild;return t._$owner=_(),r._$$click=()=>{n===`edit`?e.onGoalEdit?.(e.goal):e.onGoalAction?.(e.goal.id,n)},y(r,S(u,{get name(){return me[n]}}),i),y(i,()=>a(`chat.goals.${n}Chip`)),C(()=>({e:a(n===`resume`&&e.resumeBusy?`chat.goals.busy`:`chat.goals.${n}`),t:[`agent-chat__goal-action`,`agent-chat__goal-${n}`],a:a(`chat.goals.${n}`),o:n===`resume`&&e.resumeBusy,i:n===`resume`&&e.resumeBusy?.5:void 0}),({e,t:n,a:i,o:a,i:o},s)=>{e!==s?.e&&x(t,`content`,e),T(r,n,s?.t),i!==s?.a&&x(r,`aria-label`,i),a!==s?.o&&x(r,`disabled`,a),o!==s?.i&&ne(r,`opacity`,o)}),t})():null)}),i),n}function N(e){return[(()=>{var t=W(),n=t.firstChild,r=e.objectiveRef;return typeof r==`function`||Array.isArray(r)?w(()=>r,t):e.objectiveRef=t,C(()=>e.goal.objective,e=>{n.data=e}),t})(),b(()=>b(()=>!(!e.goal.lastStatusNote||e.resumeRecovery))()?(()=>{var t=G();return y(t,()=>e.goal.lastStatusNote),t})():null)]}function P(e){var t=K(),n=t.firstChild;return y(t,(()=>{var t=b(()=>!!O(e.goal));return()=>t()?[(()=>{var t=q();return y(t,()=>O(e.goal)),t})(),J()]:null})(),n),y(n,S(g,{get when(){return e.live},get fallback(){return k(re(e.goal,Date.now()))},get children(){return S(j,{get goal(){return e.goal}})}})),t}function ce(e){let t=()=>e.goal.status!==`active`,n=()=>t()&&!e.expanded&&!e.resumeRecovery?e.goal.lastStatusNote:void 0,r=()=>e.resumeRecovery?a(e.resumeRecovery.pending?`chat.goals.resuming`:`chat.goals.resumeUnconfirmed`):ie(e.goal.status);var i=Y(),o=i.firstChild,s=o.firstChild,c=s.nextSibling,d=c.firstChild,f=d.firstChild,p=d.nextSibling,m=c.nextSibling,h=m.firstChild,g=o.nextSibling,v=g.firstChild,w=v.firstChild,E=w.nextSibling;return y(s,(()=>{var t=b(()=>!!e.resumeRecovery?.pending);return()=>t()?X():b(()=>e.goal.status===`active`)()?S(A,{}):S(u,{get name(){return fe[e.goal.status]}})})()),d._$owner=_(),y(f,r),y(p,()=>e.goal.objective),y(o,S(j,{get goal(){return e.goal},class:`agent-chat__goal-elapsed`}),m),y(m,S(M,{get goal(){return e.goal},get canAct(){return e.canAct},get resumeBusy(){return e.resumeBusy},get resumeRecovery(){return e.resumeRecovery},get connected(){return e.connected},get onGoalAction(){return e.onGoalAction},get onGoalEdit(){return e.onGoalEdit}}),h),h._$$click=()=>e.onExpandedChange(!e.expanded),y(h,S(u,{get name(){return e.expanded?`chevronDown`:`chevronRight`}})),y(v,S(N,{get goal(){return e.goal},get resumeRecovery(){return e.resumeRecovery},get objectiveRef(){return l(!1,!0,{revision:()=>e.goal.objective})}}),w),y(v,S(P,{get goal(){return e.goal}}),E),C(()=>({e:[`agent-chat__goal`,`agent-chat__goal--${e.resumeRecovery?`resuming`:e.goal.status}`],t:String(e.expanded),a:e.resumeRecovery?`${r()}: ${e.goal.objective}`:oe(e.goal),o:e.resumeRecovery?.pending?`true`:`false`,i:n()??``,n:!n(),s:n()?`0`:void 0,h:e.expanded?`true`:`false`,r:a(e.expanded?`chat.goals.hideDetails`:`chat.goals.showDetails`),d:String(e.expanded),l:e.expanded?`false`:`true`,u:!e.expanded}),({e,t,a:n,o:r,i:a,n:o,s,h:c,r:l,d:u,l:p,u:m},_)=>{T(i,e,_?.e),t!==_?.t&&x(i,`data-expanded`,t),n!==_?.a&&x(i,`aria-label`,n),r!==_?.o&&x(i,`aria-busy`,r),a!==_?.i&&(d.content=a),o!==_?.n&&x(d,`disabled`,o),s!==_?.s&&x(f,`tabindex`,s),c!==_?.h&&x(h,`aria-expanded`,c),l!==_?.r&&x(h,`aria-label`,l),u!==_?.d&&x(g,`data-expanded`,u),p!==_?.l&&x(g,`aria-hidden`,p),m!==_?.u&&x(g,`inert`,m)}),i}function le(e){return S(g,{get when(){return e.goal!==void 0},get children(){return S(ce,{get goal(){return e.goal},get expanded(){return e.expanded},get canAct(){return e.canAct},get resumeBusy(){return e.resumeBusy},get resumeRecovery(){return e.resumeRecovery},get connected(){return e.connected},get onGoalAction(){return e.onGoalAction},get onGoalEdit(){return e.onGoalEdit},get onExpandedChange(){return e.onExpandedChange}})}})}function ue(e){var t=Z(),n=t.firstChild,r=n.nextSibling;return y(n,S(u,{name:`alertTriangle`})),y(r,S(F,{get recovery(){return e.recovery}})),y(t,S(I,{get recovery(){return e.recovery},get connected(){return e.connected}}),null),t}function F(e){return[(()=>{var t=Q();return y(t,()=>a(e.recovery.pending?`chat.goals.checking`:`chat.goals.recoveryTitle`)),t})(),(()=>{var t=B();return y(t,()=>a(e.recovery.retired===`expired`?`chat.goals.recoveryExpired`:e.recovery.retired===`invalid`?`chat.goals.recoveryInvalid`:`chat.goals.recoveryHint`)),t})()]}function I(e){var t=de();return t._$$click=()=>void e.recovery.onCheck(),y(t,()=>a(e.recovery.retired?`chat.goals.refreshCurrent`:`chat.goals.checkOutcome`)),C(()=>!e.connected||e.recovery.pending,e=>{x(t,`disabled`,e)}),t}var L,R,z,B,V,H,U,W,G,K,q,J,Y,X,Z,Q,de,fe,pe,me;function $(){return($=e((()=>{te(),v(),ae(),p(),n(),c(),i(),r(),s(),L=D(`<svg><path d="M12 13V2l8 4-8 4"></svg>`,2),R=D(`<svg><path d="M20.561 10.222a9 9 0 1 1-12.55-5.29"></svg>`,2),z=D(`<svg><path d="M8.002 9.997a5 5 0 1 0 8.9 2.02"></svg>`,2),B=D(`<span>`),V=D(`<button class="agent-chat__goal-action agent-chat__goal-resume"type=button><span class=agent-chat__goal-action-label>`),H=D(`<span class=agent-chat__goal-command-actions><!><!>`),U=D(`<openclaw-tooltip><button type=button><span class=agent-chat__goal-action-label>`,1),W=D(`<div class=agent-chat__goal-detail-objective> `),G=D(`<div class=agent-chat__goal-detail-note>`),K=D(`<div class=agent-chat__goal-detail-meta><span class=agent-chat__goal-detail-duration>`),q=D(`<span class=agent-chat__goal-detail-usage>`),J=D(`<span class=agent-chat__goal-detail-separator aria-hidden=true>·`),Y=D(`<div role=group><div class=agent-chat__goal-row><span class=agent-chat__goal-icon aria-hidden=true></span><span class=agent-chat__goal-copy><openclaw-tooltip><span class=agent-chat__goal-label role=status></span></openclaw-tooltip><span class=agent-chat__goal-objective></span></span><span class=agent-chat__goal-actions><button class="agent-chat__goal-action agent-chat__goal-expand"type=button></button></span></div><div class=agent-chat__goal-detail><div class=agent-chat__goal-detail-content><!><!>`,1),X=D(`<span class=session-run-spinner>`),Z=D(`<div class="chat-composer-neighbor-card chat-composer-neighbor-card--warn"role=status><span class=chat-composer-neighbor-card__icon aria-hidden=true></span><div class=chat-composer-neighbor-card__copy>`),Q=D(`<strong>`),de=D(`<button class="btn btn--sm"type=button>`),m(o),fe={paused:`pauseFilled`,blocked:`alertTriangle`,usage_limited:`alertTriangle`,budget_limited:`alertTriangle`,complete:`check`},pe=[`edit`,`pause`,`resume`,`clear`],me={edit:`pencil`,pause:`pauseFilled`,resume:`playRounded`,clear:`trashSimple`},ee([`click`])})))()}export{F as a,$ as c,I as i,N as n,A as o,P as r,se as s,M as t};