openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
2 lines • 1.71 kB
JavaScript
import{n as e}from"./rolldown-runtime-8BhlS34s.js";import{C as t,Kl as n,R as r,hu as i,ql as a,uu as o}from"./control-ui-core-3P365fbR.js";import{$r as s,Wr as c}from"./control-ui-core-CFW9Qtjn.js";import{c as l,l as u}from"./gateway-runtime-5YzSCmfV.js";import{n as d,t as f}from"./en-update-actions-B4FZH2_u.js";import{n as p,t as m}from"./en-settings-CTjRjKt9.js";import{n as h,t as g}from"./custodian-alert-store-D3-kKDhQ.js";function _(e,r,a){if(!a.isCurrent())return;if(!l(e.gateway.snapshot,`openclaw.chat`,`operator.admin`)){e.navigate(`updates`);return}let o=r.attempt,s=r.reconciledRecord,u=(e,t)=>[t,e].filter(Boolean).join(` · `)||i(`common.unknown`),d=[...s?[`${i(`updates.triage.observedRecord`)}: ${s.id??i(`common.unknown`)} · ${s.timestampMs===null?i(`common.unknown`):new Date(s.timestampMs).toISOString()}`]:[],...o?[`${i(`updates.page.attemptedAt`)}: ${new Date(o.timestampMs).toISOString()}`,`${i(`updates.page.attemptReason`)}: ${o.reason}`,`${i(`updates.page.beforeUpdate`)}: ${u(o.beforeVersion,o.beforeSha)}`,`${i(`updates.page.afterAttempt`)}: ${u(o.afterVersion,o.afterSha)}`,...o.failure?[`${o.failure.step}: ${o.failure.detail}`]:[]]:[r.banner.text]],f=i(r.outcome===`unknown`?`updates.triage.unknownTitle`:`updates.triage.failedTitle`),p=[...d,i(`updates.triage.hostHint`)].map(e=>t(n(e),240));g.present({id:r.id,title:f,facts:p,question:t(i(`updates.triage.question`,{outcome:f,facts:p.join(`
`)}),2400),action:{label:i(`updates.reviewUpdate`),target:{kind:`navigate`,routeId:`updates`}}},a),window.dispatchEvent(new CustomEvent(c,{detail:{open:!0}}))}function v(){return(v=e((()=>{s(),o(),m(),f(),a(),r(),u(),h(),p(),d()})))()}v();export{_ as presentUpdateFailureTriage};