openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 1.76 kB
JavaScript
import{n as e}from"./rolldown-runtime-DkW27tQK.js";import{Do as t,Oo as n,k as r,p as i}from"./control-ui-core-Rwzhj6nO.js";import{N as a,V as o,Yt as s,en as c}from"./control-ui-core-vvcQQV2m.js";import{n as l,r as u}from"./gateway-runtime-Bqqcp9-I.js";import{n as d,t as f}from"./en-update-actions-BD3m-_AA.js";import{n as p,t as m}from"./en-settings-D_ebb5Hk.js";import{n as h,t as g}from"./custodian-alert-store-C8M3qKFB.js";function _(e,n,r){if(!r.isCurrent())return;if(!l(e.gateway.snapshot,`openclaw.chat`,`operator.admin`)){e.navigate(`updates`);return}let o=n.attempt,s=n.reconciledRecord,u=(e,t)=>[t,e].filter(Boolean).join(` · `)||c(`common.unknown`),d=[...s?[`${c(`updates.triage.observedRecord`)}: ${s.id??c(`common.unknown`)} · ${s.timestampMs===null?c(`common.unknown`):new Date(s.timestampMs).toISOString()}`]:[],...o?[`${c(`updates.page.attemptedAt`)}: ${new Date(o.timestampMs).toISOString()}`,`${c(`updates.page.attemptReason`)}: ${o.reason}`,`${c(`updates.page.beforeUpdate`)}: ${u(o.beforeVersion,o.beforeSha)}`,`${c(`updates.page.afterAttempt`)}: ${u(o.afterVersion,o.afterSha)}`,...o.failure?[`${o.failure.step}: ${o.failure.detail}`]:[]]:[n.banner.text]],f=c(n.outcome===`unknown`?`updates.triage.unknownTitle`:`updates.triage.failedTitle`),p=[...d,c(`updates.triage.hostHint`)].map(e=>i(t(e),240));g.present({id:n.id,title:f,facts:p,question:i(c(`updates.triage.question`,{outcome:f,facts:p.join(`
`)}),2400),action:{label:c(`updates.reviewUpdate`),target:{kind:`navigate`,routeId:`updates`}}},r),window.dispatchEvent(new CustomEvent(a,{detail:{open:!0}}))}function v(){return(v=e((()=>{o(),s(),m(),f(),n(),r(),u(),h(),p(),d()})))()}v();export{_ as presentUpdateFailureTriage};
//# sourceMappingURL=update-triage.runtime-C-ASlPWe.js.map