@intent-hq/web 2.342.8 → 2.342.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/package.json +1 -1
- package/web/app/immutable/chunks/{B_gooRw3.js → 3yZfNPAV.js} +1 -1
- package/web/app/immutable/chunks/{Dfs3_YYJ.js → 7IhreKLs.js} +1 -1
- package/web/app/immutable/chunks/{CfcPGi-s.js → 9THCFi9r.js} +3 -3
- package/web/app/immutable/chunks/{DE1Y_Mqg.js → AiziHZdW.js} +1 -1
- package/web/app/immutable/chunks/{hPM-hpF1.js → B0KDOtDn.js} +1 -1
- package/web/app/immutable/chunks/{Db9BDdTM.js → B31Fv1Yf.js} +1 -1
- package/web/app/immutable/chunks/{DorrRHA9.js → B5auOEHx.js} +1 -1
- package/web/app/immutable/chunks/{Zz2ufh_s.js → B5woGrCE.js} +1 -1
- package/web/app/immutable/chunks/{BlJpnECK.js → B6BcD4WH.js} +3 -3
- package/web/app/immutable/chunks/{CVoHD481.js → B86KwyUY.js} +1 -1
- package/web/app/immutable/chunks/{BZRAoPBg.js → BA0Siouo.js} +1 -1
- package/web/app/immutable/chunks/{DtsUKbfD.js → BDrbb5ru.js} +1 -1
- package/web/app/immutable/chunks/{Cn2QoVqR.js → BEBrrrrG.js} +4 -4
- package/web/app/immutable/chunks/{DKyOFl-H.js → BELLt3Rp.js} +1 -1
- package/web/app/immutable/chunks/{C6ijr8RP.js → BG0i-ahv.js} +1 -1
- package/web/app/immutable/chunks/{DARBmEKl.js → BHTZ1IpN.js} +1 -1
- package/web/app/immutable/chunks/{W4n-ioby.js → BHjzQO3e.js} +1 -1
- package/web/app/immutable/chunks/{D8kRzVzM.js → BI90DWW0.js} +3 -3
- package/web/app/immutable/chunks/{BM2TfFMT.js → BNArlfIr.js} +1 -1
- package/web/app/immutable/chunks/{BTRr_gVO.js → BNhy_oid.js} +4 -4
- package/web/app/immutable/chunks/{hC1Rd2xp.js → BOiWTqMG.js} +1 -1
- package/web/app/immutable/chunks/{8dcwmYMD.js → BOv-t-JT.js} +1 -1
- package/web/app/immutable/chunks/{DksiAt8J.js → BPODOVgS.js} +1 -1
- package/web/app/immutable/chunks/{CPNo3Wxe.js → BPeBH6AO.js} +1 -1
- package/web/app/immutable/chunks/{DGLoeWwC.js → BWYkpaSu.js} +1 -1
- package/web/app/immutable/chunks/{C_YySiHw.js → BXBFDj7S.js} +1 -1
- package/web/app/immutable/chunks/{H1fgmcwF.js → BXPT2uA9.js} +1 -1
- package/web/app/immutable/chunks/{DBwzp-5d.js → BY7eZNdx.js} +1 -1
- package/web/app/immutable/chunks/{DP9aVWvY.js → BZUf-Anc.js} +2 -2
- package/web/app/immutable/chunks/{B87Opa04.js → BdmYNLCp.js} +1 -1
- package/web/app/immutable/chunks/{Br4sh5Vb.js → BfHEUs_v.js} +1 -1
- package/web/app/immutable/chunks/{BVX8qLeE.js → BfwQblTp.js} +1 -1
- package/web/app/immutable/chunks/{BGKHyW3m.js → BiGxny7G.js} +1 -1
- package/web/app/immutable/chunks/{DCWQ8q2B.js → Bj3kdllZ.js} +1 -1
- package/web/app/immutable/chunks/{eqoPYRQw.js → Bkvq66cQ.js} +1 -1
- package/web/app/immutable/chunks/{-2bHDplp.js → BpMTYOh3.js} +1 -1
- package/web/app/immutable/chunks/{zFLt0HSh.js → BtCmVuwg.js} +1 -1
- package/web/app/immutable/chunks/{h1qD8ry7.js → BvsfRyvB.js} +1 -1
- package/web/app/immutable/chunks/{CbGy5L3Y.js → ByWN0UP2.js} +1 -1
- package/web/app/immutable/chunks/{m-4S75UZ.js → C-0t79mD.js} +1 -1
- package/web/app/immutable/chunks/{DUMC5ag4.js → C5jKDcPw.js} +1 -1
- package/web/app/immutable/chunks/{BAr6DP2S.js → C6-_Dbfv.js} +1 -1
- package/web/app/immutable/chunks/{CwkZa8IK.js → CBCPUMw2.js} +1 -1
- package/web/app/immutable/chunks/{0tj_yJAd.js → CBOkoV02.js} +1 -1
- package/web/app/immutable/chunks/{BHOPo_9A.js → CBvV4T1N.js} +1 -1
- package/web/app/immutable/chunks/{BhR1rUz4.js → CCC99Zod.js} +4 -4
- package/web/app/immutable/chunks/{DAy_opbr.js → CE_jWS3I.js} +1 -1
- package/web/app/immutable/chunks/{DWfKl2G1.js → CFqvncb_.js} +2 -2
- package/web/app/immutable/chunks/{CK9cQMVJ.js → CImtZPCw.js} +1 -1
- package/web/app/immutable/chunks/{CVWq5h5S.js → CJ1-3935.js} +1 -1
- package/web/app/immutable/chunks/{DQJZrn_X.js → CNKWrPN7.js} +1 -1
- package/web/app/immutable/chunks/{CUfXGQXK.js → CPRLdguD.js} +1 -1
- package/web/app/immutable/chunks/{CqOHERUX.js → CQiPhdyr.js} +3 -3
- package/web/app/immutable/chunks/{BOhFt8_6.js → CRlyIql5.js} +1 -1
- package/web/app/immutable/chunks/{DSWsYH8C.js → CVNbeyq9.js} +1 -1
- package/web/app/immutable/chunks/{TudrisM3.js → CVwikJ31.js} +1 -1
- package/web/app/immutable/chunks/{BQ-M1wvC.js → CXVnrj9A.js} +1 -1
- package/web/app/immutable/chunks/{D3bgZo3Z.js → CXnaNNAz.js} +2 -2
- package/web/app/immutable/chunks/{Pvi3xCgN.js → C_UMz1vS.js} +1 -1
- package/web/app/immutable/chunks/{DODWySkx.js → C_d0eb1I.js} +1 -1
- package/web/app/immutable/chunks/{DzBSnte5.js → CbqyU6-T.js} +1 -1
- package/web/app/immutable/chunks/{B5QVp6A0.js → CcClhJcG.js} +1 -1
- package/web/app/immutable/chunks/{Db-yEKas.js → CcPfbTb9.js} +1 -1
- package/web/app/immutable/chunks/{Cj0F5ihH.js → CdSjG4Ft.js} +1 -1
- package/web/app/immutable/chunks/{D1Ne8i3Y.js → Ch6ugyQo.js} +1 -1
- package/web/app/immutable/chunks/{DiLL3u8G.js → Ci2Fkl9H.js} +1 -1
- package/web/app/immutable/chunks/{CYrZeetF.js → CiFAN3wQ.js} +1 -1
- package/web/app/immutable/chunks/{CCguRiXg.js → Ckk7lRpt.js} +1 -1
- package/web/app/immutable/chunks/{BqUo6Ktu.js → CmdEd1F6.js} +2 -2
- package/web/app/immutable/chunks/{8_7J_rxm.js → CnQmqlSe.js} +1 -1
- package/web/app/immutable/chunks/{CEQ56sKb.js → CoDZl2Cl.js} +1 -1
- package/web/app/immutable/chunks/{Dm9UWIDS.js → CpHRT1fG.js} +1 -1
- package/web/app/immutable/chunks/{B_FQfWfg.js → CsKhIDbI.js} +1 -1
- package/web/app/immutable/chunks/{eHnFo4lI.js → Cyenk5cb.js} +1 -1
- package/web/app/immutable/chunks/{DbaSDcEd.js → D-eZQ2fL.js} +1 -1
- package/web/app/immutable/chunks/{DbZTkkyC.js → D1-WBdny.js} +1 -1
- package/web/app/immutable/chunks/{B6UkjkkG.js → D1l0bxRT.js} +1 -1
- package/web/app/immutable/chunks/{olZe0-nS.js → D5ML4v-V.js} +1 -1
- package/web/app/immutable/chunks/{DqyPPCyO.js → D6jCr2wa.js} +2 -2
- package/web/app/immutable/chunks/{CxR88OSV.js → D7lKnGLc.js} +1 -1
- package/web/app/immutable/chunks/{B82-1O1e.js → D8fRnm9t.js} +1 -1
- package/web/app/immutable/chunks/{BbpzcJJv.js → DEbw1igk.js} +1 -1
- package/web/app/immutable/chunks/{3_J6fjhO.js → DGifkN9t.js} +1 -1
- package/web/app/immutable/chunks/{Cnv943xM.js → DHPGgtRx.js} +1 -1
- package/web/app/immutable/chunks/{BYR3hbm1.js → DKOo5zOB.js} +1 -1
- package/web/app/immutable/chunks/{DPULIKQk.js → DMJnM_nO.js} +1 -1
- package/web/app/immutable/chunks/{CSVFP6Jt.js → DNSk3ZfB.js} +1 -1
- package/web/app/immutable/chunks/{D6AnRuxJ.js → DN_Tzm7_.js} +1 -1
- package/web/app/immutable/chunks/{TpcWfRK3.js → DNac-m4q.js} +1 -1
- package/web/app/immutable/chunks/{l0-9ftmB.js → DTgS9Vhe.js} +1 -1
- package/web/app/immutable/chunks/{ob_UjBCd.js → DaOHTC-I.js} +2 -2
- package/web/app/immutable/chunks/{D_cxHEqU.js → DcSsc00x.js} +12 -12
- package/web/app/immutable/chunks/{72kV58Ql.js → DcXakdBe.js} +2 -2
- package/web/app/immutable/chunks/{762lAjev.js → DiI1RDM1.js} +6 -6
- package/web/app/immutable/chunks/{BXtYtFFm.js → DjjF2uGN.js} +1 -1
- package/web/app/immutable/chunks/{DTQGk7-p.js → DjuIGdjm.js} +1 -1
- package/web/app/immutable/chunks/{CVimJ6Rz.js → Dk3qKWP5.js} +1 -1
- package/web/app/immutable/chunks/{CEcvV5G3.js → DkHudGT7.js} +1 -1
- package/web/app/immutable/chunks/{BI40CZU_.js → DmHO_MSD.js} +1 -1
- package/web/app/immutable/chunks/{QroQeT1R.js → DspxmVwU.js} +1 -1
- package/web/app/immutable/chunks/{C62uwcSa.js → DuiaDZ1M.js} +1 -1
- package/web/app/immutable/chunks/{CsZ8CKOb.js → DxqPF6Rz.js} +1 -1
- package/web/app/immutable/chunks/{DdjKmyFb.js → DyqIj-ur.js} +1 -1
- package/web/app/immutable/chunks/{DdroO4BP.js → H9GSzKkU.js} +1 -1
- package/web/app/immutable/chunks/{DZIpsGdM.js → ImTraP8T.js} +1 -1
- package/web/app/immutable/chunks/{CdwWwIxc.js → IumZO_Dv.js} +1 -1
- package/web/app/immutable/chunks/{B0Eu_1Zr.js → J9A0UoBg.js} +1 -1
- package/web/app/immutable/chunks/{NAs2sQwc.js → MZSjdLi7.js} +1 -1
- package/web/app/immutable/chunks/{BYOZsc06.js → PvZaDjMJ.js} +1 -1
- package/web/app/immutable/chunks/{ChCEEi91.js → QGJb4cQl.js} +2 -2
- package/web/app/immutable/chunks/{CiJxgZE6.js → VZ9l83jo.js} +1 -1
- package/web/app/immutable/chunks/{b6oXDh_T.js → X6Xuy0au.js} +3 -3
- package/web/app/immutable/chunks/{CqAUygYd.js → XZbbHW_j.js} +1 -1
- package/web/app/immutable/chunks/{Crf8zlEl.js → YxdkHijX.js} +1 -1
- package/web/app/immutable/chunks/{BKZOB6N7.js → eUgSKPd1.js} +1 -1
- package/web/app/immutable/chunks/{C_MoDXbz.js → h4Po-NCE.js} +1 -1
- package/web/app/immutable/chunks/{Dnnm3rWT.js → jiBDEVCw.js} +1 -1
- package/web/app/immutable/chunks/{CZ4naQ1D.js → mD0vYAzJ.js} +1 -1
- package/web/app/immutable/chunks/{CVnjH67L.js → mHC4yU51.js} +1 -1
- package/web/app/immutable/chunks/{teiHBTP_.js → rt8w-zGI.js} +1 -1
- package/web/app/immutable/chunks/{BbiotSng.js → uVMl5RuS.js} +1 -1
- package/web/app/immutable/chunks/{BKrFdF0K.js → v9HJJtBT.js} +1 -1
- package/web/app/immutable/chunks/{DUfPBqyv.js → zhwpGmcn.js} +1 -1
- package/web/app/immutable/chunks/{Bip3iRY7.js → zrO2ZdKm.js} +4 -4
- package/web/app/immutable/entry/{app.PZ5Y9PBf.js → app.9q3h-VmL.js} +2 -2
- package/web/app/immutable/entry/start.C19LftfI.js +1 -0
- package/web/app/immutable/nodes/{0.NhRN4wpn.js → 0.BlKCxlmB.js} +1 -1
- package/web/app/immutable/nodes/{1.rxmnWftv.js → 1.xcsha6lZ.js} +1 -1
- package/web/app/immutable/nodes/{10.B5uqPVYd.js → 10.Bdyn6cmH.js} +1 -1
- package/web/app/immutable/nodes/{14.BNz2Qn0-.js → 14.CbltyVov.js} +1 -1
- package/web/app/immutable/nodes/{17.DmFoGT2O.js → 17.D1kH34dL.js} +2 -2
- package/web/app/immutable/nodes/{2.BewlISWX.js → 2.CuUzplWd.js} +4 -4
- package/web/app/immutable/nodes/{3.Dh75TGTq.js → 3.T7kzKVL0.js} +1 -1
- package/web/app/immutable/nodes/{4.D_lzUIO2.js → 4.C10VOSMQ.js} +1 -1
- package/web/app/immutable/nodes/{5.D-mFbexK.js → 5.ByeolYXZ.js} +1 -1
- package/web/app/immutable/nodes/{6.Cgb9LGMD.js → 6.nObHzXZU.js} +1 -1
- package/web/app/immutable/nodes/{7.CEKTuRJF.js → 7.Bl2k4MpH.js} +1 -1
- package/web/app/immutable/nodes/{8.Dwn9d0dT.js → 8.DSmE4IYY.js} +4 -4
- package/web/app/immutable/nodes/{9.JcoFlsdV.js → 9.BdgVRpr5.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.BY0gUtqa.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as Ye,br as h,a_ as M,bz as Ze,b as $e,bt as nt,bp as k,bv as je}from"./DXyyWeag.js";import{bo as st,bs as et,a7 as L,ay as y,aD as e,bS as U,W as c,a5 as Pe,bA as De,bH as j,bl as _e,b_ as oe,bO as de,bn as tt,bf as Ve,bV as Ee,aA as v,c9 as w,aB as H,be as it,b$ as lt,bj as dt,cd as ct,ca as Xe,bk as ut}from"./DYhIMPy1.js";import{i as G}from"./RD9QY1Yc.js";import{Iy as Le,mT as pt,uB as ft}from"./D5ej8a-y.js";import{b8 as ht}from"./hPM-hpF1.js";import{cn as vt}from"./D3QcPFoL.js";import{c as gt}from"./ChTqQfQN.js";import{i as Ue,t as He}from"./H2jLkRRS.js";import{w as _t}from"./DyvrH0mm.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,as as bt,at as kt,cQ as Je,aV as qe,bc as wt,ak as yt,aj as At,cN as Ge}from"./BTdkHPOB.js";import{k as K,w as Ft}from"./DT4bpJWb.js";import{n as Wt,u as Ne,v as xe,g as Te,j as Ct}from"./CjaOLL1c.js";import{s as xt}from"./Cuqq8bL5.js";import{f as It,ai as Pt,aX as Dt}from"./Bfr1QjPr.js";import"./DJkHth-B.js";import{c as Q}from"./CnVt0JNG.js";import{a as Mt,r as Et}from"./CVnjH67L.js";import{M as Ot,t as Be}from"./4NMrKcis.js";import{l as Ke,o as St,n as Rt,R as Nt,m as Tt,k as Bt,g as zt,i as jt}from"./CX_KiszT.js";import{m as ze}from"./D6bHtnlF.js";var Vt=H('<img alt="" class="size-4"/>'),Xt=H('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Lt=H("<span> </span>"),Ut=H('<span data-menu-action-detail=""> </span>'),Ht=H('<span aria-hidden="true"><!></span>'),Qe=H("<!> <!> <!>",1),Jt=H('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=H("<!> <!>",1),qt=H('<!> <p data-menu-action-note=""> </p>',1),Gt=H('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=H('<p data-menu-action-note=""> </p>'),Qt=H('<div class="pl-4"><!> <!></div>'),Yt=H('<span class="sr-only"> </span>');function me(be,d){const ke=st();if(new.target)return Ye({component:me,...be});et(d,!0);const Ie=(p,r=Ve)=>{var O=L(),S=y(O);{var V=W=>{const x=w(()=>Mt(r().editor));var X=L(),m=y(X);{var f=s=>{var i=Vt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=L(),b=y(i);Q(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=w(()=>Et(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,X)},R=W=>{var x=L(),X=y(x);xt(X,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return J()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(V):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=Ve)=>{var O=Qe(),S=y(O);{var V=m=>{var f=Xt(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=U(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Lt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(V):m(R,-1)})}var q=U(S,2);{var W=m=>{var f=Ut(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=U(q,2);{var X=m=>{var f=Ht(),o=Pe(f);Pt(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>Dt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Ct(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(X)})}c(p,O)};let we=h(d,"actions",7),E=h(d,"menu",7),J=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Y(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return J()},set iconWeight(p){J(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ze,$on:(p,r)=>$e(d,p,r)},se=L(),ie=y(se);return Wt(ie,17,we,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),V=w(()=>e(r).disabled||e(r).disabledReason!==void 0),R=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Qe(),W=y(q);{var x=i=>{var b=L(),T=y(b);{var ae=a=>{var n=L(),g=y(n);Q(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Jt();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var X=U(W,2);{var m=i=>{var b=L(),T=y(b);{var ae=g=>{var C=L(),P=y(C);Q(P,()=>Tt,(I,D)=>{D(I,{children:(B,Z)=>{var $=Me(),pe=y($);{let te=w(()=>e(S)?O:void 0);Q(pe,()=>St,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=U(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Q(ee,()=>Rt,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Q(Fe,()=>Nt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=w(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=U(Fe,2);{let Ce=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=U(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Q(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=U(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${ke}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>zt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0),D=w(()=>e(r).variant==="destructive");Q(P,()=>jt,(B,Z)=>{Z(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);It(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?j(F,e(F)===e(r).id?null:e(r).id,!0):Y(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=U(I,2);ne(B,()=>e(r));var Z=U(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?bt:kt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=L(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Q(fe,()=>Ot,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Z,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=U(T,2);{var ue=a=>{var n=Qt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}});var C=U(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(X,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=U(X,2);{var s=i=>{var b=Yt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Zt(be,d){if(new.target)return Ye({component:Zt,...be});et(d,!0);const ke=()=>je(T,"$installedEditors$",ne),Ie=()=>je(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=nt();let E=h(d,"layout",7,"list"),J=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Y=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),V=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),X=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());Xe(()=>{b.set(A())});const T=ht(b),ae=w(ke),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Le.dispatch(pt())}),Xe(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?j(a,le,!0):Ue(u())?j(a,u().replace(/\\/g,"/"),!0):j(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),j(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else j(a,u()),j(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else j(a,u()),j(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{j(a,u()),j(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(j(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Le.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Z(){if(e(a))try{await navigator.clipboard.writeText(He(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Ue(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(He(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Y()&&(Y()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){j(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{j(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:Je,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:Je,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Z()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),V()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:wt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(X())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Y()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return J()},set iconWeight(t){J(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Y()},set onDelete(t=void 0){Y(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return V()},set showFileNameCopy(t=!1){V(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return X()},set additionalActions(t=[]){X(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ze,$on:(t,l)=>$e(d,t,l)};{let t=w(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return J()}})}var ye=tt(ve);return we(),ye}export{Zt as default};
|
|
1
|
+
import{t as Ye,br as h,a_ as M,bz as Ze,b as $e,bt as nt,bp as k,bv as je}from"./DXyyWeag.js";import{bo as st,bs as et,a7 as L,ay as y,aD as e,bS as U,W as c,a5 as Pe,bA as De,bH as j,bl as _e,b_ as oe,bO as de,bn as tt,bf as Ve,bV as Ee,aA as v,c9 as w,aB as H,be as it,b$ as lt,bj as dt,cd as ct,ca as Xe,bk as ut}from"./DYhIMPy1.js";import{i as G}from"./RD9QY1Yc.js";import{Iy as Le,mT as pt,uB as ft}from"./D5ej8a-y.js";import{b8 as ht}from"./B0KDOtDn.js";import{cn as vt}from"./D3QcPFoL.js";import{c as gt}from"./ChTqQfQN.js";import{i as Ue,t as He}from"./H2jLkRRS.js";import{w as _t}from"./DyvrH0mm.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,as as bt,at as kt,cQ as Je,aV as qe,bc as wt,ak as yt,aj as At,cN as Ge}from"./BTdkHPOB.js";import{k as K,w as Ft}from"./DT4bpJWb.js";import{n as Wt,u as Ne,v as xe,g as Te,j as Ct}from"./CjaOLL1c.js";import{s as xt}from"./Cuqq8bL5.js";import{f as It,ai as Pt,aX as Dt}from"./Bfr1QjPr.js";import"./DJkHth-B.js";import{c as Q}from"./CnVt0JNG.js";import{a as Mt,r as Et}from"./mHC4yU51.js";import{M as Ot,t as Be}from"./4NMrKcis.js";import{l as Ke,o as St,n as Rt,R as Nt,m as Tt,k as Bt,g as zt,i as jt}from"./CX_KiszT.js";import{m as ze}from"./D6bHtnlF.js";var Vt=H('<img alt="" class="size-4"/>'),Xt=H('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Lt=H("<span> </span>"),Ut=H('<span data-menu-action-detail=""> </span>'),Ht=H('<span aria-hidden="true"><!></span>'),Qe=H("<!> <!> <!>",1),Jt=H('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=H("<!> <!>",1),qt=H('<!> <p data-menu-action-note=""> </p>',1),Gt=H('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=H('<p data-menu-action-note=""> </p>'),Qt=H('<div class="pl-4"><!> <!></div>'),Yt=H('<span class="sr-only"> </span>');function me(be,d){const ke=st();if(new.target)return Ye({component:me,...be});et(d,!0);const Ie=(p,r=Ve)=>{var O=L(),S=y(O);{var V=W=>{const x=w(()=>Mt(r().editor));var X=L(),m=y(X);{var f=s=>{var i=Vt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=L(),b=y(i);Q(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=w(()=>Et(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,X)},R=W=>{var x=L(),X=y(x);xt(X,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return J()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(V):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=Ve)=>{var O=Qe(),S=y(O);{var V=m=>{var f=Xt(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=U(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Lt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(V):m(R,-1)})}var q=U(S,2);{var W=m=>{var f=Ut(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=U(q,2);{var X=m=>{var f=Ht(),o=Pe(f);Pt(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>Dt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Ct(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(X)})}c(p,O)};let we=h(d,"actions",7),E=h(d,"menu",7),J=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Y(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return J()},set iconWeight(p){J(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ze,$on:(p,r)=>$e(d,p,r)},se=L(),ie=y(se);return Wt(ie,17,we,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),V=w(()=>e(r).disabled||e(r).disabledReason!==void 0),R=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Qe(),W=y(q);{var x=i=>{var b=L(),T=y(b);{var ae=a=>{var n=L(),g=y(n);Q(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Jt();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var X=U(W,2);{var m=i=>{var b=L(),T=y(b);{var ae=g=>{var C=L(),P=y(C);Q(P,()=>Tt,(I,D)=>{D(I,{children:(B,Z)=>{var $=Me(),pe=y($);{let te=w(()=>e(S)?O:void 0);Q(pe,()=>St,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=U(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Q(ee,()=>Rt,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Q(Fe,()=>Nt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=w(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=U(Fe,2);{let Ce=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=U(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Q(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=U(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${ke}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>zt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0),D=w(()=>e(r).variant==="destructive");Q(P,()=>jt,(B,Z)=>{Z(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);It(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?j(F,e(F)===e(r).id?null:e(r).id,!0):Y(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=U(I,2);ne(B,()=>e(r));var Z=U(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?bt:kt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=L(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Q(fe,()=>Ot,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Z,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=U(T,2);{var ue=a=>{var n=Qt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}});var C=U(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(X,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=U(X,2);{var s=i=>{var b=Yt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Zt(be,d){if(new.target)return Ye({component:Zt,...be});et(d,!0);const ke=()=>je(T,"$installedEditors$",ne),Ie=()=>je(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=nt();let E=h(d,"layout",7,"list"),J=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Y=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),V=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),X=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());Xe(()=>{b.set(A())});const T=ht(b),ae=w(ke),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Le.dispatch(pt())}),Xe(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?j(a,le,!0):Ue(u())?j(a,u().replace(/\\/g,"/"),!0):j(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),j(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else j(a,u()),j(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else j(a,u()),j(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{j(a,u()),j(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(j(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Le.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Z(){if(e(a))try{await navigator.clipboard.writeText(He(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Ue(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(He(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Y()&&(Y()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){j(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{j(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:Je,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:Je,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Z()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),V()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:wt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(X())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Y()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return J()},set iconWeight(t){J(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Y()},set onDelete(t=void 0){Y(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return V()},set showFileNameCopy(t=!1){V(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return X()},set additionalActions(t=[]){X(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ze,$on:(t,l)=>$e(d,t,l)};{let t=w(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return J()}})}var ye=tt(ve);return we(),ye}export{Zt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as l,v as h,t as T}from"./WFvSJ9zU.js";import{Iy as c,v5 as w}from"./D5ej8a-y.js";import{i as W,c as s,n as u,b as m}from"./
|
|
1
|
+
import{d as l,v as h,t as T}from"./WFvSJ9zU.js";import{Iy as c,v5 as w}from"./D5ej8a-y.js";import{i as W,c as s,n as u,b as m}from"./BZUf-Anc.js";const E=new Set(["new","creating"]);function g(n){let t;try{t=decodeURIComponent(n)}catch{return null}return t.length===0||E.has(t)?null:t}function f(n){const t=/^\/workspace\/([^/?#]+)\/?(?:[?#].*)?$/.exec(n);return t?g(t[1]):null}function A(n){const t=/^\/workspace\/([^/?#]+)(?:[/?#].*)?$/.exec(n);return t?g(t[1]):null}function N(n,t){return t.length>0&&A(n)===t}function p(){return typeof window>"u"?null:window.location?.pathname??null}function d(n,t){const e=`/workspace/${encodeURIComponent(n)}`,a=t?new URLSearchParams(t).toString():"";return a?`${e}?${a}`:e}function y(n,t){const e=t?.presenceFollowRequestId;return e?w(n,e):w(n)}function I(n,t){return t?u(n,{state:t}):u(n)}function o(n){return n?.tabState?.currentTabId??null}async function R(n,t,e,a){m();const i=I(t,e),r={workspaceId:n,epoch:s(),startTabId:a};return await i,r}function S(n){return!n||W()}function b(n,t){if(s()!==n.epoch||t!==n.startTabId&&t!==n.workspaceId)return!1;const e=p();return e===null||f(e)===n.workspaceId}async function v(n,t,e){if(S(n))return!1;const a=await R(n,t,e,o(c.state));return b(a,o(c.state))?(c.dispatch(y(n,e)),!0):!1}function*k(n,t,e){if(S(n))return!1;const a=o(yield*h(r=>r)),i=yield*l(R,n,t,e,a);return b(i,o(yield*h(r=>r)))?(yield*T(y(n,e)),!0):!1}function P(){m();const n=s(),t=o(c.state),e=p();return()=>s()===n&&o(c.state)===t&&p()===e}function _(n,t={}){return v(n,d(n,t.query),t.state)}function O(n,t={}){return k(n,d(n,t.query),t.state)}async function $(n){const t=f(n);t?await v(t,n,void 0):await u(n)}function*j(n){const t=f(n);t?yield*l(k,t,n,void 0):yield*l(u,n)}const U=Object.freeze(Object.defineProperty({__proto__:null,claimNavigation:P,navigateToAppRoute:$,navigateToAppRouteSaga:j,openAndShowWorkspace:_,showWorkspaceSaga:O,workspaceRoute:d},Symbol.toStringTag,{value:"Module"}));export{p as a,j as b,P as c,O as d,d as e,N as i,$ as n,_ as o,f as p,U as s,A as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as _t,br as _,a_ as L,bz as mt,bt as gt,b as vt,bp as x,bv as be,bu as Te}from"./DXyyWeag.js";import{bs as ht,cd as yt,ca as wt,bk as xt,a7 as N,ay as m,W as r,bn as It,aA as g,aD as t,bS as z,a5 as _e,bH as Be,bA as me,b_ as M,aB as E,c9 as o,bf as kt,bl as oe,bO as ae,bV as Ct}from"./DYhIMPy1.js";import{v as $t,n as Pt,u as De,i as At}from"./CjaOLL1c.js";import{s as Me}from"./Cuqq8bL5.js";import{c as S}from"./CnVt0JNG.js";import{cF as Et,bj as Ot,aI as Ft,F as ne,aV as Tt,aJ as Bt,bk as Dt,a4 as Ve,as as Lt}from"./BTdkHPOB.js";import{W as Nt,T as zt,G as St,C as Rt,X as Ht,J as Wt,V as Mt}from"./DPv8Q1b3.js";import{f as ge}from"./Bfr1QjPr.js";import{h as Vt}from"./D3bgZo3Z.js";import{k as jt,R as Gt,o as Jt,n as Kt,m as Ut,l as je}from"./CX_KiszT.js";import{k as ve}from"./DT4bpJWb.js";import{c as Xt}from"./ChTqQfQN.js";import"./DJkHth-B.js";import{Iy as Ge,mT as Yt,Fe as qt}from"./D5ej8a-y.js";import{w as Qt}from"./DyvrH0mm.js";import{i as X}from"./RD9QY1Yc.js";import{bu as Zt,b8 as er,b5 as tr}from"./hPM-hpF1.js";import{cn as rr}from"./D3QcPFoL.js";import{t as or}from"./H2jLkRRS.js";const ar={cursor:Rt,ghostty:St,terminal:zt,warp:Nt},nr={vscode:Mt,jetbrains:Wt,xcode:Ht};function sr(O){return ar[O.id]??nr[O.handlerType]??null}function Je(O){return O==="terminal"?Et:O==="finder"?Ot:Ft}const ir="shrink-0 text-muted-foreground hover:text-foreground focus-visible:text-foreground [&_svg]:size-4",Le="finder",lr={id:Le,name:"Finder",shortLabel:"Finder",appName:"Finder",category:"finder",handlerType:"finder",installed:!0,priority:0};function cr(O,s=[]){const se=new Set(s),Y=O.filter(({installed:q,id:ye})=>q&&!se.has(ye));return Y.some(({id:q})=>q===Le)||se.has(Le)?Y:[...Y,lr]}var dr=E('<img alt="" class="size-4"/>'),ur=E('<kbd class="type-caption ml-4 text-muted-foreground" aria-hidden="true"> </kbd>'),pr=E('<span class="min-w-0 flex-1 truncate"> </span> <!>',1),fr=E("<span> </span>"),he=E("<!> <!>",1),br=E("<span><!></span>"),_r=E('<img class="w-4 h-4"/>'),mr=E('<!> <span class="text-muted-foreground"> </span>',1),gr=E('<div class="inline-flex items-stretch rounded-md border border-border" data-open-combo-control=""><!> <!></div>'),vr=E('<div class="type-caption px-2 py-1.5 text-subtle"> </div>'),hr=E('<div class="w-60 max-w-full"><!> <!> <!></div>'),yr=E("<div><!></div>");function wr(O,s){if(new.target)return _t({component:wr,...O});ht(s,!0);const se=()=>be(Xe,"$installedEditors$",ie),Y=()=>be(Ye,"$hiddenEditorIds$",ie),q=()=>be(qe,"$isWorkspaceHostLocal$",ie),ye=()=>be(Ue,"$openAction",ie),[ie,Ke]=gt(),le=(e,d=kt)=>{var u=N(),p=m(u);S(p,()=>Gt,(te,G)=>{G(te,{get value(){return t(v).id},children:(F,D)=>{var k=N(),T=m(k);Pt(T,17,d,C=>C.id,(C,c)=>{var J=N(),h=m(J);{const $=a=>{var i=N(),y=m(i);{var H=l=>{var A=dr();M(()=>De(A,"src",`data:image/png;base64,${t(c).iconBase64??""}`)),r(l,A)},b=l=>{const A=o(()=>t(c).icon);var W=N(),B=m(W);S(B,()=>t(A),(K,re)=>{re(K,{size:16})}),r(l,W)},P=l=>{{let A=o(()=>t(c).faIcon??Je(t(c).category));ne(l,{get icon(){return t(A)},class:"size-4 text-muted-foreground"})}};L(y,l=>{t(c).iconBase64?l(H):t(c).icon?l(b,1):l(P,-1)})}r(a,i)};let n=o(()=>!I());S(h,()=>jt,(a,i)=>{i(a,{get value(){return t(c).id},closeOnSelect:!0,get disabled(){return t(n)},onSelect:()=>tt(t(c).id),get textValue(){return t(c).label},leading:$,children:(y,H)=>{var b=pr(),P=m(b),l=oe(P,!0),A=z(P,2);{var W=B=>{var K=ur(),re=oe(K,!0);M(()=>ae(re,t(c).shortcut)),r(B,K)};L(A,B=>{t(c).shortcut&&B(W)})}M(()=>ae(l,t(c).label)),r(y,b)},$$slots:{leading:!0,default:!0}})})}r(C,J)}),r(F,k)},$$slots:{default:!0}})}),r(e,u)},Ne=Xt("OpenComboButton");let I=_(s,"filePath",7),ce=_(s,"workspaceId",7,""),de=_(s,"isDirectory",7,!0),we=_(s,"workspaceFolderPath",7),xe=_(s,"class",7,""),ue=_(s,"headerText",7),Ie=_(s,"usePortal",7,!0),ke=_(s,"side",7,"bottom"),V=_(s,"variant",7,"default"),Q=_(s,"branchName",7),Ce=_(s,"compact",7,!1),$e=_(s,"embedded",7,!1),Z=_(s,"inline",7,!1),j=_(s,"iconOnly",7,!1),R=_(s,"children",7,void 0);const ze=o(()=>V()==="sidebar"?"bg-sidebar hover:bg-sidebar/80":"bg-background hover:bg-muted"),Pe=yt(ce());wt(()=>{Pe.set(ce())});const Ue=Zt(),Xe=er(Pe),Ye=tr(),qe=rr(Pe);let ee=Ct(!1);xt(()=>{Ge.dispatch(Yt())});function Qe(e){return{id:e.id,label:e.name,shortLabel:e.shortLabel,icon:sr(e),shortcut:e.shortcut,handlerType:e.handlerType,appName:e.appName,category:e.category,iconBase64:e.iconBase64}}const Ze=Qt("externalEditors");let f=o(()=>{const e=se(),d=cr(e,Y()).map(Qe),u={id:"other",label:x.ui_openCombo_other_label(),shortLabel:x.ui_openCombo_other_label(),icon:null,faIcon:Dt,handlerType:"generic"},p=[{id:"copy",label:x.ui_openCombo_copyPath_label(),shortLabel:x.ui_openCombo_copy_shortLabel(),icon:null,faIcon:Tt},...Q()?[{id:"copy-branch",label:x.ui_openCombo_copyBranch_label(),shortLabel:x.ui_openCombo_copyBranch_shortLabel(),icon:null,faIcon:Bt}]:[]];return!Ze||!q()?p:[...d,u,...p]});const pe=o(()=>t(f).some(e=>e.id!=="copy"&&e.id!=="copy-branch")),fe=o(()=>t(f).filter(e=>e.id!=="copy"&&e.id!=="copy-branch")),Se=o(()=>t(f).filter(e=>e.id==="copy"||e.id==="copy-branch")),v=o(()=>t(pe)?t(f).find(e=>e.id===ye())||t(f)[0]:t(f).find(e=>e.id==="copy")||t(f)[0]),Ae=o(()=>t(pe)?x.ui_openCombo_openIn_tooltip({name:t(v).label}):t(v).label);function Ee(){if(de())return I();const e=we()||I().substring(0,I().lastIndexOf("/"));return e?{folder:e,file:I()}:I()}async function Oe(e){if(!I())return;const d=de()?I():I().substring(0,I().lastIndexOf("/"));try{if(e==="copy"){await navigator.clipboard.writeText(or(I())),ve.success(x.ui_openCombo_pathCopied_label());return}if(e==="copy-branch"){Q()&&(await navigator.clipboard.writeText(Q()),ve.success(x.ui_openCombo_branchCopied_label()));return}if(e==="other"){const p=await X("external-editors:open-with-other",{path:d});p?.success?Be(ee,!1):p?.error&&p.error!=="No application selected"&&ve.error(p.error);return}const u=t(f).find(p=>p.id===e);if(!u){Ne.warn(`Unknown action: ${e}`);return}switch(u.handlerType){case"finder":await X("shell:showItemInFolder",{path:d});break;case"vscode":await X("vscode:open",Ee());break;case"jetbrains":await X("jetbrains:open",Ee());break;case"xcode":await X("xcode:open",Ee());break;case"generic":default:{await X("external-editors:open",{editorId:u.id,path:d});break}}}catch(u){Ne.error(`Failed to execute action ${e}:`,u),ve.error(u instanceof Error?u.message:x.ui_openCombo_openFailed_error({name:e}))}}function Fe(e){e.stopPropagation(),Oe(t(v).id)}function et(e){e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),e.stopPropagation(),Oe(t(v).id))}function Re(e){e.stopPropagation()}function tt(e){Ge.dispatch(qt(e)),Oe(e),Be(ee,!1)}var rt={get filePath(){return I()},set filePath(e){I(e),g()},get workspaceId(){return ce()},set workspaceId(e=""){ce(e),g()},get isDirectory(){return de()},set isDirectory(e=!0){de(e),g()},get workspaceFolderPath(){return we()},set workspaceFolderPath(e){we(e),g()},get class(){return xe()},set class(e=""){xe(e),g()},get headerText(){return ue()},set headerText(e){ue(e),g()},get usePortal(){return Ie()},set usePortal(e=!0){Ie(e),g()},get side(){return ke()},set side(e="bottom"){ke(e),g()},get variant(){return V()},set variant(e="default"){V(e),g()},get branchName(){return Q()},set branchName(e){Q(e),g()},get compact(){return Ce()},set compact(e=!1){Ce(e),g()},get embedded(){return $e()},set embedded(e=!1){$e(e),g()},get inline(){return Z()},set inline(e=!1){Z(e),g()},get iconOnly(){return j()},set iconOnly(e=!1){j(e),g()},get children(){return R()},set children(e=void 0){R(e),g()},$set:mt,$on:(e,d)=>vt(s,e,d)},He=N(),ot=m(He);{var at=e=>{var d=he(),u=m(d);{var p=G=>{var F=he(),D=m(F);S(D,()=>Ut,(T,C)=>{C(T,{children:(c,J)=>{var h=he(),$=m(h);S($,()=>Jt,(a,i)=>{i(a,{get icon(){return Ve},children:(y,H)=>{var b=fr(),P=oe(b,!0);M(l=>ae(P,l),[()=>x.ui_openCombo_openInApp_tooltip()]),r(y,b)},$$slots:{default:!0}})});var n=z($,2);S(n,()=>Kt,(a,i)=>{i(a,{class:"w-60",children:(y,H)=>{le(y,()=>t(fe))},$$slots:{default:!0}})}),r(c,h)},$$slots:{default:!0}})});var k=z(D,2);S(k,()=>je,(T,C)=>{C(T,{})}),r(G,F)};L(u,G=>{t(fe).length&&G(p)})}var te=z(u,2);le(te,()=>t(Se)),r(e,d)},nt=e=>{var d=yr(),u=_e(d);{const p=(F,D)=>{let k=()=>(D?.()).props;var T=N(),C=m(T);{var c=n=>{var a=br();At(a,()=>({role:"button",tabindex:"0",onclick:t(f).length>1?void 0:Fe,onkeydown:t(f).length>1?void 0:et,...t(f).length>1?k():{},class:"cursor-pointer break-words rounded-sm text-inherit underline decoration-muted-foreground/20 underline-offset-2 hover:decoration-current focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:t(Ae)}));var i=_e(a);Me(i,R),me(a),r(n,a)},J=n=>{{let a=o(()=>t(f).length>1?void 0:Fe),i=o(()=>j()&&V()!=="sidebar"?"plain":"ghost"),y=o(()=>j()?V()==="sidebar"?"icon-compact":"icon-sm":void 0),H=o(()=>j()&&V()==="sidebar"&&t(ee)),b=o(()=>!j()),P=o(()=>j()?V()==="sidebar"?ir:"cursor-pointer text-muted-foreground hover:text-foreground focus-visible:text-foreground":"cursor-pointer");ge(n,Te({type:"button",get onclick(){return t(a)}},()=>t(f).length>1?k():{},{get variant(){return t(i)},get size(){return t(y)},get active(){return t(H)},get wrapContent(){return t(b)},get class(){return t(P)},get title(){return t(Ae)},children:(l,A)=>{var W=N(),B=m(W);Me(B,R),r(l,W)},$$slots:{default:!0}}))}},h=n=>{{let a=o(()=>x.ui_openCombo_openInApp_tooltip());ge(n,Te(k,{variant:"ghost-light",size:"icon-xs",get tooltip(){return t(a)},tooltipSide:"bottom",children:(i,y)=>{ne(i,{get icon(){return Ve},size:"xs"})},$$slots:{default:!0}}))}},$=n=>{var a=gr(),i=_e(a);{let b=o(()=>t(f).length>1?"rounded-r-none":""),P=o(()=>t(ze)),l=o(()=>t(pe)?t(Ae):void 0);ge(i,{type:"button",variant:"ghost",size:"sm",get class(){return`gap-1.5 px-2 ${t(b)??""} ${t(P)??""}`},onpointerdown:Re,onkeydown:Re,onclick:Fe,get title(){return t(l)},children:(A,W)=>{var B=mr(),K=m(B);{var re=w=>{var U=_r();M(()=>{De(U,"src",`data:image/png;base64,${t(v).iconBase64??""}`),De(U,"alt",t(v).label)}),r(w,U)},it=w=>{const U=o(()=>t(v).icon);var We=N(),pt=m(We);S(pt,()=>t(U),(ft,bt)=>{bt(ft,{size:14})}),r(w,We)},lt=w=>{ne(w,{get icon(){return t(v).faIcon},class:"w-3.5 h-3.5 opacity-60"})},ct=w=>{{let U=o(()=>Je(t(v).category));ne(w,{get icon(){return t(U)},class:"w-3.5 h-3.5 opacity-60"})}};L(K,w=>{t(v).iconBase64?w(re):t(v).icon?w(it,1):t(v).faIcon?w(lt,2):w(ct,-1)})}var dt=z(K,2),ut=oe(dt,!0);M(w=>ae(ut,w),[()=>t(pe)?x.ui_openCombo_open_label():t(v).label]),r(A,B)},$$slots:{default:!0}})}var y=z(i,2);{var H=b=>{{let P=o(()=>x.ui_openCombo_openInApp_tooltip());ge(b,Te(k,{type:"button",variant:"ghost",size:"icon-sm",get"aria-label"(){return t(P)},get class(){return`rounded-l-none border-l border-border ${t(ze)??""}`},children:(l,A)=>{ne(l,{get icon(){return Lt},class:"size-3! text-muted-foreground"})},$$slots:{default:!0}}))}};L(y,b=>{t(f).length>1&&b(H)})}me(a),r(n,a)};L(C,n=>{Z()&&R()?n(c):R()?n(J,1):Ce()?n(h,2):n($,-1)})}r(F,T)},te=F=>{var D=hr(),k=_e(D);{var T=h=>{var $=vr(),n=oe($,!0);M(()=>ae(n,ue())),r(h,$)};L(k,h=>{ue()&&h(T)})}var C=z(k,2);{var c=h=>{var $=he(),n=m($);le(n,()=>t(fe));var a=z(n,2);S(a,()=>je,(i,y)=>{y(i,{})}),r(h,$)};L(C,h=>{t(fe).length&&h(c)})}var J=z(C,2);le(J,()=>t(Se)),me(D),r(F,D)};let G=o(()=>Z()&&R()?"contents!":"");Vt(u,{align:"end",get portal(){return Ie()},get side(){return ke()},get class(){return t(G)},get open(){return t(ee)},set open(F){Be(ee,F,!0)},trigger:p,content:te,$$slots:{trigger:!0,content:!0}})}me(d),M(()=>$t(d,1,`${Z()&&R()?"contents":"inline-flex items-center"} ${xe()??""}`)),r(e,d)};L(ot,e=>{$e()?e(at):e(nt,-1)})}r(O,He);var st=It(rt);return Ke(),st}export{wr as O,sr as a,Je as r,ir as s};
|
|
1
|
+
import{t as _t,br as _,a_ as L,bz as mt,bt as gt,b as vt,bp as x,bv as be,bu as Te}from"./DXyyWeag.js";import{bs as ht,cd as yt,ca as wt,bk as xt,a7 as N,ay as m,W as r,bn as It,aA as g,aD as t,bS as z,a5 as _e,bH as Be,bA as me,b_ as M,aB as E,c9 as o,bf as kt,bl as oe,bO as ae,bV as Ct}from"./DYhIMPy1.js";import{v as $t,n as Pt,u as De,i as At}from"./CjaOLL1c.js";import{s as Me}from"./Cuqq8bL5.js";import{c as S}from"./CnVt0JNG.js";import{cF as Et,bj as Ot,aI as Ft,F as ne,aV as Tt,aJ as Bt,bk as Dt,a4 as Ve,as as Lt}from"./BTdkHPOB.js";import{W as Nt,T as zt,G as St,C as Rt,X as Ht,J as Wt,V as Mt}from"./DPv8Q1b3.js";import{f as ge}from"./Bfr1QjPr.js";import{h as Vt}from"./CXnaNNAz.js";import{k as jt,R as Gt,o as Jt,n as Kt,m as Ut,l as je}from"./CX_KiszT.js";import{k as ve}from"./DT4bpJWb.js";import{c as Xt}from"./ChTqQfQN.js";import"./DJkHth-B.js";import{Iy as Ge,mT as Yt,Fe as qt}from"./D5ej8a-y.js";import{w as Qt}from"./DyvrH0mm.js";import{i as X}from"./RD9QY1Yc.js";import{bu as Zt,b8 as er,b5 as tr}from"./B0KDOtDn.js";import{cn as rr}from"./D3QcPFoL.js";import{t as or}from"./H2jLkRRS.js";const ar={cursor:Rt,ghostty:St,terminal:zt,warp:Nt},nr={vscode:Mt,jetbrains:Wt,xcode:Ht};function sr(O){return ar[O.id]??nr[O.handlerType]??null}function Je(O){return O==="terminal"?Et:O==="finder"?Ot:Ft}const ir="shrink-0 text-muted-foreground hover:text-foreground focus-visible:text-foreground [&_svg]:size-4",Le="finder",lr={id:Le,name:"Finder",shortLabel:"Finder",appName:"Finder",category:"finder",handlerType:"finder",installed:!0,priority:0};function cr(O,s=[]){const se=new Set(s),Y=O.filter(({installed:q,id:ye})=>q&&!se.has(ye));return Y.some(({id:q})=>q===Le)||se.has(Le)?Y:[...Y,lr]}var dr=E('<img alt="" class="size-4"/>'),ur=E('<kbd class="type-caption ml-4 text-muted-foreground" aria-hidden="true"> </kbd>'),pr=E('<span class="min-w-0 flex-1 truncate"> </span> <!>',1),fr=E("<span> </span>"),he=E("<!> <!>",1),br=E("<span><!></span>"),_r=E('<img class="w-4 h-4"/>'),mr=E('<!> <span class="text-muted-foreground"> </span>',1),gr=E('<div class="inline-flex items-stretch rounded-md border border-border" data-open-combo-control=""><!> <!></div>'),vr=E('<div class="type-caption px-2 py-1.5 text-subtle"> </div>'),hr=E('<div class="w-60 max-w-full"><!> <!> <!></div>'),yr=E("<div><!></div>");function wr(O,s){if(new.target)return _t({component:wr,...O});ht(s,!0);const se=()=>be(Xe,"$installedEditors$",ie),Y=()=>be(Ye,"$hiddenEditorIds$",ie),q=()=>be(qe,"$isWorkspaceHostLocal$",ie),ye=()=>be(Ue,"$openAction",ie),[ie,Ke]=gt(),le=(e,d=kt)=>{var u=N(),p=m(u);S(p,()=>Gt,(te,G)=>{G(te,{get value(){return t(v).id},children:(F,D)=>{var k=N(),T=m(k);Pt(T,17,d,C=>C.id,(C,c)=>{var J=N(),h=m(J);{const $=a=>{var i=N(),y=m(i);{var H=l=>{var A=dr();M(()=>De(A,"src",`data:image/png;base64,${t(c).iconBase64??""}`)),r(l,A)},b=l=>{const A=o(()=>t(c).icon);var W=N(),B=m(W);S(B,()=>t(A),(K,re)=>{re(K,{size:16})}),r(l,W)},P=l=>{{let A=o(()=>t(c).faIcon??Je(t(c).category));ne(l,{get icon(){return t(A)},class:"size-4 text-muted-foreground"})}};L(y,l=>{t(c).iconBase64?l(H):t(c).icon?l(b,1):l(P,-1)})}r(a,i)};let n=o(()=>!I());S(h,()=>jt,(a,i)=>{i(a,{get value(){return t(c).id},closeOnSelect:!0,get disabled(){return t(n)},onSelect:()=>tt(t(c).id),get textValue(){return t(c).label},leading:$,children:(y,H)=>{var b=pr(),P=m(b),l=oe(P,!0),A=z(P,2);{var W=B=>{var K=ur(),re=oe(K,!0);M(()=>ae(re,t(c).shortcut)),r(B,K)};L(A,B=>{t(c).shortcut&&B(W)})}M(()=>ae(l,t(c).label)),r(y,b)},$$slots:{leading:!0,default:!0}})})}r(C,J)}),r(F,k)},$$slots:{default:!0}})}),r(e,u)},Ne=Xt("OpenComboButton");let I=_(s,"filePath",7),ce=_(s,"workspaceId",7,""),de=_(s,"isDirectory",7,!0),we=_(s,"workspaceFolderPath",7),xe=_(s,"class",7,""),ue=_(s,"headerText",7),Ie=_(s,"usePortal",7,!0),ke=_(s,"side",7,"bottom"),V=_(s,"variant",7,"default"),Q=_(s,"branchName",7),Ce=_(s,"compact",7,!1),$e=_(s,"embedded",7,!1),Z=_(s,"inline",7,!1),j=_(s,"iconOnly",7,!1),R=_(s,"children",7,void 0);const ze=o(()=>V()==="sidebar"?"bg-sidebar hover:bg-sidebar/80":"bg-background hover:bg-muted"),Pe=yt(ce());wt(()=>{Pe.set(ce())});const Ue=Zt(),Xe=er(Pe),Ye=tr(),qe=rr(Pe);let ee=Ct(!1);xt(()=>{Ge.dispatch(Yt())});function Qe(e){return{id:e.id,label:e.name,shortLabel:e.shortLabel,icon:sr(e),shortcut:e.shortcut,handlerType:e.handlerType,appName:e.appName,category:e.category,iconBase64:e.iconBase64}}const Ze=Qt("externalEditors");let f=o(()=>{const e=se(),d=cr(e,Y()).map(Qe),u={id:"other",label:x.ui_openCombo_other_label(),shortLabel:x.ui_openCombo_other_label(),icon:null,faIcon:Dt,handlerType:"generic"},p=[{id:"copy",label:x.ui_openCombo_copyPath_label(),shortLabel:x.ui_openCombo_copy_shortLabel(),icon:null,faIcon:Tt},...Q()?[{id:"copy-branch",label:x.ui_openCombo_copyBranch_label(),shortLabel:x.ui_openCombo_copyBranch_shortLabel(),icon:null,faIcon:Bt}]:[]];return!Ze||!q()?p:[...d,u,...p]});const pe=o(()=>t(f).some(e=>e.id!=="copy"&&e.id!=="copy-branch")),fe=o(()=>t(f).filter(e=>e.id!=="copy"&&e.id!=="copy-branch")),Se=o(()=>t(f).filter(e=>e.id==="copy"||e.id==="copy-branch")),v=o(()=>t(pe)?t(f).find(e=>e.id===ye())||t(f)[0]:t(f).find(e=>e.id==="copy")||t(f)[0]),Ae=o(()=>t(pe)?x.ui_openCombo_openIn_tooltip({name:t(v).label}):t(v).label);function Ee(){if(de())return I();const e=we()||I().substring(0,I().lastIndexOf("/"));return e?{folder:e,file:I()}:I()}async function Oe(e){if(!I())return;const d=de()?I():I().substring(0,I().lastIndexOf("/"));try{if(e==="copy"){await navigator.clipboard.writeText(or(I())),ve.success(x.ui_openCombo_pathCopied_label());return}if(e==="copy-branch"){Q()&&(await navigator.clipboard.writeText(Q()),ve.success(x.ui_openCombo_branchCopied_label()));return}if(e==="other"){const p=await X("external-editors:open-with-other",{path:d});p?.success?Be(ee,!1):p?.error&&p.error!=="No application selected"&&ve.error(p.error);return}const u=t(f).find(p=>p.id===e);if(!u){Ne.warn(`Unknown action: ${e}`);return}switch(u.handlerType){case"finder":await X("shell:showItemInFolder",{path:d});break;case"vscode":await X("vscode:open",Ee());break;case"jetbrains":await X("jetbrains:open",Ee());break;case"xcode":await X("xcode:open",Ee());break;case"generic":default:{await X("external-editors:open",{editorId:u.id,path:d});break}}}catch(u){Ne.error(`Failed to execute action ${e}:`,u),ve.error(u instanceof Error?u.message:x.ui_openCombo_openFailed_error({name:e}))}}function Fe(e){e.stopPropagation(),Oe(t(v).id)}function et(e){e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),e.stopPropagation(),Oe(t(v).id))}function Re(e){e.stopPropagation()}function tt(e){Ge.dispatch(qt(e)),Oe(e),Be(ee,!1)}var rt={get filePath(){return I()},set filePath(e){I(e),g()},get workspaceId(){return ce()},set workspaceId(e=""){ce(e),g()},get isDirectory(){return de()},set isDirectory(e=!0){de(e),g()},get workspaceFolderPath(){return we()},set workspaceFolderPath(e){we(e),g()},get class(){return xe()},set class(e=""){xe(e),g()},get headerText(){return ue()},set headerText(e){ue(e),g()},get usePortal(){return Ie()},set usePortal(e=!0){Ie(e),g()},get side(){return ke()},set side(e="bottom"){ke(e),g()},get variant(){return V()},set variant(e="default"){V(e),g()},get branchName(){return Q()},set branchName(e){Q(e),g()},get compact(){return Ce()},set compact(e=!1){Ce(e),g()},get embedded(){return $e()},set embedded(e=!1){$e(e),g()},get inline(){return Z()},set inline(e=!1){Z(e),g()},get iconOnly(){return j()},set iconOnly(e=!1){j(e),g()},get children(){return R()},set children(e=void 0){R(e),g()},$set:mt,$on:(e,d)=>vt(s,e,d)},He=N(),ot=m(He);{var at=e=>{var d=he(),u=m(d);{var p=G=>{var F=he(),D=m(F);S(D,()=>Ut,(T,C)=>{C(T,{children:(c,J)=>{var h=he(),$=m(h);S($,()=>Jt,(a,i)=>{i(a,{get icon(){return Ve},children:(y,H)=>{var b=fr(),P=oe(b,!0);M(l=>ae(P,l),[()=>x.ui_openCombo_openInApp_tooltip()]),r(y,b)},$$slots:{default:!0}})});var n=z($,2);S(n,()=>Kt,(a,i)=>{i(a,{class:"w-60",children:(y,H)=>{le(y,()=>t(fe))},$$slots:{default:!0}})}),r(c,h)},$$slots:{default:!0}})});var k=z(D,2);S(k,()=>je,(T,C)=>{C(T,{})}),r(G,F)};L(u,G=>{t(fe).length&&G(p)})}var te=z(u,2);le(te,()=>t(Se)),r(e,d)},nt=e=>{var d=yr(),u=_e(d);{const p=(F,D)=>{let k=()=>(D?.()).props;var T=N(),C=m(T);{var c=n=>{var a=br();At(a,()=>({role:"button",tabindex:"0",onclick:t(f).length>1?void 0:Fe,onkeydown:t(f).length>1?void 0:et,...t(f).length>1?k():{},class:"cursor-pointer break-words rounded-sm text-inherit underline decoration-muted-foreground/20 underline-offset-2 hover:decoration-current focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:t(Ae)}));var i=_e(a);Me(i,R),me(a),r(n,a)},J=n=>{{let a=o(()=>t(f).length>1?void 0:Fe),i=o(()=>j()&&V()!=="sidebar"?"plain":"ghost"),y=o(()=>j()?V()==="sidebar"?"icon-compact":"icon-sm":void 0),H=o(()=>j()&&V()==="sidebar"&&t(ee)),b=o(()=>!j()),P=o(()=>j()?V()==="sidebar"?ir:"cursor-pointer text-muted-foreground hover:text-foreground focus-visible:text-foreground":"cursor-pointer");ge(n,Te({type:"button",get onclick(){return t(a)}},()=>t(f).length>1?k():{},{get variant(){return t(i)},get size(){return t(y)},get active(){return t(H)},get wrapContent(){return t(b)},get class(){return t(P)},get title(){return t(Ae)},children:(l,A)=>{var W=N(),B=m(W);Me(B,R),r(l,W)},$$slots:{default:!0}}))}},h=n=>{{let a=o(()=>x.ui_openCombo_openInApp_tooltip());ge(n,Te(k,{variant:"ghost-light",size:"icon-xs",get tooltip(){return t(a)},tooltipSide:"bottom",children:(i,y)=>{ne(i,{get icon(){return Ve},size:"xs"})},$$slots:{default:!0}}))}},$=n=>{var a=gr(),i=_e(a);{let b=o(()=>t(f).length>1?"rounded-r-none":""),P=o(()=>t(ze)),l=o(()=>t(pe)?t(Ae):void 0);ge(i,{type:"button",variant:"ghost",size:"sm",get class(){return`gap-1.5 px-2 ${t(b)??""} ${t(P)??""}`},onpointerdown:Re,onkeydown:Re,onclick:Fe,get title(){return t(l)},children:(A,W)=>{var B=mr(),K=m(B);{var re=w=>{var U=_r();M(()=>{De(U,"src",`data:image/png;base64,${t(v).iconBase64??""}`),De(U,"alt",t(v).label)}),r(w,U)},it=w=>{const U=o(()=>t(v).icon);var We=N(),pt=m(We);S(pt,()=>t(U),(ft,bt)=>{bt(ft,{size:14})}),r(w,We)},lt=w=>{ne(w,{get icon(){return t(v).faIcon},class:"w-3.5 h-3.5 opacity-60"})},ct=w=>{{let U=o(()=>Je(t(v).category));ne(w,{get icon(){return t(U)},class:"w-3.5 h-3.5 opacity-60"})}};L(K,w=>{t(v).iconBase64?w(re):t(v).icon?w(it,1):t(v).faIcon?w(lt,2):w(ct,-1)})}var dt=z(K,2),ut=oe(dt,!0);M(w=>ae(ut,w),[()=>t(pe)?x.ui_openCombo_open_label():t(v).label]),r(A,B)},$$slots:{default:!0}})}var y=z(i,2);{var H=b=>{{let P=o(()=>x.ui_openCombo_openInApp_tooltip());ge(b,Te(k,{type:"button",variant:"ghost",size:"icon-sm",get"aria-label"(){return t(P)},get class(){return`rounded-l-none border-l border-border ${t(ze)??""}`},children:(l,A)=>{ne(l,{get icon(){return Lt},class:"size-3! text-muted-foreground"})},$$slots:{default:!0}}))}};L(y,b=>{t(f).length>1&&b(H)})}me(a),r(n,a)};L(C,n=>{Z()&&R()?n(c):R()?n(J,1):Ce()?n(h,2):n($,-1)})}r(F,T)},te=F=>{var D=hr(),k=_e(D);{var T=h=>{var $=vr(),n=oe($,!0);M(()=>ae(n,ue())),r(h,$)};L(k,h=>{ue()&&h(T)})}var C=z(k,2);{var c=h=>{var $=he(),n=m($);le(n,()=>t(fe));var a=z(n,2);S(a,()=>je,(i,y)=>{y(i,{})}),r(h,$)};L(C,h=>{t(fe).length&&h(c)})}var J=z(C,2);le(J,()=>t(Se)),me(D),r(F,D)};let G=o(()=>Z()&&R()?"contents!":"");Vt(u,{align:"end",get portal(){return Ie()},get side(){return ke()},get class(){return t(G)},get open(){return t(ee)},set open(F){Be(ee,F,!0)},trigger:p,content:te,$$slots:{trigger:!0,content:!0}})}me(d),M(()=>$t(d,1,`${Z()&&R()?"contents":"inline-flex items-center"} ${xe()??""}`)),r(e,d)};L(ot,e=>{$e()?e(at):e(nt,-1)})}r(O,He);var st=It(rt);return Ke(),st}export{wr as O,sr as a,Je as r,ir as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{gT as O,gz as U,IM as P,Jz as q,CC as z,tr as K,un as N,A5 as V,A6 as J,IK as Q,IL as j,A7 as M}from"./D5ej8a-y.js";import{Q as f,o as X,C as Y,e as Z,l as S,p as ee,u as te,v as ae}from"./DHQOuksI.js";import{g as ne}from"./
|
|
1
|
+
import{gT as O,gz as U,IM as P,Jz as q,CC as z,tr as K,un as N,A5 as V,A6 as J,IK as Q,IL as j,A7 as M}from"./D5ej8a-y.js";import{Q as f,o as X,C as Y,e as Z,l as S,p as ee,u as te,v as ae}from"./DHQOuksI.js";import{g as ne}from"./DN_Tzm7_.js";import{bp as l}from"./DXyyWeag.js";import{b5 as oe,a9 as y}from"./Bfr1QjPr.js";import{B as h,S as I}from"./DyvrH0mm.js";import{aq as ce,ao as E}from"./D6jCr2wa.js";import{g as le}from"./zICIWTib.js";function A(e,a){const n=f.select(e.state),o=S.select(e.state);if(!o)return null;const c=n.indexOf(o),s=c+(a==="left"?-1:1),p=n[s];return c<0||!p?null:(e.dispatch(K(o,p,a==="left"?"before":"after")),o)}function B(e){const a=S.select(e);return a&&f.select(e).includes(a)?a:null}function m(e,a,n){const o=B(e.state),c=o?`/workspace/${o}`:ne(e.state);return a!==c&&n(c),o}function se(e,a,n,o){return e.dispatch(O(a)),m(e,n,o),a}function W(e,a){const o=a.match(/^\/workspace\/([^/]+)/)?.[1];return o?o==="new"?null:o:null}function R(e,a,n,o){if(n==="/")return F(e,a==="next"?0:"last",n,o);e.dispatch(a==="next"?Q():j());const c=S.select(e.state);if(!c)return null;const s=`/workspace/${c}`;return n!==s&&o(s),c}function ie(e,a,n){const o=W(e,a);return o?se(e,o,a,n):null}function re(e,a,n){const o=W(e,a);if(!o)return null;const c=X.select(e.state,o);if(!c)return null;const s=c.tabs.find(v=>v.id===c.activeTabId),p=c.tabs.length===0&&c.activeTabId===null,g=Y.select(e.state,o)>1&&(p||c.tabs.length===1&&s!==void 0&&s.closable!==!1);if((!s||s.closable===!1)&&!g)return null;const T=n??le(o)?.availableCanvasWidth??void 0;return e.dispatch(U(o,void 0,T)),s?.id??c.id}function pe(e,a){const n=e.state.panelLayout.byWorkspaceId[a];return!n||n.restoreStatus==="pending"?!1:Z.select(e.state,a).length===0}function ue(e,a,n){B(e.state)||e.dispatch(P(0)),m(e,a,n)}function L(e,a,{navigate:n,closeWindow:o}){return o?(o(),"window"):(m(e,a,n),null)}function de(e,a,n){const o=W(e,a);return o?re(e,a,n.availableCanvasWidth)!==null?"panel":pe(e,o)?(e.dispatch(O(o)),f.select(e.state).length>0?(ue(e,a,n.navigate),"workspace"):L(e,a,n)??"workspace"):null:f.select(e.state).length>0?null:L(e,a,n)}function be(e,a,n){return e.dispatch(M()),m(e,a,n)}function fe(e,a,n){const o=a.match(/^\/workspace\/([^/]+)/),c=o&&o[1]!=="new"?o[1]:null,s=te.select(e.state),p=c?ae.select(e.state,c):null;return c&&p&&(!s||p.closedAt>=s.closedAt)?p.kind==="column"?(e.dispatch(V(c)),"column"):(e.dispatch(J(c)),p.kind):s?(be(e,a,n),"workspace"):null}function ke(e,a){const n=a.match(/^\/workspace\/([^/]+)/),o=n&&n[1]!=="new"?n[1]:null;if(!o)return null;const c=N(o);return e.dispatch(c),ee.select(e.state,o)}function F(e,a,n,o){const c=f.select(e.state),s=a==="last"?c.length-1:a;return s<0||s>=c.length?null:(e.dispatch(P(s)),m(e,n,o))}function Ie({isMac:e,register:a,store:n,getCurrentPath:o,navigate:c,openNewWorkspace:s,getRailMachineIds:p,onCreateAgent:g,onCreateNote:T,onCreateTerminal:v,onCreateBrowser:G,onWorkspaceTabMoved:C,closeWindow:$,resolveBinding:_}){const r=e?{meta:!0}:{ctrl:!0},D=oe("TOGGLE_SIDEBAR",e),k=t=>()=>t(o()),H=t=>()=>{const i=o().match(/^\/workspace\/([^/]+)/);i?.[1]&&i[1]!=="new"&&t(i[1])},u=t=>_?{binding:()=>_(t)}:{},w=t=>_?.(t)??I[t];a({...u("global.new-space"),...r,key:"n",global:!0,description:l.workspace_shortcuts_newSpace_description(),action:s}),a({...u("panel.toggle-sidebar"),...D,global:!0,description:y.TOGGLE_SIDEBAR.label,action:()=>n.dispatch(q())}),a({...u("navigation.new-tab"),...r,key:"t",global:!0,description:l.workspace_shortcuts_newPanel_description(),action:k(t=>ke(n,t))});for(const[t,i,b,d]of[["workspace.new-agent","a",l.ui_shortcuts_newAgent_label(),g],["workspace.new-note","n",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_note_label()}),T],["workspace.new-terminal","t",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_terminal_label()}),v],["workspace.new-browser","b",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_browser_label()}),G]])d&&a({...u(t),...r,key:i,alt:!0,global:!0,allowInTerminal:!0,description:b,action:H(d)});a({...u("navigation.close-tab"),...r,key:"w",global:!0,description:l.workspace_shortcuts_closePanelTab_description(),action:k(t=>de(n,t,{navigate:c,closeWindow:$}))}),a({...u("navigation.close-space-tab"),...r,key:"w",shift:!0,global:!0,description:l.workspace_shortcuts_closeSpaceTab_description(),action:k(t=>ie(n,t,c))}),a({...u("navigation.reopen-tab"),...r,key:"t",shift:!0,global:!0,description:l.workspace_shortcuts_reopenClosedTabOrSpace_description(),action:k(t=>fe(n,t,c))}),a({...u("navigation.move-space-tab-left"),...r,key:"ArrowLeft",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_LEFT.label,action:()=>{const t=A(n,"left");t&&C?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}}),a({...u("navigation.move-space-tab-right"),...r,key:"ArrowRight",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_RIGHT.label,action:()=>{const t=A(n,"right");t&&C?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}});for(const[t,i]of[["next",!1],["previous",!0]]){a({...u(t==="next"?"global.next-space":"global.previous-space"),key:"Tab",ctrl:!0,shift:i,global:!0,description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))});const b=t==="next"?"global.next-space-alt":"global.previous-space-alt";a({...u(b),...r,key:t==="next"?"}":"{",shift:!0,global:!0,allowInTerminal:!0,preferLocal:!0,enabled:d=>!_||!h(b,d,_,e),description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))})}const x=t=>{t===1?c("/"):F(n,t===9?"last":t-2,o(),c)};for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>w("navigation.go-to-device").replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>E.select(n.state)&&!h("navigation.go-to-device",i,w,e),description:l.machineRail_nav_ariaLabel(),action:()=>{const i=p?.()??ce.select(n.state).map(d=>d.id),b=i[t===9?i.length-1:t-1];b&&n.dispatch(z(b))}});for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>I["navigation.go-to-device"].replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>!E.select(n.state)&&w("navigation.go-to-tab")===I["navigation.go-to-tab"]&&!h("navigation.go-to-device",i,w,e),description:l.ui_shortcuts_goToTab_label(),action:()=>x(t)});for(let t=1;t<=9;t++)a({binding:()=>w("navigation.go-to-tab").replace(/([1-8])-9$/,String(t)),...r,alt:!0,key:String(t),global:!0,allowInTerminal:!0,enabled:i=>!h("navigation.go-to-tab",i,w,e),description:t===1?l.home_navigation_description():t===9?l.workspace_shortcuts_selectLastSpaceTab_description():l.workspace_shortcuts_selectSpaceTab_description({digit:t}),action:()=>x(t)})}export{de as c,Ie as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as qa,s as fa}from"./
|
|
1
|
+
import{k as qa,s as fa}from"./BHTZ1IpN.js";import{s as va,n as Ct,u as q,w as en,v as me,I as Wa,X as Ka,i as Ga,g as Nn}from"./CjaOLL1c.js";import{Z as Qa,cT as Ya,A as Va,aY as xn,bX as Xa,v as Ja}from"./XZbbHW_j.js";import{bp as c,t as Pt,br as w,a_ as M,bz as Tt,b as Rt,bt as qn,bv as Re,bu as Za}from"./DXyyWeag.js";import{bo as Wn,bs as Ot,a5 as O,bl as U,bS as b,bA as $,b_ as x,aD as e,W as l,ay as H,a7 as Oe,bO as L,bn as Lt,c9 as u,aA as k,aB as _,ca as Fe,bH as h,b$ as Kt,bV as le,cd as Mt,br as ma,be as un,c5 as er,bi as En,bj as tr,bf as hn,am as ta,ax as na,ai as nr,aj as ar,c0 as rr}from"./DYhIMPy1.js";import{s as _a}from"./Cuqq8bL5.js";import{e as sr}from"./B5m4HK_m.js";import{t as Wt,k as or,a as ir,I as ha}from"./BboIV5H5.js";import{r as lr,o as dr,A as aa,L as ur}from"./QGJb4cQl.js";import{S as bn,t as Dn}from"./4NMrKcis.js";import{R as ra}from"./DT4bpJWb.js";import{I as ba}from"./ChOlbK8y.js";import"./Co9PgWQA.js";import{aC as wn,cz as cr,al as pr,aA as gr,ct as fr,cu as vr,ah as mr,aj as _r,aq as hr,aw as br,l as wr,G as kr,dS as xr,M as yr,ck as $r,bS as Ar}from"./D3QcPFoL.js";import{Iy as J,cd as Fn,cb as wa,ce as kn,qT as Sr,C$ as Ir,fF as ka,D4 as Cr,bs as Pr,zg as Tr,mq as sa,tN as Rr,ch as Or,ul as oa,nk as Lr,CL as Nr,D2 as Er,b$ as Dr}from"./D5ej8a-y.js";import{K as Mr,A as zr,at as Fr,ao as Br,T as jr}from"./zrO2ZdKm.js";import{y as Hr}from"./DyvrH0mm.js";import{l as Ur}from"./BP-Q7b0i.js";import{f as ia}from"./DN_Tzm7_.js";import{h as qr,g as Wr}from"./BVwzqysu.js";import"./BKnW-cqy.js";import{ax as Kr,am as Gr,ap as Qr,f as Mn,a5 as Yr,bc as la}from"./Bfr1QjPr.js";import"./Dwmx7Nbz.js";import{c as Vr,o as Xr,n as Jr,m as Zr,E as es}from"./CX_KiszT.js";import{c as Bn,b as da,d as jn,a as Hn,A as xa,j as ts,l as ns,P as as}from"./CXnaNNAz.js";import{c as de}from"./CnVt0JNG.js";import{F as rs,j as ss,bx as os,i as is,bK as ls}from"./B0KDOtDn.js";import{D as ds,b as us}from"./2YGlULfT.js";import{T as cs}from"./BqxV3q0f.js";import"./C5oPUaEZ.js";import{cg as ya,cK as ps,cJ as gs,bN as fs,x as vs,F as yn,b1 as ms,aq as _s,aG as hs,aC as bs,cO as ws,ba as ks,aw as xs,aH as ys,aZ as $s,ad as ua,a4 as As,c1 as Ss,ac as Is,cA as Cs,aj as Ps,cN as Ts,az as Rs}from"./BTdkHPOB.js";import{b as Os}from"./BaIAhI85.js";import"./D6bHtnlF.js";import"./B0gQeWRk.js";import{f as Ls}from"./B8xn49s1.js";const Ns=80,Es=10,Ds=new Qa(Ya,{renderer:{html({text:a}){return Va(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Kn(a){const n=document.createElement("template");n.innerHTML=Ds.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function zt(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Un(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function Sn(a,n){return!n||n.length>Ns||n.split(/\s+/).length>Es||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function Ui(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const i=zt(o[1]);return Sn(o[0],i)?i:null}function Gn(a,n=!1,o=!0){const i=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",r=a.slice(i.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!r)return null;if(n){const m=r[1],f=m.match(/\\+$/)?.[0].length??0;if(m!==m.trim()||m.includes("**")||m.startsWith("*")||m.endsWith("*")||f%2!==0)return null}const p=zt(r[1]);return Sn(r[0],p)?{title:n&&o?Kn(r[1]):p,body:Un(a,i.length+r[0].length)}:null}function ca(a){const n=[];let o=a;for(;o.trim();){const i=Qn(o,!0),d=i.heading?{body:i.body}:Gn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function qi(a){const n=[];let o=a;for(;o.trim();){const i=Qn(o,!0,Kn),d=i.heading?{title:i.heading,body:i.body}:Gn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function Wi(a){const n=zs(a),o=[];let i=a;for(n.heading&&(o.push({title:n.heading,body:""}),i=n.body);i;){const d=Gn(i);if(!d||d.body.length>=i.length)break;o.push({title:d.title,body:""}),i=d.body}if(o.length===0){const d=a.trim(),r=zt(d);return!d.includes(`
|
|
2
2
|
`)&&Sn(d,r)?[{title:r,body:""}]:d?[{title:null,body:d}]:[]}return o[o.length-1].body=i.trim(),o}function Ms(a){const n=a.replace(/^ {0,3}/,"");return!/^(?:\s|>|`{3}|~{3}|(?:[-+*]|\d+[.)])(?:[ \t]|$)|#{1,6}(?:[ \t]|$)|<|\[[^\]]*\]:)/.test(n)&&!/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})$/.test(n)}function Qn(a,n=!1,o=zt){const i=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",d=a.slice(i.length);if(n&&/^(?: {4}| {0,3}\t)/.test(d))return{heading:null,body:a};const r=d.match(/^[ \t]{0,3}#{1,6}[ \t]+([^\r\n]*?)(?:[ \t]+#+)?[ \t]*(?:\r\n|\n|\r|$)/);if(r&&zt(r[1]))return{heading:o(r[1]),body:Un(a,i.length+r[0].length)};const p=d.match(/^([^\r\n]+)(?:\r\n|\n|\r)([ \t]{0,3})(?:=+|-+)[ \t]*(?:\r\n|\n|\r|$)/);return p&&(!n||Ms(p[1])&&!p[2].includes(" "))&&zt(p[1])?{heading:o(p[1]),body:Un(a,i.length+p[0].length)}:{heading:null,body:a}}function zs(a,{preserveInlineText:n=!1}={}){const o=n?Kn:zt,i=Qn(a,!1,o);if(i.heading)return i;const d=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",p=a.slice(d.length).match(/^([^\r\n]+)(?:\r\n|\n|\r)(?:[ \t]*(?:\r\n|\n|\r))+/);if(p){const m=zt(p[1]),f=a.slice(d.length+p[0].length);if(f.trim()&&Sn(p[1],m))return{heading:o(p[1]),body:f}}return{heading:null,body:a}}const Gt="[--operational-row-inline-padding:var(--chat-operational-row-inline-padding,0.5rem)] [--operational-leading-slot-size:1.25rem] [--operational-leading-half-slot-size:0.625rem] [--operational-leading-gap:var(--chat-operational-leading-gap,0.5rem)]",Ki="type-body font-family-child font-normal text-muted-foreground",Gi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,Qi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1.5`,Yi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1`,Vi=`${Gt} relative min-w-0 max-w-full`,Xi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,Ji=`${Gt} operational-group-child-row ml-2 min-w-0 w-[calc(100%-0.5rem)] max-w-[calc(100%-0.5rem)]`,Zi="pt-6",el="text-muted-foreground",tl="text-muted-foreground",$a="font-normal text-muted-foreground",nl="tool-call-container group relative block w-full min-w-0 max-w-full overflow-hidden type-body font-family-child font-normal text-muted-foreground",al="h-[16px]! w-[16px]! shrink-0",rl=`${Gt} relative grid h-7 w-full min-w-0 max-w-full grid-cols-[var(--operational-leading-slot-size)_minmax(0,1fr)_auto] items-center gap-[var(--operational-leading-gap)] overflow-hidden rounded-md px-[var(--operational-row-inline-padding)] type-body transition-colors duration-[var(--motion-fast)] motion-reduce:transition-none`,sl=`a11y-ignore pointer-events-none flex size-[var(--operational-leading-slot-size)] min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center [&_svg]:size-[16px]! ${$a}`,ol=`type-body block min-w-0 max-w-full truncate overflow-hidden text-ellipsis whitespace-nowrap border-0 bg-transparent p-0 text-left ${$a}`,il="type-body flex min-w-0 shrink-0 items-center gap-1 whitespace-nowrap",ll="h-[16px]! w-[16px]! shrink-0 opacity-60 transition-transform duration-[var(--motion-fast)] motion-reduce:transition-none";function dl(a){return qa(a,{axis:"y",duration:va()?0:150})}function cn(a){return a.type==="thinking"||a.type==="tool_use"||a.type==="content_group"}function ul(a){const n=a?.[0];return!n||cn(n)?"":"pt-4"}function cl(a,n,o=()=>!0){const i=a[n];if(!i||!o(i)||!cn(i))return!1;let d=n-1;for(;d>=0&&!o(a[d]);)d-=1;return d>=0&&cn(a[d])}function pl(a,n,o=()=>!0,i=!1){const d=a[n];if(!d||!o(d))return"";let r=n-1;for(;r>=0&&!o(a[r]);)r-=1;if(r<0)return"";const p=a[r];if(p.type==="thinking"&&d.type==="thinking")return i||ca(p.text??p.content??"")!==null&&ca(d.text??d.content??"")!==null?"":"pt-14";const m=cn(p),f=cn(d);return m&&f?"":p.type==="thinking"&&!f?"pt-6":m||f?"pt-4":"pt-1"}const gl="shrink-0 whitespace-nowrap text-ui text-subtle focus-visible:outline-none focus-visible:text-foreground";function Fs(a){if(a?.status==="halted")return c.agent_node_halted_label();if(a?.status==="resuming")return c.agent_node_resuming_label();if(a?.placement?.target==="remote"||Hr(a?.placement?.target)){if(a.placementError)return c.remoteAgent_status_failed();if(a.cloudStart)return c.remoteAgent_status_starting();if(a.effectiveIsolation==="pending")return a.setup?.state==="pending"?c.remoteAgent_status_preparingCheckout():a.setup?.state==="running"?c.remoteAgent_status_runningSetup():c.remoteAgent_status_starting()}if(a?.placement&&a.effectiveIsolation==="pending")return c.agent_node_provisioning_label()}var Bs=_('<span class="owner-fill block h-full svelte-sxf8s9"></span>'),js=_('<span class="shrink-0 text-xs text-muted-foreground"> </span>'),Hs=_('<span class="flex items-center gap-2"><span class="group-key size-1.5 shrink-0 rounded-full svelte-sxf8s9"></span> <span class="min-w-0 flex-1"> </span> <!> <span> </span></span>'),Us=_('<dd class="col-span-2 pl-[1.125rem] text-xs text-muted-foreground wrap-anywhere"> </dd>'),qs=_(`<div class="grid grid-cols-[1fr_auto] items-baseline gap-x-3 py-0.5 text-sm"><dt class="relative min-w-0 pl-[1.125rem] wrap-anywhere before:absolute before:top-2 before:left-0 before:size-1 before:rounded-full before:bg-muted-foreground before:content-['']"> </dt> <dd> </dd> <!></div>`),Ws=_('<dl class="ml-3.5 text-foreground"></dl>'),zn=_("<!> <!>",1),Ks=_('<span class="flex items-center gap-2"><span class="min-w-0 flex-1"> </span> <span class="shrink-0 tabular-nums text-muted-foreground"> </span></span>'),Gs=_('<div class="min-w-0"><dt class="truncate text-sm text-foreground"> </dt> <dd class="text-xs text-muted-foreground wrap-anywhere"> </dd></div>'),Qs=_('<dl class="ml-3.5 flex flex-col gap-2"></dl>'),Ys=_('<section class="min-w-0" data-testid="prompt-breakdown"><div class="mb-3 flex items-baseline justify-between gap-3"><h3 class="text-sm font-medium"> </h3> <span class="shrink-0 text-sm tabular-nums text-muted-foreground"> </span></div> <div class="owner-strip mb-2 flex h-1.5 w-full overflow-hidden svelte-sxf8s9" role="img"></div> <!></section>');function Aa(a,n){const o=Wn();if(new.target)return Pt({component:Aa,...a});Ot(n,!0);let i=w(n,"breakdown",7);const d="type-body font-normal text-foreground data-[state=open]:font-normal";function r(T){return or(T,{maximumFractionDigits:T<1e4?1:0})}function p(T){return T==="native"?c.agent_contextBreakdown_owner_native_label():T==="intent"?c.agent_contextBreakdown_owner_intent_label():c.agent_contextBreakdown_owner_user_label()}const m=u(()=>i().owners.map(T=>c.agent_contextBreakdown_ownerShare_label({owner:p(T.owner),tokens:r(T.estTokens)})).join(", "));var f={get breakdown(){return i()},set breakdown(T){i(T),k()},$set:Tt,$on:(T,v)=>Rt(n,T,v)},S=Ys(),y=O(S),g=O(y),E=U(g,!0),z=b(g,2),Ce=U(z,!0);$(y);var D=b(y,2);Ct(D,21,()=>i().owners,T=>T.owner,(T,v)=>{var ve=Bs();let ue;x(()=>{q(ve,"data-owner",e(v).owner),ue=en(ve,"",ue,{"flex-grow":e(v).share})}),l(T,ve)}),$(D);var P=b(D,2);return de(P,()=>xa,(T,v)=>{v(T,{type:"multiple",children:(ve,ue)=>{var R=zn(),_e=H(R);Ct(_e,17,()=>i().groups,pe=>pe.kind,(pe,Q)=>{var W=Oe(),ne=H(W);de(ne,()=>Bn,(ge,ze)=>{ze(ge,{get value(){return e(Q).kind},get"data-prompt-group"(){return e(Q).kind},children:(ot,G)=>{var I=zn(),ae=H(I);de(ae,()=>da,(he,N)=>{N(he,{level:4,children:(Le,X)=>{var K=Oe(),Z=H(K);de(Z,()=>jn,(Y,oe)=>{oe(Y,{inset:!1,class:d,children:(ee,Ne)=>{var be=Hs(),je=O(be),et=b(je,2),ut=U(et,!0),tt=b(et,2);{var at=ct=>{var Nt=js(),yt=U(Nt,!0);x(V=>L(yt,V),[()=>c.agent_contextBreakdown_notCounted_label()]),l(ct,Nt)};M(tt,ct=>{e(Q).kind==="native"&&ct(at)})}var Ee=b(tt,2),Qt=U(Ee,!0);$(be),x((ct,Nt)=>{q(je,"data-kind",e(Q).kind),L(ut,ct),me(Ee,1,`shrink-0 tabular-nums ${e(Q).kind==="native"?"text-muted-foreground":""}`),L(Qt,Nt)},[()=>p(e(Q).kind),()=>r(e(Q).estTokens)]),l(ee,be)},$$slots:{default:!0}})}),l(Le,K)},$$slots:{default:!0}})});var Be=b(ae,2);de(Be,()=>Hn,(he,N)=>{N(he,{inset:!1,children:(Le,X)=>{var K=Ws();Ct(K,21,()=>e(Q).rows,Z=>Z.key,(Z,Y)=>{var oe=qs(),ee=O(oe),Ne=U(ee,!0),be=b(ee,2),je=U(be,!0),et=b(be,2);{var ut=tt=>{var at=Us(),Ee=U(at,!0);x(()=>L(Ee,e(Y).hint)),l(tt,at)};M(et,tt=>{e(Y).hint&&tt(ut)})}$(oe),x(tt=>{L(Ne,e(Y).label),me(be,1,`tabular-nums ${e(Y).counted?"":"text-muted-foreground"}`),L(je,tt)},[()=>r(e(Y).estTokens)]),l(Z,oe)}),$(K),l(Le,K)},$$slots:{default:!0}})}),l(ot,I)},$$slots:{default:!0}})}),l(pe,W)});var ce=b(_e,2);{var xe=pe=>{var Q=Oe(),W=H(Q);de(W,()=>Bn,(ne,ge)=>{ge(ne,{value:"hidden-skills",class:"mt-1",children:(ze,ot)=>{var G=zn(),I=H(G);de(I,()=>da,(Be,he)=>{he(Be,{level:4,children:(N,Le)=>{var X=Oe(),K=H(X);de(K,()=>jn,(Z,Y)=>{Y(Z,{inset:!1,class:d,children:(oe,ee)=>{var Ne=Ks(),be=O(Ne),je=U(be,!0),et=b(be,2),ut=U(et,!0);$(Ne),x((tt,at)=>{L(je,tt),L(ut,at)},[()=>c.agent_contextBreakdown_hiddenSkills_title(),()=>Wt(i().hiddenSkills.length)]),l(oe,Ne)},$$slots:{default:!0}})}),l(N,X)},$$slots:{default:!0}})});var ae=b(I,2);de(ae,()=>Hn,(Be,he)=>{he(Be,{inset:!1,children:(N,Le)=>{var X=Qs();Ct(X,21,()=>i().hiddenSkills,K=>K.name,(K,Z)=>{var Y=Gs(),oe=O(Y),ee=U(oe,!0),Ne=b(oe,2),be=U(Ne,!0);$(Y),x(je=>{L(ee,e(Z).name),L(be,je)},[()=>[e(Z).detail,e(Z).fix].filter(Boolean).join(" · ")]),l(K,Y)}),$(X),l(N,X)},$$slots:{default:!0}})}),l(ze,G)},$$slots:{default:!0}})}),l(pe,Q)};M(ce,pe=>{i().hiddenSkills.length>0&&pe(xe)})}l(ve,R)},$$slots:{default:!0}})}),$(S),x((T,v)=>{q(S,"aria-labelledby",`${o}-title`),q(g,"id",`${o}-title`),L(E,T),L(Ce,v),q(D,"aria-label",e(m))},[()=>c.agent_contextBreakdown_title(),()=>c.agent_contextBreakdown_tokens_label({tokens:r(i().estTokens)})]),l(a,S),Lt(f)}const Vs=["intent","user"],Xs=["systemPrompt","toolDescription","provider"],Js=["native","user","intent"],$n=a=>typeof a=="object"&&a!==null&&!Array.isArray(a),An=a=>typeof a=="number"&&Number.isFinite(a)&&a>=0,Zs=a=>a==="intent"||a==="user";function eo(a,n){if(!$n(a))return null;const{id:o,label:i,owner:d,location:r,chars:p,estTokens:m,controlHint:f}=a;if(typeof o!="string"||typeof i!="string"||!Zs(d)||typeof r!="string"||!Xs.includes(r)||!An(p)||!An(m))return null;const S=$n(f)&&typeof f.text=="string"&&f.text;return{key:`${n}:${o}`,id:o,label:i,owner:d,chars:p,estTokens:m,counted:r!=="provider",...S?{hint:S}:{}}}function to(a){if(!$n(a))return null;const{name:n,reason:o,detail:i,fix:d}=a;return[n,o,i,d].some(r=>typeof r!="string")?null:{name:n,reason:o,detail:i,fix:d}}function no(a){if(!$n(a)||a.available!==!0)return null;const{totalChars:n,estTokens:o,sections:i,hiddenSkills:d}=a;if(!An(n)||!An(o)||!Array.isArray(i)||!Array.isArray(d))return null;const r=i.map(eo).filter(f=>f!==null).sort((f,S)=>S.chars-f.chars),p=Vs.map(f=>{const S=r.filter(g=>g.counted&&g.owner===f),y=S.reduce((g,E)=>g+E.chars,0);return{owner:f,chars:y,estTokens:S.reduce((g,E)=>g+E.estTokens,0),share:n>0?y/n:0}}).filter(f=>f.chars>0),m=Js.map(f=>{const S=r.filter(y=>f==="native"?!y.counted:y.counted&&y.owner===f);return{kind:f,chars:S.reduce((y,g)=>y+g.chars,0),estTokens:S.reduce((y,g)=>y+g.estTokens,0),rows:S}}).filter(f=>f.rows.length>0);return{totalChars:n,estTokens:o,rows:r,groups:m,owners:p,hiddenSkills:d.map(to).filter(f=>f!==null)}}async function ao(a){try{const n=await Kr("agent.getSession",{agentId:a});return no(n?.session?.promptBreakdown)}catch{return null}}const pa=rs.map(a=>({key:a.path.replace(/^agentFeatures\./,""),label:a.label,description:a.description}));function ro(a){const n=a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").toLowerCase().trim();return n.charAt(0).toUpperCase()+n.slice(1)}function so(a){const n=a??{},o=pa.map(r=>({key:r.key,label:r.label(),description:r.description(),enabled:n[r.key]===!0,known:!0})),i=new Set(pa.map(r=>r.key)),d=[];for(const[r,p]of Object.entries(n))i.has(r)||d.push({key:r,label:ro(r),description:null,enabled:p===!0,known:!1});return d.sort((r,p)=>r.label.localeCompare(p.label)),o.concat(d)}var oo=_('<div class="mb-6 border-b border-border pb-6"><!></div>'),io=_("<span> </span>"),lo=_('<!> <span class="sr-only"> </span>',1),uo=_('<div role="listitem" class="text-xs text-subtle" aria-hidden="true">—</div>'),co=_('<section class="min-w-0"><h4 class="text-sm font-medium mb-3"> </h4> <div role="list" class="space-y-2"></div></section>'),po=_('<div class="@container"><!> <section><h3 class="text-sm font-medium"> </h3> <p class="mb-4 mt-1 text-sm text-muted-foreground"> </p> <div class="grid grid-cols-1 gap-6 @min-[28rem]:grid-cols-2" data-testid="harness-features-list"></div></section></div>');function Sa(a,n){const o=Wn();if(new.target)return Pt({component:Sa,...a});Ot(n,!0);let i=w(n,"open",15,!1),d=w(n,"static",7,!1),r=w(n,"version",7),p=w(n,"features",7,null),m=w(n,"agentId",7),f=w(n,"breakdown",7),S=le(null);const y=u(()=>f()===void 0&&!!m());Fe(()=>{if(!i()||!e(y)||!m())return;const D=m();let P=!0;return ao(D).then(T=>{P&&h(S,{agentId:D,view:T},!0)}),()=>{P=!1}});const g=u(()=>f()!==void 0?f():e(y)&&e(S)&&e(S).agentId===m()?e(S).view:null),E=u(()=>so(p())),z=u(()=>[{enabled:!0,label:c.chat_shared_valueOn_label(),rows:e(E).filter(D=>D.enabled)},{enabled:!1,label:c.chat_shared_valueOff_label(),rows:e(E).filter(D=>!D.enabled)}]);var Ce={get open(){return i()},set open(D=!1){i(D),k()},get static(){return d()},set static(D=!1){d(D),k()},get version(){return r()},set version(D){r(D),k()},get features(){return p()},set features(D=null){p(D),k()},get agentId(){return m()},set agentId(D){m(D),k()},get breakdown(){return f()},set breakdown(D){f(D),k()},$set:Tt,$on:(D,P)=>Rt(n,D,P)};{let D=u(()=>c.chat_harnessFeaturesModal_title({version:r()}));Vr(a,{get static(){return d()},get title(){return e(D)},size:"wide",get open(){return i()},set open(P){i(P)},children:(P,T)=>{var v=po(),ve=O(v);{var ue=W=>{var ne=oo(),ge=O(ne);Aa(ge,{get breakdown(){return e(g)}}),$(ne),l(W,ne)};M(ve,W=>{e(g)&&W(ue)})}var R=b(ve,2),_e=O(R),ce=U(_e,!0),xe=b(_e,2),pe=U(xe,!0),Q=b(xe,2);Ct(Q,21,()=>e(z),W=>W.enabled,(W,ne)=>{var ge=co(),ze=O(ge),ot=U(ze,!0),G=b(ze,2);Ct(G,21,()=>e(ne).rows,I=>I.key,(I,ae)=>{ts(I,{role:"listitem",class:"min-h-0 px-0 py-0 [&_.truncate]:whitespace-normal","data-testid":"harness-feature-state",get"data-feature"(){return e(ae).key},get"data-enabled"(){return e(ae).enabled},title:he=>{var N=Oe(),Le=H(N);{var X=Z=>{var Y=lo(),oe=H(Y);Gr(oe,{get content(){return e(ae).description},side:"top",size:"sm",children:(be,je)=>{var et=io(),ut=U(et,!0);x(()=>L(ut,e(ae).label)),l(be,et)},$$slots:{default:!0}});var ee=b(oe,2),Ne=U(ee,!0);x(()=>L(Ne,e(ae).description)),l(Z,Y)},K=Z=>{var Y=Kt();x(()=>L(Y,e(ae).label)),l(Z,Y)};M(Le,Z=>{e(ae).description?Z(X):Z(K,-1)})}l(he,N)},$$slots:{title:!0}})},I=>{var ae=uo();l(I,ae)}),$(G),$(ge),x(()=>{q(ge,"aria-label",e(ne).label),L(ot,e(ne).label)}),l(W,ge)}),$(Q),$(R),$(v),x((W,ne)=>{q(R,"aria-labelledby",`${o}-capabilities`),q(_e,"id",`${o}-capabilities`),L(ce,W),L(pe,ne)},[()=>c.chat_harnessFeaturesModal_capabilities_title(),()=>c.chat_harnessFeaturesModal_description()]),l(P,v)},$$slots:{default:!0}})}return Lt(Ce)}var go=_('<p role="alert" class="type-body text-danger"> </p>');function Ia(a,n){if(new.target)return Pt({component:Ia,...a});Ot(n,!0);const o=()=>Re(g,"$outcome$",i),[i,d]=qn();let r=w(n,"open",15,!1),p=w(n,"agentName",7),m=w(n,"workspaceId",7),f=w(n,"agentId",7);const S=crypto.randomUUID(),y=Mt(""),g=xn(y,S),E=u(()=>o()?.workspaceId===m()&&o().agentId===f()?o():void 0),z=u(()=>e(E)?.status==="pending"),Ce=u(()=>e(E)?.status==="failed"?e(E).error:"");Fe(()=>{const v=m();return f(),y.set(v),()=>J.dispatch(Fn(v,S))}),Fe(()=>{e(E)?.status==="succeeded"&&(r(!1),J.dispatch(wa(m(),S,e(E).requestId)))});function D(){const v=xn.select(J.state,m(),S);v?.agentId===f()&&v.status==="pending"||J.dispatch(kn(m(),S,crypto.randomUUID(),f(),{kind:"retire"}))}var P={get open(){return r()},set open(v=!1){r(v),k()},get agentName(){return p()},set agentName(v){p(v),k()},get workspaceId(){return m()},set workspaceId(v){m(v),k()},get agentId(){return f()},set agentId(v){f(v),k()},$set:Tt,$on:(v,ve)=>Rt(n,v,ve)};{const v=ce=>{var xe=Oe(),pe=H(xe);{var Q=W=>{var ne=go(),ge=U(ne,!0);x(()=>L(ge,e(Ce))),l(W,ne)};M(pe,W=>{e(Ce)&&W(Q)})}l(ce,xe)};let ve=u(()=>c.modals_retireAgent_title()),ue=u(()=>c.modals_retireAgent_description({name:p()})),R=u(()=>c.modals_retireAgent_confirm_label()),_e=u(()=>c.modals_bulkActionConfirm_cancel_label());ds(a,{get title(){return e(ve)},get description(){return e(ue)},get confirmLabel(){return e(R)},get cancelLabel(){return e(_e)},focusSubmit:!1,focusCancel:!0,get busy(){return e(z)},onConfirm:D,get open(){return r()},set open(ce){r(ce)},details:v,$$slots:{details:!0}})}var T=Lt(P);return d(),T}function fo({agentName:a,specialist:n}){const o=n?`{ topLevel: true, specialist: ${JSON.stringify(n)} }`:"{ topLevel: true }",i=n?`and keep the same specialist (${JSON.stringify(n)})`:"and, if you were created with a specialist, pass that exact same `specialist` value in the options";return`Please replace yourself with a fresh top-level agent and run a gradual, coordinated hand-off:
|
|
3
3
|
|
|
4
4
|
1. Create your replacement now: call \`ws.agent.create(${JSON.stringify(a)}, kickoffMessage, ${o})\`. The first argument must be your EXACT current name (${JSON.stringify(a)}) ${i}. Write the kickoff message as a thorough context hand-off: the overall goal, the current state of the work, key notes and files, decisions already made, and open threads.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as ht,br as E,bz as $t,bt as It,b as bt,bv as d}from"./DXyyWeag.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as H,bV as N,aA as U}from"./DYhIMPy1.js";import{G as At}from"./DyvrH0mm.js";import{b as Dt}from"./BaIAhI85.js";import{Iy as a,eu as Pt,ev as St,nV as Et,zf as Ut,nZ as _t,n_ as Ft,J3 as Tt,Jk as vt,J8 as xt,v4 as Wt,ul as Lt}from"./D5ej8a-y.js";import{b7 as Ht}from"./
|
|
1
|
+
import{t as ht,br as E,bz as $t,bt as It,b as bt,bv as d}from"./DXyyWeag.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as H,bV as N,aA as U}from"./DYhIMPy1.js";import{G as At}from"./DyvrH0mm.js";import{b as Dt}from"./BaIAhI85.js";import{Iy as a,eu as Pt,ev as St,nV as Et,zf as Ut,nZ as _t,n_ as Ft,J3 as Tt,Jk as vt,J8 as xt,v4 as Wt,ul as Lt}from"./D5ej8a-y.js";import{b7 as Ht}from"./zrO2ZdKm.js";import{g as Nt}from"./DfN8_dcw.js";import{dr as Ot,bN as qt,bC as Bt,bG as Gt,bE as Mt}from"./D3QcPFoL.js";import{ae as Jt}from"./9THCFi9r.js";import{C as Kt}from"./CBOkoV02.js";import{V as Vt}from"./D11z_ckk.js";import{bR as jt,bL as zt,b6 as Zt}from"./XZbbHW_j.js";import{i as Qt}from"./H2jLkRRS.js";function Xt(_,f){if(new.target)return ht({component:Xt,..._});yt(f,!0);const O=()=>d(Y,"$gitRoots$",n),F=()=>d(X,"$workspace",n),q=()=>d(st,"$ftCommits$",n),B=()=>d(ot,"$ftOlderCommits$",n),y=()=>d(tt,"$commitRead$",n),G=()=>d(Z,"$foldUnchanged",n),M=()=>d(z,"$lineWrapping",n),J=()=>d(Q,"$diffSideBySide",n),K=()=>d(at,"$ftLoading$",n),[n,V]=It(),j=e=>{Vt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{H(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return G()},onToggleFold:()=>a.dispatch(xt()),get wrapEnabled(){return M()},onToggleWrap:()=>a.dispatch(vt()),get splitEnabled(){return J()},onToggleSplit:()=>a.dispatch(Tt())})},z=jt(),Z=zt(),Q=Zt();let h=E(f,"tab",7),i=E(f,"workspaceId",7),$=E(f,"isActive",7);const T=Nt(),g=Ht(()=>i()),X=Ot(g),Y=Jt(g),w=crypto.randomUUID(),tt=qt(g,w),c=s(()=>h().data?.commitHash||""),v=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(r)))return a.dispatch(Pt(e,"history")),()=>a.dispatch(St(e,"history"))});const r=s(()=>h().data?.gitRootId||""),x=s(()=>t(r)&&O().find(e=>e.id===t(r))?.path||""),et=s(()=>t(x)||F()?.worktreePath||F()?.repositoryPath||""),st=Bt(g),ot=Gt(g),at=Mt(g),nt=s(()=>q()||[]),it=s(()=>B()||[]),p=s(()=>t(r)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),D=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(r)?y():void 0),l=s(()=>t(D)?.result?.kind==="commitDetails"?t(D).result.details:null),rt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),dt=s(()=>t(D)?.loading??!1);k(()=>{const e=t(c),o=i(),I=t(r);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Et(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Ut(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(rt));let C=N(!0),R=N(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Qt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(v)}}));k(()=>{!T||!$()||T.registerActions({display:j})});const W=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(r))||!e))return a.dispatch(_t(e,W)),()=>a.dispatch(Ft(e,W))});var mt={get tab(){return h()},set tab(e){h(e),U()},get workspaceId(){return i()},set workspaceId(e){i(e),U()},get isActive(){return $()},set isActive(e){$(e),U()},$set:$t,$on:(e,o)=>bt(f,e,o)},L=Ct(),gt=Rt(L);At(gt,()=>JSON.stringify([i(),t(r),t(c)]),e=>{{let o=s(()=>K()||t(dt)),I=s(()=>t(r)||void 0),u=s(()=>t(x)||void 0),ut=s(()=>({hash:t(c),message:t(v),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));Dt(Kt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Lt(i(),{agentId:b,openInAdjacentPanel:P,sourcePanelId:S}))},onOpenNote:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Wt(i(),b,{openInAdjacentPanel:P,sourcePanelId:S}))}}),b=>H(R,b,!0),()=>t(R))}}),kt(_,L);var pt=wt(mt);return V(),pt}export{Xt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aZ as Ae,U as ke,Y as ae,b0 as Fe,V as Pe,a_ as ve,b as o,X as Vt,ay as bt,aW as Lt,B as Ce,r as Le,O as V,aV as Ee,a6 as De}from"./
|
|
1
|
+
import{aZ as Ae,U as ke,Y as ae,b0 as Fe,V as Pe,a_ as ve,b as o,X as Vt,ay as bt,aW as Lt,B as Ce,r as Le,O as V,aV as Ee,a6 as De}from"./BEBrrrrG.js";import{l as ie}from"./BfHEUs_v.js";var Et=(function(){var t=o(function(Y,r,l,x){for(l=l||{},x=Y.length;x--;l[Y[x]]=r);return l},"o"),n=[1,3],f=[1,4],d=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],_=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],k=[2,36],u=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],g=[1,41],A=[1,45],ht=[1,14],xt=[1,23],ft=[1,18],gt=[1,19],ct=[1,20],_t=[1,21],dt=[1,22],i=[1,24],zt=[1,25],It=[1,26],wt=[1,27],Bt=[1,28],Rt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],X=[1,63],H=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Xt=[1,71],Ht=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],At=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],kt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,x,c,S,e,ut){var s=e.length-1;switch(S){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],c.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),c.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),c.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),c.setAccDescription(this.$);break;case 46:c.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:c.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:c.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:c.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:c.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:c.setXAxisLeftText(e[s-2]),c.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",c.setXAxisLeftText(e[s-1]);break;case 53:c.setXAxisLeftText(e[s]);break;case 54:c.setYAxisBottomText(e[s-2]),c.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",c.setYAxisBottomText(e[s-1]);break;case 56:c.setYAxisBottomText(e[s]);break;case 57:c.setQuadrant1Text(e[s]);break;case 58:c.setQuadrant2Text(e[s]);break;case 59:c.setQuadrant3Text(e[s]);break;case 60:c.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:f,55:d,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:f,55:d,56:h,57:p},{18:n,26:9,27:2,28:f,55:d,56:h,57:p},t(y,[2,33],{29:10}),t(_,[2,61]),t(_,[2,62]),t(_,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:T,10:q,12:m,13:b,14:g,15:A,18:ht,25:xt,35:ft,37:gt,39:ct,41:_t,42:dt,48:i,50:zt,51:It,52:wt,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:d,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:u,5:T,10:q,12:m,13:b,14:g,15:A,18:ht,25:xt,35:ft,37:gt,39:ct,41:_t,42:dt,48:i,50:zt,51:It,52:wt,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Xt,10:Ht,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:u,5:T,10:q,12:m,13:b,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:u,5:T,10:q,12:m,13:b,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:u,5:T,8:X,10:q,12:m,13:b,14:g,15:A,18:H,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(a,[2,29],{10:At}),t(Zt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:At}),t(a,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(a,[2,50],{10:At}),t(Zt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var x=new Error(r);throw x.hash=l,x}},"parseError"),parse:o(function(r){var l=this,x=[0],c=[],S=[null],e=[],ut=this.table,s="",yt=0,Jt=0,me=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(j.yy[Ft]=this.yy[Ft]);D.setInput(r,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Pt=D.yylloc;e.push(Pt);var Se=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){x.length=x.length-2*R,S.length=S.length-R,e.length=e.length-R}o(_e,"popStack");function te(){var R;return R=c.pop()||D.lex()||$t,typeof R!="number"&&(R instanceof Array&&(c=R,R=c.pop()),R=l.symbols_[R]||R),R}o(te,"lex");for(var B,G,W,vt,rt={},Tt,M,ee,qt;;){if(G=x[x.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=te()),W=ut[G]&&ut[G][B]),typeof W>"u"||!W.length||!W[0]){var Ct="";qt=[];for(Tt in ut[G])this.terminals_[Tt]&&Tt>me&&qt.push("'"+this.terminals_[Tt]+"'");D.showPosition?Ct="Parse error on line "+(yt+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+qt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Ct="Parse error on line "+(yt+1)+": Unexpected "+(B==$t?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Pt,expected:qt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+B);switch(W[0]){case 1:x.push(B),S.push(D.yytext),e.push(D.yylloc),x.push(W[1]),B=null,Jt=D.yyleng,s=D.yytext,yt=D.yylineno,Pt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],rt.$=S[S.length-M],rt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Se&&(rt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),vt=this.performAction.apply(rt,[s,Jt,yt,j.yy,W[1],S,e].concat(be)),typeof vt<"u")return vt;M&&(x=x.slice(0,-1*M*2),S=S.slice(0,-1*M),e=e.slice(0,-1*M)),x.push(this.productions_[W[1]][0]),S.push(rt.$),e.push(rt._$),ee=ut[x[x.length-2]][x[x.length-1]],x.push(ee);break;case 3:return!0}}return!0},"parse")},qe=(function(){var Y={EOF:1,parseError:o(function(l,x){if(this.yy.parser)this.yy.parser.parseError(l,x);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,x=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===c.length?this.yylloc.first_column:0)+c[c.length-x.length].length-x[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|