UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines • 1.68 kB
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{Y as t,Z as n,li as r,oi as i}from"./_4____________________________.js";import{AN as a,Gb as o,ON as s,dx as c,fM as l,xM as u}from"./_2_____________________________.js";import{n as d,t as f}from"./en-update-actions-DQoZlnG9.js";import{n as p,t as m}from"./en-settings-DEvavpke.js";import{r as h,t as g}from"./custodian-alert-store-BWcohw2R.js";function _(e,n,i){if(!i.isCurrent())return;if(!t(e.gateway.snapshot,`openclaw.chat`,`operator.admin`)){e.navigate(`updates`);return}let a=n.attempt,c=n.reconciledRecord,u=(e,t)=>[t,e].filter(Boolean).join(` · `)||r(`common.unknown`),d=[...c?[`${r(`updates.triage.observedRecord`)}: ${c.id??r(`common.unknown`)} · ${c.timestampMs===null?r(`common.unknown`):new Date(c.timestampMs).toISOString()}`]:[],...a?[`${r(`updates.page.attemptedAt`)}: ${new Date(a.timestampMs).toISOString()}`,`${r(`updates.page.attemptReason`)}: ${a.reason}`,`${r(`updates.page.beforeUpdate`)}: ${u(a.beforeVersion,a.beforeSha)}`,`${r(`updates.page.afterAttempt`)}: ${u(a.afterVersion,a.afterSha)}`,...a.failure?[`${a.failure.step}: ${a.failure.detail}`]:[]]:[n.banner.text]],f=r(n.outcome===`unknown`?`updates.triage.unknownTitle`:`updates.triage.failedTitle`),p=[...d,r(`updates.triage.hostHint`)].map(e=>o(s(e),240));g.present({id:n.id,title:f,facts:p,question:o(r(`updates.triage.question`,{outcome:f,facts:p.join(` `)}),2400),action:{label:r(`updates.reviewUpdate`),target:{kind:`navigate`,routeId:`updates`}}},i),window.dispatchEvent(new CustomEvent(l,{detail:{open:!0}}))}function v(){return(v=e((()=>{u(),i(),m(),f(),a(),c(),n(),h(),p(),d()})))()}v();export{_ as presentUpdateFailureTriage};