UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 3.05 kB
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{BA as t,dj as n,mj as r,zA as i}from"./control-ui-boot-shared-DFTSUQQ0.js";import{C as a,F as o,O as s,Rt as c,U as l,_ as u,d,g as f,j as p,l as m,s as h,u as g,x as _}from"./solid-runtime-C416s-HC.js";import{h as v,m as y}from"./deferred-ui-support-D-VedBtc.js";import{E as b}from"./route-controls-runtime-Bx6nx3QW.js";import{n as x}from"./library-file-text-cCfDG3AD.js";function S(e){let t=o(()=>{if(e.file===`SKILL.md`)return e.read.content;let t=e.read.files.find(t=>t.path===e.file);return t?x(t):null});var n=w(),l=n.firstChild.firstChild,h=l.firstChild,g=h.nextSibling,_=l.nextSibling,v=_.firstChild,y=v.nextSibling,b=y.nextSibling,S=b.firstChild,D=S.nextSibling;D.firstChild;var O=b.nextSibling,k=O.firstChild,A=k.nextSibling.firstChild,j=A.nextSibling,M=j.nextSibling,N=M.nextSibling,P=N.nextSibling,F=P.nextSibling;return n.addEventListener(`modal-cancel`,()=>e.onClose()),n._$owner=c(),d(h,()=>e.read.entry.slug),g._$$click=()=>e.onClose(),d(g,p(i,{name:`x`})),d(v,()=>r(`skillLibrary.ownerRevision`,{owner:e.read.entry.ownerLabel,revision:e.read.entry.revision.slice(0,8)})),d(y,()=>r(`skillLibrary.session.readOnly`)),d(S,()=>r(`skillLibrary.file`)),D.addEventListener(`change`,t=>e.onFile(t.currentTarget.value)),d(D,p(a,{get each(){return e.read.files},keyed:e=>e.path,children:e=>(()=>{var t=T();return d(t,()=>e().path),m(()=>e().path,e=>{t.value=e}),t})()}),null),d(_,p(s,{get when(){return t()!==null},get fallback(){var e=E();return d(e,()=>r(`skillLibrary.binaryRead`)),e},get children(){var n=C(),r=n.firstChild,i=r.nextSibling;return d(r,()=>e.file),m(()=>t()??``,e=>{i.value=e??``}),n}}),O),d(k,()=>r(`skillLibrary.technicalDetails`)),d(A,()=>r(`skillLibrary.skillId`)),d(j,()=>e.read.entry.skillId),d(M,()=>r(`skillLibrary.revision`)),d(N,()=>e.read.entry.revision),d(P,()=>r(`skillLibrary.command`)),d(F,()=>e.read.entry.name),m(()=>({e:e.read.entry.slug,t:r(`common.close`),a:e.file}),({e,t,a:r},i)=>{e!==i?.e&&f(n,`label`,e),t!==i?.t&&f(g,`aria-label`,t),u(D,`value`,r)}),n}var C,w,T,E;function D(){return(D=e((()=>{g(),l(),t(),b(),y(),n(),C=_(`<label class=field><span></span><textarea class=settings-input readonly spellcheck=false rows=16 style=font-family:var(--mono);min-width:0;max-width:100%;box-sizing:border-box;resize:vertical>`),w=_(`<openclaw-modal-dialog style=--openclaw-modal-width:960px><div class="exec-approval-card skill-reader-dialog"><div class=exec-approval-header><strong class=exec-approval-title></strong><button type=button class="btn btn--icon btn--ghost"></button></div><div class=skill-reader-dialog__body style=display:grid;gap:var(--space-4);min-width:0><p></p><p class=muted></p><label class=field><span></span><select class=settings-select><option value=SKILL.md>SKILL.md</option></select></label><details class=muted style=overflow-wrap:anywhere;min-width:0><summary></summary><dl><dt></dt><dd></dd><dt></dt><dd></dd><dt></dt><dd>`,1),T=_(`<option>`),E=_(`<p class=muted>`),v(),h([`click`])})))()}D();export{S as LibraryPinRead};