UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 1.93 kB
import{n as e,r as t}from"./rolldown-runtime-CNOWq4Kh.js";import{BA as n,cj as r,dj as i,mj as a,sj as o,zA as s}from"./control-ui-boot-shared-DFTSUQQ0.js";import{C as c,O as l,U as u,d,g as f,j as p,l as m,m as h,s as g,u as _,x as v}from"./solid-runtime-C416s-HC.js";import{K as y,q as b}from"./control-ui-boot-chat-DewxEbIm.js";import{n as x,r as S,t as C}from"./chat-comment-preview-BcQOPIam.js";var w=t({ChatSelectionAnnotationRows:()=>T});function T(e){let t,n,r=new Map,i=e=>o(t=>(r.set(e,t),()=>{r.get(e)===t&&r.delete(e)})),u=e=>{t?.isConnected&&t.hasAttribute(`open`)&&r.get(e)?.focus({preventScroll:!0})},g=()=>e.attachments?.filter(e=>e.selectionAnnotation)??[],_=()=>!!(e.disabled||e.readSignal?.aborted);return p(l,{get when(){return g().length>0},get children(){return p(C,{previewRef:e=>t=e,triggerRef:e=>n=e,get count(){return g().length},get removal(){return{onRemove:e=>y(e,void 0,`delete-all`),disabled:_()}},get children(){var e=E();return d(e,p(c,{get each(){return g()},keyed:e=>e.id,children:(e,t)=>p(l,{get when(){return e().selectionAnnotation},children:r=>p(x,{get comment(){return r()},get children(){var r=D(),o=r.firstChild,c=o.nextSibling;return o._$$click=t=>y(t,e().id,`edit`,{anchor:n}),d(o,p(s,{name:`pencil`})),c._$$click=t=>y(t,e().id,`delete`,{focusDelete:u}),h(()=>[i(e().id)],c),d(c,p(s,{name:`trash`})),m(()=>({e:a(`chat.messages.editAnnotation`,{number:String(t()+1)}),t:_(),a:e().id,o:a(`chat.messages.deleteAnnotation`),i:_()}),({e,t,a:n,o:r,i},a)=>{e!==a?.e&&f(o,`aria-label`,e),t!==a?.t&&f(o,`disabled`,t),n!==a?.a&&f(c,`data-comment-delete`,n),r!==a?.o&&f(c,`aria-label`,r),i!==a?.i&&f(c,`disabled`,i)}),r}})})})),e}})}})}var E,D;function O(){return(O=e((()=>{_(),u(),n(),r(),i(),S(),b(),E=v(`<ol class=chat-comment-preview__list role=list>`),D=v(`<span class=chat-comment-preview__actions><button type=button></button><button type=button>`),g([`click`])})))()}export{O as n,w as t};