@bkm016/basalt 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/{chunk-0039s4jt.js → chunk-02d3x4mj.js} +3 -3
- package/{chunk-sjjtxpg2.js → chunk-0xd9mnc2.js} +394 -341
- package/{chunk-npez1492.js → chunk-13gvs0ax.js} +2 -2
- package/{chunk-n981vx1t.js → chunk-1n7dat03.js} +6 -6
- package/{chunk-6ptv4g5e.js → chunk-1zj3zvw5.js} +3 -3
- package/{chunk-zxkq9m8e.js → chunk-29qrxygd.js} +2 -2
- package/{chunk-y8dkfpmj.js → chunk-30rjf7my.js} +4 -4
- package/{chunk-39vwrg8n.js → chunk-38g3gctw.js} +2 -2
- package/{chunk-benrzwea.js → chunk-4dw43syb.js} +1 -1
- package/{chunk-w67dvqtb.js → chunk-4gtgqcct.js} +2 -2
- package/chunk-66h5qpc6.js +479 -0
- package/{chunk-8wj32837.js → chunk-755sy11p.js} +1 -1
- package/chunk-7zkswxvk.js +2 -0
- package/{chunk-ebpyvs1d.js → chunk-82v8jh1h.js} +2 -2
- package/chunk-95964592.js +25 -0
- package/{chunk-gv7wqkey.js → chunk-9as0p561.js} +2 -2
- package/{chunk-fx7f4m3c.js → chunk-a1352w87.js} +1 -1
- package/{chunk-8wv5t0w6.js → chunk-a1rb1a48.js} +6 -6
- package/{chunk-bdy4jksd.js → chunk-a98wma9j.js} +1 -1
- package/{chunk-peja51xv.js → chunk-asyr3gnq.js} +2 -2
- package/{chunk-7hr6zw2m.js → chunk-ax04trym.js} +1 -1
- package/chunk-b2bxqeb4.js +2 -0
- package/{chunk-6kdgk70p.js → chunk-bdjr0kfr.js} +4 -4
- package/{chunk-dnx91jrd.js → chunk-bk4rpnm8.js} +2 -2
- package/{chunk-8x21n7y9.js → chunk-c0zfefq8.js} +1 -1
- package/{chunk-pg5nkf1y.js → chunk-c6q04xrd.js} +2 -2
- package/chunk-c71173py.js +25 -0
- package/{chunk-c7rcw9fb.js → chunk-cmwdjes8.js} +5 -5
- package/{chunk-j7yvh0ae.js → chunk-d0a1jxk5.js} +1 -1
- package/{chunk-0javrjcm.js → chunk-d5j74pcp.js} +22 -22
- package/{chunk-ca982n62.js → chunk-dfh9m9n7.js} +1 -1
- package/{chunk-s6dejhfj.js → chunk-dq01v5eq.js} +1 -1
- package/{chunk-ecf896fz.js → chunk-e1x629v0.js} +2 -2
- package/{chunk-053vb71h.js → chunk-en218k4y.js} +1 -1
- package/{chunk-ey15ye2h.js → chunk-fgwda4m0.js} +1 -1
- package/chunk-gbjn6d81.js +2 -0
- package/{chunk-n85qs7cs.js → chunk-gkf5jwvj.js} +1 -1
- package/{chunk-d48bfd2e.js → chunk-h1kb8b49.js} +2 -2
- package/{chunk-whj87h4r.js → chunk-hb4f2v34.js} +3 -3
- package/{chunk-10p3mb40.js → chunk-hbnmymaq.js} +1 -1
- package/{chunk-818nd6s1.js → chunk-jj4hqbrx.js} +2 -2
- package/{chunk-r8vvcp6c.js → chunk-jn5pqy5v.js} +1 -1
- package/{chunk-f544p9rh.js → chunk-jtsve11b.js} +10 -10
- package/chunk-m1eam0s5.js +2 -0
- package/{chunk-g0t9c3gv.js → chunk-mbpb5c7w.js} +1 -1
- package/{chunk-prgm07j4.js → chunk-msm9hmk9.js} +2 -2
- package/{chunk-dpz4hwqb.js → chunk-n0ybj4h9.js} +2 -2
- package/{chunk-z02sj1je.js → chunk-n2jcx65v.js} +2 -2
- package/{chunk-x4874m8e.js → chunk-nrsd810j.js} +2 -2
- package/chunk-pnspvnyd.js +2 -0
- package/chunk-pz2afna8.js +2 -0
- package/{chunk-f156y565.js → chunk-q9f4xb0w.js} +3 -3
- package/{chunk-arcqjt91.js → chunk-qaeyhe65.js} +1 -1
- package/chunk-qnkrrwmg.js +2 -0
- package/{chunk-063vbmtp.js → chunk-r4ttdkrz.js} +2 -2
- package/{chunk-r9aatvwm.js → chunk-stj493dn.js} +2 -2
- package/{chunk-q9dd6fhj.js → chunk-tevejprz.js} +4 -4
- package/{chunk-75434aay.js → chunk-v3ee9z3f.js} +1 -1
- package/chunk-vtqr7dm8.js +3 -0
- package/chunk-xh444pfn.js +16 -0
- package/{chunk-y69ewdn2.js → chunk-ypqjfv3a.js} +2 -2
- package/{chunk-d6p2hgxh.js → chunk-zc9ar0r4.js} +1 -1
- package/{chunk-s7skpgm2.js → chunk-zyyzk5ha.js} +1 -1
- package/compiled.js +9 -9
- package/package.json +1 -1
- package/ui-test-worker.js +19 -19
- package/web/chunk-08sq3cwm.js +1 -0
- package/web/chunk-0pghpg4y.js +2 -0
- package/web/{chunk-z1geewdf.js → chunk-0zwc2rvh.js} +2 -2
- package/web/chunk-12qf1r6m.js +1 -0
- package/web/chunk-24fjnnee.js +1 -0
- package/web/chunk-24jhbz82.js +24 -0
- package/web/{chunk-5wbnjjhg.js → chunk-2dvbeqt0.js} +1 -1
- package/web/chunk-2hrswh3d.js +2 -0
- package/web/chunk-2j2atyjw.js +1 -0
- package/web/{chunk-n754s8xd.js → chunk-2x4g9t37.js} +8 -8
- package/web/{chunk-tfn0rqg9.js → chunk-3ak5dg10.js} +25 -25
- package/web/chunk-3ecrkvr3.js +106 -0
- package/web/chunk-3h3g3ca3.js +1 -0
- package/web/chunk-3hr3ew9w.js +1 -0
- package/web/chunk-3pcrxg6m.js +1 -0
- package/web/{chunk-xckxtfp8.js → chunk-3pd0qt83.js} +72 -72
- package/web/chunk-3txxt0a7.js +1 -0
- package/web/chunk-43g4wd7a.js +1 -0
- package/web/chunk-4a6gdrbs.js +1 -0
- package/web/{chunk-twdy2f67.js → chunk-5a4mj3qz.js} +1 -1
- package/web/{chunk-q97hn4j5.js → chunk-5baeh8q7.js} +38 -38
- package/web/{chunk-4fm55fgb.js → chunk-5dr4tkem.js} +7 -7
- package/web/{chunk-wqsczy57.js → chunk-5jdrev9p.js} +9 -9
- package/web/{chunk-dg3p8db5.js → chunk-5v2c0aqk.js} +1 -1
- package/web/chunk-5z2n4z9x.css +1 -0
- package/web/{chunk-pjz30xcp.js → chunk-601k823s.js} +23 -23
- package/web/{chunk-2cem4sv7.js → chunk-60axh4sa.js} +25 -25
- package/web/chunk-66wb0p6e.js +62 -0
- package/web/{chunk-qcge7d6s.js → chunk-6e87m0nm.js} +2 -2
- package/web/chunk-6y55gk1n.js +1 -0
- package/web/chunk-79e08rk1.js +2 -0
- package/web/chunk-7qkav30b.js +2 -0
- package/web/chunk-7qq1ypvj.js +1 -0
- package/web/{chunk-h6k1x096.js → chunk-7tkgbbf9.js} +2 -2
- package/web/chunk-814kkkmq.js +8 -0
- package/web/chunk-8jcvdd5d.js +2 -0
- package/web/{chunk-gksf7cek.js → chunk-8w7fyb3v.js} +7 -7
- package/web/chunk-8w8atrdh.js +1 -0
- package/web/{chunk-czjk218p.js → chunk-8z0r0wtk.js} +62 -62
- package/web/chunk-935mjq1c.js +39 -0
- package/web/chunk-942g3eqn.js +1 -0
- package/web/{chunk-ht4mx2dt.js → chunk-98y92vmh.js} +9 -9
- package/web/chunk-9ctg0f30.js +3 -0
- package/web/chunk-9fnr00kv.js +4 -0
- package/web/{chunk-5nda24gv.js → chunk-9yfftz38.js} +1 -1
- package/web/chunk-a0ryzdnp.js +7 -0
- package/web/chunk-a61zrp66.js +1 -0
- package/web/{chunk-nfvqjzz5.js → chunk-af9evdza.js} +1 -1
- package/web/chunk-arnzrqnm.js +1 -0
- package/web/chunk-avxk6jpc.js +2 -0
- package/web/{chunk-c01176kn.js → chunk-awkdw9rw.js} +2 -2
- package/web/{chunk-sy7e4dmq.js → chunk-b5h52neg.js} +1 -1
- package/web/chunk-bwy3e58v.js +1 -0
- package/web/{chunk-ja7w629n.js → chunk-c57f714b.js} +2 -2
- package/web/chunk-c6yacwbc.js +30 -0
- package/web/chunk-ctzkqx2g.js +169 -0
- package/web/chunk-db3twjvk.js +21 -0
- package/web/{chunk-femhej5w.js → chunk-ddyyc20r.js} +57 -57
- package/web/chunk-dnv8dx72.js +1 -0
- package/web/chunk-dwjmr0zj.js +2 -0
- package/web/chunk-dz7g1gnv.js +2 -0
- package/web/chunk-eadfxfkw.js +1 -0
- package/web/{chunk-d9wdsjkk.js → chunk-eqndhs21.js} +2 -2
- package/web/chunk-ewx42c11.js +55 -0
- package/web/chunk-f7jpakwh.js +1 -0
- package/web/{chunk-4sve9xrj.js → chunk-ff1pmd3g.js} +1 -1
- package/web/chunk-fjb3ksfd.js +78 -0
- package/web/chunk-fpb2dd2d.js +2 -0
- package/web/{chunk-fv6vm14n.js → chunk-frnh4zqf.js} +2 -2
- package/web/chunk-gn8kyz76.js +7 -0
- package/web/chunk-gv99c8zv.js +1 -0
- package/web/chunk-h0767tjv.js +1 -0
- package/web/chunk-hqynf99g.js +1 -0
- package/web/{chunk-jam45rqg.js → chunk-jccz14ye.js} +2 -2
- package/web/chunk-kcjz03h5.js +2 -0
- package/web/chunk-ket6g0yd.js +1 -0
- package/web/chunk-m9q5nr8f.js +1 -0
- package/web/chunk-mbwwj216.js +1 -0
- package/web/chunk-mdfksj61.js +1 -0
- package/web/chunk-me7dza1c.js +1 -0
- package/web/{chunk-gyp6v7jd.js → chunk-myd6sc76.js} +2 -2
- package/web/{chunk-sf101c23.js → chunk-mykrm8ba.js} +2 -2
- package/web/chunk-mzzaet63.js +1 -0
- package/web/chunk-n0wazxgz.js +1 -0
- package/web/chunk-nnyc889n.js +292 -0
- package/web/{chunk-e8yj05t1.js → chunk-nvpp0ghj.js} +6 -6
- package/web/chunk-nvt9tkt4.js +1139 -0
- package/web/{chunk-sn3tkwme.js → chunk-p9hfcamx.js} +37 -37
- package/web/chunk-ph1dgffm.js +1 -0
- package/web/chunk-q34as3v6.js +1 -0
- package/web/{chunk-sd3cdqcm.js → chunk-qh62nkem.js} +2 -2
- package/web/{chunk-j1bw5v1g.js → chunk-qq6m2my8.js} +2 -2
- package/web/{chunk-tmndcktk.js → chunk-qsqtwf34.js} +15 -15
- package/web/chunk-qz6r9v1z.js +1 -0
- package/web/chunk-rad2s9ha.js +1 -0
- package/web/{chunk-y99ed8rd.js → chunk-rasjtvsb.js} +16 -16
- package/web/chunk-rayf24gy.js +370 -0
- package/web/chunk-rrpn5r5w.js +2 -0
- package/web/chunk-s37beysw.js +1 -0
- package/web/chunk-s60s09mb.js +1 -0
- package/web/chunk-sk1wkgjw.js +4 -0
- package/web/chunk-spbs56wz.js +34 -0
- package/web/chunk-t893141g.js +2 -0
- package/web/chunk-tftc5v89.js +24 -0
- package/web/chunk-tfvcs2xx.js +1 -0
- package/web/chunk-tj1fn8v2.js +1 -0
- package/web/chunk-ts6jsfdk.js +41 -0
- package/web/chunk-v1exk5wd.js +324 -0
- package/web/chunk-veam6vk4.js +303 -0
- package/web/chunk-vqmj6peg.js +1 -0
- package/web/{chunk-t6sq85s6.js → chunk-vsjpnwsr.js} +2 -2
- package/web/{chunk-0whceqes.js → chunk-vvvd3grf.js} +2 -2
- package/web/{chunk-svh4n157.js → chunk-w3w18stt.js} +5 -5
- package/web/chunk-wdq2tp9e.js +1 -0
- package/web/chunk-wkf5xfyr.js +1 -0
- package/web/{chunk-4q7wf0wd.js → chunk-wzd2a4k5.js} +9 -9
- package/web/chunk-xa43ndfj.js +2 -0
- package/web/chunk-xh4xn1az.js +1 -0
- package/web/chunk-xx11yv61.js +89 -0
- package/web/chunk-xzwxcxb4.js +1 -0
- package/web/chunk-y1qty77a.js +1 -0
- package/web/{chunk-da7m1kva.js → chunk-y2rzeb4v.js} +2 -2
- package/web/chunk-ys2tns0p.js +1 -0
- package/web/chunk-z05x9cbm.js +1 -0
- package/web/chunk-zb2bkr7f.js +2 -0
- package/web/{chunk-aangfjqc.js → chunk-zdyys4ar.js} +38 -38
- package/web/chunk-zgavhnt8.js +1 -0
- package/web/index.html +1 -1
- package/worker.js +1 -1
- package/chunk-654cny9a.js +0 -480
- package/chunk-8gw5bvh3.js +0 -25
- package/chunk-8saewt61.js +0 -3
- package/chunk-a0c989ky.js +0 -2
- package/chunk-a5apjjcn.js +0 -16
- package/chunk-a81p46j7.js +0 -2
- package/chunk-agsfy9w7.js +0 -2
- package/chunk-d20p02ny.js +0 -2
- package/chunk-ejsneb6f.js +0 -2
- package/chunk-fmq3zwzk.js +0 -2
- package/chunk-rfb85nj7.js +0 -2
- package/chunk-rfdt992v.js +0 -25
- package/web/chunk-079091ar.js +0 -39
- package/web/chunk-083r4f80.js +0 -1
- package/web/chunk-0cng7r2x.js +0 -2
- package/web/chunk-0k0ande6.js +0 -1
- package/web/chunk-14deqqhr.js +0 -2
- package/web/chunk-1s53190z.js +0 -303
- package/web/chunk-2b63adsj.js +0 -89
- package/web/chunk-3baypnwn.js +0 -4
- package/web/chunk-4067nwjp.js +0 -19
- package/web/chunk-4vjnrz87.js +0 -34
- package/web/chunk-59678wmg.js +0 -1
- package/web/chunk-5k8sv4f5.js +0 -1
- package/web/chunk-5vjhvw1m.js +0 -2
- package/web/chunk-6bwgdvf6.js +0 -1
- package/web/chunk-6ft5pz3c.js +0 -1
- package/web/chunk-7c8rwqtx.js +0 -1
- package/web/chunk-7qzz025k.js +0 -1
- package/web/chunk-7xbaqqd7.css +0 -1
- package/web/chunk-80eyv2mk.js +0 -1
- package/web/chunk-89paytbk.js +0 -4
- package/web/chunk-8ceej2g7.js +0 -1
- package/web/chunk-8nyhy122.js +0 -1
- package/web/chunk-8r0s8tx7.js +0 -1
- package/web/chunk-989jq2h8.js +0 -2
- package/web/chunk-9w5tf22s.js +0 -1
- package/web/chunk-ahztazsg.js +0 -1
- package/web/chunk-bdydzbqk.js +0 -324
- package/web/chunk-c3nn0vvc.js +0 -1
- package/web/chunk-cpwtt6ny.js +0 -1
- package/web/chunk-d22wq71s.js +0 -1
- package/web/chunk-dsw5t58p.js +0 -1
- package/web/chunk-dv72fat3.js +0 -1
- package/web/chunk-dvvs1jjq.js +0 -3
- package/web/chunk-e131rg6p.js +0 -2
- package/web/chunk-ekw54h1q.js +0 -1
- package/web/chunk-geh05ghh.js +0 -55
- package/web/chunk-hwsvhst3.js +0 -1
- package/web/chunk-jfvxxp5c.js +0 -1
- package/web/chunk-k02b36g1.js +0 -62
- package/web/chunk-kjacapzd.js +0 -7
- package/web/chunk-kkfrs7d1.js +0 -41
- package/web/chunk-kkyn8yhj.js +0 -106
- package/web/chunk-mh4rx5cf.js +0 -1
- package/web/chunk-mz9b5bsa.js +0 -1
- package/web/chunk-n448vaba.js +0 -1
- package/web/chunk-n8j88qxy.js +0 -1
- package/web/chunk-nmpbsvwb.js +0 -2
- package/web/chunk-nws1s56b.js +0 -1
- package/web/chunk-p7126wwy.js +0 -7
- package/web/chunk-phnqnhj9.js +0 -1
- package/web/chunk-q3jevm51.js +0 -292
- package/web/chunk-qg31p6cn.js +0 -1
- package/web/chunk-qhm3cfq9.js +0 -1
- package/web/chunk-qsd595b9.js +0 -1
- package/web/chunk-r7frwjqx.js +0 -2
- package/web/chunk-rddft5ce.js +0 -1139
- package/web/chunk-rgbdf2m9.js +0 -370
- package/web/chunk-rsbkbg6x.js +0 -78
- package/web/chunk-s2bs5vxh.js +0 -2
- package/web/chunk-sgwccs54.js +0 -1
- package/web/chunk-sjh8gtm9.js +0 -30
- package/web/chunk-t3658ehb.js +0 -2
- package/web/chunk-t81p4wqc.js +0 -24
- package/web/chunk-tewmsd7t.js +0 -1
- package/web/chunk-tf57s7ry.js +0 -1
- package/web/chunk-thbqwq6b.js +0 -1
- package/web/chunk-tqr80b5w.js +0 -2
- package/web/chunk-tz4twwmw.js +0 -2
- package/web/chunk-v282r683.js +0 -24
- package/web/chunk-v4vjjtn7.js +0 -1
- package/web/chunk-vbwdwcdp.js +0 -1
- package/web/chunk-vjngfh0q.js +0 -1
- package/web/chunk-vnt34mkb.js +0 -1
- package/web/chunk-wbgkwxrc.js +0 -1
- package/web/chunk-wjbk50hn.js +0 -2
- package/web/chunk-wjy848e2.js +0 -1
- package/web/chunk-wvfmmw1v.js +0 -8
- package/web/chunk-x1jm4zsg.js +0 -1
- package/web/chunk-xbpc6x9m.js +0 -169
- package/web/chunk-xce8n339.js +0 -1
- package/web/chunk-xmsb2g71.js +0 -1
- package/web/chunk-xtss82z2.js +0 -1
package/web/chunk-c3nn0vvc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Lt}from"./chunk-0whceqes.js";export{Lt as default};
|
package/web/chunk-cpwtt6ny.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,o,J,i,r,g,t,n,_,Vt,tr,Ue,Pn,De,mn,pe,re}from"./chunk-rddft5ce.js";var M=[{label:"每天 9:00",cron:"0 9 * * *"},{label:"每个工作日 9:00",cron:"0 9 * * 1-5"},{label:"每周一 9:00",cron:"0 9 * * 1"},{label:"每小时",cron:"0 * * * *"},{label:"每天 18:00",cron:"0 18 * * *"},{label:"每月 1 号 9:00",cron:"0 9 1 * *"}],ae=["日","一","二","三","四","五","六","日"],ie=(a)=>a.padStart(2,"0");function X(a){let p=M.find((I)=>I.cron===a.trim());if(p)return p.label;let N=a.trim().split(/\s+/);if(N.length!==5)return a;let[u="",y="",v="",D="",c=""]=N,C=(I)=>/^\d+$/.test(I);if(D!=="*")return a;if(C(u)&&y==="*"&&v==="*"&&c==="*")return`每小时第 ${u} 分`;let P=u.match(/^\*\/(\d+)$/);if(P&&y==="*"&&v==="*"&&c==="*")return`每 ${P[1]} 分钟`;if(!C(u)||!C(y))return a;let m=`${y}:${ie(u)}`;if(v==="*"&&c==="*")return`每天 ${m}`;if(v==="*"&&c==="1-5")return`每个工作日 ${m}`;if(v==="*"&&/^[0-7](,[0-7])*$/.test(c))return`每周${c.split(",").map((I)=>ae[Number(I)]).join("、")} ${m}`;if(C(v)&&c==="*")return`每月 ${v} 号 ${m}`;return a}function Z(a){let p=Date.now()-a,N=Math.floor(Math.abs(p)/1000);if(N<60)return"刚刚";let u=Math.floor(N/60);if(u<60)return`${u} 分钟${p>0?"前":"后"}`;let y=Math.floor(u/60);if(y<24)return`${y} 小时${p>0?"前":"后"}`;return`${Math.floor(y/24)} 天${p>0?"前":"后"}`}function he(a){let{Button:p,confirm:N,PageLayout:u,Switch:y,cn:v,style:D}=_(),{connection:c,onOpen:C}=a,[P,m]=r([]),[I,U]=r([]),[T,V]=r([]),[j,R]=r(),[B,W]=r([]),[F,K]=r(!0),[O,w]=r(),[z,L]=r(),[Y,A]=r(!1),[G,f]=r({}),s=i(0),q=h(async()=>{let e=++s.current;try{let[l,d,b,x]=await Promise.all([c.request("/api/automations"),c.request("/api/projects").catch(()=>[]),c.request("/api/info").catch(()=>{return}),c.request("/api/models").catch(()=>({models:[]}))]),oe=[...new Set(l.flatMap((S)=>S.lastSessionID?[S.lastSessionID]:[]))],se=(await Promise.all(oe.map(async(S)=>c.request(`/api/sessions/${encodeURIComponent(S)}`).catch((k)=>{if(k instanceof Error&&"status"in k&&k.status===404)return;throw k})))).filter((S)=>S!==void 0);if(e!==s.current)return;if(m(l.sort((S,k)=>S.created-k.created)),U(d),V(se),R(b),x?.models)W(x.models.map((S)=>S.id));w(void 0)}catch(l){if(e===s.current)w(l instanceof Error?l.message:"加载失败")}finally{if(e===s.current)K(!1)}},[c]);o(()=>(q(),()=>{s.current++}),[q]);let E=(e)=>{L(e),A(!0)},ee=async(e)=>{f((l)=>({...l,[e.id]:!0}));try{let l=await c.request(`/api/automations/${e.id}/run`,{method:"POST"});C(l.id)}catch(l){w(l instanceof Error?l.message:"运行失败")}finally{f((l)=>({...l,[e.id]:!1}))}},te=async(e)=>{if(!await N({title:`删除自动化「${e.name}」?`,description:"已经跑出来的会话会保留。",action:"删除",danger:!0}))return;try{await c.request(`/api/automations/${e.id}`,{method:"DELETE"}),m((d)=>d.filter((b)=>b.id!==e.id))}catch(d){w(d instanceof Error?d.message:"删除失败")}},ne=async(e,l)=>{try{let d=await c.request(`/api/automations/${e.id}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:l})});m((b)=>b.map((x)=>x.id===e.id?d:x))}catch(d){w(d instanceof Error?d.message:"状态切换失败")}};return n(u,{title:"自动化",description:n(g,{children:["到点自动开一个新会话执行提示词,跑完的结果在会话里查看。",j?.timezone&&n("span",{className:"text-faint",children:["按服务器时区 ",j.timezone,"。"]})]}),actions:n(p,{variant:"primary",onClick:()=>E(null),children:[t(pe,{className:"size-4"}),"新建"]}),children:[O&&t("div",{className:"mb-4 rounded-lg bg-danger/10 px-3 py-2 text-xs text-danger",children:O}),F?t("div",{className:"flex justify-center py-12 text-xs text-faint",children:"正在加载自动化…"}):P.length===0?n("div",{className:D("surface.emptyDashed","animate-fade"),children:[t("div",{className:"grid size-11 place-items-center rounded-xl bg-raised text-dim",children:t(Vt,{className:"size-5"})}),n("div",{children:[t("p",{className:"text-[15px] font-medium",children:"还没有自动化"}),t("p",{className:"mt-1 text-sm text-dim",children:"比如「每个工作日 9 点总结昨天的提交」。"})]}),n(p,{size:"sm",onClick:()=>E(null),className:"mt-1",children:[t(pe,{className:"size-3.5"}),"新建自动化"]})]}):t("ul",{className:"flex animate-fade flex-col gap-3",children:P.map((e)=>{let l=e.projectID?I.find((x)=>x.id===e.projectID):void 0,d=e.lastSessionID?T.find((x)=>x.id===e.lastSessionID):void 0,b=Boolean(G[e.id]);return t("li",{children:n("article",{className:D("surface.card","group p-4 transition-[border-color,box-shadow] duration-200 hover:border-line-strong hover:shadow-composer"),children:[n("div",{className:"flex items-start gap-3",children:[n("div",{className:v("min-w-0 flex-1 transition-opacity duration-200",!e.enabled&&"opacity-55"),children:[t("h2",{className:"truncate text-[15px] font-medium",children:e.name}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3.5 gap-y-1 text-[13px] text-dim",children:[n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[t(Vt,{}),X(e.schedule)]}),n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[l?t(Ue,{}):t(Pn,{}),l?l.name:"聊天"]}),e.enabled&&e.nextRun!==null&&n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[t(tr,{}),"下次 ",Z(e.nextRun)]})]})]}),t(y,{checked:e.enabled,label:e.enabled?"停用":"启用",onCheckedChange:(x)=>ne(e,x),className:"mt-0.5"})]}),t("p",{className:v("mt-3 line-clamp-2 text-sm leading-6 whitespace-pre-wrap text-faint transition-opacity duration-200",!e.enabled&&"opacity-55"),children:e.prompt}),n("div",{className:"mt-3 -mb-1 flex items-center gap-1",children:[n(p,{size:"sm",onClick:()=>ee(e),disabled:b,children:[t(mn,{className:"size-3.5"}),b?"正在启动…":"立即运行"]}),n(p,{size:"sm",variant:"ghost",onClick:()=>E(e),children:[t(De,{className:"size-3.5"}),"编辑"]}),n(p,{size:"sm",variant:"danger-ghost",onClick:()=>te(e),children:[t(re,{className:"size-3.5"}),"删除"]}),t("div",{className:"flex-1"}),e.lastRun!==null&&n("button",{type:"button",disabled:!d,onClick:()=>d&&C(d.id),className:"rounded-md px-1.5 py-1 text-[13px] text-faint transition-colors enabled:hover:bg-raised enabled:hover:text-ink",children:["上次运行 ",Z(e.lastRun),d?.archivedAt!=null?" · 已归档":"",!d?" · 会话已删除":""]})]})]})},e.id)})}),z!==void 0&&t(le,{open:Y,onOpenChange:A,automation:z??void 0,projects:I,models:B,timezone:j?.timezone,onSaved:(e)=>{m((l)=>{let d=l.findIndex((b)=>b.id===e.id);if(d>=0){let b=[...l];return b[d]=e,b}return[...l,e].sort((b,x)=>b.created-x.created)}),A(!1)},connection:c},z?.id??"new")]})}var H="custom",Q="chat";function le(a){let{Button:p,Dialog:N,Field:u,Form:y,FormError:v,Input:D,Select:c,Textarea:C}=_(),P=J(),m=a.automation,[I,U]=r(m?.name??""),[T,V]=r(m?.prompt??""),[j,R]=r(m?.schedule??M[0]?.cron??"0 9 * * *"),[B,W]=r(()=>!M.some((f)=>f.cron===j)),[F,K]=r(m?.projectID??Q),[O,w]=r(m?.model??""),[z,L]=r(!1),[Y,A]=r();async function G(f){f.preventDefault(),L(!0),A(void 0);try{let s=F===Q?void 0:F,q={name:I,prompt:T,schedule:j,model:O||void 0},E;if(m)E=await a.connection.request(`/api/automations/${m.id}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({...q,projectID:s??null})});else E=await a.connection.request("/api/automations",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...q,projectID:s})});a.onSaved(E)}catch(s){A(s instanceof Error?s.message:"保存失败")}finally{L(!1)}}return t(N,{open:a.open,onOpenChange:a.onOpenChange,title:a.automation?"编辑自动化":"新建自动化",size:"lg",footer:n(g,{children:[t("div",{className:"flex-1 max-sm:hidden"}),t(p,{onClick:()=>a.onOpenChange(!1),children:"取消"}),t(p,{type:"submit",form:P,variant:"primary",disabled:z,children:z?"正在保存…":a.automation?"保存":"创建"})]}),children:n(y,{id:P,onSubmit:G,children:[t(u,{label:"名称",children:(f)=>t(D,{id:f,autoFocus:!m,required:!0,value:I,onChange:(s)=>U(s.target.value),placeholder:"例如:每日提交总结"})}),t(u,{label:"提示词",hint:"没人盯着运行,写清楚要做什么、结果怎么汇报。",children:(f)=>t(C,{id:f,required:!0,value:T,onChange:(s)=>V(s.target.value),rows:5,placeholder:"总结昨天到现在的 git 提交,按模块分组,列出需要我关注的改动。"})}),n("div",{className:"grid gap-x-3 gap-y-4 sm:grid-cols-2",children:[t(u,{label:"时间",children:(f)=>t(c,{id:f,value:B?H:j,onValueChange:(s)=>{if(W(s===H),s!==H)R(s)},groups:[{options:M.map((s)=>({value:s.cron,label:s.label}))},{options:[{value:H,label:"自定义(cron)"}]}]})}),t(u,{label:"在哪里运行",children:(f)=>t(c,{id:f,value:F,onValueChange:K,groups:[{options:[{value:Q,label:"聊天",description:"不绑定目录",icon:t(Pn,{})}]},...a.projects.length?[{label:"项目",options:a.projects.map((s)=>({value:s.id,label:s.name,icon:t(Ue,{})}))}]:[]]})})]}),B&&t(u,{label:"cron 表达式",hint:`分 时 日 月 周,例如 30 8 * * 1-5 是工作日 8:30。${a.timezone?`按 ${a.timezone} 时间。`:""}`,children:(f)=>t(D,{id:f,required:!0,value:j,onChange:(s)=>R(s.target.value),spellCheck:!1,className:"font-mono"})}),a.models.length>0&&t(u,{label:"模型",children:(f)=>t(c,{id:f,value:O||"default",onValueChange:(s)=>w(s==="default"?"":s),groups:[{options:[{value:"default",label:"默认模型"},...a.models.map((s)=>({value:s,label:s}))]}]})}),t(v,{children:Y})]})})}export{he as AutomationsPage};
|
package/web/chunk-d22wq71s.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ai}from"./chunk-c01176kn.js";export{ai as default};
|
package/web/chunk-dsw5t58p.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ci}from"./chunk-2cem4sv7.js";export{Ci as createPieServices};
|
package/web/chunk-dv72fat3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e,a}from"./chunk-1s53190z.js";import{K,Dt,Mt}from"./chunk-2b63adsj.js";import{G}from"./chunk-14deqqhr.js";import{or,kt}from"./chunk-2cem4sv7.js";var l=or().RailroadAbnf.parser.LangiumParser,s=e((r)=>{let t=r.alternatives.map(p);if(t.length===1)return t[0];return{type:"choice",alternatives:t}},"transformAlternation"),p=e((r)=>{let t=r.elements.map(f);if(t.length===1)return t[0];return{type:"sequence",elements:t}},"transformConcatenation"),u=e((r)=>{if(r.includes("*")){let[n,o]=r.split("*"),i=n?parseInt(n,10):0,m=o?parseInt(o,10):1/0;return{min:i,max:m}}let t=parseInt(r,10);return{min:t,max:t}},"parseRepeat"),f=e((r)=>{let t=c(r.primary);if(!r.repeat)return t;let{min:n,max:o}=u(r.repeat);if(n===0&&o===1)return{type:"optional",element:t};return{type:"repetition",element:t,min:n,max:o}},"transformElement"),c=e((r)=>{switch(r.$type){case"AbnfStringLiteral":return{type:"terminal",value:r.value};case"AbnfNumVal":return{type:"terminal",value:r.value};case"AbnfRuleName":return{type:"nonterminal",name:r.name};case"AbnfGroup":return s(r.element);case"AbnfOptionalGroup":return{type:"optional",element:s(r.element)};default:throw Error(`Unsupported ABNF primary node: ${r.$type}`)}},"transformPrimary"),d=e((r)=>({name:r.name,definition:s(r.definition)}),"transformRule"),v=e((r)=>{if(G(r,K),r.title)K.setTitle(r.title);r.rules.map((t)=>K.addRule(d(t)))},"populateDb"),g={parse:e((r)=>{K.clear(),a.debug("[ABNF Parser] Starting Langium parse");let t=l.parse(r);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new kt(t);let n=t.value;a.debug("[ABNF Parser] Parsed rules:",n.rules.length),v(n),a.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:K}},E={parser:g,db:K,renderer:Mt,styles:Dt};export{E as diagram};
|
package/web/chunk-dvvs1jjq.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{G}from"./chunk-14deqqhr.js";import{e,a,D,b,O,C,S,E,T,A,R,L,l,kr,p,Nn,Xr,U}from"./chunk-1s53190z.js";import{Br,X}from"./chunk-2cem4sv7.js";var _="position frame",V="frame positioned",F="position relation",j="relation positioned",pe=e(function(t){a.debug("options str",t)},"setOptions"),ve=e(function(){return{}},"getOptions"),be=e(function(){Y(),C()},"clear");function Y(){M={}}e(Y,"reset");var we=D.eventmodeling,ye=e(()=>U({...we,...b().eventmodeling}),"getConfig"),M={};function z(){let t=Pe,{ast:i}=M,n=I();if(!i)throw Error("No data for EventModel");return i.frames.forEach((r,o)=>{let s=te(r,i.dataEntities,n);t=P(t,{$kind:_,index:o,frame:r,textProps:s});let c=void 0;if(se(r))a.debug("source frame",r.sourceFrames),c=i.frames.filter((m)=>r.sourceFrames.some((u)=>u.$refText===m.name)),c.forEach((m)=>{t=P(t,{$kind:F,index:o,frame:r,sourceFrame:m})});else t=P(t,{$kind:F,index:o,frame:r})}),t={...t,sortedSwimlanesArray:W(t.swimlanes)},t}e(z,"getState");function K(t){M.ast=void 0;let i=new Set;for(let n of t.frames){if(i.has(n.name)){let r=n.$cstNode?.range.start.line,o=r===void 0?"":` on line ${r+1}`;throw Error(`Duplicate event modeling frame ID "${n.name}"${o}`)}i.add(n.name)}M.ast=t}e(K,"setAst");var d={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function I(){return d}e(I,"getDiagramProps");var Pe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function q(t){let i=t.split(".");if(i.length===2)return i[0];return}e(q,"extractNamespace");function J(t){let i=t.split(".");if(i.length===2)return i[1];return t}e(J,"extractName");function Q(t,i){if(!i||i.length===0)return;return Object.values(t).find((n)=>n.namespace===i)}e(Q,"findSwimlaneByNamespace");function y(t,i,n){return Math.max(i,...Object.keys(t).filter((r)=>{let o=Number.parseInt(r);return o>i&&o<n}).map((r)=>Number.parseInt(r)))+1}e(y,"findNextAvailableIndex");function Z(t,i){let n=q(t.entityIdentifier),r=Q(i,n);switch(t.modelEntityType){case"ui":case"pcr":case"processor":if(r)return{index:r.index,label:r.namespace||d.labelUiAutomation};else if(n)return{index:y(i,0,100),label:d.labelUiAutomationPrefix+n};return{index:0,label:d.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":if(r)return{index:r.index,label:r.namespace||d.labelCommandReadModel};else if(n)return{index:y(i,100,200),label:d.labelCommandReadModelPrefix+n};return{index:100,label:d.labelCommandReadModel};case"evt":case"event":default:if(r)return{index:r.index,label:r.namespace||d.labelEvents};else if(n)return{index:y(i,200,300),label:d.labelEventsPrefix+n};return{index:200,label:d.labelEvents}}}e(Z,"calculateSwimlaneProps");function ee(t){let{themeVariables:i}=b();switch(t.modelEntityType){case"ui":return{fill:i.emUiFill??"white",stroke:i.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:i.emProcessorFill??"#edb3f6",stroke:i.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:i.emReadModelFill??"#d3f1a2",stroke:i.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:i.emCommandFill??"#bcd6fe",stroke:i.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:i.emEventFill??"#ffb778",stroke:i.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}e(ee,"calculateEntityVisualProps");function te(t,i,n){let r=b(),o=O(J(t.entityIdentifier)??"",r),s,c={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},u=`<b>${Nn(o,n.textMaxWidth,c)}</b>`;if(t.dataInlineValue)s=t.dataInlineValue,s=s.substring(s.indexOf("{")+1),s=s.substring(0,s.lastIndexOf("}")-1),s=O(s,r),s=Nn(s,n.textMaxWidth,c),s=s.replaceAll(" "," ");if(t.dataReference){let w=i.find((k)=>k.name===t.dataReference?.$refText);if(w)s=w.dataBlockValue,s=s.substring(s.indexOf(`{
|
|
2
|
-
`)+2),s=s.substring(0,s.lastIndexOf("}")-1),s=O(s,r),s=Nn(s,n.textMaxWidth,c),s=s.replaceAll(" "," "),s+="<br/>"}let x=s!==void 0;if(x)u+=`<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${s}</code>`;let g={fontSize:c.fontSize,fontWeight:c.fontWeight,fontFamily:c.fontFamily},f=Xr(u,g),v=x?f.width/3:f.width,h={content:u,width:v,height:f.height};return a.debug(`[${t.name}] ${t.entityIdentifier} text`,h),h}e(te,"calculateTextProps");function ne(t,i){let n=i,r=ee(n.frame),o={width:n.textProps.width+2*d.boxTextPadding,height:n.textProps.height+2*d.boxTextPadding};return[{$kind:V,frame:n.frame,index:n.index,visual:r,dimension:o,textProps:n.textProps}]}e(ne,"decidePositionFrame");function ie(t,i,n){if(i===void 0)return d.contentStartX;if(i.index===t.index&&t.r)return t.r+d.boxPadding;if(n===void 0)return d.contentStartX;return n.r-d.boxOverlap+d.boxPadding}e(ie,"calculateX");function re(t,i){let n=[...t.map((r)=>r.r),i];return Math.max(...n)}e(re,"calculateMaxRight");function W(t){return Object.values(t).sort((i,n)=>i.index-n.index)}e(W,"sortedSwimlanesArray");function ae(t,i){let n=i,r=Z(n.frame,t.swimlanes),o;if(r.index in t.swimlanes)o=t.swimlanes[r.index];else o={index:r.index,label:r.label,r:0,y:r.index*d.swimlaneMinHeight+d.swimlaneGap,height:d.swimlaneMinHeight,maxHeight:d.swimlaneMinHeight};let s=t.boxes.length>0?t.boxes[t.boxes.length-1]:void 0,c=t.previousSwimlaneNumber!==void 0?t.swimlanes[t.previousSwimlaneNumber]:void 0,m={width:Math.max(d.boxMinWidth,Math.min(d.boxMaxWidth,n.dimension.width))+2*d.boxPadding,height:Math.max(d.boxMinHeight,Math.min(d.boxMaxHeight,n.dimension.height))+2*d.boxPadding},u=ie(o,c,s),x=u+m.width+d.boxPadding,g=re(Object.values(t.swimlanes),x);o.r=u+m.width,o.maxHeight=Math.max(o.maxHeight,m.height),o.height=Math.max(d.swimlaneMinHeight,o.maxHeight)+2*d.swimlanePadding;let f={x:u,y:d.swimlanePadding+o.y,r:x,dimension:m,leftSibling:!1,swimlane:o,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},v={...t,boxes:[...t.boxes,f],swimlanes:{...t.swimlanes,[`${o.index}`]:o},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:g},h=W(v.swimlanes);if(h.length>0)h[0].y=0;for(let w=1;w<h.length;w++){let k=h[w],H=h[w-1];k.y=H.y+H.height+d.swimlaneGap}return v}e(ae,"evolveFramePositioned");function oe(t,i){if(t===0&&i.sourceFrames.length===0)return!0;return!1}e(oe,"isFirstFrame");function se(t){return t.sourceFrames!==void 0&&t.sourceFrames!==null&&t.sourceFrames.length>0}e(se,"hasSourceFrame");function B(t,i){if(i===void 0||i===null)return;return t.find((n)=>n.frame.name===i.name)}e(B,"findBoxByFrame");function de(t,i,n){if(n<0)return;for(let r=n;r>=0;r--){let o=t[r];if(o.swimlane.index!==i)return o}return}e(de,"findBoxByLineIndex");function le(t,i){let n=i;if(oe(n.index,n.frame))return[];let r=B(t.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let o;if(n.sourceFrame)o=B(t.boxes,n.sourceFrame);else{if(Br(n.frame))return[];o=de(t.boxes,r.swimlane.index,n.index-1)}if(o===void 0)return[];return[{$kind:j,frame:n.frame,index:n.index,sourceBox:o,targetBox:r}]}e(le,"decidePositionRelation");function ce(t,i){let n=i,r={visual:{fill:"none",stroke:"#000"},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...t,relations:[...t.relations,r]}}e(ce,"evolveRelationPositioned");var Se={[_]:ne,[F]:le},Me={[V]:ae,[j]:ce};function me(t,i){let n=Se[i.$kind];if(n===void 0||n===null)return[];let r=n(t,i);return a.debug("decided events",r),r}e(me,"decide");function ue(t,i){let n=i.reduce((r,o)=>{let s=Me[o.$kind];if(s===void 0||s===null)return r;return s(r,o)},t);return a.debug("evolve events",{state:t,newState:n,events:i}),n}e(ue,"evolve");function P(t,i){let n=me(t,i);return ue(t,n)}e(P,"dispatch");var N={getConfig:ye,preserveCommentsWhenParsing:!0,setOptions:pe,getOptions:ve,clear:be,setAccTitle:S,getAccTitle:E,getAccDescription:A,setAccDescription:T,setDiagramTitle:R,getDiagramTitle:L,setAst:K,getDiagramProps:I,getState:z},ke={parse:e(async(t)=>{let i=await X("eventmodeling",t);a.debug(i),N.setAst(i),G(i,N)},"parse")},Fe=l(),Be=Fe?.eventmodeling;function xe(t,i){return(n)=>{let r=n.swimlane.y+i.swimlanePadding,o=t.append("g").attr("class","em-box");o.append("rect").attr("x",n.x).attr("y",r).attr("rx","3").attr("width",n.dimension.width).attr("height",n.dimension.height).attr("stroke",n.visual.stroke).attr("fill",n.visual.fill),o.append("foreignObject").attr("x",n.x+i.boxPadding).attr("y",r+10).attr("width",n.dimension.width-2*i.boxPadding).attr("height",n.dimension.height-2*i.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(n.text)}}e(xe,"renderD3Box");function fe(t,i){return t>i}e(fe,"dirUpwards");function ge(t,i,n,r){return(o)=>{let s=o.sourceBox.swimlane.y+i.swimlanePadding,c=o.targetBox.swimlane.y+i.swimlanePadding,m=fe(s,c),u=o.sourceBox.x+o.sourceBox.dimension.width*2/3,x=o.targetBox.x+o.targetBox.dimension.width/3,g,f;if(a.debug(`rendering relation up=${m} for `,{sourceBox:o.sourceBox,targetBox:o.targetBox}),m)g=s,f=c+o.targetBox.dimension.height;else g=s+o.sourceBox.dimension.height,f=c;let v=r.emRelationStroke??o.visual.stroke;t.append("path").attr("class","em-relation").attr("fill",o.visual.fill).attr("stroke",v).attr("stroke-width","1").attr("marker-end",`url(#${n})`).attr("d",`M${u} ${g} L${x} ${f}`)}}e(ge,"renderD3Relation");function he(t,i,n,r){return(o)=>{let s=t.append("g").attr("class","em-swimlane"),c=r.emSwimlaneBackgroundOdd??"rgb(250,250,250)",m=r.emSwimlaneBackgroundStroke??"rgb(240,240,240)";s.append("rect").attr("x",0).attr("y",o.y).attr("rx","3").attr("width",i+n.swimlanePadding).attr("height",o.height).attr("fill",c).attr("stroke",m),s.append("text").attr("font-weight",n.swimlaneTextFontWeight).attr("x",30).attr("y",o.y+30).text(o.label)}}e(he,"renderD3Swimlane");var Ee=e(function(t,i,n,r){if(a.debug("in eventmodeling renderer",t+`
|
|
3
|
-
`,"id:",i,n),!Be)throw Error("EventModeling config not found");let o=r.db,{themeVariables:s,eventmodeling:c}=l(),m=p(`[id="${i}"]`),u=o.getDiagramProps(),x=o.getState(),g=`em-arrowhead-${i}`,f=s.emArrowhead??"#000000";x.sortedSwimlanesArray.forEach(he(m,x.maxR,u,s)),x.boxes.forEach(xe(m,u)),x.relations.forEach(ge(m,u,g,s)),m.append("defs").append("marker").attr("id",g).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),kr(void 0,m,c?.padding??30,c?.useMaxWidth)},"draw"),Ae={draw:Ee},$e=e((t)=>"","getStyles"),Re=$e,Ue={parser:ke,db:N,renderer:Ae,styles:Re};export{Ue as diagram};
|
package/web/chunk-e131rg6p.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,g,t,n,_,s,Z,ae,er}from"./chunk-rddft5ce.js";var u=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],c=s("code-xml",u);function zr(e){let i=_();i.useTheme();let[m,d]=r("preview"),o=e.streaming&&!e.rendered,l=!e.streaming&&!e.rendered&&Boolean(e.error),a=m==="code"||o;return n(i.Panel,{"aria-label":e.title,"data-render-pending":e.pending&&!l?"true":void 0,className:"group/graph relative my-4 font-sans not-italic first:mt-0 last:mb-0",children:[t("div",{role:"toolbar","aria-label":`${e.title}操作`,className:o?"absolute top-2 right-2 z-10 flex items-center":i.style("surface.toolbarFloating","absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-150 group-hover/graph:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-70"),children:o?n("span",{className:i.style("control.badge","gap-1.5 rounded-full px-2 py-0.5 text-[11px]"),children:[t(ae,{className:"size-3 animate-spin"}),"生成",e.title]}):n(g,{children:[t("button",{type:"button","aria-label":a?"查看图表":"查看代码",title:a?"查看图表":"查看代码",onClick:()=>d(a?"preview":"code"),className:"flex size-6 items-center justify-center rounded-md text-dim hover:bg-raised hover:text-ink [&_svg]:size-3.5",children:a?t(er,{}):t(c,{})}),t(i.CopyButton,{text:e.code,size:"icon-sm",label:"复制代码"})]})}),a&&t(i.Code,{code:e.code,lang:e.codeLang,className:"px-4 py-3"}),l&&!a&&n("div",{role:"alert",className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[t(Z,{className:"size-5 text-warning"}),t("p",{className:"max-w-full text-xs break-words text-dim",children:e.error}),t("button",{type:"button",onClick:()=>d("code"),className:"text-xs text-accent-strong underline underline-offset-2",children:"查看代码"})]}),t("div",{hidden:a||l,children:e.children})]})}
|
|
2
|
-
export{zr};
|
package/web/chunk-ekw54h1q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,o,i,r,g,t,n,_,vt,ee,de}from"./chunk-rddft5ce.js";var te={global:"全局",project:"项目",custom:"自定义",builtin:"内置"};function F({skill:s,issue:x,connection:y}){let{Button:q,CopyButton:j,style:m,useTheme:z}=_();z();let[l,C]=r(),[S,L]=r(),[d,E]=r(0);return o(()=>{let p=!0;L(void 0),C(void 0);let b=new URLSearchParams;if(s.projectID)b.set("projectID",s.projectID);if(s.location)b.set("location",s.location);let v=b.toString()?`?${b.toString()}`:"";return Promise.all([y.request(`/api/skills/${encodeURIComponent(s.name)}/content${v}`),y.request(`/api/skills/${encodeURIComponent(s.name)}/files${v}`)]).then(([f,P])=>{if(p)C({text:f.text,files:P.files})}).catch((f)=>{if(p)L(f instanceof Error?f.message:"读取失败")}),()=>{p=!1}},[y,s.name,s.projectID,s.location,d]),n("div",{className:"min-w-0 space-y-5 text-sm text-ink",children:[t("p",{className:"whitespace-pre-wrap break-words [overflow-wrap:anywhere] text-dim",children:s.description||"暂无描述"}),n("div",{children:[n("p",{className:"break-all text-xs text-dim",children:[te[s.scope],s.projectName?` · ${s.projectName}`:""]}),n("div",{className:"mt-1 flex min-w-0 items-center gap-2",children:[t("code",{className:m("markdown.inlineCode","min-w-0 flex-1 break-all text-xs"),children:s.location}),t(j,{text:s.location,label:"复制完整路径",className:"size-10"})]})]}),n("ul",{className:"space-y-1 break-words text-xs text-dim",children:[t("li",{children:"启用状态按名称生效,影响所有同名技能的新会话可用性。"}),s.disableModelInvocation&&t("li",{children:"仅手动:可由用户调用,不向模型自动提供。"}),s.platforms&&n("li",{children:["平台限制:",s.platforms.join("、")]}),s.disabled&&t("li",{children:"已禁用:不会提供给新会话。"}),x?.overriddenBy&&n("li",{className:"break-all",children:["被覆盖:同名技能优先使用 ",x.overriddenBy]})]}),s.commands?.length?n("div",{children:[t("h3",{className:"font-medium",children:"bin 命令"}),t("p",{className:"mt-1 text-xs text-dim",children:"技能目录中的可执行命令。"}),t("ul",{className:"mt-2 space-y-1 font-mono text-xs",children:s.commands.map((p)=>t("li",{className:"break-all",children:p},p))})]}):null,S?n("div",{role:"alert",className:"space-y-2",children:[n("p",{className:"break-words text-danger",children:["读取失败:",S]}),t(q,{className:"h-10",onClick:()=>E(d+1),children:"重试"})]}):!l?t("p",{role:"status",className:"text-dim",children:"正在读取文件…"}):n(g,{children:[n("section",{children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t("h3",{className:"font-medium",children:"SKILL.md 原文"}),t(j,{text:l.text,label:"复制 SKILL.md 原文",className:"size-10"})]}),n("p",{className:"mb-2 text-xs text-faint",children:[l.text.length.toLocaleString()," 字符 · 约 ",Math.ceil(l.text.length/4).toLocaleString()," ","tokens(估算)"]}),t("pre",{className:m("surface.subtle",m("chat.toolOutput"),"rounded-lg bg-raised p-3 text-xs leading-5 break-all"),children:l.text})]}),n("section",{children:[n("h3",{className:"font-medium",children:["目录文件 · ",l.files.length,l.files.length===200?"(最多显示 200 个)":""]}),t("ul",{className:"mt-2 space-y-1 font-mono text-xs text-dim",children:l.files.map((p)=>t("li",{className:"break-all",children:p},p))})]})]})]})}var U="all",H="non-project",se="size-4 cursor-pointer rounded border-line text-accent accent-accent focus-visible:outline-2 focus-visible:outline-accent";function me({connection:s}){let{Button:x,Input:y,Select:q,Dialog:j,style:m,useTheme:z}=_();z();let[l,C]=r([]),[S,L]=r([]),[d,E]=r(U),[p,b]=r([]),[v,f]=r(),[P,Q]=r(""),[w,D]=r(),[N,B]=r(!0),[A,O]=r(),[K,V]=r(),u=i(0),I=i(!1),k=h(async(e=!1)=>{let c=++u.current;I.current=!0,B(!0);try{if(e)await s.request("/api/skills/rescan",{method:"POST"});let[a,R,T]=await Promise.all([s.request("/api/skills?all=true"),s.request("/api/skills/settings"),s.request("/api/projects")]);if(c!==u.current)return;C(a.skills),L(T),b(a.issues),f(R),V(new Date),O(void 0)}catch(a){if(c===u.current)O(a instanceof Error?a.message:"读取失败")}finally{if(c===u.current)I.current=!1,B(!1)}},[s]);o(()=>(k(),()=>{u.current++}),[k]);async function G(e){if(I.current)return;I.current=!0;let c=++u.current;B(!0);try{let a=await s.request("/api/skills/settings",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(c!==u.current)return;f(a),await k()}catch(a){if(c!==u.current)return;O(a instanceof Error?a.message:"保存设置失败"),I.current=!1,B(!1)}}let X=P.trim().toLocaleLowerCase(),W=d===U?l:l.filter((e)=>{if(e.scope!=="project")return!0;return d!==H&&e.projectID===d}),J=W.filter((e)=>`${e.name} ${e.description??""}`.toLocaleLowerCase().includes(X)),M=(e)=>p.find((c)=>c.kind==="overridden"&&(c.path==="<built-in>"?e.scope==="builtin":c.path.replace(/\\/g,"/")===`${e.location.replace(/\\/g,"/")}/SKILL.md`));return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[t("h2",{className:m("settings.groupTitle"),children:"技能"}),t("p",{"aria-live":"polite",className:m("settings.groupDesc"),children:K&&`找到 ${W.length} 个 · ${K.toLocaleTimeString("zh-CN",{hour12:!1})}`})]}),n("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[t(q,{value:d,disabled:N,onValueChange:(e)=>{D(void 0),E(e)},groups:[{options:[{value:U,label:"全部来源"},{value:H,label:"非项目技能"}]},...S.length?[{label:"项目",options:S.map((e)=>({value:e.id,label:e.name,description:e.directory}))}]:[]],className:"w-44"}),n(x,{variant:"ghost",disabled:N,onClick:()=>k(!0),className:"h-9 px-2.5 text-xs",children:[t(ee,{className:`size-3.5 ${N?"animate-spin":""}`}),t("span",{className:"ml-1",children:"重新扫描"})]})]})]}),A&&n("div",{role:"alert",className:"mb-3 flex flex-wrap items-center gap-2 rounded-xl border border-line p-3",children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法更新技能:",A]}),t(x,{disabled:N,onClick:()=>k(),children:"重试"})]}),n("div",{className:"relative mb-3 min-w-0",children:[t(de,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),t(y,{type:"search","aria-label":"搜索技能",placeholder:"搜索技能",value:P,onChange:(e)=>Q(e.target.value),className:"h-10 min-w-0 pl-9"})]}),t("div",{className:m("settings.groupBox"),children:N&&!l.length?t("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2].map((e)=>n("div",{className:"h-16 space-y-2 px-4 py-3",children:[t("div",{className:"h-3 w-24 animate-pulse rounded bg-raised"}),t("div",{className:"h-3 w-2/3 animate-pulse rounded bg-raised"})]},e))}):J.length===0?t("p",{className:"p-4 text-sm text-dim",children:"没有找到匹配的技能"}):t("ul",{className:"divide-y divide-line",children:J.map((e)=>{let c=M(e),a=e.disabled;return n("li",{className:`flex min-w-0 items-center justify-between gap-3 px-4 py-2.5 transition-colors hover:bg-raised/40 ${a?"opacity-55":""}`,children:[n("button",{type:"button",className:"group flex min-h-12 min-w-0 flex-1 cursor-pointer items-center gap-3 py-1 text-left focus-visible:outline-2 focus-visible:outline-accent","aria-label":`查看技能 ${e.name}`,onClick:()=>D(e),children:[n("span",{className:"min-w-0 flex-1",children:[n("span",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[t("span",{className:"truncate text-sm font-medium text-ink",title:e.name,children:e.name}),c&&n("span",{className:"flex shrink-0 items-center gap-1 text-xs text-warning",children:[t(vt,{className:"size-3.5"}),"被覆盖"]})]}),e.description&&t("span",{className:"mt-0.5 block truncate text-xs text-dim",title:e.description,children:e.description})]}),t("span",{className:m("control.badge","shrink-0 text-[11px] text-dim"),children:e.scope==="project"?"项目":e.scope==="builtin"?"built-in":"全局"})]}),t("span",{className:"relative flex size-10 shrink-0 items-center justify-center",children:t("input",{type:"checkbox","aria-label":`启用技能 ${e.name}`,className:se,disabled:N,checked:!a,onChange:(R)=>{if(!v)return;let T=v.disabled??[],Y=R.target.checked?T.filter((Z)=>Z!==e.name):[...T,e.name];G({...v,disabled:Y})}})})]},`${e.scope}:${e.projectID??""}:${e.name}`)})})})]}),t(j,{open:Boolean(w),onOpenChange:(e)=>{if(!e)D(void 0)},title:w?.name??"",size:"lg",footer:t("div",{className:"flex w-full justify-end",children:t(x,{variant:"primary",onClick:()=>D(void 0),children:"关闭"})}),children:w&&t(F,{skill:w,issue:M(w),connection:s})})]})}export{me as SkillsSection};
|