openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 2.83 kB
JavaScript
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{GN as t,JN as n}from"./_2_____________________________.js";import{d as r,u as i}from"./deferred-ui-support-DZEPWjAk.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,u as h,x as g}from"./_6____________________.js";import{A as _}from"./route-controls-runtime-LXiVRSj4.js";import{Ht as v,Ut as y}from"./control-ui-boot-new-pHXPNTZp.js";import{n as b,r as x}from"./settings-disclosure-C2Lxm_wL.js";import"./skill-reader-dialog-DpT2WZGg.js";import{n as S}from"./library-file-text-95__9Rmm.js";function C(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?S(t):null});var r=E(),i=r.firstChild,l=i.firstChild,h=l.firstChild,g=h.nextSibling,_=g.nextSibling,y=_.firstChild,x=y.nextSibling;x.firstChild;var C=_.nextSibling,k=C.nextSibling;return r.addEventListener(`modal-cancel`,()=>e.onClose()),r._$owner=c(),d(i,p(v,{get title(){return e.read.entry.slug},onClose:()=>e.onClose()}),l),d(h,()=>n(`skillLibrary.ownerRevision`,{owner:e.read.entry.ownerLabel,revision:e.read.entry.revision.slice(0,8)})),d(g,()=>n(`skillLibrary.session.readOnly`)),d(y,()=>n(`skillLibrary.file`)),x.addEventListener(`change`,t=>e.onFile(t.currentTarget.value)),d(x,p(a,{get each(){return e.read.files},keyed:e=>e.path,children:e=>(()=>{var t=D();return d(t,()=>e().path),m(()=>e().path,e=>{t.value=e}),t})()}),null),d(l,p(s,{get when(){return t()!==null},get fallback(){var e=O();return d(e,()=>n(`skillLibrary.binaryRead`)),e},get children(){var n=w(),r=n.firstChild,i=r.nextSibling;return d(r,()=>e.file),m(()=>t()??``,e=>{i.value=e??``}),n}}),C),d(l,p(b,{quiet:!0,class:`skill-library-details`,get title(){return n(`skillLibrary.technicalDetails`)},get children(){var t=T(),r=t.firstChild,i=r.nextSibling,a=i.nextSibling,o=a.nextSibling,s=o.nextSibling,c=s.nextSibling;return d(r,()=>n(`skillLibrary.skillId`)),d(i,()=>e.read.entry.skillId),d(a,()=>n(`skillLibrary.revision`)),d(o,()=>e.read.entry.revision),d(s,()=>n(`skillLibrary.command`)),d(c,()=>e.read.entry.name),t}}),k),m(()=>({e:e.read.entry.slug,t:e.file}),({e,t},n)=>{e!==n?.e&&f(r,`label`,e),u(x,`value`,t)}),r}var w,T,E,D,O;function k(){return(k=e((()=>{h(),l(),y(),x(),_(),i(),t(),w=g(`<label class=field><span></span><textarea class="settings-input skill-library-dialog__source"readonly spellcheck=false rows=16>`),T=g(`<dl><dt></dt><dd></dd><dt></dt><dd></dd><dt></dt><dd>`),E=g(`<openclaw-modal-dialog style=--openclaw-modal-width:960px><div class="oc-dialog skill-library-dialog"><div class=oc-dialog__body><p></p><p class=muted></p><label class=field><span></span><select class=settings-select><option value=SKILL.md>SKILL.md</option></select></label><!><!>`,1),D=g(`<option>`),O=g(`<p class=muted>`),r()})))()}k();export{C as LibraryPinRead};